Skip to content

Drop the private-registry workaround: flex-fields rc.16 is on npmjs - #64

Merged
duguankui merged 1 commit into
mainfrom
revert-private-registry-workaround
Sep 6, 2026
Merged

Drop the private-registry workaround: flex-fields rc.16 is on npmjs#64
duguankui merged 1 commit into
mainfrom
revert-private-registry-workaround

Conversation

@duguankui

Copy link
Copy Markdown
Member

Why

flex-fields 10.0.0-rc.16 had only ever been published by workflow_dispatch in abp-modules, whose release workflow mirrors to public npmjs only on a tag push. So it existed solely on GitHub Packages, under @dignite-projects/*, and consuming it here required a fair amount of machinery: npm: aliases, an extra scope mapping, credentials in both workflows, and a repointed duplicate check.

Pushing the missing v10.0.0-rc.16 tag published all four packages to npmjs and removed the reason for all of it.

The deciding argument wasn't effort, it was blast radius: a private-only dependency means every contributor needs a read:packages credential just to yarn install, and CI on a fork PR can't have one at all — GitHub doesn't pass secrets to fork-triggered runs.

What this reverts

  • The four npm: aliases in angular/package.json (both dependencies and resolutions) → plain semver ranges
  • angular/.npmrc's @dignite scope mapping, and any credential in it
  • Both workflows' job-level token env and authenticate steps — CI now needs no package credential at all
  • check-angular-package-duplicates.mjs's target, @dignite-projects@dignite
  • release.yml's packed-verify token argument, and its published-verify back to secrets.GITHUB_TOKEN

On that last one: 0.1.0-preview.11 shows GITHUB_TOKEN reads abp-modules' packages fine, thanks to the "Manage Actions access" grant those packages carry for this repo. My earlier claim that it couldn't was wrong, and is corrected in the comments.

What's kept

verify-packed-npm-install.sh's optional token/overrides path, dormant and documented as such. That gate runs after the NuGet packages are pushed live, so it failing leaves a release half-published — worth keeping the tool for the next time a dependency is consumed before it reaches npmjs.

Test plan

  • Zero credentials, empty HOME, empty yarn cache: yarn install --frozen-lockfile resolves all four packages from registry.yarnpkg.com at 10.0.0-rc.16 — the contributor-experience claim, verified rather than assumed
  • yarn.lock contains no alias keys and no npm.pkg.github.com URLs
  • Duplicate check — 24 packages, exactly one copy each
  • check-angular-package-deps.mjs on dist/site
  • yarn ng test site (29), yarn build:site, yarn build (Host)

Note on abp-modules

The v10.0.0-rc.16 release run itself ended red: all packages published fine, but its post-publish verify-npm-single-copy.mjs step failed — almost certainly npmjs propagation timing, since the same packages install cleanly now. That skipped the draft-GitHub-Release steps, so rc.16 has no draft release. Worth a re-run of that job over there.

flex-fields 10.0.0-rc.16 is now on public npmjs - abp-modules' release
workflow mirrors there only on a tag push, and rc.16 had only ever been
published by workflow_dispatch, so it existed solely on GitHub Packages under
@dignite-projects. Pushing the missing v10.0.0-rc.16 tag put all four
packages on npmjs and removed the reason for everything below.

Reverts, in this repo:
  - the four npm: aliases in angular/package.json (dependencies and
    resolutions), back to plain semver ranges
  - angular/.npmrc's @dignite scope mapping, and any credential in it
  - both workflows' job-level token env and authenticate steps - CI now needs
    no package credential at all
  - check-angular-package-duplicates.mjs's target, @dignite-projects back to
    @dignite
  - release.yml's packed-verify token argument, and its published-verify back
    to secrets.GITHUB_TOKEN, which 0.1.0-preview.11 shows reads abp-modules'
    packages fine given the "Manage Actions access" grant they carry

Kept: verify-packed-npm-install.sh's optional token/overrides path, dormant
and documented as such. It is the thing to reach for if a dependency is ever
consumed before it reaches npmjs again, and that gate runs after the NuGet
packages are already pushed live, so it failing is expensive.

The deciding argument was not effort but blast radius: a private-only
dependency means every contributor needs a read:packages credential just to
yarn install, and CI on a fork PR cannot have one at all, since GitHub does
not pass secrets to fork-triggered runs.

Verified with zero credentials in the environment, an empty HOME and an empty
yarn cache: yarn install --frozen-lockfile resolves all four packages from
registry.yarnpkg.com at 10.0.0-rc.16. Plus the duplicate check (24 packages,
one copy each), the packaged-deps check, yarn ng test site (29), build:site
and the Host build.
@duguankui
duguankui merged commit 9916925 into main Sep 6, 2026
1 check passed
@duguankui
duguankui deleted the revert-private-registry-workaround branch September 6, 2026 00:37
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