feat(ui-scripts): add publish-private command for private-registry releases#2555
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
| // No --provenance: only npmjs supports it. | ||
| // No --registry flag: the temp .npmrc handles registry + auth. | ||
| ], | ||
| childEnv |
There was a problem hiding this comment.
I would include a small delay between calling this. We ran into very inconvenient errors when calling this 80+ times without delay, the command started failing after a while (npmjs's DDOS protection?).
I suggest to add a small delay here too (we were using 500ms)
There was a problem hiding this comment.
good call, adding it
| PRIVATE_TAG, | ||
| '--no-git-checks' | ||
| // No --provenance: only npmjs supports it. | ||
| // No --registry flag: the temp .npmrc handles registry + auth. |
There was a problem hiding this comment.
I dont see this flag in the docs https://pnpm.io/cli/publish
There was a problem hiding this comment.
I'm talking about --registry
7369857 to
95c499c
Compare
95c499c to
43aa634
Compare
…leases Adds a new `ui-scripts publish-private` command that publishes all non-private packages to a private npm-compatible registry. Intended for distributing fixes to a small set of consumers before a public release. The command reads INSTUI_PRIVATE_REGISTRY and INSTUI_PRIVATE_REGISTRY_TOKEN from the environment, refuses any npmjs.org host as a hard guard, prompts the operator to confirm the registry hostname (skippable with --yes), and writes an isolated .npmrc to a temp dir via NPM_CONFIG_USERCONFIG so the user's global config is left untouched. Each package is published under the `security` dist-tag with `--no-git-checks` and no `--provenance`. The existing `publish` command, npm.js helpers, and release workflows are unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
43aa634 to
eabb624
Compare
HerrTopi
left a comment
There was a problem hiding this comment.
Seems good to me, giving thumbs up with cautious optimism, hope everything will work properly

Summary
Adds
pnpm run publish-privatefor publishing all non-private packages to an npm-compatible private registry. Used to ship pre-release builds of security fixes to selected consumers ahead of the public release.Reads
INSTUI_PRIVATE_REGISTRYandINSTUI_PRIVATE_REGISTRY_TOKENfrom the environment. The existing public release path (pnpm run release, OIDC, GitHub workflows) is untouched.Why a separate command
pnpm run releaseis invoked on master push and OIDC-publishes to npmjs. Overloading it would mean a mis-set env var could leak embargoed code to the public registry. A distinct command isolates the private path and its guard rails.Safety
*.npmjs.org.--yes)..npmrcfor the publish subprocesses only — user/project.npmrcuntouched, cleaned up infinally.securitysopnpm installwon't resolve a private build by accident.Usage
What this PR does NOT do
publish.js.Test Plan
pnpm run publish-private --helpshows the--yesflag.Draft until the version-bump PR lands and the end-to-end flow can be walked through.