Conversation
- Add npm auth to the release workflow - Mark published packages as public
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Auth token written to wrong npmrc file location
- The workflow now writes the npm auth token to
$NPM_CONFIG_USERCONFIG, matching the config path thatsetup-nodeexports for publish commands.
- The workflow now writes the npm auth token to
Or push these changes by commenting:
@cursor push fbad10b032
Preview (fbad10b032)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -42,7 +42,7 @@
- name: Authenticate to npm
run: |
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > "$NPM_CONFIG_USERCONFIG"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit fc2529a. Configure here.
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
There was a problem hiding this comment.
Auth token written to wrong npmrc file location
High Severity
The setup-node action's registry-url option sets NPM_CONFIG_USERCONFIG to $RUNNER_TEMP/.npmrc. This causes the ~/.npmrc file created by the "Authenticate to npm" step to be ignored. Since $RUNNER_TEMP/.npmrc expects an undefined NODE_AUTH_TOKEN, package publishing fails due to missing authentication.
Reviewed by Cursor Bugbot for commit fc2529a. Configure here.



Summary
publishConfig.access=publicto all publishable packages so scoped packages can be published publicly to npm.NPM_TOKENbefore running the Changesets publish step.core,create-markdown,mdx,preview, andreact.Testing
NPM_TOKENinto~/.npmrcbefore the publish step.package.jsonnow includespublishConfig.accessset topublic.Note
Low Risk
Low risk release-configuration changes: updates npm publish metadata and CI authentication without touching runtime code paths.
Overview
Prepares packages for public npm publishing by adding
publishConfig.access="public"across the publishable packages.Updates the GitHub
Releaseworkflow to explicitly authenticate to npm (writesNPM_TOKENinto~/.npmrc) before running the Changesets publish step.Reviewed by Cursor Bugbot for commit fc2529a. Bugbot is set up for automated code reviews on this repo. Configure here.