Skip to content

Commit bed83bd

Browse files
committed
Fix local release testing: publish with --tag for prerelease versions
Summary: `scripts/e2e/init-project-e2e.js` publishes in-repo packages to the local Verdaccio proxy with `npm publish`, but omits `--tag`. npm >= 11 refuses to publish a prerelease version (e.g. `0.87.0-rc.0`) without an explicit tag: npm error You must specify a tag using --tag when publishing a prerelease version. This breaks `yarn test-release-local` on any machine using npm >= 11 (bundled with Node 24+). Pass an explicit `--tag`. This is a throwaway local registry and the install step pins the exact version, so the dist-tag value is not significant. Changelog: [Internal] Test Plan: `yarn test-release-local -t RNTestProject -p iOS` gets past the publish step on npm 11 (previously failed immediately at `npm publish`).
1 parent 7996285 commit bed83bd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/e2e/init-project-e2e.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ async function initNewProjectFromSource(
122122
`${desc} ${styleText('dim', '.').repeat(Math.max(0, 72 - desc.length))} `,
123123
);
124124
execSync(
125-
`npm publish --registry ${VERDACCIO_SERVER_URL} --access public`,
125+
// `--tag` is required by npm >= 11 when publishing a prerelease
126+
// version. This is a throwaway local registry and the install step
127+
// pins the exact version, so the dist-tag value is not significant.
128+
`npm publish --registry ${VERDACCIO_SERVER_URL} --access public --tag react-native-e2e`,
126129
{
127130
cwd: packagePath,
128131
stdio: verbose ? 'inherit' : [process.stderr],

0 commit comments

Comments
 (0)