From cb2fa4fcfff1cc6e72def014d5f9e84b5adf65ba Mon Sep 17 00:00:00 2001 From: Jason Bedard Date: Wed, 24 Jul 2024 08:12:52 -0700 Subject: [PATCH] test: include package.json files in npm_translate_lock(data) (#1853) --- .../npm_translate_lock_LTE4Nzc1MDcwNjU= | 7 ++++--- .bazelignore | 1 + MODULE.bazel | 6 ++++++ WORKSPACE | 3 +++ npm/private/test/snapshots/bzlmod/npm_defs.bzl | 2 +- npm/private/test/snapshots/wksp/npm_defs.bzl | 2 +- pnpm-lock.yaml | 4 +++- pnpm-workspace.yaml | 5 ++--- 8 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= index e0febe6fd..998d52dca 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= @@ -1,5 +1,5 @@ # @generated -# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "@@//:pnpm-lock.yaml"). +# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "@//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. .npmrc=-2065072158 examples/js_binary/package.json=-41174383 @@ -22,10 +22,11 @@ js/private/test/image/package.json=-687546763 js/private/test/js_run_devserver/package.json=-260856079 js/private/worker/src/package.json=1608383745 npm/private/test/npm_package/package.json=-1991705133 +npm/private/test/npm_package_publish/package.json=-646566766 npm/private/test/package.json=600650131 npm/private/test/vendored/is-odd/package.json=1041695223 npm/private/test/vendored/lodash-4.17.21.tgz=-1206623349 npm/private/test/vendored/semver-max/package.json=578664053 package.json=-275319675 -pnpm-lock.yaml=76490674 -pnpm-workspace.yaml=-884103165 +pnpm-lock.yaml=1584807079 +pnpm-workspace.yaml=-762451270 diff --git a/.bazelignore b/.bazelignore index be3cdbea1..312414601 100644 --- a/.bazelignore +++ b/.bazelignore @@ -21,3 +21,4 @@ js/private/worker/src/node_modules node_modules/ npm/private/test/node_modules/ npm/private/test/npm_package/node_modules/ +npm/private/test/npm_package_publish/node_modules diff --git a/MODULE.bazel b/MODULE.bazel index 881b6b856..dad051f53 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -128,12 +128,17 @@ npm.npm_translate_lock( "//:package.json", "//:pnpm-workspace.yaml", "//examples/js_binary:package.json", + "//examples/linked_consumer:package.json", "//examples/linked_empty_node_modules:package.json", + "//examples/linked_lib:package.json", + "//examples/linked_pkg:package.json", "//examples/macro:package.json", "//examples/npm_deps:package.json", "//examples/npm_package/libs/lib_a:package.json", "//examples/npm_package/packages/pkg_a:package.json", "//examples/npm_package/packages/pkg_b:package.json", + "//examples/npm_package/packages/pkg_d:package.json", + "//examples/npm_package/packages/pkg_e:package.json", "//examples/webpack_cli:package.json", "//js/private/coverage/bundle:package.json", "//js/private/image:package.json", @@ -143,6 +148,7 @@ npm.npm_translate_lock( "//npm/private/test:package.json", "//npm/private/test:vendored/lodash-4.17.21.tgz", "//npm/private/test/npm_package:package.json", + "//npm/private/test/npm_package_publish:package.json", "//npm/private/test/vendored/is-odd:package.json", "//npm/private/test/vendored/semver-max:package.json", ], diff --git a/WORKSPACE b/WORKSPACE index a82860a93..080fee379 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -87,6 +87,8 @@ npm_translate_lock( "//examples/npm_package/libs/lib_a:package.json", "//examples/npm_package/packages/pkg_a:package.json", "//examples/npm_package/packages/pkg_b:package.json", + "//examples/npm_package/packages/pkg_d:package.json", + "//examples/npm_package/packages/pkg_e:package.json", "//examples/webpack_cli:package.json", "//js/private/coverage/bundle:package.json", "//js/private/image:package.json", @@ -96,6 +98,7 @@ npm_translate_lock( "//npm/private/test:package.json", "//npm/private/test:vendored/lodash-4.17.21.tgz", "//npm/private/test/npm_package:package.json", + "//npm/private/test/npm_package_publish:package.json", "//npm/private/test/vendored/is-odd:package.json", "//npm/private/test/vendored/semver-max:package.json", ], diff --git a/npm/private/test/snapshots/bzlmod/npm_defs.bzl b/npm/private/test/snapshots/bzlmod/npm_defs.bzl index dca3ec7c3..eaf7fd19d 100644 --- a/npm/private/test/snapshots/bzlmod/npm_defs.bzl +++ b/npm/private/test/snapshots/bzlmod/npm_defs.bzl @@ -991,7 +991,7 @@ load("@aspect_rules_js//npm/private:npm_link_package_store.bzl", _npm_link_packa # buildifier: disable=bzl-visibility load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = "npm_package_store") -_LINK_PACKAGES = ["", "examples/js_binary", "examples/linked_consumer", "examples/linked_empty_node_modules", "examples/linked_lib", "examples/linked_pkg", "examples/macro", "examples/npm_deps", "examples/npm_package/libs/lib_a", "examples/npm_package/packages/pkg_a", "examples/npm_package/packages/pkg_b", "examples/npm_package/packages/pkg_d", "examples/npm_package/packages/pkg_e", "examples/webpack_cli", "js/private/coverage/bundle", "js/private/image", "js/private/test/image", "js/private/test/js_run_devserver", "js/private/worker/src", "npm/private/test", "npm/private/test/npm_package"] +_LINK_PACKAGES = ["", "examples/js_binary", "examples/linked_consumer", "examples/linked_empty_node_modules", "examples/linked_lib", "examples/linked_pkg", "examples/macro", "examples/npm_deps", "examples/npm_package/libs/lib_a", "examples/npm_package/packages/pkg_a", "examples/npm_package/packages/pkg_b", "examples/npm_package/packages/pkg_d", "examples/npm_package/packages/pkg_e", "examples/webpack_cli", "js/private/coverage/bundle", "js/private/image", "js/private/test/image", "js/private/test/js_run_devserver", "js/private/worker/src", "npm/private/test", "npm/private/test/npm_package", "npm/private/test/npm_package_publish"] # buildifier: disable=function-docstring def npm_link_all_packages(name = "node_modules", imported_links = []): diff --git a/npm/private/test/snapshots/wksp/npm_defs.bzl b/npm/private/test/snapshots/wksp/npm_defs.bzl index 88eeefc22..c8d70b38e 100644 --- a/npm/private/test/snapshots/wksp/npm_defs.bzl +++ b/npm/private/test/snapshots/wksp/npm_defs.bzl @@ -991,7 +991,7 @@ load("@aspect_rules_js//npm/private:npm_link_package_store.bzl", _npm_link_packa # buildifier: disable=bzl-visibility load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = "npm_package_store") -_LINK_PACKAGES = ["", "examples/js_binary", "examples/linked_consumer", "examples/linked_empty_node_modules", "examples/linked_lib", "examples/linked_pkg", "examples/macro", "examples/npm_deps", "examples/npm_package/libs/lib_a", "examples/npm_package/packages/pkg_a", "examples/npm_package/packages/pkg_b", "examples/npm_package/packages/pkg_d", "examples/npm_package/packages/pkg_e", "examples/webpack_cli", "js/private/coverage/bundle", "js/private/image", "js/private/test/image", "js/private/test/js_run_devserver", "js/private/worker/src", "npm/private/test", "npm/private/test/npm_package"] +_LINK_PACKAGES = ["", "examples/js_binary", "examples/linked_consumer", "examples/linked_empty_node_modules", "examples/linked_lib", "examples/linked_pkg", "examples/macro", "examples/npm_deps", "examples/npm_package/libs/lib_a", "examples/npm_package/packages/pkg_a", "examples/npm_package/packages/pkg_b", "examples/npm_package/packages/pkg_d", "examples/npm_package/packages/pkg_e", "examples/webpack_cli", "js/private/coverage/bundle", "js/private/image", "js/private/test/image", "js/private/test/js_run_devserver", "js/private/worker/src", "npm/private/test", "npm/private/test/npm_package", "npm/private/test/npm_package_publish"] # buildifier: disable=function-docstring def npm_link_all_packages(name = "node_modules", imported_links = []): diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f0c65260..d2f921e59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,7 @@ overrides: semver-max: file:./npm/private/test/vendored/semver-max is-odd: file:./npm/private/test/vendored/is-odd -packageExtensionsChecksum: 4368ccb508aca4e83892ade0753603ce +packageExtensionsChecksum: e978e3e510efb71c3833e1915611f5d9 patchedDependencies: meaning-of-life@1.0.0: @@ -410,6 +410,8 @@ importers: specifier: npm:chalk@5.1.1 version: /chalk@5.1.1 + npm/private/test/npm_package_publish: {} + packages: /@ampproject/remapping@2.2.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4e411d3df..843e2c2f3 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,7 +5,6 @@ packages: - 'js/private/coverage/bundle' - 'js/private/worker/src' - 'js/private/image' - - 'js/private/test/image' - - 'js/private/test/js_run_devserver' + - 'js/private/test/*' - 'npm/private/test' - - 'npm/private/test/npm_package' + - 'npm/private/test/*'