Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pnpm): support npm: aliases to packages in alternate registries #1770

Merged
merged 1 commit into from
May 31, 2024

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented May 31, 2024

Fixes include:

  • pnpm v5-6 aliases to a package with the registry.npmjs.com/ prefix (broke in the last PR)
  • pnpm v9 aliases in transitive deps, pointing to packages not in any workspace package.json
  • making aliases clearer by changing the internal format to npm: (like specifiers) instead of / prefixes (/alias/version was v5, /alias@version was v6, alias@version is v9 and no longer has the distinguishing prefix so I switched to npm: in our internal structs).

Added tests for each of those cases across lockfile versions.


Changes are visible to end-users: no

Test plan

  • New test cases added

@jbedard jbedard requested a review from gregmagolan May 31, 2024 00:29
@jbedard jbedard force-pushed the npm-registried-alias branch from a778ff5 to fbba1a2 Compare May 31, 2024 00:30
Copy link

aspect-workflows bot commented May 31, 2024

Test

All tests were cache hits

193 tests (100.0%) were fully cached saving 53s.


Test

e2e/bzlmod

All tests were cache hits

4 tests (100.0%) were fully cached saving 467ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 439ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 9s.


Test

e2e/npm_link_package

All tests were cache hits

2 tests (100.0%) were fully cached saving 1s.


Test

e2e/npm_link_package-esm

All tests were cache hits

2 tests (100.0%) were fully cached saving 923ms.


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 271ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 117ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 248ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 520ms.


Test

e2e/pnpm_lockfiles

All tests were cache hits

25 tests (100.0%) were fully cached saving 9s.


Test

e2e/pnpm_workspace

All tests were cache hits

8 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

6 tests (100.0%) were fully cached saving 2s.


Test

e2e/repo_mapping

All tests were cache hits

2 tests (100.0%) were fully cached saving 451ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 605ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 187ms.


Buildifier      Format

@jbedard jbedard force-pushed the npm-registried-alias branch from fbba1a2 to 30ec9e1 Compare May 31, 2024 00:33
@jbedard jbedard force-pushed the npm-registried-alias branch 2 times, most recently from 9b00547 to 0fc4264 Compare May 31, 2024 03:16
@jbedard jbedard marked this pull request as ready for review May 31, 2024 03:16
@jbedard jbedard force-pushed the npm-registried-alias branch from 0fc4264 to f1d5e0d Compare May 31, 2024 03:27
@jbedard jbedard enabled auto-merge (squash) May 31, 2024 04:22
@jbedard jbedard merged commit d55c9de into aspect-build:main May 31, 2024
98 checks passed
@jbedard jbedard deleted the npm-registried-alias branch May 31, 2024 04:22
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