Skip to content

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Apr 25, 2025

Fix #2196

Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: yes/no
  • Breaking change (forces users to change their own code or config): yes/no
  • Suggested release notes appear below: yes/no

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:

Copy link

aspect-workflows bot commented Apr 25, 2025

Test

11 test targets passed

Targets
//:npm_link_targets_test [k8-fastbuild]                           105ms
//npm/private/test:write_npm_translate_lock_0_test [k8-fastbuild] 62ms
//npm/private/test:write_npm_translate_lock_1_test [k8-fastbuild] 101ms
//npm/private/test:write_npm_translate_lock_2_test [k8-fastbuild] 156ms
//npm/private/test:write_npm_translate_lock_3_test [k8-fastbuild] 128ms
//npm/private/test:write_npm_translate_lock_4_test [k8-fastbuild] 178ms
//npm/private/test:write_npm_translate_lock_5_test [k8-fastbuild] 109ms
//npm/private:_test_gendocs_0_0 [k8-fastbuild]                    69ms
//npm/private:_test_gendocs_0_1 [k8-fastbuild]                    33ms
//npm/private:_test_gendocs_1_0 [k8-fastbuild]                    38ms
//npm/private:_test_gendocs_1_1 [k8-fastbuild]                    32ms

Total test execution time was 1s. 211 tests (95.0%) were fully cached saving 27s.


Test

e2e/bzlmod

All tests were cache hits

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


Test

e2e/gyp_no_install_script

⚠️ Buildkite build #9366 failed.

Failed tests (1)
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //:write_npm_translate_lock_bzlmod_test

Test

e2e/js_image_oci

All tests were cache hits

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


Test

e2e/npm_link_package

All tests were cache hits

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


Test

e2e/npm_link_package-esm

All tests were cache hits

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


Test

e2e/npm_translate_lock

All tests were cache hits

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


Test

e2e/npm_translate_lock_empty

All tests were cache hits

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


Test

e2e/npm_translate_lock_multi

All tests were cache hits

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


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

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


Test

e2e/npm_translate_lock_replace_packages

⚠️ Buildkite build #9366 failed.

Failed tests (1)
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //:write_npm_translate_lock_bzlmod_test

Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

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


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 496ms.


Test

e2e/pnpm_lockfiles

⚠️ Buildkite build #9366 failed.

Failed tests (35)
//v101:repos_0_test [k8-fastbuild]🔗
//v101:repos_3_test [k8-fastbuild]🔗
//v101:repos_4_test [k8-fastbuild]🔗
//v101:repos_5_test [k8-fastbuild]🔗
//v101:repos_6_test [k8-fastbuild]🔗
//v101:repos_7_test [k8-fastbuild]🔗
//v101:repos_8_test [k8-fastbuild]🔗
//v54:repos_0_test [k8-fastbuild]🔗
//v54:repos_3_test [k8-fastbuild]🔗
//v54:repos_4_test [k8-fastbuild]🔗
//v54:repos_5_test [k8-fastbuild]🔗
//v54:repos_6_test [k8-fastbuild]🔗
//v54:repos_7_test [k8-fastbuild]🔗
//v54:repos_8_test [k8-fastbuild]🔗
//v60:repos_0_test [k8-fastbuild]🔗
//v60:repos_3_test [k8-fastbuild]🔗
//v60:repos_4_test [k8-fastbuild]🔗
//v60:repos_5_test [k8-fastbuild]🔗
//v60:repos_6_test [k8-fastbuild]🔗
//v60:repos_7_test [k8-fastbuild]🔗
//v60:repos_8_test [k8-fastbuild]🔗
//v61:repos_0_test [k8-fastbuild]🔗
//v61:repos_3_test [k8-fastbuild]🔗
//v61:repos_4_test [k8-fastbuild]🔗
//v61:repos_5_test [k8-fastbuild]🔗
//v61:repos_6_test [k8-fastbuild]🔗
//v61:repos_7_test [k8-fastbuild]🔗
//v61:repos_8_test [k8-fastbuild]🔗
//v90:repos_0_test [k8-fastbuild]🔗
//v90:repos_3_test [k8-fastbuild]🔗
//v90:repos_4_test [k8-fastbuild]🔗
//v90:repos_5_test [k8-fastbuild]🔗
//v90:repos_6_test [k8-fastbuild]🔗
//v90:repos_7_test [k8-fastbuild]🔗
//v90:repos_8_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //v90:repos_6_test //v101:repos_3_test //v61:repos_7_test //v54:repos_4_test //v101:repos_8_test //v60:repos_5_test //v60:repos_6_test //v90:repos_0_test //v101:repos_4_test //v90:repos_7_test //v101:repos_5_test //v60:repos_3_test //v90:repos_3_test //v90:repos_8_test //v101:repos_6_test //v61:repos_6_test //v54:repos_8_test //v60:repos_7_test //v101:repos_7_test //v61:repos_5_test //v54:repos_0_test //v60:repos_0_test //v61:repos_8_test //v54:repos_5_test //v90:repos_4_test //v61:repos_4_test //v60:repos_8_test //v90:repos_5_test //v54:repos_6_test //v60:repos_4_test //v61:repos_0_test //v61:repos_3_test //v101:repos_0_test //v54:repos_7_test //v54:repos_3_test

Test

e2e/pnpm_workspace

⚠️ Buildkite build #9366 failed.

Failed tests (1)
//:repos_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //:repos_test

Test

e2e/pnpm_workspace_rerooted

⚠️ Buildkite build #9366 failed.

Failed tests (1)
//:repos_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //:repos_test

Test

e2e/repo_mapping

All tests were cache hits

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


Test

e2e/rules_foo

All tests were cache hits

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


Test

e2e/runfiles

All tests were cache hits

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


Test

e2e/vendored_node

All tests were cache hits

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


Buildifier      Format

@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch from 8abf4c3 to cf54f5a Compare April 25, 2025 07:48
@jbedard jbedard requested a review from dzbarsky April 25, 2025 07:49
@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch 2 times, most recently from 5102c89 to 935d9c2 Compare April 28, 2025 17:46
""" {bin_name} = lambda name, **kwargs: _{bin_name}_internal(name, link_root_name = link_root_name, **kwargs),
{bin_name}_test = lambda name, **kwargs: _{bin_name}_test_internal(name, link_root_name = link_root_name, **kwargs),
{bin_name}_binary = lambda name, **kwargs: _{bin_name}_binary_internal(name, link_root_name = link_root_name, **kwargs),
""" {bin_name} = {bin_name},
Copy link
Collaborator

@dzbarsky dzbarsky Apr 28, 2025

Choose a reason for hiding this comment

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

maybe leave a TODO to cleanup eihter this or the macros above? Seems weird to have both APIs (my vote is to remove this struct)

```
//:.aspect_rules_js/node_modules/cliui/7.0.4
//:.aspect_rules_js/cliui/7.0.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is to align with pnpm naming right?

Copy link
Collaborator

@dzbarsky dzbarsky left a comment

Choose a reason for hiding this comment

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

i love this

npm_link_all_packages_bzl = [
"""\
# buildifier: disable=function-docstring
def npm_link_all_packages(name = "node_modules", imported_links = []):
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess one question would be... should we keep the name param for consistency across rules but throw if it is not the default? Does that help IDEs or anything like that? 🤷

@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch 2 times, most recently from 2be2231 to f0c9856 Compare May 1, 2025 15:57
@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch from f0c9856 to 5a66888 Compare June 25, 2025 04:10
@jbedard jbedard added the breaking Requires a semver-major release due to breaking public API changes label Aug 5, 2025
@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch from 5a66888 to cd8860a Compare August 22, 2025 18:02
@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch from cd8860a to f72a38a Compare September 23, 2025 22:47
@jbedard jbedard force-pushed the 2196-rm-the-node_modules branch from f72a38a to 7fe53cc Compare September 23, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Requires a semver-major release due to breaking public API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ability to customize virtual store name
2 participants