Allow preserving file paths when including assets from config key entry#7389
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
/snapit |
|
🫰✨ Thanks @melissaluu! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260424162325Caution After installing, validate the version by running |
37b6c5f to
f653639
Compare
5fa082f to
26c602f
Compare
|
/snapit |
|
🫰✨ Thanks @vividviolet! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260424215600Caution After installing, validate the version by running |
26c602f to
5deb0e5
Compare
f653639 to
d862233
Compare

WHY are these changes introduced?
When multiple
configKeyentries reference different source directories or files that produce the same output-relative path, the last writer silently wins. This makes it impossible to detect accidental file collisions when directory structures need to be preserved in the output.WHAT is this pull request doing?
Adds a
preserveFilePathsoption (defaultfalse) toconfigKeyinclusion entries. When enabled:usedFilesset is threaded through allconfigKeyentries so cross-entry collisions are detected, not just within-entry ones.usedBasenamesdeduplication logic is preserved for entries wherepreserveFilePathsisfalse.The collision check is extracted into a single
assertNoCollisionhelper used by both the directory and single-file copy branches.How to test your changes?
Unit tests should be sufficient
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add