Skip to content

Copy fixture projects with glob selection and Git metadata protection - #19

Merged
dblock merged 1 commit into
masterfrom
dblock/recursive-fixture-copying
Nov 11, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/recursive-fixture-copying

Conversation

@dblock

@dblock dblock commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Ports the complete behavior of dblock/ruby-gem-release#54 and adds optional glob selection.

await project.copyFiles(sourceRoot);                         // Whole project.
await project.copyFiles(sourceRoot, "**/*.{js,md}");           // Glob matches.
await project.copyFiles(sourceRoot, ["README.md", "bin/run"]); // Exact files.
await project.copyFiles(sourceRoot, []);                     // Nothing.

Glob strings support wildcards, recursive **, character classes, and brace alternatives with portable / separators. Hidden files are included; no matches copy nothing. Arrays remain literal file lists, including filenames containing glob characters. A stable minimatch dependency provides matching on all supported Node.js versions without using experimental runtime glob APIs.

Recursive/glob copying preserves nested paths, binary bytes and modes, and skips .git metadata at every level. Exact metadata selections and source/destination aliases into metadata are rejected before copying any file. Matching uses the existing non-following directory walk and canonical-root preflight, not a filesystem glob that traverses directory links. The real lifecycle example copies its files recursively and runs a focused fixture test command.

Validation: 92 source tests; npm run lint; actual packed-consumer installation with shared recursive/glob/exact-copy and metadata-protection checks, installed declarations, and the executable lifecycle example. The testing module has 100% line/function and 97.63% branch coverage.

AI-authored by GitHub Copilot on behalf of @dblock.

@dblock
dblock added this pull request to stack #17 November 11, 2026 18:56
Base automatically changed from dblock/markdown-replacement-overload to master November 11, 2026 18:57
@dblock
dblock force-pushed the dblock/recursive-fixture-copying branch from baa6f82 to 9d2d75a Compare November 11, 2026 18:57
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the dblock/recursive-fixture-copying branch from 9d2d75a to 509a2e2 Compare November 11, 2026 19:04
@dblock dblock changed the title Copy whole fixture projects with Git metadata protection Copy fixture projects with glob selection and Git metadata protection Nov 11, 2026
@dblock
dblock merged commit 22bba3a into master Nov 11, 2026
8 checks passed
@dblock
dblock deleted the dblock/recursive-fixture-copying branch November 11, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant