Skip to content

fix(cli): BE_NPM_CHECK asks for an npm alias's real package, not the alias - #31

Merged
igorlamos merged 1 commit into
mainfrom
fix/npm-check-aliases
Nov 3, 2026
Merged

igorlamos merged 1 commit into
mainfrom
fix/npm-check-aliases

Conversation

@beplus-agent-claude

Copy link
Copy Markdown
Contributor

What

BE_NPM_CHECK now asks the registry for an npm alias's real package, not for the alias's name.

Mountaineer's console has "@beplus/docs-legacy": "npm:@beplus/docs@0.4.2". pnpm fetches that as @beplus/docs, but the check took the key and asked for @beplus/docs-legacy. It got a 404 and failed the job. That is the red Check Locale Translations / checks on ironmountain-cz/monorepo#563, the first app-ci.yml caller with an aliased dependency. npm sign-in itself worked.

How

The jq that lists each package's @beplus dependencies now:

  • reads a dependency whose spec starts with npm: as the package after npm:, scoped or not, with or without a version;
  • skips an alias to a package outside @beplus, which is not this registry's to serve;
  • checks an alias with an unscoped key that points into @beplus;
  • still skips workspace: dependencies.

cli/README.md says so.

Checked

I extracted the step's script from cli/action.yml and ran it with a stand-in npm that answers like a real registry, but gives a 404 for @beplus/docs-legacy:

  • on Mountaineer's console package.json from dev, main fails with ::error::@beplus/docs-legacy: npm error 404, as in CI;
  • with this branch it checks 26 packages, @beplus/docs among them, and exits 0;
  • on an edge-case manifest it lists @beplus/actions (from plain-alias), @beplus/bare-real (no version), @beplus/docs, @beplus/uix and @beplus/i18n-tools, and skips the lodash alias and the workspace: one.

test-cli.yml's registry case (no token, so the anonymous stub) is unchanged.

Release

A patch, v2.16.2, and v2 moved to it. #563 then only needs its check re-run.

…alias

A dependency such as "@beplus/docs-legacy": "npm:@beplus/docs@0.4.2" is
fetched as @beplus/docs, but the check asked the registry for
@beplus/docs-legacy, got a 404 and failed the job (Mountaineer's console,
ironmountain-cz/monorepo#563). It now reads the package after `npm:`, and
skips an alias to a package outside @beplus.

Co-Authored-By: Igor Lamos <igor@be.plus>
@igorlamos igorlamos self-assigned this Nov 3, 2026
@igorlamos
igorlamos merged commit 515c421 into main Nov 3, 2026
7 checks passed
@igorlamos
igorlamos deleted the fix/npm-check-aliases branch November 3, 2026 16:56
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.

2 participants