Skip to content

fix: pnpm v9 url version specifiers without resolved semver #2209

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Apr 30, 2025

A similar test found an issue involving file: deps + peers, but I'd like to merge this first.

Changes are visible to end-users: no

Test plan

  • New test cases added

@jbedard jbedard requested review from dzbarsky and Aghassi April 30, 2025 23:20
Copy link

aspect-workflows bot commented Apr 30, 2025

Test

All tests were cache hits

225 tests (100.0%) were fully cached saving 33s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 502ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

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


Test

e2e/js_image_oci

All tests were cache hits

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


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 448ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 533ms.


Test

e2e/npm_translate_lock

All tests were cache hits

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


Test

e2e/npm_translate_lock_empty

All tests were cache hits

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


Test

e2e/npm_translate_lock_multi

All tests were cache hits

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


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

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


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 603ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

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


Test

e2e/npm_translate_package_lock

All tests were cache hits

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


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

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


Test

e2e/package_json_module

All tests were cache hits

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


Test

e2e/pnpm_lockfiles

4 test targets passed

Targets
//v54:repos_0_test [k8-fastbuild]34ms
//v60:repos_0_test [k8-fastbuild]40ms
//v61:repos_0_test [k8-fastbuild]42ms
//v90:repos_0_test [k8-fastbuild]33ms

Total test execution time was 149ms. 39 tests (90.7%) were fully cached saving 3s.


Test

e2e/pnpm_workspace

All tests were cache hits

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


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

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


Test

e2e/repo_mapping

All tests were cache hits

3 tests (100.0%) were fully cached saving 404ms.


Test

e2e/rules_foo

All tests were cache hits

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


Test

e2e/runfiles

All tests were cache hits

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


Test

e2e/vendored_node

All tests were cache hits

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


Buildifier      Format

version: link:../b
'@scoped/c':
specifier: file:../c
version: file:../projects/c(@scoped/b@projects+b)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice the file: and (..peers..) here. That causes a bug as soon as @scope/c is used with different peers (such as none).

This is fixed in #2177

version: https://gitpkg.vercel.app/EqualMa/gitpkg-hello/packages/hello
jsonify:
specifier: https://github.com/aspect-build/test-packages/releases/download/0.0.0/@foo-jsonify-0.0.0.tgz
version: '@foo/jsonify@https://github.com/aspect-build/test-packages/releases/download/0.0.0/@foo-jsonify-0.0.0.tgz'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice the :// here. This shows a difference in v9+ where the version being a URL prefixes the pkgname@ unlike <v9.

This is what required the new replace("://", "/") (which I didn't realize was in this cherry-pick 😅)

@jbedard jbedard changed the title test: peer dependencies with different version specifiers fix: pnpm v9 url version specifiers without resolved semver May 1, 2025
@jbedard jbedard enabled auto-merge (squash) May 1, 2025 01:19
@jbedard jbedard disabled auto-merge May 1, 2025 01:19
@jbedard jbedard merged commit b87e6af into aspect-build:main May 1, 2025
98 of 99 checks passed
@jbedard jbedard deleted the pnpm-peers-tests branch May 1, 2025 01:19
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