Repository navigation
fix: anchor root-level entries in package.json files - #1971
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1971 +/- ##
=======================================
Coverage 98.60% 98.60%
=======================================
Files 88 88
Lines 1786 1786
Branches 492 491 -1
=======================================
Hits 1761 1761
Misses 24 24
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Released in v14.1.1 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
package.jsonfileswith/:matchers.js,matchers.d.ts,pure.js,pure.d.tsanddont-cleanup-after-each.js.filesentry that contains a/against the package root. It matches an entry without a/by basename, at any depth. So in a checkout with therefs/submodules,yarn packaddsrefs/react-testing-library/{pure.js,pure.d.ts,dont-cleanup-after-each.js,src/pure.js,types/pure.d.ts}. A leftoverbuild/pure.d.tsgets in the same way: whenfilesis set, Yarn does not apply the root.gitignore.npm publish(used by release-it) was not affected, and published versions are clean. This change makesyarn packandyarn npm publishproduce the same file list as npm.dist/anddocs/stay as they are. Their trailing slash already anchors them to the root, so a nesteddocs/(such aswebsite/docs) does not get in.Test plan
yarn pack --dry-runwithbuild/pure.d.tsandbuild/nested/pure.jspresent lists both files. In the main checkout, it also lists the fiverefs/react-testing-library/files.yarn pack --dry-runlists nobuild/,refs/orwebsite/paths. It still lists the rootmatchers.js,matchers.d.ts,pure.js,pure.d.ts,dont-cleanup-after-each.js,package.json,README.md,LICENSEandCHANGELOG.md.build/dist/x.jsandbuild/docs/x.mdwere not packed before or after the fix.npm pack --dry-runlists the same root files before and after the fix.yarn validate. The change only touches thefileslist, which no build, test or lint step reads. Not checked with a builtdist/in the worktree.dist/is matched by an unchanged entry.🤖 Generated with Claude Code