Repository navigation
fix: publish source files referenced by source conditional exports - #10607
Tyagiquamar wants to merge 8 commits into
Conversation
|
Updated in 146aef7:
|
|
This is violating |
snowystinger
left a comment
There was a problem hiding this comment.
It looks like your new tests are failing?
| "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", | ||
| "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
| }, | ||
| "publishConfig": { |
There was a problem hiding this comment.
Can you minimize the diff by restoring the original key order?
|
|
||
| const files = await packlist({path: dir}); | ||
| const buf = await tarballBuffer(dir, files); | ||
| const stripSource = manifest.files?.includes('!exports/**') && manifest.exports?.['.']?.source; |
There was a problem hiding this comment.
Why were changes needed in this file? shouldn't the "prepareForPublish" handle it?
|
Thanks @snowystinger!
|
|
Thanks, looks like tests are still failing |
CircleCI job 704079 fails in the packing test's beforeAll: Yarn enables immutable installs in CI, so the temporary fixture cannot create its initial lockfile (YN0028). Added YARN_ENABLE_IMMUTABLE_INSTALLS=false only to that fixture installation's environment. Reproduced all seven failures before the change with CI=true in Docker. After the change, all seven npm/Yarn/Verdaccio packing cases passed with CI=true, Node 24.14.1, Yarn 4.18.0, and the lockfile's Jest 30.4.2/npm-packlist 1.4.8/tar 6.2.1. Oxfmt and JavaScript syntax checks passed. Used an isolated Node Jest configuration for this filesystem-only test; no component suite or Parcel build was run for this test-only change. |
|
And you'll need to sign the CLA https://github.com/adobe/react-spectrum/blob/main/CONTRIBUTING.md#contributor-license-agreement |
Signed |
|
done |
|
Closing and reopening to get CLA to take ahold |
|
Seems like the CLA was not signed for whatever reason. Could you try again? |
Done |
Closes #10397.
Intent
The published
react-aria,react-statelyandreact-aria-componentspackages exclude their source files but advertise source entries. Bundlers selecting the source condition can therefore resolve a file absent from the tarball.Strip source references during packing and restore each local manifest exactly afterward. npm and Yarn use prepack/postpack; the direct Verdaccio seeder applies the same preparation and restores in a finally block. The publishConfig objects retain the repository's access-only convention.
✅ Pull Request Checklist:
AI assistance was used to implement and validate these review changes against AGENTS.md and the contribution guidance.
📝 Test Instructions:
Passed in Docker with Node 24 and the repository's Yarn 4.18.0:
yarn constraints.yarn jest packages/react-aria-components/test/packing.test.js --runInBand(7 passed).The tests inspect npm and Yarn tarballs for all three packages and direct Verdaccio tarballs and registry metadata. They also verify exact restoration of local manifests. The full component build and test suite were not run locally.
🧢 Your Project:
Independent contributor.