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

[Bug]: Rules JS misses version-less patches that pnpm itself can apply #2031

Closed
Silic0nS0ldier opened this issue Dec 11, 2024 · 0 comments · Fixed by #2059
Closed

[Bug]: Rules JS misses version-less patches that pnpm itself can apply #2031

Silic0nS0ldier opened this issue Dec 11, 2024 · 0 comments · Fixed by #2059
Assignees
Labels
bug Something isn't working

Comments

@Silic0nS0ldier
Copy link

What happened?

Patches targeting a package name rather than a specific package version are not applied.

Targeting package names has been a feature since 9.7.0, although pnpm.io documentation does not yet reflect this.

The 9.0 pnpm-lock.yaml provides all the information to determine if a package needs a patch and which patch to use.

e.g. "@plasmohq/parcel-core": "patches/@plasmohq__parcel-core.patch",

# ...
patchedDependencies:
  # ...
  '@plasmohq/parcel-core':
    hash: j6aeftdiyyvjf4gx4savuikgli
    #     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    path: patches/@plasmohq__parcel-core.patch
  # ...
packages:
  # ...
  '@plasmohq/[email protected]':
    resolution: {integrity: sha512-kMWuazvf925ZAn2yHzzrb4Zsje1titFmvi/C5cXrI0TH58eT7n6GUiRXiOYP4JgGDHs/pEygx3WPuyWVTNF2HQ==}
    engines: {parcel: '>= 2.7.0'}
  # ...
snapshots:
  # ...
  '@plasmohq/[email protected](patch_hash=j6aeftdiyyvjf4gx4savuikgli)':
  #                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
    dependencies:
      '@parcel/cache': 2.9.3(@parcel/[email protected])
      '@parcel/core': 2.9.3
      '@parcel/diagnostic': 2.9.3
      '@parcel/events': 2.9.3
      '@parcel/fs': 2.9.3(@parcel/[email protected])
      '@parcel/graph': 2.9.3
      '@parcel/hash': 2.9.3
      '@parcel/logger': 2.9.3
      '@parcel/package-manager': 2.9.3(@parcel/[email protected])
      '@parcel/plugin': 2.9.3(@parcel/[email protected])
      '@parcel/source-map': 2.1.1
      '@parcel/types': 2.9.3(@parcel/[email protected])
      '@parcel/utils': 2.9.3
      '@parcel/watcher': 2.2.0
      '@parcel/workers': 2.9.3(@parcel/[email protected])
      abortcontroller-polyfill: 1.7.5
      nullthrows: 1.1.1
  # ...

Version

Development (host) and target OS/architectures:

Output of bazel --version: bazel 7.4.1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: bazel_dep(name = "aspect_rules_js", version = "2.0.1")

Language(s) and/or frameworks involved:

How to reproduce

Patch any dependency with `pnpm patch` workflow and remove the version specifier in `patchedDependencies`. Observe patches not applied in Rules JS's `node_modules`.

Any other information?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants