Skip to content

fix(scripts): disable npm provenance for private repo - #140

Closed
wyattjoh wants to merge 3 commits into
mainfrom
chore/remove-npm-token-auth
Closed

fix(scripts): disable npm provenance for private repo#140
wyattjoh wants to merge 3 commits into
mainfrom
chore/remove-npm-token-auth

Conversation

@wyattjoh

@wyattjoh wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove --provenance from npm publish in scripts/releaser/index.ts

Why

npm publish --provenance requires the source repository to be public. clerk/cli is currently private, so sigstore rejects publishes with E422 Unprocessable Entity. The flag is removed with a comment pointing to when it should be re-enabled: once the repo is public and OIDC trusted publishing replaces NODE_AUTH_TOKEN (see the follow-up PR in this stack).

wyattjoh added 3 commits April 9, 2026 15:08
npm publish --provenance requires the source repository to be public.
clerk/cli is currently private, so sigstore rejects publishes with E422.
Remove the flag for now. It will be re-enabled once the repo is public
and OIDC trusted publishing replaces NODE_AUTH_TOKEN.
- Move targets to scripts/lib/targets.ts (shared by build, sign-macos,
  and releaser)
- Move run() and publish() helpers into scripts/lib/npm.ts alongside
  the existing isPublished()
- Flatten scripts/releaser/index.ts to scripts/releaser.ts now that
  the directory only held one file
- Update import paths in build.ts, sign-macos.ts, and package.json
@wyattjoh

wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

Stack: npm-publishing-fixes

Part of a stacked PR chain. Do not merge manually.

@wyattjoh

wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

Opened from wrong branch. Recreating from fix/disable-npm-provenance.

@wyattjoh wyattjoh closed this Apr 9, 2026
@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a32d90f-667f-4772-ba77-c4f722765c08

📥 Commits

Reviewing files that changed from the base of the PR and between f9be436 and c6df875.

📒 Files selected for processing (8)
  • .github/workflows/release.yml
  • .github/workflows/snapshot.yml
  • package.json
  • scripts/build.ts
  • scripts/lib/npm.ts
  • scripts/lib/targets.ts
  • scripts/releaser.ts
  • scripts/sign-macos.ts

📝 Walkthrough

Walkthrough

This change refactors the release infrastructure by consolidating npm publishing logic into reusable helper functions in scripts/lib/npm.ts, restructuring the releaser from a directory-based module to a single entry point file, and relocating target configuration to scripts/lib/targets.ts. Build and signing scripts were updated to import targets from the new shared library location. Workflow files were modified to remove the NODE_AUTH_TOKEN environment variable from npm publish steps. Package.json scripts were updated to point to the new releaser entry point.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant