rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

(Feat): Parse local package.json and auto add bins

Open pat-trunk-io opened this issue 1 year ago • 3 comments

Type of change

  • New feature or functionality (change which adds functionality)

Bins for external packages need to be explicitly added in the translate_lock rule, however, for package.json local to your workspace, those files can be read and the bins entry be auto added

For changes visible to end-users

  • Suggested release notes are provided below: package.json that are in the importer dictionary of the pnpm-lock file gets their bins auto added to linked package store

Test plan

  • New test cases added WIP

pat-trunk-io avatar Apr 18 '24 16:04 pat-trunk-io

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 18 '24 16:04 CLAassistant

Hi all,

I have a few local to my workspace package.json that expose bins, and it's really convenient to have them auto-added.

Currently working on adding an e2e test for this.

pat-trunk-io avatar Apr 18 '24 16:04 pat-trunk-io

Test

Buildkite build #3197 is running...


Test

e2e/bzlmod

Buildkite build #3197 is running...


Test

e2e/gyp_no_install_script

Buildkite build #3197 is running...


Test

e2e/js_image_oci

Buildkite build #3197 is running...


Test

e2e/npm_link_package

Buildkite build #3197 is running...


Test

e2e/npm_link_package-esm

Buildkite build #3197 is running...


Test

e2e/npm_translate_lock

Buildkite build #3197 is running...


Test

e2e/npm_translate_lock_empty

Buildkite build #3197 is running...


Test

e2e/npm_translate_lock_multi

Buildkite build #3197 is running...


Test

e2e/npm_translate_lock_partial_clone

Buildkite build #3197 is running...


Test

e2e/npm_translate_lock_subdir_patch

Buildkite build #3197 is running...


Test

e2e/npm_translate_package_lock

Buildkite build #3197 is running...


Test

e2e/npm_translate_yarn_lock

Buildkite build #3197 is running...


Test

e2e/package_json_module

Buildkite build #3197 is running...


Test

e2e/pnpm_workspace

Buildkite build #3197 is running...


Test

e2e/pnpm_workspace_rerooted

Buildkite build #3197 is running...


Test

e2e/rules_foo

Buildkite build #3197 is running...


Test

e2e/vendored_node

Buildkite build #3197 is running...


Buildifier      Format

aspect-workflows[bot] avatar Apr 18 '24 16:04 aspect-workflows[bot]