fix(npm): replace npm_translate_lock(replace_packages) with replace_package module extension
A replacement of the npm_translate_lock(replace_packages) API for bzlmod to ensure labels are passed from the user module instead of strings.
Changes are visible to end-users: no
Test plan
- Covered by existing test cases
- New test cases added
Test
2 test targets passed
Targets
//npm/private:_test_gendocs_0_0 [k8-fastbuild] 39ms //npm/private:_test_gendocs_0_1 [k8-fastbuild] 29ms
Total test execution time was 68ms. 223 tests (99.1%) 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
:warning: Buildkite build #8514 failed.
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
All tests were cache hits
43 tests (100.0%) 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
Replaced with https://github.com/aspect-build/rules_js/pull/2289