diff --git a/BUILD.bazel b/BUILD.bazel index 5726b01bb..e85faadcb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -11,7 +11,6 @@ load("//npm:defs.bzl", "npm_link_package") # manual /WORKSPACE npm_import rules to bazel-bin/node_modules as well as the package store # bazel-bin/node_modules/.aspect_rules_js since /pnpm-lock.yaml is the root of the pnpm workspace npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_acorn, npm_link_pnpm, @@ -27,7 +26,6 @@ build_test( # buildifier: disable=duplicated-name NODE_MODULES = npm_link_targets( - name = "node_modules", package = package_name(), ) + [ "//:node_modules/acorn", diff --git a/docs/npm_import.md b/docs/npm_import.md index 32839d662..fd69269d2 100644 --- a/docs/npm_import.md +++ b/docs/npm_import.md @@ -79,7 +79,7 @@ package's `BUILD.bazel` file: ``` load("@npm__at_types_node__15.12.2__links//:defs.bzl", npm_link_types_node = "npm_link_imported_package") -npm_link_types_node(name = "node_modules") +npm_link_types_node() ``` This links `@types/node` into the `node_modules` of this package with the target name `:node_modules/@types/node`. @@ -95,7 +95,7 @@ When using `npm_translate_lock`, you can link all the npm dependencies in the lo ``` load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() ``` This creates `:node_modules/name` and `:node_modules/@scope/name` targets for all direct npm dependencies in the package. @@ -111,7 +111,6 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm__at_types_node__15.12.2__links//:defs.bzl", npm_link_types_node = "npm_link_imported_package") npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_types_node, ] diff --git a/docs/npm_link_all_packages.md b/docs/npm_link_all_packages.md index 9d32d60e9..809cbfc28 100644 --- a/docs/npm_link_all_packages.md +++ b/docs/npm_link_all_packages.md @@ -16,7 +16,7 @@ load("@npm//:defs.bzl", "npm_link_targets", "npm_link_all_packages") ## npm_link_all_packages
-npm_link_all_packages(name, imported_links)
+npm_link_all_packages(imported_links)
 
Generated list of npm_link_package() target generators and first-party linked packages corresponding to the packages in {pnpm_lock_label} @@ -27,7 +27,6 @@ If you use manually-written [`npm_import`](/docs/npm_import.md#npm_import) you c load("@npm_meaning-of-life__links//:defs.bzl", npm_link_meaning_of_life = "npm_link_imported_package") npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_meaning_of_life, ], @@ -39,7 +38,6 @@ If you use manually-written [`npm_import`](/docs/npm_import.md#npm_import) you c | Name | Description | Default Value | | :------------- | :------------- | :------------- | -| name | name of catch all target to generate for all packages linked | `"node_modules"` | | imported_links | optional list link functions from manually imported packages that were fetched with npm_import rules. | `[]` | @@ -48,7 +46,7 @@ If you use manually-written [`npm_import`](/docs/npm_import.md#npm_import) you c ## npm_link_targets
-npm_link_targets(name, package)
+npm_link_targets(package)
 
Generated list of target names that are linked by npm_link_all_packages() @@ -58,7 +56,6 @@ Generated list of target names that are linked by npm_link_all_packages() | Name | Description | Default Value | | :------------- | :------------- | :------------- | -| name | name of catch all target to generate for all packages linked | `"node_modules"` | | package | Bazel package to generate targets names for.

Set to an empty string "" to specify the root package.

If unspecified, the current package (`native.package_name()`) is used. | `None` | **RETURNS** diff --git a/e2e/bzlmod/BUILD.bazel b/e2e/bzlmod/BUILD.bazel index 246e36826..fa69f1734 100644 --- a/e2e/bzlmod/BUILD.bazel +++ b/e2e/bzlmod/BUILD.bazel @@ -12,7 +12,6 @@ not_windows = select({ }) npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_meaning_of_life, ], diff --git a/e2e/bzlmod/other_module/BUILD.bazel b/e2e/bzlmod/other_module/BUILD.bazel index 962d95939..8f18a3c84 100644 --- a/e2e/bzlmod/other_module/BUILD.bazel +++ b/e2e/bzlmod/other_module/BUILD.bazel @@ -1,7 +1,7 @@ load("@npm_other_module//:defs.bzl", "npm_link_all_packages") load("@npm_other_module//:pyright/package_json.bzl", pyright = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() pyright.pyright_binary( name = "pyright", diff --git a/e2e/gyp_no_install_script/BUILD.bazel b/e2e/gyp_no_install_script/BUILD.bazel index adaa033f0..921dc0ffc 100644 --- a/e2e/gyp_no_install_script/BUILD.bazel +++ b/e2e/gyp_no_install_script/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@aspect_rules_js//js:defs.bzl", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_test( name = "test", diff --git a/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl b/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl index ad0d61c6f..5876e5ef9 100644 --- a/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl +++ b/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl @@ -16,220 +16,219 @@ _PACKAGE_STORE_NAME = "segfault-handler@1.3.0" # Generated npm_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/@gar+promisify@1.1.3/pkg": "@gar/promisify", - ":.aspect_rules_js/{link_root_name}/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", - ":.aspect_rules_js/{link_root_name}/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", - ":.aspect_rules_js/{link_root_name}/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", - ":.aspect_rules_js/{link_root_name}/abbrev@1.1.1/pkg": "abbrev", - ":.aspect_rules_js/{link_root_name}/agent-base@6.0.2/pkg": "agent-base", - ":.aspect_rules_js/{link_root_name}/agentkeepalive@4.2.1/pkg": "agentkeepalive", - ":.aspect_rules_js/{link_root_name}/aggregate-error@3.1.0/pkg": "aggregate-error", - ":.aspect_rules_js/{link_root_name}/ansi-regex@5.0.1/pkg": "ansi-regex", - ":.aspect_rules_js/{link_root_name}/aproba@2.0.0/pkg": "aproba", - ":.aspect_rules_js/{link_root_name}/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", - ":.aspect_rules_js/{link_root_name}/balanced-match@1.0.2/pkg": "balanced-match", - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/pkg": "bindings", - ":.aspect_rules_js/{link_root_name}/brace-expansion@1.1.11/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/brace-expansion@2.0.1/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/cacache@16.1.3/pkg": "cacache", - ":.aspect_rules_js/{link_root_name}/chownr@2.0.0/pkg": "chownr", - ":.aspect_rules_js/{link_root_name}/clean-stack@2.2.0/pkg": "clean-stack", - ":.aspect_rules_js/{link_root_name}/color-support@1.1.3/pkg": "color-support", - ":.aspect_rules_js/{link_root_name}/concat-map@0.0.1/pkg": "concat-map", - ":.aspect_rules_js/{link_root_name}/console-control-strings@1.1.0/pkg": "console-control-strings", - ":.aspect_rules_js/{link_root_name}/debug@4.3.4/pkg": "debug", - ":.aspect_rules_js/{link_root_name}/delegates@1.0.0/pkg": "delegates", - ":.aspect_rules_js/{link_root_name}/depd@1.1.2/pkg": "depd", - ":.aspect_rules_js/{link_root_name}/emoji-regex@8.0.0/pkg": "emoji-regex", - ":.aspect_rules_js/{link_root_name}/encoding@0.1.13/pkg": "encoding", - ":.aspect_rules_js/{link_root_name}/env-paths@2.2.1/pkg": "env-paths", - ":.aspect_rules_js/{link_root_name}/err-code@2.0.3/pkg": "err-code", - ":.aspect_rules_js/{link_root_name}/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", - ":.aspect_rules_js/{link_root_name}/fs-minipass@2.1.0/pkg": "fs-minipass", - ":.aspect_rules_js/{link_root_name}/fs.realpath@1.0.0/pkg": "fs.realpath", - ":.aspect_rules_js/{link_root_name}/gauge@4.0.4/pkg": "gauge", - ":.aspect_rules_js/{link_root_name}/glob@7.2.3/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/glob@8.1.0/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/graceful-fs@4.2.10/pkg": "graceful-fs", - ":.aspect_rules_js/{link_root_name}/has-unicode@2.0.1/pkg": "has-unicode", - ":.aspect_rules_js/{link_root_name}/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", - ":.aspect_rules_js/{link_root_name}/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", - ":.aspect_rules_js/{link_root_name}/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", - ":.aspect_rules_js/{link_root_name}/humanize-ms@1.2.1/pkg": "humanize-ms", - ":.aspect_rules_js/{link_root_name}/iconv-lite@0.6.3/pkg": "iconv-lite", - ":.aspect_rules_js/{link_root_name}/imurmurhash@0.1.4/pkg": "imurmurhash", - ":.aspect_rules_js/{link_root_name}/indent-string@4.0.0/pkg": "indent-string", - ":.aspect_rules_js/{link_root_name}/infer-owner@1.0.4/pkg": "infer-owner", - ":.aspect_rules_js/{link_root_name}/inflight@1.0.6/pkg": "inflight", - ":.aspect_rules_js/{link_root_name}/inherits@2.0.4/pkg": "inherits", - ":.aspect_rules_js/{link_root_name}/ip@2.0.0/pkg": "ip", - ":.aspect_rules_js/{link_root_name}/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", - ":.aspect_rules_js/{link_root_name}/is-lambda@1.0.1/pkg": "is-lambda", - ":.aspect_rules_js/{link_root_name}/isexe@2.0.0/pkg": "isexe", - ":.aspect_rules_js/{link_root_name}/lru-cache@6.0.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/lru-cache@7.17.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", - ":.aspect_rules_js/{link_root_name}/minimatch@3.1.2/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minimatch@5.1.6/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minipass@3.3.6/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass@4.2.4/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass-collect@1.0.2/pkg": "minipass-collect", - ":.aspect_rules_js/{link_root_name}/minipass-fetch@2.1.2/pkg": "minipass-fetch", - ":.aspect_rules_js/{link_root_name}/minipass-flush@1.0.5/pkg": "minipass-flush", - ":.aspect_rules_js/{link_root_name}/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", - ":.aspect_rules_js/{link_root_name}/minipass-sized@1.0.3/pkg": "minipass-sized", - ":.aspect_rules_js/{link_root_name}/minizlib@2.1.2/pkg": "minizlib", - ":.aspect_rules_js/{link_root_name}/mkdirp@1.0.4/pkg": "mkdirp", - ":.aspect_rules_js/{link_root_name}/ms@2.1.3/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/ms@2.1.2/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/pkg": "nan", - ":.aspect_rules_js/{link_root_name}/negotiator@0.6.3/pkg": "negotiator", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/pkg": "node-gyp", - ":.aspect_rules_js/{link_root_name}/nopt@6.0.0/pkg": "nopt", - ":.aspect_rules_js/{link_root_name}/npmlog@6.0.2/pkg": "npmlog", - ":.aspect_rules_js/{link_root_name}/once@1.4.0/pkg": "once", - ":.aspect_rules_js/{link_root_name}/p-map@4.0.0/pkg": "p-map", - ":.aspect_rules_js/{link_root_name}/path-is-absolute@1.0.1/pkg": "path-is-absolute", - ":.aspect_rules_js/{link_root_name}/promise-inflight@1.0.1/pkg": "promise-inflight", - ":.aspect_rules_js/{link_root_name}/promise-retry@2.0.1/pkg": "promise-retry", - ":.aspect_rules_js/{link_root_name}/readable-stream@3.6.1/pkg": "readable-stream", - ":.aspect_rules_js/{link_root_name}/retry@0.12.0/pkg": "retry", - ":.aspect_rules_js/{link_root_name}/rimraf@3.0.2/pkg": "rimraf", - ":.aspect_rules_js/{link_root_name}/safe-buffer@5.2.1/pkg": "safe-buffer", - ":.aspect_rules_js/{link_root_name}/safer-buffer@2.1.2/pkg": "safer-buffer", - ":.aspect_rules_js/{link_root_name}/segfault-handler@1.3.0/pkg": "segfault-handler", - ":.aspect_rules_js/{link_root_name}/semver@7.3.8/pkg": "semver", - ":.aspect_rules_js/{link_root_name}/set-blocking@2.0.0/pkg": "set-blocking", - ":.aspect_rules_js/{link_root_name}/signal-exit@3.0.7/pkg": "signal-exit", - ":.aspect_rules_js/{link_root_name}/smart-buffer@4.2.0/pkg": "smart-buffer", - ":.aspect_rules_js/{link_root_name}/socks@2.7.1/pkg": "socks", - ":.aspect_rules_js/{link_root_name}/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", - ":.aspect_rules_js/{link_root_name}/ssri@9.0.1/pkg": "ssri", - ":.aspect_rules_js/{link_root_name}/string-width@4.2.3/pkg": "string-width", - ":.aspect_rules_js/{link_root_name}/string_decoder@1.3.0/pkg": "string_decoder", - ":.aspect_rules_js/{link_root_name}/strip-ansi@6.0.1/pkg": "strip-ansi", - ":.aspect_rules_js/{link_root_name}/tar@6.1.13/pkg": "tar", - ":.aspect_rules_js/{link_root_name}/unique-filename@2.0.1/pkg": "unique-filename", - ":.aspect_rules_js/{link_root_name}/unique-slug@3.0.0/pkg": "unique-slug", - ":.aspect_rules_js/{link_root_name}/util-deprecate@1.0.2/pkg": "util-deprecate", - ":.aspect_rules_js/{link_root_name}/which@2.0.2/pkg": "which", - ":.aspect_rules_js/{link_root_name}/wide-align@1.1.5/pkg": "wide-align", - ":.aspect_rules_js/{link_root_name}/wrappy@1.0.2/pkg": "wrappy", - ":.aspect_rules_js/{link_root_name}/yallist@4.0.0/pkg": "yallist", + ":.aspect_rules_js/@gar+promisify@1.1.3/pkg": "@gar/promisify", + ":.aspect_rules_js/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", + ":.aspect_rules_js/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", + ":.aspect_rules_js/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", + ":.aspect_rules_js/abbrev@1.1.1/pkg": "abbrev", + ":.aspect_rules_js/agent-base@6.0.2/pkg": "agent-base", + ":.aspect_rules_js/agentkeepalive@4.2.1/pkg": "agentkeepalive", + ":.aspect_rules_js/aggregate-error@3.1.0/pkg": "aggregate-error", + ":.aspect_rules_js/ansi-regex@5.0.1/pkg": "ansi-regex", + ":.aspect_rules_js/aproba@2.0.0/pkg": "aproba", + ":.aspect_rules_js/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", + ":.aspect_rules_js/balanced-match@1.0.2/pkg": "balanced-match", + ":.aspect_rules_js/bindings@1.5.0/pkg": "bindings", + ":.aspect_rules_js/brace-expansion@1.1.11/pkg": "brace-expansion", + ":.aspect_rules_js/brace-expansion@2.0.1/pkg": "brace-expansion", + ":.aspect_rules_js/cacache@16.1.3/pkg": "cacache", + ":.aspect_rules_js/chownr@2.0.0/pkg": "chownr", + ":.aspect_rules_js/clean-stack@2.2.0/pkg": "clean-stack", + ":.aspect_rules_js/color-support@1.1.3/pkg": "color-support", + ":.aspect_rules_js/concat-map@0.0.1/pkg": "concat-map", + ":.aspect_rules_js/console-control-strings@1.1.0/pkg": "console-control-strings", + ":.aspect_rules_js/debug@4.3.4/pkg": "debug", + ":.aspect_rules_js/delegates@1.0.0/pkg": "delegates", + ":.aspect_rules_js/depd@1.1.2/pkg": "depd", + ":.aspect_rules_js/emoji-regex@8.0.0/pkg": "emoji-regex", + ":.aspect_rules_js/encoding@0.1.13/pkg": "encoding", + ":.aspect_rules_js/env-paths@2.2.1/pkg": "env-paths", + ":.aspect_rules_js/err-code@2.0.3/pkg": "err-code", + ":.aspect_rules_js/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", + ":.aspect_rules_js/fs-minipass@2.1.0/pkg": "fs-minipass", + ":.aspect_rules_js/fs.realpath@1.0.0/pkg": "fs.realpath", + ":.aspect_rules_js/gauge@4.0.4/pkg": "gauge", + ":.aspect_rules_js/glob@7.2.3/pkg": "glob", + ":.aspect_rules_js/glob@8.1.0/pkg": "glob", + ":.aspect_rules_js/graceful-fs@4.2.10/pkg": "graceful-fs", + ":.aspect_rules_js/has-unicode@2.0.1/pkg": "has-unicode", + ":.aspect_rules_js/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", + ":.aspect_rules_js/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", + ":.aspect_rules_js/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", + ":.aspect_rules_js/humanize-ms@1.2.1/pkg": "humanize-ms", + ":.aspect_rules_js/iconv-lite@0.6.3/pkg": "iconv-lite", + ":.aspect_rules_js/imurmurhash@0.1.4/pkg": "imurmurhash", + ":.aspect_rules_js/indent-string@4.0.0/pkg": "indent-string", + ":.aspect_rules_js/infer-owner@1.0.4/pkg": "infer-owner", + ":.aspect_rules_js/inflight@1.0.6/pkg": "inflight", + ":.aspect_rules_js/inherits@2.0.4/pkg": "inherits", + ":.aspect_rules_js/ip@2.0.0/pkg": "ip", + ":.aspect_rules_js/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", + ":.aspect_rules_js/is-lambda@1.0.1/pkg": "is-lambda", + ":.aspect_rules_js/isexe@2.0.0/pkg": "isexe", + ":.aspect_rules_js/lru-cache@6.0.0/pkg": "lru-cache", + ":.aspect_rules_js/lru-cache@7.17.0/pkg": "lru-cache", + ":.aspect_rules_js/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", + ":.aspect_rules_js/minimatch@3.1.2/pkg": "minimatch", + ":.aspect_rules_js/minimatch@5.1.6/pkg": "minimatch", + ":.aspect_rules_js/minipass@3.3.6/pkg": "minipass", + ":.aspect_rules_js/minipass@4.2.4/pkg": "minipass", + ":.aspect_rules_js/minipass-collect@1.0.2/pkg": "minipass-collect", + ":.aspect_rules_js/minipass-fetch@2.1.2/pkg": "minipass-fetch", + ":.aspect_rules_js/minipass-flush@1.0.5/pkg": "minipass-flush", + ":.aspect_rules_js/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", + ":.aspect_rules_js/minipass-sized@1.0.3/pkg": "minipass-sized", + ":.aspect_rules_js/minizlib@2.1.2/pkg": "minizlib", + ":.aspect_rules_js/mkdirp@1.0.4/pkg": "mkdirp", + ":.aspect_rules_js/ms@2.1.3/pkg": "ms", + ":.aspect_rules_js/ms@2.1.2/pkg": "ms", + ":.aspect_rules_js/nan@2.17.0/pkg": "nan", + ":.aspect_rules_js/negotiator@0.6.3/pkg": "negotiator", + ":.aspect_rules_js/node-gyp@9.3.1/pkg": "node-gyp", + ":.aspect_rules_js/nopt@6.0.0/pkg": "nopt", + ":.aspect_rules_js/npmlog@6.0.2/pkg": "npmlog", + ":.aspect_rules_js/once@1.4.0/pkg": "once", + ":.aspect_rules_js/p-map@4.0.0/pkg": "p-map", + ":.aspect_rules_js/path-is-absolute@1.0.1/pkg": "path-is-absolute", + ":.aspect_rules_js/promise-inflight@1.0.1/pkg": "promise-inflight", + ":.aspect_rules_js/promise-retry@2.0.1/pkg": "promise-retry", + ":.aspect_rules_js/readable-stream@3.6.1/pkg": "readable-stream", + ":.aspect_rules_js/retry@0.12.0/pkg": "retry", + ":.aspect_rules_js/rimraf@3.0.2/pkg": "rimraf", + ":.aspect_rules_js/safe-buffer@5.2.1/pkg": "safe-buffer", + ":.aspect_rules_js/safer-buffer@2.1.2/pkg": "safer-buffer", + ":.aspect_rules_js/segfault-handler@1.3.0/pkg": "segfault-handler", + ":.aspect_rules_js/semver@7.3.8/pkg": "semver", + ":.aspect_rules_js/set-blocking@2.0.0/pkg": "set-blocking", + ":.aspect_rules_js/signal-exit@3.0.7/pkg": "signal-exit", + ":.aspect_rules_js/smart-buffer@4.2.0/pkg": "smart-buffer", + ":.aspect_rules_js/socks@2.7.1/pkg": "socks", + ":.aspect_rules_js/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", + ":.aspect_rules_js/ssri@9.0.1/pkg": "ssri", + ":.aspect_rules_js/string-width@4.2.3/pkg": "string-width", + ":.aspect_rules_js/string_decoder@1.3.0/pkg": "string_decoder", + ":.aspect_rules_js/strip-ansi@6.0.1/pkg": "strip-ansi", + ":.aspect_rules_js/tar@6.1.13/pkg": "tar", + ":.aspect_rules_js/unique-filename@2.0.1/pkg": "unique-filename", + ":.aspect_rules_js/unique-slug@3.0.0/pkg": "unique-slug", + ":.aspect_rules_js/util-deprecate@1.0.2/pkg": "util-deprecate", + ":.aspect_rules_js/which@2.0.2/pkg": "which", + ":.aspect_rules_js/wide-align@1.1.5/pkg": "wide-align", + ":.aspect_rules_js/wrappy@1.0.2/pkg": "wrappy", + ":.aspect_rules_js/yallist@4.0.0/pkg": "yallist", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/ref": "bindings", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/ref": "nan", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/ref": "node-gyp", + ":.aspect_rules_js/bindings@1.5.0/ref": "bindings", + ":.aspect_rules_js/nan@2.17.0/ref": "nan", + ":.aspect_rules_js/node-gyp@9.3.1/ref": "node-gyp", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/@gar+promisify@1.1.3/pkg": "@gar/promisify", - ":.aspect_rules_js/{link_root_name}/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", - ":.aspect_rules_js/{link_root_name}/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", - ":.aspect_rules_js/{link_root_name}/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", - ":.aspect_rules_js/{link_root_name}/abbrev@1.1.1/pkg": "abbrev", - ":.aspect_rules_js/{link_root_name}/agent-base@6.0.2/pkg": "agent-base", - ":.aspect_rules_js/{link_root_name}/agentkeepalive@4.2.1/pkg": "agentkeepalive", - ":.aspect_rules_js/{link_root_name}/aggregate-error@3.1.0/pkg": "aggregate-error", - ":.aspect_rules_js/{link_root_name}/ansi-regex@5.0.1/pkg": "ansi-regex", - ":.aspect_rules_js/{link_root_name}/aproba@2.0.0/pkg": "aproba", - ":.aspect_rules_js/{link_root_name}/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", - ":.aspect_rules_js/{link_root_name}/balanced-match@1.0.2/pkg": "balanced-match", - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/pkg": "bindings", - ":.aspect_rules_js/{link_root_name}/brace-expansion@1.1.11/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/brace-expansion@2.0.1/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/cacache@16.1.3/pkg": "cacache", - ":.aspect_rules_js/{link_root_name}/chownr@2.0.0/pkg": "chownr", - ":.aspect_rules_js/{link_root_name}/clean-stack@2.2.0/pkg": "clean-stack", - ":.aspect_rules_js/{link_root_name}/color-support@1.1.3/pkg": "color-support", - ":.aspect_rules_js/{link_root_name}/concat-map@0.0.1/pkg": "concat-map", - ":.aspect_rules_js/{link_root_name}/console-control-strings@1.1.0/pkg": "console-control-strings", - ":.aspect_rules_js/{link_root_name}/debug@4.3.4/pkg": "debug", - ":.aspect_rules_js/{link_root_name}/delegates@1.0.0/pkg": "delegates", - ":.aspect_rules_js/{link_root_name}/depd@1.1.2/pkg": "depd", - ":.aspect_rules_js/{link_root_name}/emoji-regex@8.0.0/pkg": "emoji-regex", - ":.aspect_rules_js/{link_root_name}/encoding@0.1.13/pkg": "encoding", - ":.aspect_rules_js/{link_root_name}/env-paths@2.2.1/pkg": "env-paths", - ":.aspect_rules_js/{link_root_name}/err-code@2.0.3/pkg": "err-code", - ":.aspect_rules_js/{link_root_name}/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", - ":.aspect_rules_js/{link_root_name}/fs-minipass@2.1.0/pkg": "fs-minipass", - ":.aspect_rules_js/{link_root_name}/fs.realpath@1.0.0/pkg": "fs.realpath", - ":.aspect_rules_js/{link_root_name}/gauge@4.0.4/pkg": "gauge", - ":.aspect_rules_js/{link_root_name}/glob@7.2.3/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/glob@8.1.0/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/graceful-fs@4.2.10/pkg": "graceful-fs", - ":.aspect_rules_js/{link_root_name}/has-unicode@2.0.1/pkg": "has-unicode", - ":.aspect_rules_js/{link_root_name}/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", - ":.aspect_rules_js/{link_root_name}/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", - ":.aspect_rules_js/{link_root_name}/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", - ":.aspect_rules_js/{link_root_name}/humanize-ms@1.2.1/pkg": "humanize-ms", - ":.aspect_rules_js/{link_root_name}/iconv-lite@0.6.3/pkg": "iconv-lite", - ":.aspect_rules_js/{link_root_name}/imurmurhash@0.1.4/pkg": "imurmurhash", - ":.aspect_rules_js/{link_root_name}/indent-string@4.0.0/pkg": "indent-string", - ":.aspect_rules_js/{link_root_name}/infer-owner@1.0.4/pkg": "infer-owner", - ":.aspect_rules_js/{link_root_name}/inflight@1.0.6/pkg": "inflight", - ":.aspect_rules_js/{link_root_name}/inherits@2.0.4/pkg": "inherits", - ":.aspect_rules_js/{link_root_name}/ip@2.0.0/pkg": "ip", - ":.aspect_rules_js/{link_root_name}/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", - ":.aspect_rules_js/{link_root_name}/is-lambda@1.0.1/pkg": "is-lambda", - ":.aspect_rules_js/{link_root_name}/isexe@2.0.0/pkg": "isexe", - ":.aspect_rules_js/{link_root_name}/lru-cache@6.0.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/lru-cache@7.17.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", - ":.aspect_rules_js/{link_root_name}/minimatch@3.1.2/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minimatch@5.1.6/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minipass@3.3.6/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass@4.2.4/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass-collect@1.0.2/pkg": "minipass-collect", - ":.aspect_rules_js/{link_root_name}/minipass-fetch@2.1.2/pkg": "minipass-fetch", - ":.aspect_rules_js/{link_root_name}/minipass-flush@1.0.5/pkg": "minipass-flush", - ":.aspect_rules_js/{link_root_name}/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", - ":.aspect_rules_js/{link_root_name}/minipass-sized@1.0.3/pkg": "minipass-sized", - ":.aspect_rules_js/{link_root_name}/minizlib@2.1.2/pkg": "minizlib", - ":.aspect_rules_js/{link_root_name}/mkdirp@1.0.4/pkg": "mkdirp", - ":.aspect_rules_js/{link_root_name}/ms@2.1.3/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/ms@2.1.2/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/pkg": "nan", - ":.aspect_rules_js/{link_root_name}/negotiator@0.6.3/pkg": "negotiator", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/pkg": "node-gyp", - ":.aspect_rules_js/{link_root_name}/nopt@6.0.0/pkg": "nopt", - ":.aspect_rules_js/{link_root_name}/npmlog@6.0.2/pkg": "npmlog", - ":.aspect_rules_js/{link_root_name}/once@1.4.0/pkg": "once", - ":.aspect_rules_js/{link_root_name}/p-map@4.0.0/pkg": "p-map", - ":.aspect_rules_js/{link_root_name}/path-is-absolute@1.0.1/pkg": "path-is-absolute", - ":.aspect_rules_js/{link_root_name}/promise-inflight@1.0.1/pkg": "promise-inflight", - ":.aspect_rules_js/{link_root_name}/promise-retry@2.0.1/pkg": "promise-retry", - ":.aspect_rules_js/{link_root_name}/readable-stream@3.6.1/pkg": "readable-stream", - ":.aspect_rules_js/{link_root_name}/retry@0.12.0/pkg": "retry", - ":.aspect_rules_js/{link_root_name}/rimraf@3.0.2/pkg": "rimraf", - ":.aspect_rules_js/{link_root_name}/safe-buffer@5.2.1/pkg": "safe-buffer", - ":.aspect_rules_js/{link_root_name}/safer-buffer@2.1.2/pkg": "safer-buffer", - ":.aspect_rules_js/{link_root_name}/segfault-handler@1.3.0/pkg_pre_lc_lite": "segfault-handler", - ":.aspect_rules_js/{link_root_name}/semver@7.3.8/pkg": "semver", - ":.aspect_rules_js/{link_root_name}/set-blocking@2.0.0/pkg": "set-blocking", - ":.aspect_rules_js/{link_root_name}/signal-exit@3.0.7/pkg": "signal-exit", - ":.aspect_rules_js/{link_root_name}/smart-buffer@4.2.0/pkg": "smart-buffer", - ":.aspect_rules_js/{link_root_name}/socks@2.7.1/pkg": "socks", - ":.aspect_rules_js/{link_root_name}/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", - ":.aspect_rules_js/{link_root_name}/ssri@9.0.1/pkg": "ssri", - ":.aspect_rules_js/{link_root_name}/string-width@4.2.3/pkg": "string-width", - ":.aspect_rules_js/{link_root_name}/string_decoder@1.3.0/pkg": "string_decoder", - ":.aspect_rules_js/{link_root_name}/strip-ansi@6.0.1/pkg": "strip-ansi", - ":.aspect_rules_js/{link_root_name}/tar@6.1.13/pkg": "tar", - ":.aspect_rules_js/{link_root_name}/unique-filename@2.0.1/pkg": "unique-filename", - ":.aspect_rules_js/{link_root_name}/unique-slug@3.0.0/pkg": "unique-slug", - ":.aspect_rules_js/{link_root_name}/util-deprecate@1.0.2/pkg": "util-deprecate", - ":.aspect_rules_js/{link_root_name}/which@2.0.2/pkg": "which", - ":.aspect_rules_js/{link_root_name}/wide-align@1.1.5/pkg": "wide-align", - ":.aspect_rules_js/{link_root_name}/wrappy@1.0.2/pkg": "wrappy", - ":.aspect_rules_js/{link_root_name}/yallist@4.0.0/pkg": "yallist", + ":.aspect_rules_js/@gar+promisify@1.1.3/pkg": "@gar/promisify", + ":.aspect_rules_js/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", + ":.aspect_rules_js/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", + ":.aspect_rules_js/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", + ":.aspect_rules_js/abbrev@1.1.1/pkg": "abbrev", + ":.aspect_rules_js/agent-base@6.0.2/pkg": "agent-base", + ":.aspect_rules_js/agentkeepalive@4.2.1/pkg": "agentkeepalive", + ":.aspect_rules_js/aggregate-error@3.1.0/pkg": "aggregate-error", + ":.aspect_rules_js/ansi-regex@5.0.1/pkg": "ansi-regex", + ":.aspect_rules_js/aproba@2.0.0/pkg": "aproba", + ":.aspect_rules_js/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", + ":.aspect_rules_js/balanced-match@1.0.2/pkg": "balanced-match", + ":.aspect_rules_js/bindings@1.5.0/pkg": "bindings", + ":.aspect_rules_js/brace-expansion@1.1.11/pkg": "brace-expansion", + ":.aspect_rules_js/brace-expansion@2.0.1/pkg": "brace-expansion", + ":.aspect_rules_js/cacache@16.1.3/pkg": "cacache", + ":.aspect_rules_js/chownr@2.0.0/pkg": "chownr", + ":.aspect_rules_js/clean-stack@2.2.0/pkg": "clean-stack", + ":.aspect_rules_js/color-support@1.1.3/pkg": "color-support", + ":.aspect_rules_js/concat-map@0.0.1/pkg": "concat-map", + ":.aspect_rules_js/console-control-strings@1.1.0/pkg": "console-control-strings", + ":.aspect_rules_js/debug@4.3.4/pkg": "debug", + ":.aspect_rules_js/delegates@1.0.0/pkg": "delegates", + ":.aspect_rules_js/depd@1.1.2/pkg": "depd", + ":.aspect_rules_js/emoji-regex@8.0.0/pkg": "emoji-regex", + ":.aspect_rules_js/encoding@0.1.13/pkg": "encoding", + ":.aspect_rules_js/env-paths@2.2.1/pkg": "env-paths", + ":.aspect_rules_js/err-code@2.0.3/pkg": "err-code", + ":.aspect_rules_js/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", + ":.aspect_rules_js/fs-minipass@2.1.0/pkg": "fs-minipass", + ":.aspect_rules_js/fs.realpath@1.0.0/pkg": "fs.realpath", + ":.aspect_rules_js/gauge@4.0.4/pkg": "gauge", + ":.aspect_rules_js/glob@7.2.3/pkg": "glob", + ":.aspect_rules_js/glob@8.1.0/pkg": "glob", + ":.aspect_rules_js/graceful-fs@4.2.10/pkg": "graceful-fs", + ":.aspect_rules_js/has-unicode@2.0.1/pkg": "has-unicode", + ":.aspect_rules_js/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", + ":.aspect_rules_js/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", + ":.aspect_rules_js/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", + ":.aspect_rules_js/humanize-ms@1.2.1/pkg": "humanize-ms", + ":.aspect_rules_js/iconv-lite@0.6.3/pkg": "iconv-lite", + ":.aspect_rules_js/imurmurhash@0.1.4/pkg": "imurmurhash", + ":.aspect_rules_js/indent-string@4.0.0/pkg": "indent-string", + ":.aspect_rules_js/infer-owner@1.0.4/pkg": "infer-owner", + ":.aspect_rules_js/inflight@1.0.6/pkg": "inflight", + ":.aspect_rules_js/inherits@2.0.4/pkg": "inherits", + ":.aspect_rules_js/ip@2.0.0/pkg": "ip", + ":.aspect_rules_js/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", + ":.aspect_rules_js/is-lambda@1.0.1/pkg": "is-lambda", + ":.aspect_rules_js/isexe@2.0.0/pkg": "isexe", + ":.aspect_rules_js/lru-cache@6.0.0/pkg": "lru-cache", + ":.aspect_rules_js/lru-cache@7.17.0/pkg": "lru-cache", + ":.aspect_rules_js/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", + ":.aspect_rules_js/minimatch@3.1.2/pkg": "minimatch", + ":.aspect_rules_js/minimatch@5.1.6/pkg": "minimatch", + ":.aspect_rules_js/minipass@3.3.6/pkg": "minipass", + ":.aspect_rules_js/minipass@4.2.4/pkg": "minipass", + ":.aspect_rules_js/minipass-collect@1.0.2/pkg": "minipass-collect", + ":.aspect_rules_js/minipass-fetch@2.1.2/pkg": "minipass-fetch", + ":.aspect_rules_js/minipass-flush@1.0.5/pkg": "minipass-flush", + ":.aspect_rules_js/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", + ":.aspect_rules_js/minipass-sized@1.0.3/pkg": "minipass-sized", + ":.aspect_rules_js/minizlib@2.1.2/pkg": "minizlib", + ":.aspect_rules_js/mkdirp@1.0.4/pkg": "mkdirp", + ":.aspect_rules_js/ms@2.1.3/pkg": "ms", + ":.aspect_rules_js/ms@2.1.2/pkg": "ms", + ":.aspect_rules_js/nan@2.17.0/pkg": "nan", + ":.aspect_rules_js/negotiator@0.6.3/pkg": "negotiator", + ":.aspect_rules_js/node-gyp@9.3.1/pkg": "node-gyp", + ":.aspect_rules_js/nopt@6.0.0/pkg": "nopt", + ":.aspect_rules_js/npmlog@6.0.2/pkg": "npmlog", + ":.aspect_rules_js/once@1.4.0/pkg": "once", + ":.aspect_rules_js/p-map@4.0.0/pkg": "p-map", + ":.aspect_rules_js/path-is-absolute@1.0.1/pkg": "path-is-absolute", + ":.aspect_rules_js/promise-inflight@1.0.1/pkg": "promise-inflight", + ":.aspect_rules_js/promise-retry@2.0.1/pkg": "promise-retry", + ":.aspect_rules_js/readable-stream@3.6.1/pkg": "readable-stream", + ":.aspect_rules_js/retry@0.12.0/pkg": "retry", + ":.aspect_rules_js/rimraf@3.0.2/pkg": "rimraf", + ":.aspect_rules_js/safe-buffer@5.2.1/pkg": "safe-buffer", + ":.aspect_rules_js/safer-buffer@2.1.2/pkg": "safer-buffer", + ":.aspect_rules_js/segfault-handler@1.3.0/pkg_pre_lc_lite": "segfault-handler", + ":.aspect_rules_js/semver@7.3.8/pkg": "semver", + ":.aspect_rules_js/set-blocking@2.0.0/pkg": "set-blocking", + ":.aspect_rules_js/signal-exit@3.0.7/pkg": "signal-exit", + ":.aspect_rules_js/smart-buffer@4.2.0/pkg": "smart-buffer", + ":.aspect_rules_js/socks@2.7.1/pkg": "socks", + ":.aspect_rules_js/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", + ":.aspect_rules_js/ssri@9.0.1/pkg": "ssri", + ":.aspect_rules_js/string-width@4.2.3/pkg": "string-width", + ":.aspect_rules_js/string_decoder@1.3.0/pkg": "string_decoder", + ":.aspect_rules_js/strip-ansi@6.0.1/pkg": "strip-ansi", + ":.aspect_rules_js/tar@6.1.13/pkg": "tar", + ":.aspect_rules_js/unique-filename@2.0.1/pkg": "unique-filename", + ":.aspect_rules_js/unique-slug@3.0.0/pkg": "unique-slug", + ":.aspect_rules_js/util-deprecate@1.0.2/pkg": "util-deprecate", + ":.aspect_rules_js/which@2.0.2/pkg": "which", + ":.aspect_rules_js/wide-align@1.1.5/pkg": "wide-align", + ":.aspect_rules_js/wrappy@1.0.2/pkg": "wrappy", + ":.aspect_rules_js/yallist@4.0.0/pkg": "yallist", }, dev = False, has_lifecycle_build_target = True, @@ -246,11 +245,9 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): +def npm_link_imported_package_store(name): return _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, @@ -260,12 +257,8 @@ def npm_link_imported_package_store(name, link_root_name, link_alias): # Generated npm_package_store and npm_link_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl b/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl index 0b87fe3f7..4bd1b22c8 100644 --- a/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl +++ b/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl @@ -16,220 +16,219 @@ _PACKAGE_STORE_NAME = "segfault-handler@1.3.0" # Generated npm_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/@gar+promisify@1.1.3/pkg": "@gar/promisify", - ":.aspect_rules_js/{link_root_name}/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", - ":.aspect_rules_js/{link_root_name}/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", - ":.aspect_rules_js/{link_root_name}/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", - ":.aspect_rules_js/{link_root_name}/abbrev@1.1.1/pkg": "abbrev", - ":.aspect_rules_js/{link_root_name}/agent-base@6.0.2/pkg": "agent-base", - ":.aspect_rules_js/{link_root_name}/agentkeepalive@4.2.1/pkg": "agentkeepalive", - ":.aspect_rules_js/{link_root_name}/aggregate-error@3.1.0/pkg": "aggregate-error", - ":.aspect_rules_js/{link_root_name}/ansi-regex@5.0.1/pkg": "ansi-regex", - ":.aspect_rules_js/{link_root_name}/aproba@2.0.0/pkg": "aproba", - ":.aspect_rules_js/{link_root_name}/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", - ":.aspect_rules_js/{link_root_name}/balanced-match@1.0.2/pkg": "balanced-match", - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/pkg": "bindings", - ":.aspect_rules_js/{link_root_name}/brace-expansion@1.1.11/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/brace-expansion@2.0.1/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/cacache@16.1.3/pkg": "cacache", - ":.aspect_rules_js/{link_root_name}/chownr@2.0.0/pkg": "chownr", - ":.aspect_rules_js/{link_root_name}/clean-stack@2.2.0/pkg": "clean-stack", - ":.aspect_rules_js/{link_root_name}/color-support@1.1.3/pkg": "color-support", - ":.aspect_rules_js/{link_root_name}/concat-map@0.0.1/pkg": "concat-map", - ":.aspect_rules_js/{link_root_name}/console-control-strings@1.1.0/pkg": "console-control-strings", - ":.aspect_rules_js/{link_root_name}/debug@4.3.4/pkg": "debug", - ":.aspect_rules_js/{link_root_name}/delegates@1.0.0/pkg": "delegates", - ":.aspect_rules_js/{link_root_name}/depd@1.1.2/pkg": "depd", - ":.aspect_rules_js/{link_root_name}/emoji-regex@8.0.0/pkg": "emoji-regex", - ":.aspect_rules_js/{link_root_name}/encoding@0.1.13/pkg": "encoding", - ":.aspect_rules_js/{link_root_name}/env-paths@2.2.1/pkg": "env-paths", - ":.aspect_rules_js/{link_root_name}/err-code@2.0.3/pkg": "err-code", - ":.aspect_rules_js/{link_root_name}/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", - ":.aspect_rules_js/{link_root_name}/fs-minipass@2.1.0/pkg": "fs-minipass", - ":.aspect_rules_js/{link_root_name}/fs.realpath@1.0.0/pkg": "fs.realpath", - ":.aspect_rules_js/{link_root_name}/gauge@4.0.4/pkg": "gauge", - ":.aspect_rules_js/{link_root_name}/glob@7.2.3/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/glob@8.1.0/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/graceful-fs@4.2.10/pkg": "graceful-fs", - ":.aspect_rules_js/{link_root_name}/has-unicode@2.0.1/pkg": "has-unicode", - ":.aspect_rules_js/{link_root_name}/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", - ":.aspect_rules_js/{link_root_name}/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", - ":.aspect_rules_js/{link_root_name}/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", - ":.aspect_rules_js/{link_root_name}/humanize-ms@1.2.1/pkg": "humanize-ms", - ":.aspect_rules_js/{link_root_name}/iconv-lite@0.6.3/pkg": "iconv-lite", - ":.aspect_rules_js/{link_root_name}/imurmurhash@0.1.4/pkg": "imurmurhash", - ":.aspect_rules_js/{link_root_name}/indent-string@4.0.0/pkg": "indent-string", - ":.aspect_rules_js/{link_root_name}/infer-owner@1.0.4/pkg": "infer-owner", - ":.aspect_rules_js/{link_root_name}/inflight@1.0.6/pkg": "inflight", - ":.aspect_rules_js/{link_root_name}/inherits@2.0.4/pkg": "inherits", - ":.aspect_rules_js/{link_root_name}/ip@2.0.0/pkg": "ip", - ":.aspect_rules_js/{link_root_name}/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", - ":.aspect_rules_js/{link_root_name}/is-lambda@1.0.1/pkg": "is-lambda", - ":.aspect_rules_js/{link_root_name}/isexe@2.0.0/pkg": "isexe", - ":.aspect_rules_js/{link_root_name}/lru-cache@6.0.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/lru-cache@7.17.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", - ":.aspect_rules_js/{link_root_name}/minimatch@3.1.2/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minimatch@5.1.6/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minipass@3.3.6/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass@4.2.4/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass-collect@1.0.2/pkg": "minipass-collect", - ":.aspect_rules_js/{link_root_name}/minipass-fetch@2.1.2/pkg": "minipass-fetch", - ":.aspect_rules_js/{link_root_name}/minipass-flush@1.0.5/pkg": "minipass-flush", - ":.aspect_rules_js/{link_root_name}/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", - ":.aspect_rules_js/{link_root_name}/minipass-sized@1.0.3/pkg": "minipass-sized", - ":.aspect_rules_js/{link_root_name}/minizlib@2.1.2/pkg": "minizlib", - ":.aspect_rules_js/{link_root_name}/mkdirp@1.0.4/pkg": "mkdirp", - ":.aspect_rules_js/{link_root_name}/ms@2.1.3/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/ms@2.1.2/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/pkg": "nan", - ":.aspect_rules_js/{link_root_name}/negotiator@0.6.3/pkg": "negotiator", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/pkg": "node-gyp", - ":.aspect_rules_js/{link_root_name}/nopt@6.0.0/pkg": "nopt", - ":.aspect_rules_js/{link_root_name}/npmlog@6.0.2/pkg": "npmlog", - ":.aspect_rules_js/{link_root_name}/once@1.4.0/pkg": "once", - ":.aspect_rules_js/{link_root_name}/p-map@4.0.0/pkg": "p-map", - ":.aspect_rules_js/{link_root_name}/path-is-absolute@1.0.1/pkg": "path-is-absolute", - ":.aspect_rules_js/{link_root_name}/promise-inflight@1.0.1/pkg": "promise-inflight", - ":.aspect_rules_js/{link_root_name}/promise-retry@2.0.1/pkg": "promise-retry", - ":.aspect_rules_js/{link_root_name}/readable-stream@3.6.1/pkg": "readable-stream", - ":.aspect_rules_js/{link_root_name}/retry@0.12.0/pkg": "retry", - ":.aspect_rules_js/{link_root_name}/rimraf@3.0.2/pkg": "rimraf", - ":.aspect_rules_js/{link_root_name}/safe-buffer@5.2.1/pkg": "safe-buffer", - ":.aspect_rules_js/{link_root_name}/safer-buffer@2.1.2/pkg": "safer-buffer", - ":.aspect_rules_js/{link_root_name}/segfault-handler@1.3.0/pkg": "segfault-handler", - ":.aspect_rules_js/{link_root_name}/semver@7.3.8/pkg": "semver", - ":.aspect_rules_js/{link_root_name}/set-blocking@2.0.0/pkg": "set-blocking", - ":.aspect_rules_js/{link_root_name}/signal-exit@3.0.7/pkg": "signal-exit", - ":.aspect_rules_js/{link_root_name}/smart-buffer@4.2.0/pkg": "smart-buffer", - ":.aspect_rules_js/{link_root_name}/socks@2.7.1/pkg": "socks", - ":.aspect_rules_js/{link_root_name}/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", - ":.aspect_rules_js/{link_root_name}/ssri@9.0.1/pkg": "ssri", - ":.aspect_rules_js/{link_root_name}/string-width@4.2.3/pkg": "string-width", - ":.aspect_rules_js/{link_root_name}/string_decoder@1.3.0/pkg": "string_decoder", - ":.aspect_rules_js/{link_root_name}/strip-ansi@6.0.1/pkg": "strip-ansi", - ":.aspect_rules_js/{link_root_name}/tar@6.1.13/pkg": "tar", - ":.aspect_rules_js/{link_root_name}/unique-filename@2.0.1/pkg": "unique-filename", - ":.aspect_rules_js/{link_root_name}/unique-slug@3.0.0/pkg": "unique-slug", - ":.aspect_rules_js/{link_root_name}/util-deprecate@1.0.2/pkg": "util-deprecate", - ":.aspect_rules_js/{link_root_name}/which@2.0.2/pkg": "which", - ":.aspect_rules_js/{link_root_name}/wide-align@1.1.5/pkg": "wide-align", - ":.aspect_rules_js/{link_root_name}/wrappy@1.0.2/pkg": "wrappy", - ":.aspect_rules_js/{link_root_name}/yallist@4.0.0/pkg": "yallist", + ":.aspect_rules_js/@gar+promisify@1.1.3/pkg": "@gar/promisify", + ":.aspect_rules_js/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", + ":.aspect_rules_js/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", + ":.aspect_rules_js/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", + ":.aspect_rules_js/abbrev@1.1.1/pkg": "abbrev", + ":.aspect_rules_js/agent-base@6.0.2/pkg": "agent-base", + ":.aspect_rules_js/agentkeepalive@4.2.1/pkg": "agentkeepalive", + ":.aspect_rules_js/aggregate-error@3.1.0/pkg": "aggregate-error", + ":.aspect_rules_js/ansi-regex@5.0.1/pkg": "ansi-regex", + ":.aspect_rules_js/aproba@2.0.0/pkg": "aproba", + ":.aspect_rules_js/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", + ":.aspect_rules_js/balanced-match@1.0.2/pkg": "balanced-match", + ":.aspect_rules_js/bindings@1.5.0/pkg": "bindings", + ":.aspect_rules_js/brace-expansion@1.1.11/pkg": "brace-expansion", + ":.aspect_rules_js/brace-expansion@2.0.1/pkg": "brace-expansion", + ":.aspect_rules_js/cacache@16.1.3/pkg": "cacache", + ":.aspect_rules_js/chownr@2.0.0/pkg": "chownr", + ":.aspect_rules_js/clean-stack@2.2.0/pkg": "clean-stack", + ":.aspect_rules_js/color-support@1.1.3/pkg": "color-support", + ":.aspect_rules_js/concat-map@0.0.1/pkg": "concat-map", + ":.aspect_rules_js/console-control-strings@1.1.0/pkg": "console-control-strings", + ":.aspect_rules_js/debug@4.3.4/pkg": "debug", + ":.aspect_rules_js/delegates@1.0.0/pkg": "delegates", + ":.aspect_rules_js/depd@1.1.2/pkg": "depd", + ":.aspect_rules_js/emoji-regex@8.0.0/pkg": "emoji-regex", + ":.aspect_rules_js/encoding@0.1.13/pkg": "encoding", + ":.aspect_rules_js/env-paths@2.2.1/pkg": "env-paths", + ":.aspect_rules_js/err-code@2.0.3/pkg": "err-code", + ":.aspect_rules_js/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", + ":.aspect_rules_js/fs-minipass@2.1.0/pkg": "fs-minipass", + ":.aspect_rules_js/fs.realpath@1.0.0/pkg": "fs.realpath", + ":.aspect_rules_js/gauge@4.0.4/pkg": "gauge", + ":.aspect_rules_js/glob@7.2.3/pkg": "glob", + ":.aspect_rules_js/glob@8.1.0/pkg": "glob", + ":.aspect_rules_js/graceful-fs@4.2.10/pkg": "graceful-fs", + ":.aspect_rules_js/has-unicode@2.0.1/pkg": "has-unicode", + ":.aspect_rules_js/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", + ":.aspect_rules_js/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", + ":.aspect_rules_js/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", + ":.aspect_rules_js/humanize-ms@1.2.1/pkg": "humanize-ms", + ":.aspect_rules_js/iconv-lite@0.6.3/pkg": "iconv-lite", + ":.aspect_rules_js/imurmurhash@0.1.4/pkg": "imurmurhash", + ":.aspect_rules_js/indent-string@4.0.0/pkg": "indent-string", + ":.aspect_rules_js/infer-owner@1.0.4/pkg": "infer-owner", + ":.aspect_rules_js/inflight@1.0.6/pkg": "inflight", + ":.aspect_rules_js/inherits@2.0.4/pkg": "inherits", + ":.aspect_rules_js/ip@2.0.0/pkg": "ip", + ":.aspect_rules_js/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", + ":.aspect_rules_js/is-lambda@1.0.1/pkg": "is-lambda", + ":.aspect_rules_js/isexe@2.0.0/pkg": "isexe", + ":.aspect_rules_js/lru-cache@6.0.0/pkg": "lru-cache", + ":.aspect_rules_js/lru-cache@7.17.0/pkg": "lru-cache", + ":.aspect_rules_js/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", + ":.aspect_rules_js/minimatch@3.1.2/pkg": "minimatch", + ":.aspect_rules_js/minimatch@5.1.6/pkg": "minimatch", + ":.aspect_rules_js/minipass@3.3.6/pkg": "minipass", + ":.aspect_rules_js/minipass@4.2.4/pkg": "minipass", + ":.aspect_rules_js/minipass-collect@1.0.2/pkg": "minipass-collect", + ":.aspect_rules_js/minipass-fetch@2.1.2/pkg": "minipass-fetch", + ":.aspect_rules_js/minipass-flush@1.0.5/pkg": "minipass-flush", + ":.aspect_rules_js/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", + ":.aspect_rules_js/minipass-sized@1.0.3/pkg": "minipass-sized", + ":.aspect_rules_js/minizlib@2.1.2/pkg": "minizlib", + ":.aspect_rules_js/mkdirp@1.0.4/pkg": "mkdirp", + ":.aspect_rules_js/ms@2.1.3/pkg": "ms", + ":.aspect_rules_js/ms@2.1.2/pkg": "ms", + ":.aspect_rules_js/nan@2.17.0/pkg": "nan", + ":.aspect_rules_js/negotiator@0.6.3/pkg": "negotiator", + ":.aspect_rules_js/node-gyp@9.3.1/pkg": "node-gyp", + ":.aspect_rules_js/nopt@6.0.0/pkg": "nopt", + ":.aspect_rules_js/npmlog@6.0.2/pkg": "npmlog", + ":.aspect_rules_js/once@1.4.0/pkg": "once", + ":.aspect_rules_js/p-map@4.0.0/pkg": "p-map", + ":.aspect_rules_js/path-is-absolute@1.0.1/pkg": "path-is-absolute", + ":.aspect_rules_js/promise-inflight@1.0.1/pkg": "promise-inflight", + ":.aspect_rules_js/promise-retry@2.0.1/pkg": "promise-retry", + ":.aspect_rules_js/readable-stream@3.6.1/pkg": "readable-stream", + ":.aspect_rules_js/retry@0.12.0/pkg": "retry", + ":.aspect_rules_js/rimraf@3.0.2/pkg": "rimraf", + ":.aspect_rules_js/safe-buffer@5.2.1/pkg": "safe-buffer", + ":.aspect_rules_js/safer-buffer@2.1.2/pkg": "safer-buffer", + ":.aspect_rules_js/segfault-handler@1.3.0/pkg": "segfault-handler", + ":.aspect_rules_js/semver@7.3.8/pkg": "semver", + ":.aspect_rules_js/set-blocking@2.0.0/pkg": "set-blocking", + ":.aspect_rules_js/signal-exit@3.0.7/pkg": "signal-exit", + ":.aspect_rules_js/smart-buffer@4.2.0/pkg": "smart-buffer", + ":.aspect_rules_js/socks@2.7.1/pkg": "socks", + ":.aspect_rules_js/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", + ":.aspect_rules_js/ssri@9.0.1/pkg": "ssri", + ":.aspect_rules_js/string-width@4.2.3/pkg": "string-width", + ":.aspect_rules_js/string_decoder@1.3.0/pkg": "string_decoder", + ":.aspect_rules_js/strip-ansi@6.0.1/pkg": "strip-ansi", + ":.aspect_rules_js/tar@6.1.13/pkg": "tar", + ":.aspect_rules_js/unique-filename@2.0.1/pkg": "unique-filename", + ":.aspect_rules_js/unique-slug@3.0.0/pkg": "unique-slug", + ":.aspect_rules_js/util-deprecate@1.0.2/pkg": "util-deprecate", + ":.aspect_rules_js/which@2.0.2/pkg": "which", + ":.aspect_rules_js/wide-align@1.1.5/pkg": "wide-align", + ":.aspect_rules_js/wrappy@1.0.2/pkg": "wrappy", + ":.aspect_rules_js/yallist@4.0.0/pkg": "yallist", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/ref": "bindings", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/ref": "nan", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/ref": "node-gyp", + ":.aspect_rules_js/bindings@1.5.0/ref": "bindings", + ":.aspect_rules_js/nan@2.17.0/ref": "nan", + ":.aspect_rules_js/node-gyp@9.3.1/ref": "node-gyp", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/@gar+promisify@1.1.3/pkg": "@gar/promisify", - ":.aspect_rules_js/{link_root_name}/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", - ":.aspect_rules_js/{link_root_name}/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", - ":.aspect_rules_js/{link_root_name}/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", - ":.aspect_rules_js/{link_root_name}/abbrev@1.1.1/pkg": "abbrev", - ":.aspect_rules_js/{link_root_name}/agent-base@6.0.2/pkg": "agent-base", - ":.aspect_rules_js/{link_root_name}/agentkeepalive@4.2.1/pkg": "agentkeepalive", - ":.aspect_rules_js/{link_root_name}/aggregate-error@3.1.0/pkg": "aggregate-error", - ":.aspect_rules_js/{link_root_name}/ansi-regex@5.0.1/pkg": "ansi-regex", - ":.aspect_rules_js/{link_root_name}/aproba@2.0.0/pkg": "aproba", - ":.aspect_rules_js/{link_root_name}/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", - ":.aspect_rules_js/{link_root_name}/balanced-match@1.0.2/pkg": "balanced-match", - ":.aspect_rules_js/{link_root_name}/bindings@1.5.0/pkg": "bindings", - ":.aspect_rules_js/{link_root_name}/brace-expansion@1.1.11/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/brace-expansion@2.0.1/pkg": "brace-expansion", - ":.aspect_rules_js/{link_root_name}/cacache@16.1.3/pkg": "cacache", - ":.aspect_rules_js/{link_root_name}/chownr@2.0.0/pkg": "chownr", - ":.aspect_rules_js/{link_root_name}/clean-stack@2.2.0/pkg": "clean-stack", - ":.aspect_rules_js/{link_root_name}/color-support@1.1.3/pkg": "color-support", - ":.aspect_rules_js/{link_root_name}/concat-map@0.0.1/pkg": "concat-map", - ":.aspect_rules_js/{link_root_name}/console-control-strings@1.1.0/pkg": "console-control-strings", - ":.aspect_rules_js/{link_root_name}/debug@4.3.4/pkg": "debug", - ":.aspect_rules_js/{link_root_name}/delegates@1.0.0/pkg": "delegates", - ":.aspect_rules_js/{link_root_name}/depd@1.1.2/pkg": "depd", - ":.aspect_rules_js/{link_root_name}/emoji-regex@8.0.0/pkg": "emoji-regex", - ":.aspect_rules_js/{link_root_name}/encoding@0.1.13/pkg": "encoding", - ":.aspect_rules_js/{link_root_name}/env-paths@2.2.1/pkg": "env-paths", - ":.aspect_rules_js/{link_root_name}/err-code@2.0.3/pkg": "err-code", - ":.aspect_rules_js/{link_root_name}/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", - ":.aspect_rules_js/{link_root_name}/fs-minipass@2.1.0/pkg": "fs-minipass", - ":.aspect_rules_js/{link_root_name}/fs.realpath@1.0.0/pkg": "fs.realpath", - ":.aspect_rules_js/{link_root_name}/gauge@4.0.4/pkg": "gauge", - ":.aspect_rules_js/{link_root_name}/glob@7.2.3/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/glob@8.1.0/pkg": "glob", - ":.aspect_rules_js/{link_root_name}/graceful-fs@4.2.10/pkg": "graceful-fs", - ":.aspect_rules_js/{link_root_name}/has-unicode@2.0.1/pkg": "has-unicode", - ":.aspect_rules_js/{link_root_name}/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", - ":.aspect_rules_js/{link_root_name}/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", - ":.aspect_rules_js/{link_root_name}/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", - ":.aspect_rules_js/{link_root_name}/humanize-ms@1.2.1/pkg": "humanize-ms", - ":.aspect_rules_js/{link_root_name}/iconv-lite@0.6.3/pkg": "iconv-lite", - ":.aspect_rules_js/{link_root_name}/imurmurhash@0.1.4/pkg": "imurmurhash", - ":.aspect_rules_js/{link_root_name}/indent-string@4.0.0/pkg": "indent-string", - ":.aspect_rules_js/{link_root_name}/infer-owner@1.0.4/pkg": "infer-owner", - ":.aspect_rules_js/{link_root_name}/inflight@1.0.6/pkg": "inflight", - ":.aspect_rules_js/{link_root_name}/inherits@2.0.4/pkg": "inherits", - ":.aspect_rules_js/{link_root_name}/ip@2.0.0/pkg": "ip", - ":.aspect_rules_js/{link_root_name}/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", - ":.aspect_rules_js/{link_root_name}/is-lambda@1.0.1/pkg": "is-lambda", - ":.aspect_rules_js/{link_root_name}/isexe@2.0.0/pkg": "isexe", - ":.aspect_rules_js/{link_root_name}/lru-cache@6.0.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/lru-cache@7.17.0/pkg": "lru-cache", - ":.aspect_rules_js/{link_root_name}/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", - ":.aspect_rules_js/{link_root_name}/minimatch@3.1.2/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minimatch@5.1.6/pkg": "minimatch", - ":.aspect_rules_js/{link_root_name}/minipass@3.3.6/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass@4.2.4/pkg": "minipass", - ":.aspect_rules_js/{link_root_name}/minipass-collect@1.0.2/pkg": "minipass-collect", - ":.aspect_rules_js/{link_root_name}/minipass-fetch@2.1.2/pkg": "minipass-fetch", - ":.aspect_rules_js/{link_root_name}/minipass-flush@1.0.5/pkg": "minipass-flush", - ":.aspect_rules_js/{link_root_name}/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", - ":.aspect_rules_js/{link_root_name}/minipass-sized@1.0.3/pkg": "minipass-sized", - ":.aspect_rules_js/{link_root_name}/minizlib@2.1.2/pkg": "minizlib", - ":.aspect_rules_js/{link_root_name}/mkdirp@1.0.4/pkg": "mkdirp", - ":.aspect_rules_js/{link_root_name}/ms@2.1.3/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/ms@2.1.2/pkg": "ms", - ":.aspect_rules_js/{link_root_name}/nan@2.17.0/pkg": "nan", - ":.aspect_rules_js/{link_root_name}/negotiator@0.6.3/pkg": "negotiator", - ":.aspect_rules_js/{link_root_name}/node-gyp@9.3.1/pkg": "node-gyp", - ":.aspect_rules_js/{link_root_name}/nopt@6.0.0/pkg": "nopt", - ":.aspect_rules_js/{link_root_name}/npmlog@6.0.2/pkg": "npmlog", - ":.aspect_rules_js/{link_root_name}/once@1.4.0/pkg": "once", - ":.aspect_rules_js/{link_root_name}/p-map@4.0.0/pkg": "p-map", - ":.aspect_rules_js/{link_root_name}/path-is-absolute@1.0.1/pkg": "path-is-absolute", - ":.aspect_rules_js/{link_root_name}/promise-inflight@1.0.1/pkg": "promise-inflight", - ":.aspect_rules_js/{link_root_name}/promise-retry@2.0.1/pkg": "promise-retry", - ":.aspect_rules_js/{link_root_name}/readable-stream@3.6.1/pkg": "readable-stream", - ":.aspect_rules_js/{link_root_name}/retry@0.12.0/pkg": "retry", - ":.aspect_rules_js/{link_root_name}/rimraf@3.0.2/pkg": "rimraf", - ":.aspect_rules_js/{link_root_name}/safe-buffer@5.2.1/pkg": "safe-buffer", - ":.aspect_rules_js/{link_root_name}/safer-buffer@2.1.2/pkg": "safer-buffer", - ":.aspect_rules_js/{link_root_name}/segfault-handler@1.3.0/pkg_pre_lc_lite": "segfault-handler", - ":.aspect_rules_js/{link_root_name}/semver@7.3.8/pkg": "semver", - ":.aspect_rules_js/{link_root_name}/set-blocking@2.0.0/pkg": "set-blocking", - ":.aspect_rules_js/{link_root_name}/signal-exit@3.0.7/pkg": "signal-exit", - ":.aspect_rules_js/{link_root_name}/smart-buffer@4.2.0/pkg": "smart-buffer", - ":.aspect_rules_js/{link_root_name}/socks@2.7.1/pkg": "socks", - ":.aspect_rules_js/{link_root_name}/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", - ":.aspect_rules_js/{link_root_name}/ssri@9.0.1/pkg": "ssri", - ":.aspect_rules_js/{link_root_name}/string-width@4.2.3/pkg": "string-width", - ":.aspect_rules_js/{link_root_name}/string_decoder@1.3.0/pkg": "string_decoder", - ":.aspect_rules_js/{link_root_name}/strip-ansi@6.0.1/pkg": "strip-ansi", - ":.aspect_rules_js/{link_root_name}/tar@6.1.13/pkg": "tar", - ":.aspect_rules_js/{link_root_name}/unique-filename@2.0.1/pkg": "unique-filename", - ":.aspect_rules_js/{link_root_name}/unique-slug@3.0.0/pkg": "unique-slug", - ":.aspect_rules_js/{link_root_name}/util-deprecate@1.0.2/pkg": "util-deprecate", - ":.aspect_rules_js/{link_root_name}/which@2.0.2/pkg": "which", - ":.aspect_rules_js/{link_root_name}/wide-align@1.1.5/pkg": "wide-align", - ":.aspect_rules_js/{link_root_name}/wrappy@1.0.2/pkg": "wrappy", - ":.aspect_rules_js/{link_root_name}/yallist@4.0.0/pkg": "yallist", + ":.aspect_rules_js/@gar+promisify@1.1.3/pkg": "@gar/promisify", + ":.aspect_rules_js/@npmcli+fs@2.1.2/pkg": "@npmcli/fs", + ":.aspect_rules_js/@npmcli+move-file@2.0.1/pkg": "@npmcli/move-file", + ":.aspect_rules_js/@tootallnate+once@2.0.0/pkg": "@tootallnate/once", + ":.aspect_rules_js/abbrev@1.1.1/pkg": "abbrev", + ":.aspect_rules_js/agent-base@6.0.2/pkg": "agent-base", + ":.aspect_rules_js/agentkeepalive@4.2.1/pkg": "agentkeepalive", + ":.aspect_rules_js/aggregate-error@3.1.0/pkg": "aggregate-error", + ":.aspect_rules_js/ansi-regex@5.0.1/pkg": "ansi-regex", + ":.aspect_rules_js/aproba@2.0.0/pkg": "aproba", + ":.aspect_rules_js/are-we-there-yet@3.0.1/pkg": "are-we-there-yet", + ":.aspect_rules_js/balanced-match@1.0.2/pkg": "balanced-match", + ":.aspect_rules_js/bindings@1.5.0/pkg": "bindings", + ":.aspect_rules_js/brace-expansion@1.1.11/pkg": "brace-expansion", + ":.aspect_rules_js/brace-expansion@2.0.1/pkg": "brace-expansion", + ":.aspect_rules_js/cacache@16.1.3/pkg": "cacache", + ":.aspect_rules_js/chownr@2.0.0/pkg": "chownr", + ":.aspect_rules_js/clean-stack@2.2.0/pkg": "clean-stack", + ":.aspect_rules_js/color-support@1.1.3/pkg": "color-support", + ":.aspect_rules_js/concat-map@0.0.1/pkg": "concat-map", + ":.aspect_rules_js/console-control-strings@1.1.0/pkg": "console-control-strings", + ":.aspect_rules_js/debug@4.3.4/pkg": "debug", + ":.aspect_rules_js/delegates@1.0.0/pkg": "delegates", + ":.aspect_rules_js/depd@1.1.2/pkg": "depd", + ":.aspect_rules_js/emoji-regex@8.0.0/pkg": "emoji-regex", + ":.aspect_rules_js/encoding@0.1.13/pkg": "encoding", + ":.aspect_rules_js/env-paths@2.2.1/pkg": "env-paths", + ":.aspect_rules_js/err-code@2.0.3/pkg": "err-code", + ":.aspect_rules_js/file-uri-to-path@1.0.0/pkg": "file-uri-to-path", + ":.aspect_rules_js/fs-minipass@2.1.0/pkg": "fs-minipass", + ":.aspect_rules_js/fs.realpath@1.0.0/pkg": "fs.realpath", + ":.aspect_rules_js/gauge@4.0.4/pkg": "gauge", + ":.aspect_rules_js/glob@7.2.3/pkg": "glob", + ":.aspect_rules_js/glob@8.1.0/pkg": "glob", + ":.aspect_rules_js/graceful-fs@4.2.10/pkg": "graceful-fs", + ":.aspect_rules_js/has-unicode@2.0.1/pkg": "has-unicode", + ":.aspect_rules_js/http-cache-semantics@4.1.1/pkg": "http-cache-semantics", + ":.aspect_rules_js/http-proxy-agent@5.0.0/pkg": "http-proxy-agent", + ":.aspect_rules_js/https-proxy-agent@5.0.1/pkg": "https-proxy-agent", + ":.aspect_rules_js/humanize-ms@1.2.1/pkg": "humanize-ms", + ":.aspect_rules_js/iconv-lite@0.6.3/pkg": "iconv-lite", + ":.aspect_rules_js/imurmurhash@0.1.4/pkg": "imurmurhash", + ":.aspect_rules_js/indent-string@4.0.0/pkg": "indent-string", + ":.aspect_rules_js/infer-owner@1.0.4/pkg": "infer-owner", + ":.aspect_rules_js/inflight@1.0.6/pkg": "inflight", + ":.aspect_rules_js/inherits@2.0.4/pkg": "inherits", + ":.aspect_rules_js/ip@2.0.0/pkg": "ip", + ":.aspect_rules_js/is-fullwidth-code-point@3.0.0/pkg": "is-fullwidth-code-point", + ":.aspect_rules_js/is-lambda@1.0.1/pkg": "is-lambda", + ":.aspect_rules_js/isexe@2.0.0/pkg": "isexe", + ":.aspect_rules_js/lru-cache@6.0.0/pkg": "lru-cache", + ":.aspect_rules_js/lru-cache@7.17.0/pkg": "lru-cache", + ":.aspect_rules_js/make-fetch-happen@10.2.1/pkg": "make-fetch-happen", + ":.aspect_rules_js/minimatch@3.1.2/pkg": "minimatch", + ":.aspect_rules_js/minimatch@5.1.6/pkg": "minimatch", + ":.aspect_rules_js/minipass@3.3.6/pkg": "minipass", + ":.aspect_rules_js/minipass@4.2.4/pkg": "minipass", + ":.aspect_rules_js/minipass-collect@1.0.2/pkg": "minipass-collect", + ":.aspect_rules_js/minipass-fetch@2.1.2/pkg": "minipass-fetch", + ":.aspect_rules_js/minipass-flush@1.0.5/pkg": "minipass-flush", + ":.aspect_rules_js/minipass-pipeline@1.2.4/pkg": "minipass-pipeline", + ":.aspect_rules_js/minipass-sized@1.0.3/pkg": "minipass-sized", + ":.aspect_rules_js/minizlib@2.1.2/pkg": "minizlib", + ":.aspect_rules_js/mkdirp@1.0.4/pkg": "mkdirp", + ":.aspect_rules_js/ms@2.1.3/pkg": "ms", + ":.aspect_rules_js/ms@2.1.2/pkg": "ms", + ":.aspect_rules_js/nan@2.17.0/pkg": "nan", + ":.aspect_rules_js/negotiator@0.6.3/pkg": "negotiator", + ":.aspect_rules_js/node-gyp@9.3.1/pkg": "node-gyp", + ":.aspect_rules_js/nopt@6.0.0/pkg": "nopt", + ":.aspect_rules_js/npmlog@6.0.2/pkg": "npmlog", + ":.aspect_rules_js/once@1.4.0/pkg": "once", + ":.aspect_rules_js/p-map@4.0.0/pkg": "p-map", + ":.aspect_rules_js/path-is-absolute@1.0.1/pkg": "path-is-absolute", + ":.aspect_rules_js/promise-inflight@1.0.1/pkg": "promise-inflight", + ":.aspect_rules_js/promise-retry@2.0.1/pkg": "promise-retry", + ":.aspect_rules_js/readable-stream@3.6.1/pkg": "readable-stream", + ":.aspect_rules_js/retry@0.12.0/pkg": "retry", + ":.aspect_rules_js/rimraf@3.0.2/pkg": "rimraf", + ":.aspect_rules_js/safe-buffer@5.2.1/pkg": "safe-buffer", + ":.aspect_rules_js/safer-buffer@2.1.2/pkg": "safer-buffer", + ":.aspect_rules_js/segfault-handler@1.3.0/pkg_pre_lc_lite": "segfault-handler", + ":.aspect_rules_js/semver@7.3.8/pkg": "semver", + ":.aspect_rules_js/set-blocking@2.0.0/pkg": "set-blocking", + ":.aspect_rules_js/signal-exit@3.0.7/pkg": "signal-exit", + ":.aspect_rules_js/smart-buffer@4.2.0/pkg": "smart-buffer", + ":.aspect_rules_js/socks@2.7.1/pkg": "socks", + ":.aspect_rules_js/socks-proxy-agent@7.0.0/pkg": "socks-proxy-agent", + ":.aspect_rules_js/ssri@9.0.1/pkg": "ssri", + ":.aspect_rules_js/string-width@4.2.3/pkg": "string-width", + ":.aspect_rules_js/string_decoder@1.3.0/pkg": "string_decoder", + ":.aspect_rules_js/strip-ansi@6.0.1/pkg": "strip-ansi", + ":.aspect_rules_js/tar@6.1.13/pkg": "tar", + ":.aspect_rules_js/unique-filename@2.0.1/pkg": "unique-filename", + ":.aspect_rules_js/unique-slug@3.0.0/pkg": "unique-slug", + ":.aspect_rules_js/util-deprecate@1.0.2/pkg": "util-deprecate", + ":.aspect_rules_js/which@2.0.2/pkg": "which", + ":.aspect_rules_js/wide-align@1.1.5/pkg": "wide-align", + ":.aspect_rules_js/wrappy@1.0.2/pkg": "wrappy", + ":.aspect_rules_js/yallist@4.0.0/pkg": "yallist", }, dev = False, has_lifecycle_build_target = True, @@ -246,11 +245,9 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): +def npm_link_imported_package_store(name): return _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, @@ -260,12 +257,8 @@ def npm_link_imported_package_store(name, link_root_name, link_alias): # Generated npm_package_store and npm_link_package_store targets for npm package segfault-handler@1.3.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/js_image_docker/BUILD.bazel b/e2e/js_image_docker/BUILD.bazel index ee6542ba9..9ca7402d1 100644 --- a/e2e/js_image_docker/BUILD.bazel +++ b/e2e/js_image_docker/BUILD.bazel @@ -6,7 +6,7 @@ load("@io_bazel_rules_docker//container:layer.bzl", "container_layer") load("@io_bazel_rules_docker//contrib:test.bzl", "container_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() platform( name = "arm64_linux", diff --git a/e2e/js_image_oci/BUILD.bazel b/e2e/js_image_oci/BUILD.bazel index e98a04523..3cdfdc467 100644 --- a/e2e/js_image_oci/BUILD.bazel +++ b/e2e/js_image_oci/BUILD.bazel @@ -1,3 +1,3 @@ load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() diff --git a/e2e/js_image_oci/pkg/a/BUILD.bazel b/e2e/js_image_oci/pkg/a/BUILD.bazel index d34357214..70ec0241a 100644 --- a/e2e/js_image_oci/pkg/a/BUILD.bazel +++ b/e2e/js_image_oci/pkg/a/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", diff --git a/e2e/js_image_oci/pkg/b/BUILD.bazel b/e2e/js_image_oci/pkg/b/BUILD.bazel index 366b368fc..8d30cebae 100644 --- a/e2e/js_image_oci/pkg/b/BUILD.bazel +++ b/e2e/js_image_oci/pkg/b/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/e2e/js_run_devserver/BUILD.bazel b/e2e/js_run_devserver/BUILD.bazel index 656d0993a..04924fc91 100644 --- a/e2e/js_run_devserver/BUILD.bazel +++ b/e2e/js_run_devserver/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_link_package-esm/BUILD.bazel b/e2e/npm_link_package-esm/BUILD.bazel index e555fd594..0be2149b2 100644 --- a/e2e/npm_link_package-esm/BUILD.bazel +++ b/e2e/npm_link_package-esm/BUILD.bazel @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@foo//:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_link_package( name = "node_modules/@e2e/lib", diff --git a/e2e/npm_link_package-rerooted/root/BUILD.bazel b/e2e/npm_link_package-rerooted/root/BUILD.bazel index 6261e5086..56b82b2cf 100644 --- a/e2e/npm_link_package-rerooted/root/BUILD.bazel +++ b/e2e/npm_link_package-rerooted/root/BUILD.bazel @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@foo//:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_link_package( name = "node_modules/@e2e/lib", diff --git a/e2e/npm_link_package/BUILD.bazel b/e2e/npm_link_package/BUILD.bazel index e555fd594..0be2149b2 100644 --- a/e2e/npm_link_package/BUILD.bazel +++ b/e2e/npm_link_package/BUILD.bazel @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@foo//:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_link_package( name = "node_modules/@e2e/lib", diff --git a/e2e/npm_translate_lock/BUILD.bazel b/e2e/npm_translate_lock/BUILD.bazel index d1fa84085..a9ee0f508 100644 --- a/e2e/npm_translate_lock/BUILD.bazel +++ b/e2e/npm_translate_lock/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_auth/BUILD.bazel b/e2e/npm_translate_lock_auth/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/npm_translate_lock_auth/BUILD.bazel +++ b/e2e/npm_translate_lock_auth/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_disable_hooks/BUILD.bazel b/e2e/npm_translate_lock_disable_hooks/BUILD.bazel index b3c7980b1..595deea30 100644 --- a/e2e/npm_translate_lock_disable_hooks/BUILD.bazel +++ b/e2e/npm_translate_lock_disable_hooks/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_disable_hooks/snapshots/aspect_test_c_links_defs.bzl b/e2e/npm_translate_lock_disable_hooks/snapshots/aspect_test_c_links_defs.bzl index 64e199ff4..b7e889b00 100644 --- a/e2e/npm_translate_lock_disable_hooks/snapshots/aspect_test_c_links_defs.bzl +++ b/e2e/npm_translate_lock_disable_hooks/snapshots/aspect_test_c_links_defs.bzl @@ -16,18 +16,17 @@ _PACKAGE_STORE_NAME = "@aspect-test+c@2.0.0" # Generated npm_package_store targets for npm package @aspect-test/c@2.0.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/@aspect-test+c@2.0.0/pkg": "@aspect-test/c", + ":.aspect_rules_js/@aspect-test+c@2.0.0/pkg": "@aspect-test/c", }, ref_deps = {}, lc_deps = { - ":.aspect_rules_js/{link_root_name}/@aspect-test+c@2.0.0/pkg_pre_lc_lite": "@aspect-test/c", + ":.aspect_rules_js/@aspect-test+c@2.0.0/pkg_pre_lc_lite": "@aspect-test/c", }, dev = False, has_lifecycle_build_target = False, @@ -42,11 +41,9 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package @aspect-test/c@2.0.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): +def npm_link_imported_package_store(name): return _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, @@ -56,12 +53,8 @@ def npm_link_imported_package_store(name, link_root_name, link_alias): # Generated npm_package_store and npm_link_package_store targets for npm package @aspect-test/c@2.0.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/npm_translate_lock_disable_hooks/snapshots/defs.bzl b/e2e/npm_translate_lock_disable_hooks/snapshots/defs.bzl index be709a147..186f57378 100644 --- a/e2e/npm_translate_lock_disable_hooks/snapshots/defs.bzl +++ b/e2e/npm_translate_lock_disable_hooks/snapshots/defs.bzl @@ -8,7 +8,7 @@ load("@aspect_rules_js//js:defs.bzl", _js_library = "js_library") _LINK_PACKAGES = [""] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -20,7 +20,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -28,11 +28,11 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) + store_0() if link: if bazel_package == "": - link_0("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_0("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: @@ -40,21 +40,21 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -62,5 +62,5 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test/c".format(name)) + link_targets.append(":node_modules/@aspect-test/c") return link_targets diff --git a/e2e/npm_translate_lock_empty/BUILD.bazel b/e2e/npm_translate_lock_empty/BUILD.bazel index c0f3ad1a1..7a9fcaea2 100644 --- a/e2e/npm_translate_lock_empty/BUILD.bazel +++ b/e2e/npm_translate_lock_empty/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_exclude_package_contents/BUILD.bazel b/e2e/npm_translate_lock_exclude_package_contents/BUILD.bazel index 29996dd54..af5673535 100644 --- a/e2e/npm_translate_lock_exclude_package_contents/BUILD.bazel +++ b/e2e/npm_translate_lock_exclude_package_contents/BUILD.bazel @@ -1,6 +1,6 @@ load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() sh_test( name = "test_sh", diff --git a/e2e/npm_translate_lock_git+ssh/BUILD.bazel b/e2e/npm_translate_lock_git+ssh/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/npm_translate_lock_git+ssh/BUILD.bazel +++ b/e2e/npm_translate_lock_git+ssh/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_partial_clone/root/BUILD.bazel b/e2e/npm_translate_lock_partial_clone/root/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/npm_translate_lock_partial_clone/root/BUILD.bazel +++ b/e2e/npm_translate_lock_partial_clone/root/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_lock_replace_packages/BUILD.bazel b/e2e/npm_translate_lock_replace_packages/BUILD.bazel index 16e39531a..cb15ae168 100644 --- a/e2e/npm_translate_lock_replace_packages/BUILD.bazel +++ b/e2e/npm_translate_lock_replace_packages/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_test( name = "test", diff --git a/e2e/npm_translate_lock_subdir_patch/subdir/BUILD.bazel b/e2e/npm_translate_lock_subdir_patch/subdir/BUILD.bazel index 1f88a7369..9dc4f055c 100644 --- a/e2e/npm_translate_lock_subdir_patch/subdir/BUILD.bazel +++ b/e2e/npm_translate_lock_subdir_patch/subdir/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_test( name = "test", diff --git a/e2e/npm_translate_package_lock/BUILD.bazel b/e2e/npm_translate_package_lock/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/npm_translate_package_lock/BUILD.bazel +++ b/e2e/npm_translate_package_lock/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/npm_translate_yarn_lock/BUILD.bazel b/e2e/npm_translate_yarn_lock/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/npm_translate_yarn_lock/BUILD.bazel +++ b/e2e/npm_translate_yarn_lock/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/package_json_module/BUILD.bazel b/e2e/package_json_module/BUILD.bazel index da38f97c8..659aaa64d 100644 --- a/e2e/package_json_module/BUILD.bazel +++ b/e2e/package_json_module/BUILD.bazel @@ -1,7 +1,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//:mocha/package_json.bzl", mocha_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() mocha_bin.mocha_test( name = "test", diff --git a/e2e/patch_from_repo/BUILD.bazel b/e2e/patch_from_repo/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/patch_from_repo/BUILD.bazel +++ b/e2e/patch_from_repo/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/pnpm_lockfiles/MODULE.bazel b/e2e/pnpm_lockfiles/MODULE.bazel index d7e2f817e..bf497324b 100644 --- a/e2e/pnpm_lockfiles/MODULE.bazel +++ b/e2e/pnpm_lockfiles/MODULE.bazel @@ -93,7 +93,7 @@ npm = use_extension( [ npm.npm_translate_lock( - name = lockfile.replace(".yaml", ""), + name = lockfile, pnpm_lock = "//cases/%s:pnpm-lock.yaml" % lockfile, verify_node_modules_ignored = "//:.bazelignore", ) @@ -103,7 +103,7 @@ npm = use_extension( [ use_repo( npm, - lockfile.replace(".yaml", ""), + lockfile, ) for lockfile in PNPM_LOCK_TEST_CASES ] diff --git a/e2e/pnpm_lockfiles/WORKSPACE b/e2e/pnpm_lockfiles/WORKSPACE index c05b26712..95ac683c8 100644 --- a/e2e/pnpm_lockfiles/WORKSPACE +++ b/e2e/pnpm_lockfiles/WORKSPACE @@ -59,7 +59,7 @@ npm_repositories_v90() [ npm_translate_lock( - name = lockfile.replace(".yaml", ""), + name = lockfile, pnpm_lock = "//cases/%s:pnpm-lock.yaml" % lockfile, verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/pnpm_lockfiles/lockfile-test.bzl b/e2e/pnpm_lockfiles/lockfile-test.bzl index 74f027a60..b55b711ad 100644 --- a/e2e/pnpm_lockfiles/lockfile-test.bzl +++ b/e2e/pnpm_lockfiles/lockfile-test.bzl @@ -45,7 +45,7 @@ def lockfile_test(npm_link_all_packages, name = None): lock_version = name if name else native.package_name() lock_repo = "lock-%s" % lock_version - npm_link_all_packages(name = "node_modules") + npm_link_all_packages() # Copy each test to this lockfile dir for test in ["patched-dependencies-test.js", "aliases-test.js"]: @@ -134,8 +134,8 @@ def lockfile_test(npm_link_all_packages, name = None): # Packages involving overrides ":node_modules/is-odd", - ":.aspect_rules_js/node_modules/is-odd@3.0.1", - ":.aspect_rules_js/node_modules/is-number@0.0.0", + ":.aspect_rules_js/is-odd@3.0.1", + ":.aspect_rules_js/is-number@0.0.0", # Odd git/http versions ":node_modules/debug", @@ -162,46 +162,46 @@ def lockfile_test(npm_link_all_packages, name = None): ":node_modules/is-odd-v1", ":node_modules/is-odd-v2", ":node_modules/is-odd-v3", - ":.aspect_rules_js/node_modules/is-odd@0.1.0", - ":.aspect_rules_js/node_modules/is-odd@1.0.0", - ":.aspect_rules_js/node_modules/is-odd@2.0.0", - ":.aspect_rules_js/node_modules/is-odd@3.0.0", + ":.aspect_rules_js/is-odd@0.1.0", + ":.aspect_rules_js/is-odd@1.0.0", + ":.aspect_rules_js/is-odd@2.0.0", + ":.aspect_rules_js/is-odd@3.0.0", # npm: alias to package not listed elsewhere ":node_modules/alias-only-sizzle", - ":.aspect_rules_js/node_modules/@types+sizzle@2.3.9", + ":.aspect_rules_js/@types+sizzle@2.3.9", "@%s__at_types_sizzle__2.3.9//:pkg" % lock_repo, # Targets within the virtual store... # Direct dep targets - ":.aspect_rules_js/node_modules/@aspect-test+a@5.0.2", - ":.aspect_rules_js/node_modules/@aspect-test+a@5.0.2/dir", - ":.aspect_rules_js/node_modules/@aspect-test+a@5.0.2/pkg", - ":.aspect_rules_js/node_modules/@aspect-test+a@5.0.2/ref", + ":.aspect_rules_js/@aspect-test+a@5.0.2", + ":.aspect_rules_js/@aspect-test+a@5.0.2/dir", + ":.aspect_rules_js/@aspect-test+a@5.0.2/pkg", + ":.aspect_rules_js/@aspect-test+a@5.0.2/ref", # Direct deps with lifecycles - ":.aspect_rules_js/node_modules/@aspect-test+c@2.0.2/lc", - ":.aspect_rules_js/node_modules/@aspect-test+c@2.0.2/pkg_lc", + ":.aspect_rules_js/@aspect-test+c@2.0.2/lc", + ":.aspect_rules_js/@aspect-test+c@2.0.2/pkg_lc", # link:, workspace:, file:, ./rel/path - ":.aspect_rules_js/node_modules/@scoped+a@0.0.0", - ":.aspect_rules_js/node_modules/@scoped+b@0.0.0", - ":.aspect_rules_js/node_modules/@scoped+c@0.0.0", - ":.aspect_rules_js/node_modules/@scoped+d@0.0.0", - ":.aspect_rules_js/node_modules/test-c200-d200@0.0.0", - ":.aspect_rules_js/node_modules/test-c201-d200@0.0.0", - ":.aspect_rules_js/node_modules/lodash@4.17.21", - ":.aspect_rules_js/node_modules/lodash@4.17.21/dir", + ":.aspect_rules_js/@scoped+a@0.0.0", + ":.aspect_rules_js/@scoped+b@0.0.0", + ":.aspect_rules_js/@scoped+c@0.0.0", + ":.aspect_rules_js/@scoped+d@0.0.0", + ":.aspect_rules_js/test-c200-d200@0.0.0", + ":.aspect_rules_js/test-c201-d200@0.0.0", + ":.aspect_rules_js/lodash@4.17.21", + ":.aspect_rules_js/lodash@4.17.21/dir", # Patched dependencies - ":.aspect_rules_js/node_modules/meaning-of-life@1.0.0_o3deharooos255qt5xdujc3cuq", + ":.aspect_rules_js/meaning-of-life@1.0.0_o3deharooos255qt5xdujc3cuq", "@%s__meaning-of-life__1.0.0_o3deharooos255qt5xdujc3cuq//:pkg" % lock_repo, # Direct deps from custom registry - ":.aspect_rules_js/node_modules/@types+node@16.18.11", + ":.aspect_rules_js/@types+node@16.18.11", # Direct deps with peers - ":.aspect_rules_js/node_modules/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2", + ":.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2", "@%s__at_aspect-test_d__2.0.0_at_aspect-test_c_2.0.2//:pkg" % lock_repo, ], ) diff --git a/e2e/pnpm_lockfiles/v54/snapshots/defs.bzl b/e2e/pnpm_lockfiles/v54/snapshots/defs.bzl index 3d8fad06a..b007f9b88 100644 --- a/e2e/pnpm_lockfiles/v54/snapshots/defs.bzl +++ b/e2e/pnpm_lockfiles/v54/snapshots/defs.bzl @@ -77,7 +77,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "projects/a", "projects/a-types", "projects/b", "projects/c", "projects/d", "projects/peer-types", "projects/peers-combo-1", "projects/peers-combo-2", "vendored/is-number"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -89,7 +89,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -97,206 +97,206 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) - store_12(name) - store_13(name) - store_14(name) - store_15(name) - store_16(name) - store_17(name) - store_18(name) - store_19(name) - store_20(name) - store_21(name) - store_22(name) - store_23(name) - store_24(name) - store_25(name) - store_26(name) - store_27(name) - store_28(name) - store_29(name) - store_30(name) - store_31(name) - store_32(name) - store_33(name) - store_34(name) - store_35(name) - store_36(name) - store_37(name) - store_38(name) - store_39(name) - store_40(name) - store_41(name) - store_42(name) - store_43(name) - store_44(name) - store_45(name) - store_46(name) - store_47(name) - store_48(name) - store_49(name) - store_50(name) - store_51(name) - store_52(name) - store_53(name) - store_54(name) - store_55(name) - store_56(name) - store_57(name) - store_58(name) - store_59(name) - store_60(name) - store_61(name) - store_62(name) - store_63(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() + store_12() + store_13() + store_14() + store_15() + store_16() + store_17() + store_18() + store_19() + store_20() + store_21() + store_22() + store_23() + store_24() + store_25() + store_26() + store_27() + store_28() + store_29() + store_30() + store_31() + store_32() + store_33() + store_34() + store_35() + store_36() + store_37() + store_38() + store_39() + store_40() + store_41() + store_42() + store_43() + store_44() + store_45() + store_46() + store_47() + store_48() + store_49() + store_50() + store_51() + store_52() + store_53() + store_54() + store_55() + store_56() + store_57() + store_58() + store_59() + store_60() + store_61() + store_62() + store_63() if link: if bazel_package == "": - link_4("{}/@aspect-test-a-bad-scope".format(name), link_root_name = name, link_alias = "@aspect-test-a-bad-scope") - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) + link_4("@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-a-bad-scope") if "@aspect-test-a-bad-scop" not in scope_targets: scope_targets["@aspect-test-a-bad-scop"] = [link_targets[-1]] else: scope_targets["@aspect-test-a-bad-scop"].append(link_targets[-1]) - link_4("{}/@aspect-test-custom-scope/a".format(name), link_root_name = name, link_alias = "@aspect-test-custom-scope/a") - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) + link_4("@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") if "@aspect-test-custom-scope" not in scope_targets: scope_targets["@aspect-test-custom-scope"] = [link_targets[-1]] else: scope_targets["@aspect-test-custom-scope"].append(link_targets[-1]) - link_4("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_4("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/@aspect-test/a2".format(name), link_root_name = name, link_alias = "@aspect-test/a2") - link_targets.append(":{}/@aspect-test/a2".format(name)) + link_4("@aspect-test/a2") + link_targets.append(":node_modules/@aspect-test/a2") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/aspect-test-a-no-scope".format(name), link_root_name = name, link_alias = "aspect-test-a-no-scope") - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_4("{}/aspect-test-a/no-at".format(name), link_root_name = name, link_alias = "aspect-test-a/no-at") - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_5("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_4("aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_4("aspect-test-a/no-at") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_5("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_12("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_13("{}/@isaacs/cliui".format(name), link_root_name = name, link_alias = "@isaacs/cliui") - link_targets.append(":{}/@isaacs/cliui".format(name)) + link_12("jsonify") + link_targets.append(":node_modules/jsonify") + link_13("@isaacs/cliui") + link_targets.append(":node_modules/@isaacs/cliui") if "@isaacs" not in scope_targets: scope_targets["@isaacs"] = [link_targets[-1]] else: scope_targets["@isaacs"].append(link_targets[-1]) - link_14("{}/rollup-plugin-with-peers".format(name), link_root_name = name, link_alias = "rollup-plugin-with-peers") - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_16("{}/@types/archiver".format(name), link_root_name = name, link_alias = "@types/archiver") - link_targets.append(":{}/@types/archiver".format(name)) + link_14("rollup-plugin-with-peers") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_16("@types/archiver") + link_targets.append(":node_modules/@types/archiver") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_20("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_20("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_20("{}/alias-types-node".format(name), link_root_name = name, link_alias = "alias-types-node") - link_targets.append(":{}/alias-types-node".format(name)) - link_21("{}/alias-only-sizzle".format(name), link_root_name = name, link_alias = "alias-only-sizzle") - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_24("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_34("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) - link_37("{}/is-odd-v0".format(name), link_root_name = name, link_alias = "is-odd-v0") - link_targets.append(":{}/is-odd-v0".format(name)) - link_38("{}/is-odd-v1".format(name), link_root_name = name, link_alias = "is-odd-v1") - link_targets.append(":{}/is-odd-v1".format(name)) - link_39("{}/is-odd-v2".format(name), link_root_name = name, link_alias = "is-odd-v2") - link_targets.append(":{}/is-odd-v2".format(name)) - link_40("{}/is-odd-v3".format(name), link_root_name = name, link_alias = "is-odd-v3") - link_targets.append(":{}/is-odd-v3".format(name)) - link_41("{}/is-odd".format(name), link_root_name = name, link_alias = "is-odd") - link_targets.append(":{}/is-odd".format(name)) - link_41("{}/is-odd-alias".format(name), link_root_name = name, link_alias = "is-odd-alias") - link_targets.append(":{}/is-odd-alias".format(name)) - link_42("{}/jquery-git-ssh-e61fccb".format(name), link_root_name = name, link_alias = "jquery-git-ssh-e61fccb") - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_44("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_45("{}/meaning-of-life".format(name), link_root_name = name, link_alias = "meaning-of-life") - link_targets.append(":{}/meaning-of-life".format(name)) - link_51("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_52("{}/rollup3".format(name), link_root_name = name, link_alias = "rollup3") - link_targets.append(":{}/rollup3".format(name)) - link_59("{}/tslib".format(name), link_root_name = name, link_alias = "tslib") - link_targets.append(":{}/tslib".format(name)) - link_60("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) - link_61("{}/uvu".format(name), link_root_name = name, link_alias = "uvu") - link_targets.append(":{}/uvu".format(name)) + link_20("alias-types-node") + link_targets.append(":node_modules/alias-types-node") + link_21("alias-only-sizzle") + link_targets.append(":node_modules/alias-only-sizzle") + link_24("debug") + link_targets.append(":node_modules/debug") + link_34("hello") + link_targets.append(":node_modules/hello") + link_37("is-odd-v0") + link_targets.append(":node_modules/is-odd-v0") + link_38("is-odd-v1") + link_targets.append(":node_modules/is-odd-v1") + link_39("is-odd-v2") + link_targets.append(":node_modules/is-odd-v2") + link_40("is-odd-v3") + link_targets.append(":node_modules/is-odd-v3") + link_41("is-odd") + link_targets.append(":node_modules/is-odd") + link_41("is-odd-alias") + link_targets.append(":node_modules/is-odd-alias") + link_42("jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_44("lodash") + link_targets.append(":node_modules/lodash") + link_45("meaning-of-life") + link_targets.append(":node_modules/meaning-of-life") + link_51("rollup") + link_targets.append(":node_modules/rollup") + link_52("rollup3") + link_targets.append(":node_modules/rollup3") + link_59("tslib") + link_targets.append(":node_modules/tslib") + link_60("typescript") + link_targets.append(":node_modules/typescript") + link_61("uvu") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_9("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peers-combo-1": - link_7("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_7("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_10("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/a-types": - link_20("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_20("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "projects/b": - link_20("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_20("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: @@ -304,14 +304,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+c@0.0.0", src = "//projects/c:pkg", package = "@scoped/c", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -320,8 +319,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/c".format(name), - src = "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name), + name = "node_modules/@scoped/c", + src = "//:.aspect_rules_js/@scoped+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -329,13 +328,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/c/dir".format(name), - srcs = [":{}/@scoped/c".format(name)], + name = "node_modules/@scoped/c/dir", + srcs = [":node_modules/@scoped/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -343,7 +342,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "is-number@0.0.0", src = "//vendored/is-number:pkg", package = "is-number", @@ -355,7 +353,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+a@0.0.0", src = "//projects/a:pkg", package = "@scoped/a", @@ -368,8 +365,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/b", "projects/c", "projects/d"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/a".format(name), - src = "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name), + name = "node_modules/@scoped/a", + src = "//:.aspect_rules_js/@scoped+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -377,13 +374,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/a/dir".format(name), - srcs = [":{}/@scoped/a".format(name)], + name = "node_modules/@scoped/a/dir", + srcs = [":node_modules/@scoped/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -391,13 +388,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+b@0.0.0", src = "//projects/b:pkg", package = "@scoped/b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -406,8 +402,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/b".format(name), - src = "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name), + name = "node_modules/@scoped/b", + src = "//:.aspect_rules_js/@scoped+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -415,13 +411,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/b/dir".format(name), - srcs = [":{}/@scoped/b".format(name)], + name = "node_modules/@scoped/b/dir", + srcs = [":node_modules/@scoped/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -429,13 +425,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+d@0.0.0", src = "//projects/d:pkg", package = "@scoped/d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -444,8 +439,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/d".format(name), - src = "//:.aspect_rules_js/{}/@scoped+d@0.0.0".format(name), + name = "node_modules/@scoped/d", + src = "//:.aspect_rules_js/@scoped+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -453,13 +448,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/d/dir".format(name), - srcs = [":{}/@scoped/d".format(name)], + name = "node_modules/@scoped/d/dir", + srcs = [":node_modules/@scoped/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -467,7 +462,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "alias-project-a@0.0.0", src = "//projects/a:pkg", package = "alias-project-a", @@ -480,8 +474,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/alias-project-a".format(name), - src = "//:.aspect_rules_js/{}/alias-project-a@0.0.0".format(name), + name = "node_modules/alias-project-a", + src = "//:.aspect_rules_js/alias-project-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -489,23 +483,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/alias-project-a/dir".format(name), - srcs = [":{}/alias-project-a".format(name)], + name = "node_modules/alias-project-a/dir", + srcs = [":node_modules/alias-project-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "scoped+bad@0.0.0", src = "//projects/b:pkg", package = "scoped/bad", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -514,8 +507,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/scoped/bad".format(name), - src = "//:.aspect_rules_js/{}/scoped+bad@0.0.0".format(name), + name = "node_modules/scoped/bad", + src = "//:.aspect_rules_js/scoped+bad@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -523,24 +516,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/scoped/bad/dir".format(name), - srcs = [":{}/scoped/bad".format(name)], + name = "node_modules/scoped/bad/dir", + srcs = [":node_modules/scoped/bad"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c200-d200@0.0.0", src = "//projects/peers-combo-2:pkg", package = "test-c200-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.0".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.0": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -549,8 +541,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c200-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c200-d200@0.0.0".format(name), + name = "node_modules/test-c200-d200", + src = "//:.aspect_rules_js/test-c200-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -558,24 +550,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c200-d200/dir".format(name), - srcs = [":{}/test-c200-d200".format(name)], + name = "node_modules/test-c200-d200/dir", + srcs = [":node_modules/test-c200-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c201-d200@0.0.0", src = "//projects/peers-combo-1:pkg", package = "test-c201-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.1".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.1": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -584,8 +575,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c201-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c201-d200@0.0.0".format(name), + name = "node_modules/test-c201-d200", + src = "//:.aspect_rules_js/test-c201-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -593,17 +584,16 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c201-d200/dir".format(name), - srcs = [":{}/test-c201-d200".format(name)], + name = "node_modules/test-c201-d200/dir", + srcs = [":node_modules/test-c201-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-peer-types@0.0.0", src = "//projects/peer-types:pkg", package = "test-peer-types", @@ -616,8 +606,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-peer-types".format(name), - src = "//:.aspect_rules_js/{}/test-peer-types@0.0.0".format(name), + name = "node_modules/test-peer-types", + src = "//:.aspect_rules_js/test-peer-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -625,23 +615,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-peer-types/dir".format(name), - srcs = [":{}/test-peer-types".format(name)], + name = "node_modules/test-peer-types/dir", + srcs = [":node_modules/test-peer-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "a-types@0.0.0", src = "//projects/a-types:pkg", package = "a-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "@types/node", + "//:.aspect_rules_js/@types+node@16.18.11": "@types/node", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -650,8 +639,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["projects/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/a-types".format(name), - src = "//:.aspect_rules_js/{}/a-types@0.0.0".format(name), + name = "node_modules/a-types", + src = "//:.aspect_rules_js/a-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -659,31 +648,31 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/a-types/dir".format(name), - srcs = [":{}/a-types".format(name)], + name = "node_modules/a-types/dir", + srcs = [":node_modules/a-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -691,75 +680,75 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/a2".format(name)) - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/@isaacs/cliui".format(name)) - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_targets.append(":{}/@types/archiver".format(name)) - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/alias-types-node".format(name)) - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/hello".format(name)) - link_targets.append(":{}/is-odd-v0".format(name)) - link_targets.append(":{}/is-odd-v1".format(name)) - link_targets.append(":{}/is-odd-v2".format(name)) - link_targets.append(":{}/is-odd-v3".format(name)) - link_targets.append(":{}/is-odd".format(name)) - link_targets.append(":{}/is-odd-alias".format(name)) - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/meaning-of-life".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/rollup3".format(name)) - link_targets.append(":{}/tslib".format(name)) - link_targets.append(":{}/typescript".format(name)) - link_targets.append(":{}/uvu".format(name)) + link_targets.append(":node_modules/@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a2") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/@isaacs/cliui") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_targets.append(":node_modules/@types/archiver") + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/alias-types-node") + link_targets.append(":node_modules/alias-only-sizzle") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/hello") + link_targets.append(":node_modules/is-odd-v0") + link_targets.append(":node_modules/is-odd-v1") + link_targets.append(":node_modules/is-odd-v2") + link_targets.append(":node_modules/is-odd-v3") + link_targets.append(":node_modules/is-odd") + link_targets.append(":node_modules/is-odd-alias") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/meaning-of-life") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/rollup3") + link_targets.append(":node_modules/tslib") + link_targets.append(":node_modules/typescript") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peers-combo-1": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/a-types": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "projects/b": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") if bazel_package in [""]: - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if bazel_package in ["", "projects/b", "projects/c", "projects/d"]: - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if bazel_package in [""]: - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if bazel_package in [""]: - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if bazel_package in [""]: - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if bazel_package in [""]: - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if bazel_package in [""]: - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if bazel_package in [""]: - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if bazel_package in [""]: - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if bazel_package in ["projects/b"]: - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") return link_targets diff --git a/e2e/pnpm_lockfiles/v54/snapshots/rollup3_package_json.bzl b/e2e/pnpm_lockfiles/v54/snapshots/rollup3_package_json.bzl index 776ae8930..df8883175 100644 --- a/e2e/pnpm_lockfiles/v54/snapshots/rollup3_package_json.bzl +++ b/e2e/pnpm_lockfiles/v54/snapshots/rollup3_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@3.29.4" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v54/snapshots/rollup_links_defs.bzl b/e2e/pnpm_lockfiles/v54/snapshots/rollup_links_defs.bzl index 60ebee0f5..1cb437668 100644 --- a/e2e/pnpm_lockfiles/v54/snapshots/rollup_links_defs.bzl +++ b/e2e/pnpm_lockfiles/v54/snapshots/rollup_links_defs.bzl @@ -16,22 +16,21 @@ _PACKAGE_STORE_NAME = "rollup@2.14.0" # Generated npm_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg": "rollup", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/ref": "fsevents", + ":.aspect_rules_js/fsevents@2.3.3/ref": "fsevents", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg_pre_lc_lite": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg_pre_lc_lite": "rollup", }, dev = False, has_lifecycle_build_target = False, @@ -46,26 +45,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/pnpm_lockfiles/v54/snapshots/rollup_package_json.bzl b/e2e/pnpm_lockfiles/v54/snapshots/rollup_package_json.bzl index cf712bbdd..c79fe4c90 100644 --- a/e2e/pnpm_lockfiles/v54/snapshots/rollup_package_json.bzl +++ b/e2e/pnpm_lockfiles/v54/snapshots/rollup_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@2.14.0" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "./dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v60/snapshots/defs.bzl b/e2e/pnpm_lockfiles/v60/snapshots/defs.bzl index 0ffd12c9b..69415026d 100644 --- a/e2e/pnpm_lockfiles/v60/snapshots/defs.bzl +++ b/e2e/pnpm_lockfiles/v60/snapshots/defs.bzl @@ -78,7 +78,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "projects/a", "projects/a-types", "projects/b", "projects/c", "projects/d", "projects/peer-types", "projects/peers-combo-1", "projects/peers-combo-2", "vendored/is-number"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -90,7 +90,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -98,218 +98,218 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) - store_12(name) - store_13(name) - store_14(name) - store_15(name) - store_16(name) - store_17(name) - store_18(name) - store_19(name) - store_20(name) - store_21(name) - store_22(name) - store_23(name) - store_24(name) - store_25(name) - store_26(name) - store_27(name) - store_28(name) - store_29(name) - store_30(name) - store_31(name) - store_32(name) - store_33(name) - store_34(name) - store_35(name) - store_36(name) - store_37(name) - store_38(name) - store_39(name) - store_40(name) - store_41(name) - store_42(name) - store_43(name) - store_44(name) - store_45(name) - store_46(name) - store_47(name) - store_48(name) - store_49(name) - store_50(name) - store_51(name) - store_52(name) - store_53(name) - store_54(name) - store_55(name) - store_56(name) - store_57(name) - store_58(name) - store_59(name) - store_60(name) - store_61(name) - store_62(name) - store_63(name) - store_64(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() + store_12() + store_13() + store_14() + store_15() + store_16() + store_17() + store_18() + store_19() + store_20() + store_21() + store_22() + store_23() + store_24() + store_25() + store_26() + store_27() + store_28() + store_29() + store_30() + store_31() + store_32() + store_33() + store_34() + store_35() + store_36() + store_37() + store_38() + store_39() + store_40() + store_41() + store_42() + store_43() + store_44() + store_45() + store_46() + store_47() + store_48() + store_49() + store_50() + store_51() + store_52() + store_53() + store_54() + store_55() + store_56() + store_57() + store_58() + store_59() + store_60() + store_61() + store_62() + store_63() + store_64() if link: if bazel_package == "": - link_4("{}/@aspect-test-a-bad-scope".format(name), link_root_name = name, link_alias = "@aspect-test-a-bad-scope") - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) + link_4("@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-a-bad-scope") if "@aspect-test-a-bad-scop" not in scope_targets: scope_targets["@aspect-test-a-bad-scop"] = [link_targets[-1]] else: scope_targets["@aspect-test-a-bad-scop"].append(link_targets[-1]) - link_4("{}/@aspect-test-custom-scope/a".format(name), link_root_name = name, link_alias = "@aspect-test-custom-scope/a") - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) + link_4("@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") if "@aspect-test-custom-scope" not in scope_targets: scope_targets["@aspect-test-custom-scope"] = [link_targets[-1]] else: scope_targets["@aspect-test-custom-scope"].append(link_targets[-1]) - link_4("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_4("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/@aspect-test/a2".format(name), link_root_name = name, link_alias = "@aspect-test/a2") - link_targets.append(":{}/@aspect-test/a2".format(name)) + link_4("@aspect-test/a2") + link_targets.append(":node_modules/@aspect-test/a2") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/aspect-test-a-no-scope".format(name), link_root_name = name, link_alias = "aspect-test-a-no-scope") - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_4("{}/aspect-test-a/no-at".format(name), link_root_name = name, link_alias = "aspect-test-a/no-at") - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_5("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_4("aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_4("aspect-test-a/no-at") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_5("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_12("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_12("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_14("{}/@isaacs/cliui".format(name), link_root_name = name, link_alias = "@isaacs/cliui") - link_targets.append(":{}/@isaacs/cliui".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_14("@isaacs/cliui") + link_targets.append(":node_modules/@isaacs/cliui") if "@isaacs" not in scope_targets: scope_targets["@isaacs"] = [link_targets[-1]] else: scope_targets["@isaacs"].append(link_targets[-1]) - link_15("{}/rollup-plugin-with-peers".format(name), link_root_name = name, link_alias = "rollup-plugin-with-peers") - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_17("{}/@types/archiver".format(name), link_root_name = name, link_alias = "@types/archiver") - link_targets.append(":{}/@types/archiver".format(name)) + link_15("rollup-plugin-with-peers") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_17("@types/archiver") + link_targets.append(":node_modules/@types/archiver") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/alias-types-node".format(name), link_root_name = name, link_alias = "alias-types-node") - link_targets.append(":{}/alias-types-node".format(name)) - link_22("{}/alias-only-sizzle".format(name), link_root_name = name, link_alias = "alias-only-sizzle") - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_25("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) - link_38("{}/is-odd-v0".format(name), link_root_name = name, link_alias = "is-odd-v0") - link_targets.append(":{}/is-odd-v0".format(name)) - link_39("{}/is-odd-v1".format(name), link_root_name = name, link_alias = "is-odd-v1") - link_targets.append(":{}/is-odd-v1".format(name)) - link_40("{}/is-odd-v2".format(name), link_root_name = name, link_alias = "is-odd-v2") - link_targets.append(":{}/is-odd-v2".format(name)) - link_41("{}/is-odd-v3".format(name), link_root_name = name, link_alias = "is-odd-v3") - link_targets.append(":{}/is-odd-v3".format(name)) - link_42("{}/is-odd".format(name), link_root_name = name, link_alias = "is-odd") - link_targets.append(":{}/is-odd".format(name)) - link_42("{}/is-odd-alias".format(name), link_root_name = name, link_alias = "is-odd-alias") - link_targets.append(":{}/is-odd-alias".format(name)) - link_43("{}/jquery-git-ssh-e61fccb".format(name), link_root_name = name, link_alias = "jquery-git-ssh-e61fccb") - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_45("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_46("{}/meaning-of-life".format(name), link_root_name = name, link_alias = "meaning-of-life") - link_targets.append(":{}/meaning-of-life".format(name)) - link_52("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_53("{}/rollup3".format(name), link_root_name = name, link_alias = "rollup3") - link_targets.append(":{}/rollup3".format(name)) - link_60("{}/tslib".format(name), link_root_name = name, link_alias = "tslib") - link_targets.append(":{}/tslib".format(name)) - link_61("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) - link_62("{}/uvu".format(name), link_root_name = name, link_alias = "uvu") - link_targets.append(":{}/uvu".format(name)) + link_21("alias-types-node") + link_targets.append(":node_modules/alias-types-node") + link_22("alias-only-sizzle") + link_targets.append(":node_modules/alias-only-sizzle") + link_25("debug") + link_targets.append(":node_modules/debug") + link_35("hello") + link_targets.append(":node_modules/hello") + link_38("is-odd-v0") + link_targets.append(":node_modules/is-odd-v0") + link_39("is-odd-v1") + link_targets.append(":node_modules/is-odd-v1") + link_40("is-odd-v2") + link_targets.append(":node_modules/is-odd-v2") + link_41("is-odd-v3") + link_targets.append(":node_modules/is-odd-v3") + link_42("is-odd") + link_targets.append(":node_modules/is-odd") + link_42("is-odd-alias") + link_targets.append(":node_modules/is-odd-alias") + link_43("jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_45("lodash") + link_targets.append(":node_modules/lodash") + link_46("meaning-of-life") + link_targets.append(":node_modules/meaning-of-life") + link_52("rollup") + link_targets.append(":node_modules/rollup") + link_53("rollup3") + link_targets.append(":node_modules/rollup3") + link_60("tslib") + link_targets.append(":node_modules/tslib") + link_61("typescript") + link_targets.append(":node_modules/typescript") + link_62("uvu") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_9("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peers-combo-1": - link_7("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_7("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_10("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peer-types": - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_35("hello") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "projects/b": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: @@ -317,14 +317,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+c@0.0.0", src = "//projects/c:pkg", package = "@scoped/c", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -333,8 +332,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/c".format(name), - src = "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name), + name = "node_modules/@scoped/c", + src = "//:.aspect_rules_js/@scoped+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -342,13 +341,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/c/dir".format(name), - srcs = [":{}/@scoped/c".format(name)], + name = "node_modules/@scoped/c/dir", + srcs = [":node_modules/@scoped/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -356,7 +355,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "is-number@0.0.0", src = "//vendored/is-number:pkg", package = "is-number", @@ -368,7 +366,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+a@0.0.0", src = "//projects/a:pkg", package = "@scoped/a", @@ -381,8 +378,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/a".format(name), - src = "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name), + name = "node_modules/@scoped/a", + src = "//:.aspect_rules_js/@scoped+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -390,13 +387,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/a/dir".format(name), - srcs = [":{}/@scoped/a".format(name)], + name = "node_modules/@scoped/a/dir", + srcs = [":node_modules/@scoped/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -404,13 +401,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+b@0.0.0", src = "//projects/b:pkg", package = "@scoped/b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -419,8 +415,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/b".format(name), - src = "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name), + name = "node_modules/@scoped/b", + src = "//:.aspect_rules_js/@scoped+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -428,13 +424,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/b/dir".format(name), - srcs = [":{}/@scoped/b".format(name)], + name = "node_modules/@scoped/b/dir", + srcs = [":node_modules/@scoped/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -442,14 +438,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+d@0.0.0", src = "//projects/d:pkg", package = "@scoped/d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -458,8 +453,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/d".format(name), - src = "//:.aspect_rules_js/{}/@scoped+d@0.0.0".format(name), + name = "node_modules/@scoped/d", + src = "//:.aspect_rules_js/@scoped+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -467,13 +462,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/d/dir".format(name), - srcs = [":{}/@scoped/d".format(name)], + name = "node_modules/@scoped/d/dir", + srcs = [":node_modules/@scoped/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -481,7 +476,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "alias-project-a@0.0.0", src = "//projects/a:pkg", package = "alias-project-a", @@ -494,8 +488,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/alias-project-a".format(name), - src = "//:.aspect_rules_js/{}/alias-project-a@0.0.0".format(name), + name = "node_modules/alias-project-a", + src = "//:.aspect_rules_js/alias-project-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -503,23 +497,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/alias-project-a/dir".format(name), - srcs = [":{}/alias-project-a".format(name)], + name = "node_modules/alias-project-a/dir", + srcs = [":node_modules/alias-project-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "scoped+bad@0.0.0", src = "//projects/b:pkg", package = "scoped/bad", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -528,8 +521,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/scoped/bad".format(name), - src = "//:.aspect_rules_js/{}/scoped+bad@0.0.0".format(name), + name = "node_modules/scoped/bad", + src = "//:.aspect_rules_js/scoped+bad@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -537,24 +530,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/scoped/bad/dir".format(name), - srcs = [":{}/scoped/bad".format(name)], + name = "node_modules/scoped/bad/dir", + srcs = [":node_modules/scoped/bad"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c200-d200@0.0.0", src = "//projects/peers-combo-2:pkg", package = "test-c200-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.0".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.0": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -563,8 +555,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c200-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c200-d200@0.0.0".format(name), + name = "node_modules/test-c200-d200", + src = "//:.aspect_rules_js/test-c200-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -572,24 +564,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c200-d200/dir".format(name), - srcs = [":{}/test-c200-d200".format(name)], + name = "node_modules/test-c200-d200/dir", + srcs = [":node_modules/test-c200-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c201-d200@0.0.0", src = "//projects/peers-combo-1:pkg", package = "test-c201-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.1".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.1": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -598,8 +589,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c201-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c201-d200@0.0.0".format(name), + name = "node_modules/test-c201-d200", + src = "//:.aspect_rules_js/test-c201-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -607,27 +598,26 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c201-d200/dir".format(name), - srcs = [":{}/test-c201-d200".format(name)], + name = "node_modules/test-c201-d200/dir", + srcs = [":node_modules/test-c201-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-peer-types@0.0.0", src = "//projects/peer-types:pkg", package = "test-peer-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", - "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name): "@scoped/c", - "//:.aspect_rules_js/{}/@gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello".format(name): "hello", - "//:.aspect_rules_js/{}/@github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz".format(name): "jsonify", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", + "//:.aspect_rules_js/@scoped+c@0.0.0": "@scoped/c", + "//:.aspect_rules_js/@gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello": "hello", + "//:.aspect_rules_js/@github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz": "jsonify", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -636,8 +626,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-peer-types".format(name), - src = "//:.aspect_rules_js/{}/test-peer-types@0.0.0".format(name), + name = "node_modules/test-peer-types", + src = "//:.aspect_rules_js/test-peer-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -645,23 +635,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-peer-types/dir".format(name), - srcs = [":{}/test-peer-types".format(name)], + name = "node_modules/test-peer-types/dir", + srcs = [":node_modules/test-peer-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "a-types@0.0.0", src = "//projects/a-types:pkg", package = "a-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "@types/node", + "//:.aspect_rules_js/@types+node@16.18.11": "@types/node", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -670,8 +659,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["projects/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/a-types".format(name), - src = "//:.aspect_rules_js/{}/a-types@0.0.0".format(name), + name = "node_modules/a-types", + src = "//:.aspect_rules_js/a-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -679,31 +668,31 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/a-types/dir".format(name), - srcs = [":{}/a-types".format(name)], + name = "node_modules/a-types/dir", + srcs = [":node_modules/a-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -711,79 +700,79 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/a2".format(name)) - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/e".format(name)) - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/@isaacs/cliui".format(name)) - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_targets.append(":{}/@types/archiver".format(name)) - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/alias-types-node".format(name)) - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/hello".format(name)) - link_targets.append(":{}/is-odd-v0".format(name)) - link_targets.append(":{}/is-odd-v1".format(name)) - link_targets.append(":{}/is-odd-v2".format(name)) - link_targets.append(":{}/is-odd-v3".format(name)) - link_targets.append(":{}/is-odd".format(name)) - link_targets.append(":{}/is-odd-alias".format(name)) - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/meaning-of-life".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/rollup3".format(name)) - link_targets.append(":{}/tslib".format(name)) - link_targets.append(":{}/typescript".format(name)) - link_targets.append(":{}/uvu".format(name)) + link_targets.append(":node_modules/@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a2") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/e") + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/@isaacs/cliui") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_targets.append(":node_modules/@types/archiver") + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/alias-types-node") + link_targets.append(":node_modules/alias-only-sizzle") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/hello") + link_targets.append(":node_modules/is-odd-v0") + link_targets.append(":node_modules/is-odd-v1") + link_targets.append(":node_modules/is-odd-v2") + link_targets.append(":node_modules/is-odd-v3") + link_targets.append(":node_modules/is-odd") + link_targets.append(":node_modules/is-odd-alias") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/meaning-of-life") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/rollup3") + link_targets.append(":node_modules/tslib") + link_targets.append(":node_modules/typescript") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peers-combo-1": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peer-types": - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/hello".format(name)) + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "projects/b": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") if bazel_package in ["", "projects/peer-types"]: - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if bazel_package in [""]: - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if bazel_package in [""]: - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if bazel_package in [""]: - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if bazel_package in [""]: - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if bazel_package in [""]: - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if bazel_package in [""]: - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if bazel_package in ["projects/b"]: - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") return link_targets diff --git a/e2e/pnpm_lockfiles/v60/snapshots/rollup3_package_json.bzl b/e2e/pnpm_lockfiles/v60/snapshots/rollup3_package_json.bzl index 776ae8930..df8883175 100644 --- a/e2e/pnpm_lockfiles/v60/snapshots/rollup3_package_json.bzl +++ b/e2e/pnpm_lockfiles/v60/snapshots/rollup3_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@3.29.4" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v60/snapshots/rollup_links_defs.bzl b/e2e/pnpm_lockfiles/v60/snapshots/rollup_links_defs.bzl index 60ebee0f5..1cb437668 100644 --- a/e2e/pnpm_lockfiles/v60/snapshots/rollup_links_defs.bzl +++ b/e2e/pnpm_lockfiles/v60/snapshots/rollup_links_defs.bzl @@ -16,22 +16,21 @@ _PACKAGE_STORE_NAME = "rollup@2.14.0" # Generated npm_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg": "rollup", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/ref": "fsevents", + ":.aspect_rules_js/fsevents@2.3.3/ref": "fsevents", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg_pre_lc_lite": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg_pre_lc_lite": "rollup", }, dev = False, has_lifecycle_build_target = False, @@ -46,26 +45,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/pnpm_lockfiles/v60/snapshots/rollup_package_json.bzl b/e2e/pnpm_lockfiles/v60/snapshots/rollup_package_json.bzl index cf712bbdd..c79fe4c90 100644 --- a/e2e/pnpm_lockfiles/v60/snapshots/rollup_package_json.bzl +++ b/e2e/pnpm_lockfiles/v60/snapshots/rollup_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@2.14.0" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "./dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v61/snapshots/defs.bzl b/e2e/pnpm_lockfiles/v61/snapshots/defs.bzl index 0ffd12c9b..69415026d 100644 --- a/e2e/pnpm_lockfiles/v61/snapshots/defs.bzl +++ b/e2e/pnpm_lockfiles/v61/snapshots/defs.bzl @@ -78,7 +78,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "projects/a", "projects/a-types", "projects/b", "projects/c", "projects/d", "projects/peer-types", "projects/peers-combo-1", "projects/peers-combo-2", "vendored/is-number"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -90,7 +90,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -98,218 +98,218 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) - store_12(name) - store_13(name) - store_14(name) - store_15(name) - store_16(name) - store_17(name) - store_18(name) - store_19(name) - store_20(name) - store_21(name) - store_22(name) - store_23(name) - store_24(name) - store_25(name) - store_26(name) - store_27(name) - store_28(name) - store_29(name) - store_30(name) - store_31(name) - store_32(name) - store_33(name) - store_34(name) - store_35(name) - store_36(name) - store_37(name) - store_38(name) - store_39(name) - store_40(name) - store_41(name) - store_42(name) - store_43(name) - store_44(name) - store_45(name) - store_46(name) - store_47(name) - store_48(name) - store_49(name) - store_50(name) - store_51(name) - store_52(name) - store_53(name) - store_54(name) - store_55(name) - store_56(name) - store_57(name) - store_58(name) - store_59(name) - store_60(name) - store_61(name) - store_62(name) - store_63(name) - store_64(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() + store_12() + store_13() + store_14() + store_15() + store_16() + store_17() + store_18() + store_19() + store_20() + store_21() + store_22() + store_23() + store_24() + store_25() + store_26() + store_27() + store_28() + store_29() + store_30() + store_31() + store_32() + store_33() + store_34() + store_35() + store_36() + store_37() + store_38() + store_39() + store_40() + store_41() + store_42() + store_43() + store_44() + store_45() + store_46() + store_47() + store_48() + store_49() + store_50() + store_51() + store_52() + store_53() + store_54() + store_55() + store_56() + store_57() + store_58() + store_59() + store_60() + store_61() + store_62() + store_63() + store_64() if link: if bazel_package == "": - link_4("{}/@aspect-test-a-bad-scope".format(name), link_root_name = name, link_alias = "@aspect-test-a-bad-scope") - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) + link_4("@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-a-bad-scope") if "@aspect-test-a-bad-scop" not in scope_targets: scope_targets["@aspect-test-a-bad-scop"] = [link_targets[-1]] else: scope_targets["@aspect-test-a-bad-scop"].append(link_targets[-1]) - link_4("{}/@aspect-test-custom-scope/a".format(name), link_root_name = name, link_alias = "@aspect-test-custom-scope/a") - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) + link_4("@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") if "@aspect-test-custom-scope" not in scope_targets: scope_targets["@aspect-test-custom-scope"] = [link_targets[-1]] else: scope_targets["@aspect-test-custom-scope"].append(link_targets[-1]) - link_4("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_4("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/@aspect-test/a2".format(name), link_root_name = name, link_alias = "@aspect-test/a2") - link_targets.append(":{}/@aspect-test/a2".format(name)) + link_4("@aspect-test/a2") + link_targets.append(":node_modules/@aspect-test/a2") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/aspect-test-a-no-scope".format(name), link_root_name = name, link_alias = "aspect-test-a-no-scope") - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_4("{}/aspect-test-a/no-at".format(name), link_root_name = name, link_alias = "aspect-test-a/no-at") - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_5("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_4("aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_4("aspect-test-a/no-at") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_5("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_12("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_12("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_14("{}/@isaacs/cliui".format(name), link_root_name = name, link_alias = "@isaacs/cliui") - link_targets.append(":{}/@isaacs/cliui".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_14("@isaacs/cliui") + link_targets.append(":node_modules/@isaacs/cliui") if "@isaacs" not in scope_targets: scope_targets["@isaacs"] = [link_targets[-1]] else: scope_targets["@isaacs"].append(link_targets[-1]) - link_15("{}/rollup-plugin-with-peers".format(name), link_root_name = name, link_alias = "rollup-plugin-with-peers") - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_17("{}/@types/archiver".format(name), link_root_name = name, link_alias = "@types/archiver") - link_targets.append(":{}/@types/archiver".format(name)) + link_15("rollup-plugin-with-peers") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_17("@types/archiver") + link_targets.append(":node_modules/@types/archiver") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/alias-types-node".format(name), link_root_name = name, link_alias = "alias-types-node") - link_targets.append(":{}/alias-types-node".format(name)) - link_22("{}/alias-only-sizzle".format(name), link_root_name = name, link_alias = "alias-only-sizzle") - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_25("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) - link_38("{}/is-odd-v0".format(name), link_root_name = name, link_alias = "is-odd-v0") - link_targets.append(":{}/is-odd-v0".format(name)) - link_39("{}/is-odd-v1".format(name), link_root_name = name, link_alias = "is-odd-v1") - link_targets.append(":{}/is-odd-v1".format(name)) - link_40("{}/is-odd-v2".format(name), link_root_name = name, link_alias = "is-odd-v2") - link_targets.append(":{}/is-odd-v2".format(name)) - link_41("{}/is-odd-v3".format(name), link_root_name = name, link_alias = "is-odd-v3") - link_targets.append(":{}/is-odd-v3".format(name)) - link_42("{}/is-odd".format(name), link_root_name = name, link_alias = "is-odd") - link_targets.append(":{}/is-odd".format(name)) - link_42("{}/is-odd-alias".format(name), link_root_name = name, link_alias = "is-odd-alias") - link_targets.append(":{}/is-odd-alias".format(name)) - link_43("{}/jquery-git-ssh-e61fccb".format(name), link_root_name = name, link_alias = "jquery-git-ssh-e61fccb") - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_45("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_46("{}/meaning-of-life".format(name), link_root_name = name, link_alias = "meaning-of-life") - link_targets.append(":{}/meaning-of-life".format(name)) - link_52("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_53("{}/rollup3".format(name), link_root_name = name, link_alias = "rollup3") - link_targets.append(":{}/rollup3".format(name)) - link_60("{}/tslib".format(name), link_root_name = name, link_alias = "tslib") - link_targets.append(":{}/tslib".format(name)) - link_61("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) - link_62("{}/uvu".format(name), link_root_name = name, link_alias = "uvu") - link_targets.append(":{}/uvu".format(name)) + link_21("alias-types-node") + link_targets.append(":node_modules/alias-types-node") + link_22("alias-only-sizzle") + link_targets.append(":node_modules/alias-only-sizzle") + link_25("debug") + link_targets.append(":node_modules/debug") + link_35("hello") + link_targets.append(":node_modules/hello") + link_38("is-odd-v0") + link_targets.append(":node_modules/is-odd-v0") + link_39("is-odd-v1") + link_targets.append(":node_modules/is-odd-v1") + link_40("is-odd-v2") + link_targets.append(":node_modules/is-odd-v2") + link_41("is-odd-v3") + link_targets.append(":node_modules/is-odd-v3") + link_42("is-odd") + link_targets.append(":node_modules/is-odd") + link_42("is-odd-alias") + link_targets.append(":node_modules/is-odd-alias") + link_43("jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_45("lodash") + link_targets.append(":node_modules/lodash") + link_46("meaning-of-life") + link_targets.append(":node_modules/meaning-of-life") + link_52("rollup") + link_targets.append(":node_modules/rollup") + link_53("rollup3") + link_targets.append(":node_modules/rollup3") + link_60("tslib") + link_targets.append(":node_modules/tslib") + link_61("typescript") + link_targets.append(":node_modules/typescript") + link_62("uvu") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_9("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peers-combo-1": - link_7("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_7("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_10("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peer-types": - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_35("hello") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "projects/b": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: @@ -317,14 +317,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+c@0.0.0", src = "//projects/c:pkg", package = "@scoped/c", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -333,8 +332,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/c".format(name), - src = "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name), + name = "node_modules/@scoped/c", + src = "//:.aspect_rules_js/@scoped+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -342,13 +341,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/c/dir".format(name), - srcs = [":{}/@scoped/c".format(name)], + name = "node_modules/@scoped/c/dir", + srcs = [":node_modules/@scoped/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -356,7 +355,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "is-number@0.0.0", src = "//vendored/is-number:pkg", package = "is-number", @@ -368,7 +366,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+a@0.0.0", src = "//projects/a:pkg", package = "@scoped/a", @@ -381,8 +378,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/a".format(name), - src = "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name), + name = "node_modules/@scoped/a", + src = "//:.aspect_rules_js/@scoped+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -390,13 +387,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/a/dir".format(name), - srcs = [":{}/@scoped/a".format(name)], + name = "node_modules/@scoped/a/dir", + srcs = [":node_modules/@scoped/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -404,13 +401,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+b@0.0.0", src = "//projects/b:pkg", package = "@scoped/b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -419,8 +415,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/b".format(name), - src = "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name), + name = "node_modules/@scoped/b", + src = "//:.aspect_rules_js/@scoped+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -428,13 +424,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/b/dir".format(name), - srcs = [":{}/@scoped/b".format(name)], + name = "node_modules/@scoped/b/dir", + srcs = [":node_modules/@scoped/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -442,14 +438,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+d@0.0.0", src = "//projects/d:pkg", package = "@scoped/d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -458,8 +453,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/d".format(name), - src = "//:.aspect_rules_js/{}/@scoped+d@0.0.0".format(name), + name = "node_modules/@scoped/d", + src = "//:.aspect_rules_js/@scoped+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -467,13 +462,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/d/dir".format(name), - srcs = [":{}/@scoped/d".format(name)], + name = "node_modules/@scoped/d/dir", + srcs = [":node_modules/@scoped/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -481,7 +476,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "alias-project-a@0.0.0", src = "//projects/a:pkg", package = "alias-project-a", @@ -494,8 +488,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/alias-project-a".format(name), - src = "//:.aspect_rules_js/{}/alias-project-a@0.0.0".format(name), + name = "node_modules/alias-project-a", + src = "//:.aspect_rules_js/alias-project-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -503,23 +497,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/alias-project-a/dir".format(name), - srcs = [":{}/alias-project-a".format(name)], + name = "node_modules/alias-project-a/dir", + srcs = [":node_modules/alias-project-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "scoped+bad@0.0.0", src = "//projects/b:pkg", package = "scoped/bad", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -528,8 +521,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/scoped/bad".format(name), - src = "//:.aspect_rules_js/{}/scoped+bad@0.0.0".format(name), + name = "node_modules/scoped/bad", + src = "//:.aspect_rules_js/scoped+bad@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -537,24 +530,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/scoped/bad/dir".format(name), - srcs = [":{}/scoped/bad".format(name)], + name = "node_modules/scoped/bad/dir", + srcs = [":node_modules/scoped/bad"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c200-d200@0.0.0", src = "//projects/peers-combo-2:pkg", package = "test-c200-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.0".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.0": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -563,8 +555,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c200-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c200-d200@0.0.0".format(name), + name = "node_modules/test-c200-d200", + src = "//:.aspect_rules_js/test-c200-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -572,24 +564,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c200-d200/dir".format(name), - srcs = [":{}/test-c200-d200".format(name)], + name = "node_modules/test-c200-d200/dir", + srcs = [":node_modules/test-c200-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c201-d200@0.0.0", src = "//projects/peers-combo-1:pkg", package = "test-c201-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.1".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.1": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -598,8 +589,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c201-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c201-d200@0.0.0".format(name), + name = "node_modules/test-c201-d200", + src = "//:.aspect_rules_js/test-c201-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -607,27 +598,26 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c201-d200/dir".format(name), - srcs = [":{}/test-c201-d200".format(name)], + name = "node_modules/test-c201-d200/dir", + srcs = [":node_modules/test-c201-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-peer-types@0.0.0", src = "//projects/peer-types:pkg", package = "test-peer-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", - "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name): "@scoped/c", - "//:.aspect_rules_js/{}/@gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello".format(name): "hello", - "//:.aspect_rules_js/{}/@github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz".format(name): "jsonify", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", + "//:.aspect_rules_js/@scoped+c@0.0.0": "@scoped/c", + "//:.aspect_rules_js/@gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello": "hello", + "//:.aspect_rules_js/@github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz": "jsonify", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -636,8 +626,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-peer-types".format(name), - src = "//:.aspect_rules_js/{}/test-peer-types@0.0.0".format(name), + name = "node_modules/test-peer-types", + src = "//:.aspect_rules_js/test-peer-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -645,23 +635,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-peer-types/dir".format(name), - srcs = [":{}/test-peer-types".format(name)], + name = "node_modules/test-peer-types/dir", + srcs = [":node_modules/test-peer-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "a-types@0.0.0", src = "//projects/a-types:pkg", package = "a-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "@types/node", + "//:.aspect_rules_js/@types+node@16.18.11": "@types/node", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -670,8 +659,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["projects/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/a-types".format(name), - src = "//:.aspect_rules_js/{}/a-types@0.0.0".format(name), + name = "node_modules/a-types", + src = "//:.aspect_rules_js/a-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -679,31 +668,31 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/a-types/dir".format(name), - srcs = [":{}/a-types".format(name)], + name = "node_modules/a-types/dir", + srcs = [":node_modules/a-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -711,79 +700,79 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/a2".format(name)) - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/e".format(name)) - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/@isaacs/cliui".format(name)) - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_targets.append(":{}/@types/archiver".format(name)) - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/alias-types-node".format(name)) - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/hello".format(name)) - link_targets.append(":{}/is-odd-v0".format(name)) - link_targets.append(":{}/is-odd-v1".format(name)) - link_targets.append(":{}/is-odd-v2".format(name)) - link_targets.append(":{}/is-odd-v3".format(name)) - link_targets.append(":{}/is-odd".format(name)) - link_targets.append(":{}/is-odd-alias".format(name)) - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/meaning-of-life".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/rollup3".format(name)) - link_targets.append(":{}/tslib".format(name)) - link_targets.append(":{}/typescript".format(name)) - link_targets.append(":{}/uvu".format(name)) + link_targets.append(":node_modules/@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a2") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/e") + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/@isaacs/cliui") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_targets.append(":node_modules/@types/archiver") + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/alias-types-node") + link_targets.append(":node_modules/alias-only-sizzle") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/hello") + link_targets.append(":node_modules/is-odd-v0") + link_targets.append(":node_modules/is-odd-v1") + link_targets.append(":node_modules/is-odd-v2") + link_targets.append(":node_modules/is-odd-v3") + link_targets.append(":node_modules/is-odd") + link_targets.append(":node_modules/is-odd-alias") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/meaning-of-life") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/rollup3") + link_targets.append(":node_modules/tslib") + link_targets.append(":node_modules/typescript") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peers-combo-1": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peer-types": - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/hello".format(name)) + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "projects/b": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") if bazel_package in ["", "projects/peer-types"]: - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if bazel_package in [""]: - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if bazel_package in [""]: - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if bazel_package in [""]: - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if bazel_package in [""]: - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if bazel_package in [""]: - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if bazel_package in [""]: - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if bazel_package in ["projects/b"]: - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") return link_targets diff --git a/e2e/pnpm_lockfiles/v61/snapshots/rollup3_package_json.bzl b/e2e/pnpm_lockfiles/v61/snapshots/rollup3_package_json.bzl index 776ae8930..df8883175 100644 --- a/e2e/pnpm_lockfiles/v61/snapshots/rollup3_package_json.bzl +++ b/e2e/pnpm_lockfiles/v61/snapshots/rollup3_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@3.29.4" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v61/snapshots/rollup_links_defs.bzl b/e2e/pnpm_lockfiles/v61/snapshots/rollup_links_defs.bzl index 60ebee0f5..1cb437668 100644 --- a/e2e/pnpm_lockfiles/v61/snapshots/rollup_links_defs.bzl +++ b/e2e/pnpm_lockfiles/v61/snapshots/rollup_links_defs.bzl @@ -16,22 +16,21 @@ _PACKAGE_STORE_NAME = "rollup@2.14.0" # Generated npm_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg": "rollup", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/ref": "fsevents", + ":.aspect_rules_js/fsevents@2.3.3/ref": "fsevents", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg_pre_lc_lite": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg_pre_lc_lite": "rollup", }, dev = False, has_lifecycle_build_target = False, @@ -46,26 +45,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/pnpm_lockfiles/v61/snapshots/rollup_package_json.bzl b/e2e/pnpm_lockfiles/v61/snapshots/rollup_package_json.bzl index cf712bbdd..c79fe4c90 100644 --- a/e2e/pnpm_lockfiles/v61/snapshots/rollup_package_json.bzl +++ b/e2e/pnpm_lockfiles/v61/snapshots/rollup_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@2.14.0" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "./dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v90/snapshots/defs.bzl b/e2e/pnpm_lockfiles/v90/snapshots/defs.bzl index 11c96c934..f4d09b32e 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/defs.bzl +++ b/e2e/pnpm_lockfiles/v90/snapshots/defs.bzl @@ -78,7 +78,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "projects/a", "projects/a-types", "projects/b", "projects/c", "projects/d", "projects/peer-types", "projects/peers-combo-1", "projects/peers-combo-2", "vendored/is-number"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -90,7 +90,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -98,218 +98,218 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) - store_12(name) - store_13(name) - store_14(name) - store_15(name) - store_16(name) - store_17(name) - store_18(name) - store_19(name) - store_20(name) - store_21(name) - store_22(name) - store_23(name) - store_24(name) - store_25(name) - store_26(name) - store_27(name) - store_28(name) - store_29(name) - store_30(name) - store_31(name) - store_32(name) - store_33(name) - store_34(name) - store_35(name) - store_36(name) - store_37(name) - store_38(name) - store_39(name) - store_40(name) - store_41(name) - store_42(name) - store_43(name) - store_44(name) - store_45(name) - store_46(name) - store_47(name) - store_48(name) - store_49(name) - store_50(name) - store_51(name) - store_52(name) - store_53(name) - store_54(name) - store_55(name) - store_56(name) - store_57(name) - store_58(name) - store_59(name) - store_60(name) - store_61(name) - store_62(name) - store_63(name) - store_64(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() + store_12() + store_13() + store_14() + store_15() + store_16() + store_17() + store_18() + store_19() + store_20() + store_21() + store_22() + store_23() + store_24() + store_25() + store_26() + store_27() + store_28() + store_29() + store_30() + store_31() + store_32() + store_33() + store_34() + store_35() + store_36() + store_37() + store_38() + store_39() + store_40() + store_41() + store_42() + store_43() + store_44() + store_45() + store_46() + store_47() + store_48() + store_49() + store_50() + store_51() + store_52() + store_53() + store_54() + store_55() + store_56() + store_57() + store_58() + store_59() + store_60() + store_61() + store_62() + store_63() + store_64() if link: if bazel_package == "": - link_4("{}/@aspect-test-a-bad-scope".format(name), link_root_name = name, link_alias = "@aspect-test-a-bad-scope") - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) + link_4("@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-a-bad-scope") if "@aspect-test-a-bad-scop" not in scope_targets: scope_targets["@aspect-test-a-bad-scop"] = [link_targets[-1]] else: scope_targets["@aspect-test-a-bad-scop"].append(link_targets[-1]) - link_4("{}/@aspect-test-custom-scope/a".format(name), link_root_name = name, link_alias = "@aspect-test-custom-scope/a") - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) + link_4("@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") if "@aspect-test-custom-scope" not in scope_targets: scope_targets["@aspect-test-custom-scope"] = [link_targets[-1]] else: scope_targets["@aspect-test-custom-scope"].append(link_targets[-1]) - link_4("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_4("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/@aspect-test/a2".format(name), link_root_name = name, link_alias = "@aspect-test/a2") - link_targets.append(":{}/@aspect-test/a2".format(name)) + link_4("@aspect-test/a2") + link_targets.append(":node_modules/@aspect-test/a2") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_4("{}/aspect-test-a-no-scope".format(name), link_root_name = name, link_alias = "aspect-test-a-no-scope") - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_4("{}/aspect-test-a/no-at".format(name), link_root_name = name, link_alias = "aspect-test-a/no-at") - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_5("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_4("aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_4("aspect-test-a/no-at") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_5("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_12("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_12("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_14("{}/@isaacs/cliui".format(name), link_root_name = name, link_alias = "@isaacs/cliui") - link_targets.append(":{}/@isaacs/cliui".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_14("@isaacs/cliui") + link_targets.append(":node_modules/@isaacs/cliui") if "@isaacs" not in scope_targets: scope_targets["@isaacs"] = [link_targets[-1]] else: scope_targets["@isaacs"].append(link_targets[-1]) - link_15("{}/rollup-plugin-with-peers".format(name), link_root_name = name, link_alias = "rollup-plugin-with-peers") - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_17("{}/@types/archiver".format(name), link_root_name = name, link_alias = "@types/archiver") - link_targets.append(":{}/@types/archiver".format(name)) + link_15("rollup-plugin-with-peers") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_17("@types/archiver") + link_targets.append(":node_modules/@types/archiver") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_21("{}/alias-types-node".format(name), link_root_name = name, link_alias = "alias-types-node") - link_targets.append(":{}/alias-types-node".format(name)) - link_22("{}/alias-only-sizzle".format(name), link_root_name = name, link_alias = "alias-only-sizzle") - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_25("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) - link_38("{}/is-odd-v0".format(name), link_root_name = name, link_alias = "is-odd-v0") - link_targets.append(":{}/is-odd-v0".format(name)) - link_39("{}/is-odd-v1".format(name), link_root_name = name, link_alias = "is-odd-v1") - link_targets.append(":{}/is-odd-v1".format(name)) - link_40("{}/is-odd-v2".format(name), link_root_name = name, link_alias = "is-odd-v2") - link_targets.append(":{}/is-odd-v2".format(name)) - link_41("{}/is-odd-v3".format(name), link_root_name = name, link_alias = "is-odd-v3") - link_targets.append(":{}/is-odd-v3".format(name)) - link_42("{}/is-odd".format(name), link_root_name = name, link_alias = "is-odd") - link_targets.append(":{}/is-odd".format(name)) - link_42("{}/is-odd-alias".format(name), link_root_name = name, link_alias = "is-odd-alias") - link_targets.append(":{}/is-odd-alias".format(name)) - link_43("{}/jquery-git-ssh-e61fccb".format(name), link_root_name = name, link_alias = "jquery-git-ssh-e61fccb") - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_45("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_46("{}/meaning-of-life".format(name), link_root_name = name, link_alias = "meaning-of-life") - link_targets.append(":{}/meaning-of-life".format(name)) - link_52("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_53("{}/rollup3".format(name), link_root_name = name, link_alias = "rollup3") - link_targets.append(":{}/rollup3".format(name)) - link_60("{}/tslib".format(name), link_root_name = name, link_alias = "tslib") - link_targets.append(":{}/tslib".format(name)) - link_61("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) - link_62("{}/uvu".format(name), link_root_name = name, link_alias = "uvu") - link_targets.append(":{}/uvu".format(name)) + link_21("alias-types-node") + link_targets.append(":node_modules/alias-types-node") + link_22("alias-only-sizzle") + link_targets.append(":node_modules/alias-only-sizzle") + link_25("debug") + link_targets.append(":node_modules/debug") + link_35("hello") + link_targets.append(":node_modules/hello") + link_38("is-odd-v0") + link_targets.append(":node_modules/is-odd-v0") + link_39("is-odd-v1") + link_targets.append(":node_modules/is-odd-v1") + link_40("is-odd-v2") + link_targets.append(":node_modules/is-odd-v2") + link_41("is-odd-v3") + link_targets.append(":node_modules/is-odd-v3") + link_42("is-odd") + link_targets.append(":node_modules/is-odd") + link_42("is-odd-alias") + link_targets.append(":node_modules/is-odd-alias") + link_43("jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_45("lodash") + link_targets.append(":node_modules/lodash") + link_46("meaning-of-life") + link_targets.append(":node_modules/meaning-of-life") + link_52("rollup") + link_targets.append(":node_modules/rollup") + link_53("rollup3") + link_targets.append(":node_modules/rollup3") + link_60("tslib") + link_targets.append(":node_modules/tslib") + link_61("typescript") + link_targets.append(":node_modules/typescript") + link_62("uvu") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_6("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_6("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_9("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peers-combo-1": - link_7("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_7("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_10("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "projects/peer-types": - link_13("{}/jsonify".format(name), link_root_name = name, link_alias = "jsonify") - link_targets.append(":{}/jsonify".format(name)) - link_35("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) + link_13("jsonify") + link_targets.append(":node_modules/jsonify") + link_35("hello") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "projects/b": - link_21("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_21("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: @@ -317,14 +317,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+c@0.0.0", src = "//projects/c:pkg", package = "@scoped/c", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -333,8 +332,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/c".format(name), - src = "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name), + name = "node_modules/@scoped/c", + src = "//:.aspect_rules_js/@scoped+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -342,13 +341,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/c/dir".format(name), - srcs = [":{}/@scoped/c".format(name)], + name = "node_modules/@scoped/c/dir", + srcs = [":node_modules/@scoped/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -356,7 +355,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "is-number@0.0.0", src = "//vendored/is-number:pkg", package = "is-number", @@ -368,7 +366,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+a@0.0.0", src = "//projects/a:pkg", package = "@scoped/a", @@ -381,8 +378,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/a".format(name), - src = "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name), + name = "node_modules/@scoped/a", + src = "//:.aspect_rules_js/@scoped+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -390,13 +387,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/a/dir".format(name), - srcs = [":{}/@scoped/a".format(name)], + name = "node_modules/@scoped/a/dir", + srcs = [":node_modules/@scoped/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -404,13 +401,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+b@0.0.0", src = "//projects/b:pkg", package = "@scoped/b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -419,8 +415,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/b".format(name), - src = "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name), + name = "node_modules/@scoped/b", + src = "//:.aspect_rules_js/@scoped+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -428,13 +424,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/b/dir".format(name), - srcs = [":{}/@scoped/b".format(name)], + name = "node_modules/@scoped/b/dir", + srcs = [":node_modules/@scoped/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -442,14 +438,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@scoped+d@0.0.0", src = "//projects/d:pkg", package = "@scoped/d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -458,8 +453,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@scoped/d".format(name), - src = "//:.aspect_rules_js/{}/@scoped+d@0.0.0".format(name), + name = "node_modules/@scoped/d", + src = "//:.aspect_rules_js/@scoped+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -467,13 +462,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@scoped/d/dir".format(name), - srcs = [":{}/@scoped/d".format(name)], + name = "node_modules/@scoped/d/dir", + srcs = [":node_modules/@scoped/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if "@scoped" not in scope_targets: scope_targets["@scoped"] = [link_targets[-1]] else: @@ -481,7 +476,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "alias-project-a@0.0.0", src = "//projects/a:pkg", package = "alias-project-a", @@ -494,8 +488,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/alias-project-a".format(name), - src = "//:.aspect_rules_js/{}/alias-project-a@0.0.0".format(name), + name = "node_modules/alias-project-a", + src = "//:.aspect_rules_js/alias-project-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -503,23 +497,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/alias-project-a/dir".format(name), - srcs = [":{}/alias-project-a".format(name)], + name = "node_modules/alias-project-a/dir", + srcs = [":node_modules/alias-project-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "scoped+bad@0.0.0", src = "//projects/b:pkg", package = "scoped/bad", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -528,8 +521,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/scoped/bad".format(name), - src = "//:.aspect_rules_js/{}/scoped+bad@0.0.0".format(name), + name = "node_modules/scoped/bad", + src = "//:.aspect_rules_js/scoped+bad@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -537,24 +530,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/scoped/bad/dir".format(name), - srcs = [":{}/scoped/bad".format(name)], + name = "node_modules/scoped/bad/dir", + srcs = [":node_modules/scoped/bad"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c200-d200@0.0.0", src = "//projects/peers-combo-2:pkg", package = "test-c200-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.0".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.0": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.0": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -563,8 +555,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c200-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c200-d200@0.0.0".format(name), + name = "node_modules/test-c200-d200", + src = "//:.aspect_rules_js/test-c200-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -572,24 +564,23 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c200-d200/dir".format(name), - srcs = [":{}/test-c200-d200".format(name)], + name = "node_modules/test-c200-d200/dir", + srcs = [":node_modules/test-c200-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-c201-d200@0.0.0", src = "//projects/peers-combo-1:pkg", package = "test-c201-d200", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+c@2.0.1".format(name): "@aspect-test/c", - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1".format(name): "@aspect-test/d", + "//:.aspect_rules_js/@aspect-test+c@2.0.1": "@aspect-test/c", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.1": "@aspect-test/d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -598,8 +589,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-c201-d200".format(name), - src = "//:.aspect_rules_js/{}/test-c201-d200@0.0.0".format(name), + name = "node_modules/test-c201-d200", + src = "//:.aspect_rules_js/test-c201-d200@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -607,27 +598,26 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-c201-d200/dir".format(name), - srcs = [":{}/test-c201-d200".format(name)], + name = "node_modules/test-c201-d200/dir", + srcs = [":node_modules/test-c201-d200"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-peer-types@0.0.0", src = "//projects/peer-types:pkg", package = "test-peer-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@scoped+a@0.0.0".format(name): "@scoped/a", - "//:.aspect_rules_js/{}/@scoped+b@0.0.0".format(name): "@scoped/b", - "//:.aspect_rules_js/{}/@scoped+c@0.0.0".format(name): "@scoped/c", - "//:.aspect_rules_js/{}/hello@https+gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello".format(name): "hello", - "//:.aspect_rules_js/{}/@foo+jsonify@https+github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz".format(name): "jsonify", + "//:.aspect_rules_js/@scoped+a@0.0.0": "@scoped/a", + "//:.aspect_rules_js/@scoped+b@0.0.0": "@scoped/b", + "//:.aspect_rules_js/@scoped+c@0.0.0": "@scoped/c", + "//:.aspect_rules_js/hello@https+gitpkg.vercel.app+EqualMa+gitpkg-hello+packages+hello": "hello", + "//:.aspect_rules_js/@foo+jsonify@https+github.com+aspect-build+test-packages+releases+download+0.0.0+@foo-jsonify-0.0.0.tgz": "jsonify", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -636,8 +626,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in [""]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-peer-types".format(name), - src = "//:.aspect_rules_js/{}/test-peer-types@0.0.0".format(name), + name = "node_modules/test-peer-types", + src = "//:.aspect_rules_js/test-peer-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -645,23 +635,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-peer-types/dir".format(name), - srcs = [":{}/test-peer-types".format(name)], + name = "node_modules/test-peer-types/dir", + srcs = [":node_modules/test-peer-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "a-types@0.0.0", src = "//projects/a-types:pkg", package = "a-types", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "@types/node", + "//:.aspect_rules_js/@types+node@16.18.11": "@types/node", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -670,8 +659,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["projects/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/a-types".format(name), - src = "//:.aspect_rules_js/{}/a-types@0.0.0".format(name), + name = "node_modules/a-types", + src = "//:.aspect_rules_js/a-types@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -679,31 +668,31 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/a-types/dir".format(name), - srcs = [":{}/a-types".format(name)], + name = "node_modules/a-types/dir", + srcs = [":node_modules/a-types"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -711,79 +700,79 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test-a-bad-scope".format(name)) - link_targets.append(":{}/@aspect-test-custom-scope/a".format(name)) - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/a2".format(name)) - link_targets.append(":{}/aspect-test-a-no-scope".format(name)) - link_targets.append(":{}/aspect-test-a/no-at".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/e".format(name)) - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/@isaacs/cliui".format(name)) - link_targets.append(":{}/rollup-plugin-with-peers".format(name)) - link_targets.append(":{}/@types/archiver".format(name)) - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/alias-types-node".format(name)) - link_targets.append(":{}/alias-only-sizzle".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/hello".format(name)) - link_targets.append(":{}/is-odd-v0".format(name)) - link_targets.append(":{}/is-odd-v1".format(name)) - link_targets.append(":{}/is-odd-v2".format(name)) - link_targets.append(":{}/is-odd-v3".format(name)) - link_targets.append(":{}/is-odd".format(name)) - link_targets.append(":{}/is-odd-alias".format(name)) - link_targets.append(":{}/jquery-git-ssh-e61fccb".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/meaning-of-life".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/rollup3".format(name)) - link_targets.append(":{}/tslib".format(name)) - link_targets.append(":{}/typescript".format(name)) - link_targets.append(":{}/uvu".format(name)) + link_targets.append(":node_modules/@aspect-test-a-bad-scope") + link_targets.append(":node_modules/@aspect-test-custom-scope/a") + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a2") + link_targets.append(":node_modules/aspect-test-a-no-scope") + link_targets.append(":node_modules/aspect-test-a/no-at") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/e") + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/@isaacs/cliui") + link_targets.append(":node_modules/rollup-plugin-with-peers") + link_targets.append(":node_modules/@types/archiver") + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/alias-types-node") + link_targets.append(":node_modules/alias-only-sizzle") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/hello") + link_targets.append(":node_modules/is-odd-v0") + link_targets.append(":node_modules/is-odd-v1") + link_targets.append(":node_modules/is-odd-v2") + link_targets.append(":node_modules/is-odd-v3") + link_targets.append(":node_modules/is-odd") + link_targets.append(":node_modules/is-odd-alias") + link_targets.append(":node_modules/jquery-git-ssh-e61fccb") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/meaning-of-life") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/rollup3") + link_targets.append(":node_modules/tslib") + link_targets.append(":node_modules/typescript") + link_targets.append(":node_modules/uvu") elif bazel_package == "projects/peers-combo-2": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peers-combo-1": - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@aspect-test/d".format(name)) + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/d") elif bazel_package == "projects/peer-types": - link_targets.append(":{}/jsonify".format(name)) - link_targets.append(":{}/hello".format(name)) + link_targets.append(":node_modules/jsonify") + link_targets.append(":node_modules/hello") elif bazel_package == "projects/a-types": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "projects/b": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") if bazel_package in ["", "projects/peer-types"]: - link_targets.append(":{}/@scoped/c".format(name)) + link_targets.append(":node_modules/@scoped/c") if bazel_package in ["", "projects/b", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/a".format(name)) + link_targets.append(":node_modules/@scoped/a") if bazel_package in ["", "projects/c", "projects/d", "projects/peer-types"]: - link_targets.append(":{}/@scoped/b".format(name)) + link_targets.append(":node_modules/@scoped/b") if bazel_package in [""]: - link_targets.append(":{}/@scoped/d".format(name)) + link_targets.append(":node_modules/@scoped/d") if bazel_package in [""]: - link_targets.append(":{}/alias-project-a".format(name)) + link_targets.append(":node_modules/alias-project-a") if bazel_package in [""]: - link_targets.append(":{}/scoped/bad".format(name)) + link_targets.append(":node_modules/scoped/bad") if bazel_package in [""]: - link_targets.append(":{}/test-c200-d200".format(name)) + link_targets.append(":node_modules/test-c200-d200") if bazel_package in [""]: - link_targets.append(":{}/test-c201-d200".format(name)) + link_targets.append(":node_modules/test-c201-d200") if bazel_package in [""]: - link_targets.append(":{}/test-peer-types".format(name)) + link_targets.append(":node_modules/test-peer-types") if bazel_package in ["projects/b"]: - link_targets.append(":{}/a-types".format(name)) + link_targets.append(":node_modules/a-types") return link_targets diff --git a/e2e/pnpm_lockfiles/v90/snapshots/rollup3_package_json.bzl b/e2e/pnpm_lockfiles/v90/snapshots/rollup3_package_json.bzl index 776ae8930..df8883175 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/rollup3_package_json.bzl +++ b/e2e/pnpm_lockfiles/v90/snapshots/rollup3_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@3.29.4" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_lockfiles/v90/snapshots/rollup_links_defs.bzl b/e2e/pnpm_lockfiles/v90/snapshots/rollup_links_defs.bzl index 60ebee0f5..1cb437668 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/rollup_links_defs.bzl +++ b/e2e/pnpm_lockfiles/v90/snapshots/rollup_links_defs.bzl @@ -16,22 +16,21 @@ _PACKAGE_STORE_NAME = "rollup@2.14.0" # Generated npm_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg": "rollup", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/ref": "fsevents", + ":.aspect_rules_js/fsevents@2.3.3/ref": "fsevents", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.3/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.14.0/pkg_pre_lc_lite": "rollup", + ":.aspect_rules_js/fsevents@2.3.3/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.14.0/pkg_pre_lc_lite": "rollup", }, dev = False, has_lifecycle_build_target = False, @@ -46,26 +45,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.14.0 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/e2e/pnpm_lockfiles/v90/snapshots/rollup_package_json.bzl b/e2e/pnpm_lockfiles/v90/snapshots/rollup_package_json.bzl index cf712bbdd..c79fe4c90 100644 --- a/e2e/pnpm_lockfiles/v90/snapshots/rollup_package_json.bzl +++ b/e2e/pnpm_lockfiles/v90/snapshots/rollup_package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@2.14.0" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "./dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "./dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/e2e/pnpm_workspace/BUILD.bazel b/e2e/pnpm_workspace/BUILD.bazel index 1e6d5e2cf..4677d1bbc 100644 --- a/e2e/pnpm_workspace/BUILD.bazel +++ b/e2e/pnpm_workspace/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() sh_test( name = "node_test", diff --git a/e2e/pnpm_workspace/app/a/BUILD.bazel b/e2e/pnpm_workspace/app/a/BUILD.bazel index 957bd5694..20dc8151f 100644 --- a/e2e/pnpm_workspace/app/a/BUILD.bazel +++ b/e2e/pnpm_workspace/app/a/BUILD.bazel @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets") load("@npm//app/a:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace/app/b/BUILD.bazel b/e2e/pnpm_workspace/app/b/BUILD.bazel index 3678b2b51..394ac6df9 100644 --- a/e2e/pnpm_workspace/app/b/BUILD.bazel +++ b/e2e/pnpm_workspace/app/b/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", @@ -36,6 +36,6 @@ build_test( targets = [ ":node_modules/@lib/b", ":node_modules/@lib/b_alias", - "//:.aspect_rules_js/node_modules/@lib+b_alias@0.0.0", + "//:.aspect_rules_js/@lib+b_alias@0.0.0", ], ) diff --git a/e2e/pnpm_workspace/app/c/BUILD.bazel b/e2e/pnpm_workspace/app/c/BUILD.bazel index 92e21d724..ff067cec9 100644 --- a/e2e/pnpm_workspace/app/c/BUILD.bazel +++ b/e2e/pnpm_workspace/app/c/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//app/a:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace/app/d/BUILD.bazel b/e2e/pnpm_workspace/app/d/BUILD.bazel index 45bb3fcd6..efc9d86d0 100644 --- a/e2e/pnpm_workspace/app/d/BUILD.bazel +++ b/e2e/pnpm_workspace/app/d/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace/lib/a/BUILD.bazel b/e2e/pnpm_workspace/lib/a/BUILD.bazel index 8ef6932fe..99cb9c6ca 100644 --- a/e2e/pnpm_workspace/lib/a/BUILD.bazel +++ b/e2e/pnpm_workspace/lib/a/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", diff --git a/e2e/pnpm_workspace/lib/b/BUILD.bazel b/e2e/pnpm_workspace/lib/b/BUILD.bazel index c63547a05..deeab1aff 100644 --- a/e2e/pnpm_workspace/lib/b/BUILD.bazel +++ b/e2e/pnpm_workspace/lib/b/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", @@ -18,6 +18,6 @@ build_test( name = "aliases", targets = [ ":node_modules/alias-1", - "//:.aspect_rules_js/node_modules/@types+sizzle@2.3.8", + "//:.aspect_rules_js/@types+sizzle@2.3.8", ], ) diff --git a/e2e/pnpm_workspace/lib/c/BUILD.bazel b/e2e/pnpm_workspace/lib/c/BUILD.bazel index 6b3b2207e..09ccb9c4e 100644 --- a/e2e/pnpm_workspace/lib/c/BUILD.bazel +++ b/e2e/pnpm_workspace/lib/c/BUILD.bazel @@ -3,7 +3,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", diff --git a/e2e/pnpm_workspace/lib/d/BUILD.bazel b/e2e/pnpm_workspace/lib/d/BUILD.bazel index 0419c7c11..5729a31bf 100644 --- a/e2e/pnpm_workspace/lib/d/BUILD.bazel +++ b/e2e/pnpm_workspace/lib/d/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", @@ -21,6 +21,6 @@ build_test( name = "aliases", targets = [ ":node_modules/alias-2", - "//:.aspect_rules_js/node_modules/@types+node@16.18.11", + "//:.aspect_rules_js/@types+node@16.18.11", ], ) diff --git a/e2e/pnpm_workspace/snapshots/defs.bzl b/e2e/pnpm_workspace/snapshots/defs.bzl index 221c26bc2..89f87c602 100644 --- a/e2e/pnpm_workspace/snapshots/defs.bzl +++ b/e2e/pnpm_workspace/snapshots/defs.bzl @@ -25,7 +25,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "app/a", "app/b", "app/c", "app/d", "lib/a", "lib/b", "lib/c", "lib/d"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -37,7 +37,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -45,110 +45,110 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() if link: if bazel_package == "": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_1("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_1("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_2("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_2("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_11("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) + link_10("lodash") + link_targets.append(":node_modules/lodash") + link_11("typescript") + link_targets.append(":node_modules/typescript") elif bazel_package == "app/a": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/c": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "lib/d": - link_3("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_3("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_8("{}/alias-2".format(name), link_root_name = name, link_alias = "alias-2") - link_targets.append(":{}/alias-2".format(name)) + link_8("alias-2") + link_targets.append(":node_modules/alias-2") elif bazel_package == "lib/a": - link_4("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_4("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "lib/b": - link_5("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_5("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/alias-1".format(name), link_root_name = name, link_alias = "alias-1") - link_targets.append(":{}/alias-1".format(name)) + link_9("alias-1") + link_targets.append(":node_modules/alias-1") elif bazel_package == "lib/c": - link_5("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_5("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/d": - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/b": - link_7("{}/@aspect-test/h".format(name), link_root_name = name, link_alias = "@aspect-test/h") - link_targets.append(":{}/@aspect-test/h".format(name)) + link_7("@aspect-test/h") + link_targets.append(":node_modules/@aspect-test/h") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: @@ -156,13 +156,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+c@0.0.0", src = "//lib/c:pkg", package = "@lib/c", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", + "//:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -171,8 +170,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/c"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/c".format(name), - src = "//:.aspect_rules_js/{}/@lib+c@0.0.0".format(name), + name = "node_modules/@lib/c", + src = "//:.aspect_rules_js/@lib+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -180,13 +179,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/c/dir".format(name), - srcs = [":{}/@lib/c".format(name)], + name = "node_modules/@lib/c/dir", + srcs = [":node_modules/@lib/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/c".format(name)) + link_targets.append(":node_modules/@lib/c") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -194,13 +193,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "vendored-a@0.0.0", src = "//vendored/a:pkg", package = "vendored-a", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", + "//:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -209,8 +207,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/vendored-a".format(name), - src = "//:.aspect_rules_js/{}/vendored-a@0.0.0".format(name), + name = "node_modules/vendored-a", + src = "//:.aspect_rules_js/vendored-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -218,23 +216,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/vendored-a/dir".format(name), - srcs = [":{}/vendored-a".format(name)], + name = "node_modules/vendored-a/dir", + srcs = [":node_modules/vendored-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/vendored-a".format(name)) + link_targets.append(":node_modules/vendored-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "vendored-b@0.0.0", src = "//vendored/b:pkg", package = "vendored-b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@lib+b@0.0.0".format(name): "@lib/b", + "//:.aspect_rules_js/@lib+b@0.0.0": "@lib/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -243,8 +240,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/vendored-b".format(name), - src = "//:.aspect_rules_js/{}/vendored-b@0.0.0".format(name), + name = "node_modules/vendored-b", + src = "//:.aspect_rules_js/vendored-b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -252,26 +249,25 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/vendored-b/dir".format(name), - srcs = [":{}/vendored-b".format(name)], + name = "node_modules/vendored-b/dir", + srcs = [":node_modules/vendored-b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/vendored-b".format(name)) + link_targets.append(":node_modules/vendored-b") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+a@0.0.0", src = "//lib/a:pkg", package = "@lib/a", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+e@1.0.0".format(name): "@aspect-test/e", - "//:.aspect_rules_js/{}/@lib+b@0.0.0".format(name): "@lib/b", - "//:.aspect_rules_js/{}/vendored-a@0.0.0".format(name): "vendored-a", - "//:.aspect_rules_js/{}/vendored-b@0.0.0".format(name): "vendored-b", + "//:.aspect_rules_js/@aspect-test+e@1.0.0": "@aspect-test/e", + "//:.aspect_rules_js/@lib+b@0.0.0": "@lib/b", + "//:.aspect_rules_js/vendored-a@0.0.0": "vendored-a", + "//:.aspect_rules_js/vendored-b@0.0.0": "vendored-b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -280,8 +276,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/a".format(name), - src = "//:.aspect_rules_js/{}/@lib+a@0.0.0".format(name), + name = "node_modules/@lib/a", + src = "//:.aspect_rules_js/@lib+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -289,13 +285,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/a/dir".format(name), - srcs = [":{}/@lib/a".format(name)], + name = "node_modules/@lib/a/dir", + srcs = [":node_modules/@lib/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/a".format(name)) + link_targets.append(":node_modules/@lib/a") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -303,14 +299,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+b@0.0.0", src = "//lib/b:pkg", package = "@lib/b", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", - "//:.aspect_rules_js/{}/@types+sizzle@2.3.8".format(name): "alias-1", + "//:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", + "//:.aspect_rules_js/@types+sizzle@2.3.8": "alias-1", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -319,8 +314,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/b", "lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/b".format(name), - src = "//:.aspect_rules_js/{}/@lib+b@0.0.0".format(name), + name = "node_modules/@lib/b", + src = "//:.aspect_rules_js/@lib+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -328,13 +323,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/b/dir".format(name), - srcs = [":{}/@lib/b".format(name)], + name = "node_modules/@lib/b/dir", + srcs = [":node_modules/@lib/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/b".format(name)) + link_targets.append(":node_modules/@lib/b") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -342,14 +337,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+b_alias@0.0.0", src = "//lib/b:pkg", package = "@lib/b_alias", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", - "//:.aspect_rules_js/{}/@types+sizzle@2.3.8".format(name): "alias-1", + "//:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", + "//:.aspect_rules_js/@types+sizzle@2.3.8": "alias-1", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -358,8 +352,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/b_alias".format(name), - src = "//:.aspect_rules_js/{}/@lib+b_alias@0.0.0".format(name), + name = "node_modules/@lib/b_alias", + src = "//:.aspect_rules_js/@lib+b_alias@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -367,13 +361,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/b_alias/dir".format(name), - srcs = [":{}/@lib/b_alias".format(name)], + name = "node_modules/@lib/b_alias/dir", + srcs = [":node_modules/@lib/b_alias"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/b_alias".format(name)) + link_targets.append(":node_modules/@lib/b_alias") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -381,14 +375,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+d@0.0.0", src = "//lib/d:pkg", package = "@lib/d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2".format(name): "@aspect-test/d", - "//:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "alias-2", + "//:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2": "@aspect-test/d", + "//:.aspect_rules_js/@types+node@16.18.11": "alias-2", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -397,8 +390,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/d"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/d".format(name), - src = "//:.aspect_rules_js/{}/@lib+d@0.0.0".format(name), + name = "node_modules/@lib/d", + src = "//:.aspect_rules_js/@lib+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -406,13 +399,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/d/dir".format(name), - srcs = [":{}/@lib/d".format(name)], + name = "node_modules/@lib/d/dir", + srcs = [":node_modules/@lib/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/d".format(name)) + link_targets.append(":node_modules/@lib/d") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -420,21 +413,21 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -442,50 +435,50 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/typescript".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/typescript") elif bazel_package == "app/a": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "app/c": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "lib/d": - link_targets.append(":{}/@aspect-test/d".format(name)) - link_targets.append(":{}/alias-2".format(name)) + link_targets.append(":node_modules/@aspect-test/d") + link_targets.append(":node_modules/alias-2") elif bazel_package == "lib/a": - link_targets.append(":{}/@aspect-test/e".format(name)) + link_targets.append(":node_modules/@aspect-test/e") elif bazel_package == "lib/b": - link_targets.append(":{}/@aspect-test/f".format(name)) - link_targets.append(":{}/alias-1".format(name)) + link_targets.append(":node_modules/@aspect-test/f") + link_targets.append(":node_modules/alias-1") elif bazel_package == "lib/c": - link_targets.append(":{}/@aspect-test/f".format(name)) + link_targets.append(":node_modules/@aspect-test/f") elif bazel_package == "app/d": - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "app/b": - link_targets.append(":{}/@aspect-test/h".format(name)) + link_targets.append(":node_modules/@aspect-test/h") if bazel_package in ["app/c"]: - link_targets.append(":{}/@lib/c".format(name)) + link_targets.append(":node_modules/@lib/c") if bazel_package in ["lib/a"]: - link_targets.append(":{}/vendored-a".format(name)) + link_targets.append(":node_modules/vendored-a") if bazel_package in ["lib/a"]: - link_targets.append(":{}/vendored-b".format(name)) + link_targets.append(":node_modules/vendored-b") if bazel_package in ["app/a"]: - link_targets.append(":{}/@lib/a".format(name)) + link_targets.append(":node_modules/@lib/a") if bazel_package in ["app/b", "lib/a"]: - link_targets.append(":{}/@lib/b".format(name)) + link_targets.append(":node_modules/@lib/b") if bazel_package in ["app/b"]: - link_targets.append(":{}/@lib/b_alias".format(name)) + link_targets.append(":node_modules/@lib/b_alias") if bazel_package in ["app/d"]: - link_targets.append(":{}/@lib/d".format(name)) + link_targets.append(":node_modules/@lib/d") return link_targets diff --git a/e2e/pnpm_workspace_deps/BUILD.bazel b/e2e/pnpm_workspace_deps/BUILD.bazel index e98a04523..3cdfdc467 100644 --- a/e2e/pnpm_workspace_deps/BUILD.bazel +++ b/e2e/pnpm_workspace_deps/BUILD.bazel @@ -1,3 +1,3 @@ load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() diff --git a/e2e/pnpm_workspace_deps/lib-dupes/BUILD.bazel b/e2e/pnpm_workspace_deps/lib-dupes/BUILD.bazel index 7adbfc0dc..7cd318f47 100644 --- a/e2e/pnpm_workspace_deps/lib-dupes/BUILD.bazel +++ b/e2e/pnpm_workspace_deps/lib-dupes/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # A library with 2 aliases to one simple dependency (package with no dependencies) js_library( diff --git a/e2e/pnpm_workspace_deps/lib/BUILD.bazel b/e2e/pnpm_workspace_deps/lib/BUILD.bazel index 2e57192f9..4c65e959d 100644 --- a/e2e/pnpm_workspace_deps/lib/BUILD.bazel +++ b/e2e/pnpm_workspace_deps/lib/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # A basic library with 2 simple dependencies (packages with no dependencies)) js_library( diff --git a/e2e/pnpm_workspace_deps/tests/BUILD.bazel b/e2e/pnpm_workspace_deps/tests/BUILD.bazel index b980f3754..3903467f3 100644 --- a/e2e/pnpm_workspace_deps/tests/BUILD.bazel +++ b/e2e/pnpm_workspace_deps/tests/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # Exposed by js_library() js_test( diff --git a/e2e/pnpm_workspace_rerooted/BUILD.bazel b/e2e/pnpm_workspace_rerooted/BUILD.bazel index 1e6d5e2cf..4677d1bbc 100644 --- a/e2e/pnpm_workspace_rerooted/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() sh_test( name = "node_test", diff --git a/e2e/pnpm_workspace_rerooted/app/a/BUILD.bazel b/e2e/pnpm_workspace_rerooted/app/a/BUILD.bazel index 957bd5694..20dc8151f 100644 --- a/e2e/pnpm_workspace_rerooted/app/a/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/app/a/BUILD.bazel @@ -4,7 +4,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets") load("@npm//app/a:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace_rerooted/app/b/BUILD.bazel b/e2e/pnpm_workspace_rerooted/app/b/BUILD.bazel index 1c11b256f..8e50e7902 100644 --- a/e2e/pnpm_workspace_rerooted/app/b/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/app/b/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", @@ -36,6 +36,6 @@ build_test( targets = [ ":node_modules/@lib/b", ":node_modules/@lib/b_alias", - "//root:.aspect_rules_js/node_modules/@lib+b_alias@0.0.0", + "//root:.aspect_rules_js/@lib+b_alias@0.0.0", ], ) diff --git a/e2e/pnpm_workspace_rerooted/app/c/BUILD.bazel b/e2e/pnpm_workspace_rerooted/app/c/BUILD.bazel index 92e21d724..ff067cec9 100644 --- a/e2e/pnpm_workspace_rerooted/app/c/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/app/c/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//app/a:@aspect-test/a/package_json.bzl", aspect_test_a_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace_rerooted/app/d/BUILD.bazel b/e2e/pnpm_workspace_rerooted/app/d/BUILD.bazel index 45bb3fcd6..efc9d86d0 100644 --- a/e2e/pnpm_workspace_rerooted/app/d/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/app/d/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "main", diff --git a/e2e/pnpm_workspace_rerooted/lib/a/BUILD.bazel b/e2e/pnpm_workspace_rerooted/lib/a/BUILD.bazel index 8ef6932fe..99cb9c6ca 100644 --- a/e2e/pnpm_workspace_rerooted/lib/a/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/lib/a/BUILD.bazel @@ -4,7 +4,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", diff --git a/e2e/pnpm_workspace_rerooted/lib/b/BUILD.bazel b/e2e/pnpm_workspace_rerooted/lib/b/BUILD.bazel index f63df9b2a..365d2e2d7 100644 --- a/e2e/pnpm_workspace_rerooted/lib/b/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/lib/b/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", @@ -18,6 +18,6 @@ build_test( name = "aliases", targets = [ ":node_modules/alias-1", - "//root:.aspect_rules_js/node_modules/@types+sizzle@2.3.8", + "//root:.aspect_rules_js/@types+sizzle@2.3.8", ], ) diff --git a/e2e/pnpm_workspace_rerooted/lib/c/BUILD.bazel b/e2e/pnpm_workspace_rerooted/lib/c/BUILD.bazel index 6b3b2207e..09ccb9c4e 100644 --- a/e2e/pnpm_workspace_rerooted/lib/c/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/lib/c/BUILD.bazel @@ -3,7 +3,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() npm_package( name = "pkg", diff --git a/e2e/pnpm_workspace_rerooted/lib/d/BUILD.bazel b/e2e/pnpm_workspace_rerooted/lib/d/BUILD.bazel index 545936810..32679892e 100644 --- a/e2e/pnpm_workspace_rerooted/lib/d/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/lib/d/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", @@ -21,6 +21,6 @@ build_test( name = "aliases", targets = [ ":node_modules/alias-2", - "//root:.aspect_rules_js/node_modules/@types+node@16.18.11", + "//root:.aspect_rules_js/@types+node@16.18.11", ], ) diff --git a/e2e/pnpm_workspace_rerooted/root/BUILD.bazel b/e2e/pnpm_workspace_rerooted/root/BUILD.bazel index e98a04523..3cdfdc467 100644 --- a/e2e/pnpm_workspace_rerooted/root/BUILD.bazel +++ b/e2e/pnpm_workspace_rerooted/root/BUILD.bazel @@ -1,3 +1,3 @@ load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() diff --git a/e2e/pnpm_workspace_rerooted/snapshots/defs.bzl b/e2e/pnpm_workspace_rerooted/snapshots/defs.bzl index 107f75779..08a267a1f 100644 --- a/e2e/pnpm_workspace_rerooted/snapshots/defs.bzl +++ b/e2e/pnpm_workspace_rerooted/snapshots/defs.bzl @@ -25,7 +25,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "app/a", "app/b", "app/c", "app/d", "lib/a", "lib/b", "lib/c", "lib/d"] # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "root" is_root = bazel_package == root_package @@ -37,7 +37,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -45,110 +45,110 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() if link: if bazel_package == "": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_1("{}/@aspect-test/b".format(name), link_root_name = name, link_alias = "@aspect-test/b") - link_targets.append(":{}/@aspect-test/b".format(name)) + link_1("@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/b") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_2("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_2("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_10("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_11("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) + link_10("lodash") + link_targets.append(":node_modules/lodash") + link_11("typescript") + link_targets.append(":node_modules/typescript") elif bazel_package == "app/a": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/c": - link_0("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_0("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "lib/d": - link_3("{}/@aspect-test/d".format(name), link_root_name = name, link_alias = "@aspect-test/d") - link_targets.append(":{}/@aspect-test/d".format(name)) + link_3("@aspect-test/d") + link_targets.append(":node_modules/@aspect-test/d") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_8("{}/alias-2".format(name), link_root_name = name, link_alias = "alias-2") - link_targets.append(":{}/alias-2".format(name)) + link_8("alias-2") + link_targets.append(":node_modules/alias-2") elif bazel_package == "lib/a": - link_4("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_4("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "lib/b": - link_5("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_5("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_9("{}/alias-1".format(name), link_root_name = name, link_alias = "alias-1") - link_targets.append(":{}/alias-1".format(name)) + link_9("alias-1") + link_targets.append(":node_modules/alias-1") elif bazel_package == "lib/c": - link_5("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_5("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/d": - link_6("{}/@aspect-test/g".format(name), link_root_name = name, link_alias = "@aspect-test/g") - link_targets.append(":{}/@aspect-test/g".format(name)) + link_6("@aspect-test/g") + link_targets.append(":node_modules/@aspect-test/g") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) elif bazel_package == "app/b": - link_7("{}/@aspect-test/h".format(name), link_root_name = name, link_alias = "@aspect-test/h") - link_targets.append(":{}/@aspect-test/h".format(name)) + link_7("@aspect-test/h") + link_targets.append(":node_modules/@aspect-test/h") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: @@ -156,13 +156,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+c@0.0.0", src = "//lib/c:pkg", package = "@lib/c", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", + "//root:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -171,8 +170,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/c"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/c".format(name), - src = "//root:.aspect_rules_js/{}/@lib+c@0.0.0".format(name), + name = "node_modules/@lib/c", + src = "//root:.aspect_rules_js/@lib+c@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -180,13 +179,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/c/dir".format(name), - srcs = [":{}/@lib/c".format(name)], + name = "node_modules/@lib/c/dir", + srcs = [":node_modules/@lib/c"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/c".format(name)) + link_targets.append(":node_modules/@lib/c") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -194,13 +193,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "vendored-a@0.0.0", src = "//vendored/a:pkg", package = "vendored-a", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", + "//root:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -209,8 +207,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/vendored-a".format(name), - src = "//root:.aspect_rules_js/{}/vendored-a@0.0.0".format(name), + name = "node_modules/vendored-a", + src = "//root:.aspect_rules_js/vendored-a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -218,23 +216,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/vendored-a/dir".format(name), - srcs = [":{}/vendored-a".format(name)], + name = "node_modules/vendored-a/dir", + srcs = [":node_modules/vendored-a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/vendored-a".format(name)) + link_targets.append(":node_modules/vendored-a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "vendored-b@0.0.0", src = "//vendored/b:pkg", package = "vendored-b", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@lib+b@0.0.0".format(name): "@lib/b", + "//root:.aspect_rules_js/@lib+b@0.0.0": "@lib/b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -243,8 +240,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/vendored-b".format(name), - src = "//root:.aspect_rules_js/{}/vendored-b@0.0.0".format(name), + name = "node_modules/vendored-b", + src = "//root:.aspect_rules_js/vendored-b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -252,26 +249,25 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/vendored-b/dir".format(name), - srcs = [":{}/vendored-b".format(name)], + name = "node_modules/vendored-b/dir", + srcs = [":node_modules/vendored-b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/vendored-b".format(name)) + link_targets.append(":node_modules/vendored-b") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+a@0.0.0", src = "//lib/a:pkg", package = "@lib/a", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+e@1.0.0".format(name): "@aspect-test/e", - "//root:.aspect_rules_js/{}/@lib+b@0.0.0".format(name): "@lib/b", - "//root:.aspect_rules_js/{}/vendored-a@0.0.0".format(name): "vendored-a", - "//root:.aspect_rules_js/{}/vendored-b@0.0.0".format(name): "vendored-b", + "//root:.aspect_rules_js/@aspect-test+e@1.0.0": "@aspect-test/e", + "//root:.aspect_rules_js/@lib+b@0.0.0": "@lib/b", + "//root:.aspect_rules_js/vendored-a@0.0.0": "vendored-a", + "//root:.aspect_rules_js/vendored-b@0.0.0": "vendored-b", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -280,8 +276,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/a".format(name), - src = "//root:.aspect_rules_js/{}/@lib+a@0.0.0".format(name), + name = "node_modules/@lib/a", + src = "//root:.aspect_rules_js/@lib+a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -289,13 +285,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/a/dir".format(name), - srcs = [":{}/@lib/a".format(name)], + name = "node_modules/@lib/a/dir", + srcs = [":node_modules/@lib/a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/a".format(name)) + link_targets.append(":node_modules/@lib/a") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -303,14 +299,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+b@0.0.0", src = "//lib/b:pkg", package = "@lib/b", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", - "//root:.aspect_rules_js/{}/@types+sizzle@2.3.8".format(name): "alias-1", + "//root:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", + "//root:.aspect_rules_js/@types+sizzle@2.3.8": "alias-1", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -319,8 +314,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/b", "lib/a"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/b".format(name), - src = "//root:.aspect_rules_js/{}/@lib+b@0.0.0".format(name), + name = "node_modules/@lib/b", + src = "//root:.aspect_rules_js/@lib+b@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -328,13 +323,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/b/dir".format(name), - srcs = [":{}/@lib/b".format(name)], + name = "node_modules/@lib/b/dir", + srcs = [":node_modules/@lib/b"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/b".format(name)) + link_targets.append(":node_modules/@lib/b") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -342,14 +337,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+b_alias@0.0.0", src = "//lib/b:pkg", package = "@lib/b_alias", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+f@1.0.0".format(name): "@aspect-test/f", - "//root:.aspect_rules_js/{}/@types+sizzle@2.3.8".format(name): "alias-1", + "//root:.aspect_rules_js/@aspect-test+f@1.0.0": "@aspect-test/f", + "//root:.aspect_rules_js/@types+sizzle@2.3.8": "alias-1", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -358,8 +352,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/b_alias".format(name), - src = "//root:.aspect_rules_js/{}/@lib+b_alias@0.0.0".format(name), + name = "node_modules/@lib/b_alias", + src = "//root:.aspect_rules_js/@lib+b_alias@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -367,13 +361,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/b_alias/dir".format(name), - srcs = [":{}/@lib/b_alias".format(name)], + name = "node_modules/@lib/b_alias/dir", + srcs = [":node_modules/@lib/b_alias"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/b_alias".format(name)) + link_targets.append(":node_modules/@lib/b_alias") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -381,14 +375,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+d@0.0.0", src = "//lib/d:pkg", package = "@lib/d", version = "0.0.0", deps = { - "//root:.aspect_rules_js/{}/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2".format(name): "@aspect-test/d", - "//root:.aspect_rules_js/{}/@types+node@16.18.11".format(name): "alias-2", + "//root:.aspect_rules_js/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2": "@aspect-test/d", + "//root:.aspect_rules_js/@types+node@16.18.11": "alias-2", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -397,8 +390,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["app/d"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/d".format(name), - src = "//root:.aspect_rules_js/{}/@lib+d@0.0.0".format(name), + name = "node_modules/@lib/d", + src = "//root:.aspect_rules_js/@lib+d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -406,13 +399,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/d/dir".format(name), - srcs = [":{}/@lib/d".format(name)], + name = "node_modules/@lib/d/dir", + srcs = [":node_modules/@lib/d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/d".format(name)) + link_targets.append(":node_modules/@lib/d") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -420,21 +413,21 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -442,50 +435,50 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/b".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/typescript".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/b") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/typescript") elif bazel_package == "app/a": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "app/c": - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "lib/d": - link_targets.append(":{}/@aspect-test/d".format(name)) - link_targets.append(":{}/alias-2".format(name)) + link_targets.append(":node_modules/@aspect-test/d") + link_targets.append(":node_modules/alias-2") elif bazel_package == "lib/a": - link_targets.append(":{}/@aspect-test/e".format(name)) + link_targets.append(":node_modules/@aspect-test/e") elif bazel_package == "lib/b": - link_targets.append(":{}/@aspect-test/f".format(name)) - link_targets.append(":{}/alias-1".format(name)) + link_targets.append(":node_modules/@aspect-test/f") + link_targets.append(":node_modules/alias-1") elif bazel_package == "lib/c": - link_targets.append(":{}/@aspect-test/f".format(name)) + link_targets.append(":node_modules/@aspect-test/f") elif bazel_package == "app/d": - link_targets.append(":{}/@aspect-test/g".format(name)) + link_targets.append(":node_modules/@aspect-test/g") elif bazel_package == "app/b": - link_targets.append(":{}/@aspect-test/h".format(name)) + link_targets.append(":node_modules/@aspect-test/h") if bazel_package in ["app/c"]: - link_targets.append(":{}/@lib/c".format(name)) + link_targets.append(":node_modules/@lib/c") if bazel_package in ["lib/a"]: - link_targets.append(":{}/vendored-a".format(name)) + link_targets.append(":node_modules/vendored-a") if bazel_package in ["lib/a"]: - link_targets.append(":{}/vendored-b".format(name)) + link_targets.append(":node_modules/vendored-b") if bazel_package in ["app/a"]: - link_targets.append(":{}/@lib/a".format(name)) + link_targets.append(":node_modules/@lib/a") if bazel_package in ["app/b", "lib/a"]: - link_targets.append(":{}/@lib/b".format(name)) + link_targets.append(":node_modules/@lib/b") if bazel_package in ["app/b"]: - link_targets.append(":{}/@lib/b_alias".format(name)) + link_targets.append(":node_modules/@lib/b_alias") if bazel_package in ["app/d"]: - link_targets.append(":{}/@lib/d".format(name)) + link_targets.append(":node_modules/@lib/d") return link_targets diff --git a/e2e/repo_mapping/BUILD.bazel b/e2e/repo_mapping/BUILD.bazel index 404bb6bc5..a0bf60483 100644 --- a/e2e/repo_mapping/BUILD.bazel +++ b/e2e/repo_mapping/BUILD.bazel @@ -6,7 +6,6 @@ load("@rules_js-repo_name//js:defs.bzl", "js_test") load("@rules_js-repo_name//npm:defs.bzl", "npm_link_package", "npm_package") npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_types_node, ], diff --git a/e2e/rules_foo/foo/repositories.bzl b/e2e/rules_foo/foo/repositories.bzl index 67efbdd2a..b2ef2786b 100755 --- a/e2e/rules_foo/foo/repositories.bzl +++ b/e2e/rules_foo/foo/repositories.bzl @@ -15,7 +15,7 @@ def foo_repositories(): additional_file_contents = { "BUILD.bazel": [ """load("//:npm_link_all_packages.bzl", "npm_link_all_packages")""", - """npm_link_all_packages(name = "node_modules")""", + """npm_link_all_packages()""", ], # Test that we can add statements to the generated defs bzl file "npm_link_all_packages.bzl": [ diff --git a/e2e/update_pnpm_lock/BUILD.bazel b/e2e/update_pnpm_lock/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/update_pnpm_lock/BUILD.bazel +++ b/e2e/update_pnpm_lock/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/update_pnpm_lock/workspace_package/BUILD.bazel b/e2e/update_pnpm_lock/workspace_package/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/update_pnpm_lock/workspace_package/BUILD.bazel +++ b/e2e/update_pnpm_lock/workspace_package/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/update_pnpm_lock_with_import/BUILD.bazel b/e2e/update_pnpm_lock_with_import/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/update_pnpm_lock_with_import/BUILD.bazel +++ b/e2e/update_pnpm_lock_with_import/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/update_pnpm_lock_with_import/workspace_package/BUILD.bazel b/e2e/update_pnpm_lock_with_import/workspace_package/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/update_pnpm_lock_with_import/workspace_package/BUILD.bazel +++ b/e2e/update_pnpm_lock_with_import/workspace_package/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/vendored_tarfile/BUILD.bazel b/e2e/vendored_tarfile/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/vendored_tarfile/BUILD.bazel +++ b/e2e/vendored_tarfile/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/verify_patches/BUILD.bazel b/e2e/verify_patches/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/verify_patches/BUILD.bazel +++ b/e2e/verify_patches/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/webpack_devserver/BUILD.bazel b/e2e/webpack_devserver/BUILD.bazel index e39c0e591..f70dade86 100644 --- a/e2e/webpack_devserver/BUILD.bazel +++ b/e2e/webpack_devserver/BUILD.bazel @@ -3,7 +3,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//:webpack/package_json.bzl", webpack_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/webpack_devserver/mylib/BUILD.bazel b/e2e/webpack_devserver/mylib/BUILD.bazel index 6db42b8a6..813e0f1c4 100644 --- a/e2e/webpack_devserver/mylib/BUILD.bazel +++ b/e2e/webpack_devserver/mylib/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/e2e/webpack_devserver_esm/BUILD.bazel b/e2e/webpack_devserver_esm/BUILD.bazel index cdfb9418e..8d38f232a 100644 --- a/e2e/webpack_devserver_esm/BUILD.bazel +++ b/e2e/webpack_devserver_esm/BUILD.bazel @@ -3,7 +3,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//:webpack/package_json.bzl", webpack_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/e2e/webpack_devserver_esm/mylib/BUILD.bazel b/e2e/webpack_devserver_esm/mylib/BUILD.bazel index 6db42b8a6..813e0f1c4 100644 --- a/e2e/webpack_devserver_esm/mylib/BUILD.bazel +++ b/e2e/webpack_devserver_esm/mylib/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/e2e/workspace/BUILD.bazel b/e2e/workspace/BUILD.bazel index 7691ba4fd..f933c1619 100644 --- a/e2e/workspace/BUILD.bazel +++ b/e2e/workspace/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() build_test( name = "test", diff --git a/examples/js_binary/BUILD.bazel b/examples/js_binary/BUILD.bazel index 6e0a6be68..59d7a7265 100644 --- a/examples/js_binary/BUILD.bazel +++ b/examples/js_binary/BUILD.bazel @@ -17,7 +17,7 @@ load(":custom_rule.bzl", "custom_rule") # Link all direct dependencies in /examples/npm_deps/package.json to # bazel-bin/examples/npm_deps/node_modules -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # A simple program that runs the Acorn JS parser to produce an AST js_binary( diff --git a/examples/js_lib_pkg/a/BUILD.bazel b/examples/js_lib_pkg/a/BUILD.bazel index 5b4211ae0..af38c57bb 100644 --- a/examples/js_lib_pkg/a/BUILD.bazel +++ b/examples/js_lib_pkg/a/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/examples/js_lib_pkg/b/BUILD.bazel b/examples/js_lib_pkg/b/BUILD.bazel index 5ea329719..cd4446432 100644 --- a/examples/js_lib_pkg/b/BUILD.bazel +++ b/examples/js_lib_pkg/b/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_test( name = "test", diff --git a/examples/linked_consumer/BUILD.bazel b/examples/linked_consumer/BUILD.bazel index 662d75705..c084fdaaf 100644 --- a/examples/linked_consumer/BUILD.bazel +++ b/examples/linked_consumer/BUILD.bazel @@ -3,7 +3,7 @@ load("@aspect_bazel_lib//lib:diff_test.bzl", "diff_test") load("@aspect_rules_js//js:defs.bzl", "js_info_files", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # Exposed by js_library() js_test( diff --git a/examples/linked_empty_node_modules/BUILD.bazel b/examples/linked_empty_node_modules/BUILD.bazel index 0b8d8cf7c..be4cbcf84 100644 --- a/examples/linked_empty_node_modules/BUILD.bazel +++ b/examples/linked_empty_node_modules/BUILD.bazel @@ -5,7 +5,7 @@ load("//npm:defs.bzl", "npm_package") # Approx repro of https://github.com/aspect-build/rules_js/issues/918 -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "lib", diff --git a/examples/linked_lib/BUILD.bazel b/examples/linked_lib/BUILD.bazel index 82045c6ca..98d246fcf 100644 --- a/examples/linked_lib/BUILD.bazel +++ b/examples/linked_lib/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # A basic package with 2 simple dependencies (packages with no dependencies) # Exposed via js_library() diff --git a/examples/linked_pkg/BUILD.bazel b/examples/linked_pkg/BUILD.bazel index a7bd1109a..d169e7f73 100644 --- a/examples/linked_pkg/BUILD.bazel +++ b/examples/linked_pkg/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # A basic library with 2 simple dependencies (packages with no dependencies) js_library( diff --git a/examples/macro/BUILD.bazel b/examples/macro/BUILD.bazel index ff934f595..928879d37 100644 --- a/examples/macro/BUILD.bazel +++ b/examples/macro/BUILD.bazel @@ -4,7 +4,7 @@ load("//examples/macro:mocha.bzl", "mocha_test") # Link all direct dependencies in /examples/macro/package.json to # bazel-bin/examples/macro/node_modules -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() mocha_test( name = "test", diff --git a/examples/nextjs/BUILD.bazel b/examples/nextjs/BUILD.bazel index 2534ad4bf..d2eadc547 100644 --- a/examples/nextjs/BUILD.bazel +++ b/examples/nextjs/BUILD.bazel @@ -3,7 +3,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//examples/nextjs:next/package_json.bzl", next_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # The nextjs binary target to used by nextjs:defs.bzl next_bin.next_binary( diff --git a/examples/npm_deps/BUILD.bazel b/examples/npm_deps/BUILD.bazel index 1d13a8363..18db813ef 100644 --- a/examples/npm_deps/BUILD.bazel +++ b/examples/npm_deps/BUILD.bazel @@ -17,7 +17,7 @@ load("@npm__rollup__2.70.2//examples/npm_deps:package_json.bzl", "rollup", "roll # Link all direct dependencies in /examples/npm_deps/package.json to # bazel-bin/examples/npm_deps/node_modules -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() ####################################### # Use case 1: transitive npm dependencies diff --git a/examples/npm_package/libs/lib_a/BUILD.bazel b/examples/npm_package/libs/lib_a/BUILD.bazel index 0a80da8e3..67a21b630 100644 --- a/examples/npm_package/libs/lib_a/BUILD.bazel +++ b/examples/npm_package/libs/lib_a/BUILD.bazel @@ -1,7 +1,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("//js:defs.bzl", "js_library") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # An example of a library that is use directly and not via a npm_package. # This library could be used by build steps of packages as a "dev dependency" diff --git a/examples/npm_package/packages/pkg_a/BUILD.bazel b/examples/npm_package/packages/pkg_a/BUILD.bazel index 5f4e1c286..0e1b0f11a 100644 --- a/examples/npm_package/packages/pkg_a/BUILD.bazel +++ b/examples/npm_package/packages/pkg_a/BUILD.bazel @@ -2,7 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@aspect_rules_js//npm:defs.bzl", "npm_package", "stamped_package_json") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() stamped_package_json( name = "package", diff --git a/examples/npm_package/packages/pkg_b/BUILD.bazel b/examples/npm_package/packages/pkg_b/BUILD.bazel index 8be1bf977..10115df5a 100644 --- a/examples/npm_package/packages/pkg_b/BUILD.bazel +++ b/examples/npm_package/packages/pkg_b/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//npm:defs.bzl", "npm_package") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # The terminal npm_package target for this package. This target is linked # manually in the root of the pnpm workspace with `npm_link_package`. diff --git a/examples/npm_package/packages/pkg_d/BUILD.bazel b/examples/npm_package/packages/pkg_d/BUILD.bazel index 366b368fc..8d30cebae 100644 --- a/examples/npm_package/packages/pkg_d/BUILD.bazel +++ b/examples/npm_package/packages/pkg_d/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/examples/npm_package/packages/pkg_e/BUILD.bazel b/examples/npm_package/packages/pkg_e/BUILD.bazel index 366b368fc..8d30cebae 100644 --- a/examples/npm_package/packages/pkg_e/BUILD.bazel +++ b/examples/npm_package/packages/pkg_e/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "pkg", diff --git a/examples/stack_traces/BUILD.bazel b/examples/stack_traces/BUILD.bazel index 980cc6b7b..04f8f5437 100644 --- a/examples/stack_traces/BUILD.bazel +++ b/examples/stack_traces/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_test( name = "stack_traces", diff --git a/examples/webpack_cli/BUILD.bazel b/examples/webpack_cli/BUILD.bazel index cb3cefc8f..edc72a47a 100644 --- a/examples/webpack_cli/BUILD.bazel +++ b/examples/webpack_cli/BUILD.bazel @@ -2,9 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_library", "js_test") load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//examples/webpack_cli:webpack-cli/package_json.bzl", "bin") -npm_link_all_packages( - name = "node_modules", -) +npm_link_all_packages() js_library( name = "lib", diff --git a/js/private/coverage/bundle/BUILD.bazel b/js/private/coverage/bundle/BUILD.bazel index 670a5a4d7..bf43f091a 100644 --- a/js/private/coverage/bundle/BUILD.bazel +++ b/js/private/coverage/bundle/BUILD.bazel @@ -1,7 +1,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//js/private/coverage/bundle:rollup/package_json.bzl", rollup_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() rollup_bin.rollup( name = "bundle", diff --git a/js/private/test/image/BUILD.bazel b/js/private/test/image/BUILD.bazel index dac91d4aa..0748a5953 100644 --- a/js/private/test/image/BUILD.bazel +++ b/js/private/test/image/BUILD.bazel @@ -2,7 +2,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("//js:defs.bzl", "js_binary") load(":asserts.bzl", "assert_checksum", "assert_js_image_layer_listings", "make_js_image_layer") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_binary( name = "bin", diff --git a/js/private/test/js_run_devserver/BUILD.bazel b/js/private/test/js_run_devserver/BUILD.bazel index 1fb7bc5c5..f2554909f 100644 --- a/js/private/test/js_run_devserver/BUILD.bazel +++ b/js/private/test/js_run_devserver/BUILD.bazel @@ -3,7 +3,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//js/private/test/js_run_devserver:jasmine/package_json.bzl", jasmine_bin = "bin") load(":js_run_devserver_test.bzl", "js_run_devserver_test") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # Checks node_modules symlinks that they refer to exec root (instead of runfiles) # in order to make sure bundlers see exactly one node_modules tree. Checks: diff --git a/js/private/worker/src/BUILD.bazel b/js/private/worker/src/BUILD.bazel index 17e0d39e1..7af425f80 100644 --- a/js/private/worker/src/BUILD.bazel +++ b/js/private/worker/src/BUILD.bazel @@ -1,7 +1,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("@npm//js/private/worker/src:rollup/package_json.bzl", rollup_bin = "bin") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() rollup_bin.rollup( name = "bundle", diff --git a/npm/private/BUILD.bazel b/npm/private/BUILD.bazel index 794a8d1f5..199b36281 100644 --- a/npm/private/BUILD.bazel +++ b/npm/private/BUILD.bazel @@ -29,8 +29,8 @@ exports_files(["noop.sh"]) "npm_translate_lock_generate.docs.bzl", ]) for j, expected in enumerate([ - """def npm_link_targets(name = "node_modules", package = None):""", - """def npm_link_all_packages(name = "node_modules", imported_links = []):""", + """def npm_link_targets(package = None):""", + """def npm_link_all_packages(imported_links = []):""", ]) ] diff --git a/npm/private/npm_import.bzl b/npm/private/npm_import.bzl index 785829bdd..4ccb96c34 100644 --- a/npm/private/npm_import.bzl +++ b/npm/private/npm_import.bzl @@ -56,9 +56,8 @@ _PACKAGE_STORE_NAME = "{package_store_name}" # Generated npm_package_store targets for npm package {package}@{version} # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, @@ -81,7 +80,6 @@ def npm_imported_package_store(link_root_name): # buildifier: disable=function-docstring # buildifier: disable=unnamed-macro def npm_imported_package_store_internal( - link_root_name, package, version, root_package, @@ -107,11 +105,7 @@ def npm_imported_package_store_internal( ) fail(msg) - deps = {k.format(link_root_name = link_root_name): v for k, v in deps.items()} - ref_deps = {k.format(link_root_name = link_root_name): v for k, v in ref_deps.items()} - lc_deps = {k.format(link_root_name = link_root_name): v for k, v in lc_deps.items()} - - store_target_name = "%s/%s/%s" % (utils.package_store_root, link_root_name, package_store_name) + store_target_name = "%s/%s" % (utils.package_store_root, package_store_name) # reference target used to avoid circular deps _npm_package_store( @@ -233,21 +227,20 @@ def npm_imported_package_store_internal( tags = ["manual"], ) +# buildifier: disable=function-docstring def npm_link_imported_package_store_internal( name, - link_root_name, - link_alias, root_package, link_visibility, bins, - package_store_name, - public_visibility): - store_target_name = "%s/%s/%s" % (utils.package_store_root, link_root_name, package_store_name) + package_store_name): + store_target_name = "%s/%s" % (utils.package_store_root, package_store_name) + link_target_name = "node_modules/{}".format(name) # terminal package store target to link npm_link_package_store( - name = name, - package = link_alias, + name = link_target_name, + package = name, src = "//%s:%s" % (root_package, store_target_name), visibility = link_visibility, tags = ["manual"], @@ -257,35 +250,29 @@ def npm_link_imported_package_store_internal( # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/dir".format(name), - srcs = [":" + name], + name = "{}/dir".format(link_target_name), + srcs = [":" + link_target_name], output_group = utils.package_directory_output_group, visibility = link_visibility, tags = ["manual"], ) - return [":{}".format(name)] if public_visibility else [] - _LINK_JS_PACKAGE_LINK_IMPORTED_STORE_TMPL = """\ # Generated npm_package_store and npm_link_package_store targets for npm package {package}@{version} # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = {link_visibility}, bins = {bins}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = {public_visibility}, ) """ # Invoked by generated npm_link_imported_package_store targets for npm package {package}@{version} # buildifier: disable=function-docstring def npm_link_imported_package_internal( - name, package, version, root_package, @@ -321,12 +308,8 @@ def npm_link_imported_package_internal( if not link_aliases: link_aliases = [package] for link_alias in link_aliases: - link_target_name = "{}/{}".format(name, link_alias) - npm_link_imported_package_store_macro( - name = link_target_name, - link_root_name = name, - link_alias = link_alias, - ) + link_target_name = "node_modules/{}".format(link_alias) + npm_link_imported_package_store_macro(link_alias) if public_visibility: link_targets.append(":" + link_target_name) link_scope = link_alias[:link_alias.find("/", 1)] if link_alias[0] == "@" else None @@ -336,19 +319,15 @@ def npm_link_imported_package_internal( scoped_targets[link_scope].append(link_target_name) if is_root: - npm_imported_package_store_macro(name) + npm_imported_package_store_macro() return (link_targets, scoped_targets) _LINK_JS_PACKAGE_LINK_IMPORTED_PKG_TMPL = """\ # Generated npm_package_store and npm_link_package_store targets for npm package {package}@{version} # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = {link_default}, - fail_if_no_link = True): +def npm_link_imported_package(link = {link_default}, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, @@ -361,8 +340,8 @@ def npm_link_imported_package( ) """ -def bin_internal(name, link_workspace_and_package, link_root_name, package_store_name, bin_path, bin_mnemonic, **kwargs): - target = "%s:%s/%s/%s" % (link_workspace_and_package, utils.package_store_root, link_root_name, package_store_name) +def bin_internal(name, link_workspace_and_package, package_store_name, bin_path, bin_mnemonic, **kwargs): + target = "%s:%s/%s" % (link_workspace_and_package, utils.package_store_root, package_store_name) _directory_path( name = "%s__entry_point" % name, directory = target + "/dir", @@ -383,8 +362,8 @@ def bin_internal(name, link_workspace_and_package, link_root_name, package_store **kwargs ) -def bin_test_internal(name, link_workspace_and_package, link_root_name, package_store_name, bin_path, **kwargs): - target = "%s:%s/%s/%s" % (link_workspace_and_package, utils.package_store_root, link_root_name, package_store_name) +def bin_test_internal(name, link_workspace_and_package, package_store_name, bin_path, **kwargs): + target = "%s:%s/%s" % (link_workspace_and_package, utils.package_store_root, package_store_name) _directory_path( name = "%s__entry_point" % name, directory = target + "/dir", @@ -398,8 +377,8 @@ def bin_test_internal(name, link_workspace_and_package, link_root_name, package_ **kwargs ) -def bin_binary_internal(name, link_workspace_and_package, link_root_name, package_store_name, bin_path, **kwargs): - target = "%s:%s/%s/%s" % (link_workspace_and_package, utils.package_store_root, link_root_name, package_store_name) +def bin_binary_internal(name, link_workspace_and_package, package_store_name, bin_path, **kwargs): + target = "%s:%s/%s" % (link_workspace_and_package, utils.package_store_root, package_store_name) _directory_path( name = "%s__entry_point" % name, directory = target + "/dir", @@ -414,46 +393,34 @@ def bin_binary_internal(name, link_workspace_and_package, link_root_name, packag ) _BIN_MACRO_TMPL = """ -def _{bin_name}_internal(name, link_root_name, **kwargs): +def {bin_name}(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "{bin_path}", bin_mnemonic = "{bin_mnemonic}", **kwargs, ) -def _{bin_name}_test_internal(name, link_root_name, **kwargs): +def {bin_name}_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "{bin_path}", **kwargs, ) -def _{bin_name}_binary_internal(name, link_root_name, **kwargs): +def {bin_name}_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "{bin_path}", **kwargs, ) - -def {bin_name}(name, **kwargs): - _{bin_name}_internal(name, "node_modules", **kwargs) - -def {bin_name}_test(name, **kwargs): - _{bin_name}_test_internal(name, "node_modules", **kwargs) - -def {bin_name}_binary(name, **kwargs): - _{bin_name}_binary_internal(name, "node_modules", **kwargs) """ _JS_PACKAGE_TMPL = """ @@ -682,22 +649,21 @@ def _npm_import_rule_impl(rctx): for bin_name in bins: sanitized_bin_name = _sanitize_bin_name(bin_name) bin_struct_fields.append( - """ {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}, + {bin_name}_test = {bin_name}_test, + {bin_name}_binary = {bin_name}_binary, {bin_name}_path = "{bin_path}",""".format( bin_name = sanitized_bin_name, bin_path = bins[bin_name], ), ) - bin_bzl.append("""def bin_factory(link_root_name): - # bind link_root_name using lambdas + bin_bzl.append("""def bin_factory(): return struct( {bin_struct_fields} ) -bin = bin_factory("node_modules") +bin = bin_factory() """.format( package = rctx.attr.package, version = rctx.attr.version, @@ -748,7 +714,7 @@ def _npm_import_links_rule_impl(rctx): deps = {} for (dep_name, dep_version) in rctx.attr.deps.items(): - dep_store_target = '":{package_store_root}/{{link_root_name}}/{package_store_name}/ref"'.format( + dep_store_target = '":{package_store_root}/{package_store_name}/ref"'.format( package_store_name = utils.package_store_name(dep_name, dep_version), package_store_root = utils.package_store_root, ) @@ -763,13 +729,13 @@ def _npm_import_links_rule_impl(rctx): # party npm deps; it is not used for 1st party deps for (dep_name, dep_versions) in rctx.attr.transitive_closure.items(): for dep_version in dep_versions: - dep_store_target = '":{package_store_root}/{{link_root_name}}/{package_store_name}/pkg"' + dep_store_target = '":{package_store_root}/{package_store_name}/pkg"' lc_dep_store_target = dep_store_target if dep_name == rctx.attr.package and dep_version == rctx.attr.version: # special case for lifecycle transitive closure deps; do not depend on # the __pkg of this package as that will be the output directory # of the lifecycle action - lc_dep_store_target = '":{package_store_root}/{{link_root_name}}/{package_store_name}/pkg_pre_lc_lite"' + lc_dep_store_target = '":{package_store_root}/{package_store_name}/pkg_pre_lc_lite"' dep_package_store_name = utils.package_store_name(dep_name, dep_version) @@ -793,7 +759,7 @@ def _npm_import_links_rule_impl(rctx): deps[dep_store_target].append(dep_name) else: for (dep_name, dep_version) in rctx.attr.deps.items(): - dep_store_target = '":{package_store_root}/{{link_root_name}}/{package_store_name}"'.format( + dep_store_target = '":{package_store_root}/{package_store_name}"'.format( package_store_name = utils.package_store_name(dep_name, dep_version), package_store_root = utils.package_store_root, ) @@ -1058,7 +1024,7 @@ def npm_import( ``` load("@npm__at_types_node__15.12.2__links//:defs.bzl", npm_link_types_node = "npm_link_imported_package") - npm_link_types_node(name = "node_modules") + npm_link_types_node() ``` This links `@types/node` into the `node_modules` of this package with the target name `:node_modules/@types/node`. @@ -1074,7 +1040,7 @@ def npm_import( ``` load("@npm//:defs.bzl", "npm_link_all_packages") - npm_link_all_packages(name = "node_modules") + npm_link_all_packages() ``` This creates `:node_modules/name` and `:node_modules/@scope/name` targets for all direct npm dependencies in the package. @@ -1090,7 +1056,6 @@ def npm_import( load("@npm__at_types_node__15.12.2__links//:defs.bzl", npm_link_types_node = "npm_link_imported_package") npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_types_node, ] diff --git a/npm/private/npm_package_store.bzl b/npm/private/npm_package_store.bzl index 249c35870..60abff606 100644 --- a/npm/private/npm_package_store.bzl +++ b/npm/private/npm_package_store.bzl @@ -48,19 +48,19 @@ _ATTRS = { For example, ``` - //:.aspect_rules_js/node_modules/cliui/7.0.4 + //:.aspect_rules_js/cliui/7.0.4 ``` The version may include peer dep(s), ``` - //:.aspect_rules_js/node_modules/debug/4.3.4_supports-color@8.1.1 + //:.aspect_rules_js/debug/4.3.4_supports-color@8.1.1 ``` It could be also be a url based version, ``` - //:.aspect_rules_js/node_modules/debug/github.com/ngokevin/debug/9742c5f383a6f8046241920156236ade8ec30d53 + //:.aspect_rules_js/debug/github.com/ngokevin/debug/9742c5f383a6f8046241920156236ade8ec30d53 ``` Package store link targets names for 3rd party package that come directly from an @@ -72,7 +72,7 @@ _ATTRS = { For example, ``` - //:.aspect_rules_js/node_modules/cliui/7.0.4 + //:.aspect_rules_js/cliui/7.0.4 ``` Package store link targets names for 1st party packages automatically linked by `npm_link_all_packages` @@ -82,7 +82,7 @@ _ATTRS = { For example, ``` - //:.aspect_rules_js/node_modules/@mycorp/mypkg/0.0.0 + //:.aspect_rules_js/@mycorp/mypkg/0.0.0 ``` Package store link targets names for 1st party packages manually linked with `npm_link_package` @@ -91,7 +91,7 @@ _ATTRS = { For example, ``` - //:.aspect_rules_js/node_modules/@mycorp/mypkg + //:.aspect_rules_js/@mycorp/mypkg ``` > In typical usage, a node.js program sometimes requires modules which were @@ -462,8 +462,8 @@ npm_package_store = rule( # Invoked by generated package store targets for local packages # buildifier: disable=function-docstring # buildifier: disable=unnamed-macro -def npm_local_package_store_internal(link_root_name, package_store_name, package, version, src, deps, visibility, tags): - store_target_name = "%s/%s/%s" % (utils.package_store_root, link_root_name, package_store_name) +def npm_local_package_store_internal(package_store_name, package, version, src, deps, visibility, tags): + store_target_name = "%s/%s" % (utils.package_store_root, package_store_name) npm_package_store( name = store_target_name, diff --git a/npm/private/npm_translate_lock_generate.bzl b/npm/private/npm_translate_lock_generate.bzl index 190a30895..adf8cd50b 100644 --- a/npm/private/npm_translate_lock_generate.bzl +++ b/npm/private/npm_translate_lock_generate.bzl @@ -32,7 +32,6 @@ _FP_STORE_TMPL = \ """ if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "{package_store_name}", src = "{npm_package_target}", package = "{package}", @@ -47,8 +46,8 @@ _FP_DIRECT_TMPL = \ if bazel_package in {link_packages}: # terminal target for direct dependencies _npm_link_package_store( - name = "{{}}/{pkg}".format(name), - src = "//{root_package}:{package_store_root}/{{}}/{package_store_name}".format(name), + name = "node_modules/{pkg}", + src = "//{root_package}:{package_store_root}/{package_store_name}", visibility = {link_visibility}, tags = ["manual"], ) @@ -56,8 +55,8 @@ _FP_DIRECT_TMPL = \ # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{{}}/{pkg}/dir".format(name), - srcs = [":{{}}/{pkg}".format(name)], + name = "node_modules/{pkg}/dir", + srcs = [":node_modules/{pkg}"], output_group = "{package_directory_output_group}", visibility = {link_visibility}, tags = ["manual"], @@ -66,7 +65,7 @@ _FP_DIRECT_TMPL = \ _FP_DIRECT_TARGET_TMPL = \ """ if bazel_package in {link_packages}: - link_targets.append(":{{}}/{pkg}".format(name))""" + link_targets.append(":node_modules/{pkg}")""" _BZL_LIBRARY_TMPL = \ """bzl_library( @@ -134,7 +133,7 @@ sh_binary( transitive_deps = {} for raw_package, raw_version in deps.items(): package_store_name = utils.package_store_name(raw_package, raw_version) - dep_store_target = """"//{root_package}:{package_store_root}/{{}}/{package_store_name}".format(name)""".format( + dep_store_target = '"//{root_package}:{package_store_root}/{package_store_name}"'.format( root_package = root_package, package_store_name = package_store_name, package_store_root = utils.package_store_root, @@ -181,7 +180,7 @@ sh_binary( raw_deps = importers.get(dep_link).get("deps") for raw_package, raw_version in raw_deps.items(): package_store_name = utils.package_store_name(raw_package, raw_version) - dep_store_target = """"//{root_package}:{package_store_root}/{{}}/{package_store_name}".format(name)""".format( + dep_store_target = '"//{root_package}:{package_store_root}/{package_store_name}"'.format( root_package = root_package, package_store_name = package_store_name, package_store_root = utils.package_store_root, @@ -206,7 +205,7 @@ sh_binary( npm_link_targets_bzl = [ """\ # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -217,7 +216,7 @@ def npm_link_targets(name = "node_modules", package = None): npm_link_all_packages_bzl = [ """\ # buildifier: disable=function-docstring -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "{root_package}" is_root = bazel_package == root_package @@ -229,7 +228,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {{}} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -265,7 +264,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): ), ) - stores_bzl.append(""" store_{i}(name)""".format(i = i)) + stores_bzl.append(""" store_{i}()""".format(i = i)) for link_package, _link_aliases in _import.link_packages.items(): link_aliases = _link_aliases or [_import.package] @@ -283,14 +282,14 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # for each alias of this package for link_alias in link_aliases: # link the alias to the underlying package - links_bzl[link_package].append(""" link_{i}("{{}}/{alias}".format(name), link_root_name = name, link_alias = "{alias}")""".format( + links_bzl[link_package].append(""" link_{i}("{alias}")""".format( i = i, alias = link_alias, )) # expose the alias if public if "//visibility:public" in _import.package_visibility: - add_to_link_targets = """ link_targets.append(":{{}}/{alias}".format(name))""".format(alias = link_alias) + add_to_link_targets = """ link_targets.append(":node_modules/{alias}")""".format(alias = link_alias) links_bzl[link_package].append(add_to_link_targets) links_targets_bzl[link_package].append(add_to_link_targets) package_scope = link_alias[:link_alias.find("/", 1)] if link_alias[0] == "@" else None @@ -404,7 +403,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): )) if "//visibility:public" in package_visibility: - add_to_link_targets = """ link_targets.append(":{{}}/{pkg}".format(name))""".format(pkg = fp_package) + add_to_link_targets = """ link_targets.append(":node_modules/{pkg}")""".format(pkg = fp_package) npm_link_all_packages_bzl.append(add_to_link_targets) package_scope = fp_package[:fp_package.find("/", 1)] if fp_package[0] == "@" else None if package_scope: @@ -414,14 +413,14 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): npm_link_all_packages_bzl.append(""" for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], diff --git a/npm/private/npm_translate_lock_generate.docs.bzl b/npm/private/npm_translate_lock_generate.docs.bzl index f1edd6f88..b34090c70 100644 --- a/npm/private/npm_translate_lock_generate.docs.bzl +++ b/npm/private/npm_translate_lock_generate.docs.bzl @@ -17,11 +17,10 @@ load("@npm//:defs.bzl", "npm_link_targets", "npm_link_all_packages") # Instead, we define the interfaces in this file, while the implementations live in npm_translate_lock_generate.bzl. # buildifier: disable=unused-variable -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): """Generated list of target names that are linked by npm_link_all_packages() Args: - name: name of catch all target to generate for all packages linked package: Bazel package to generate targets names for. Set to an empty string "" to specify the root package. @@ -34,7 +33,7 @@ def npm_link_targets(name = "node_modules", package = None): pass # buildifier: disable=unused-variable -def npm_link_all_packages(name = "node_modules", imported_links = []): +def npm_link_all_packages(imported_links = []): """Generated list of npm_link_package() target generators and first-party linked packages corresponding to the packages in {pnpm_lock_label} If you use manually-written [`npm_import`](/docs/npm_import.md#npm_import) you can link these as well, for example, @@ -43,14 +42,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): load("@npm_meaning-of-life__links//:defs.bzl", npm_link_meaning_of_life = "npm_link_imported_package") npm_link_all_packages( - name = "node_modules", imported_links = [ npm_link_meaning_of_life, ], ) Args: - name: name of catch all target to generate for all packages linked imported_links: optional list link functions from manually imported packages that were fetched with npm_import rules. """ pass diff --git a/npm/private/test/BUILD.bazel b/npm/private/test/BUILD.bazel index e2489eb31..da33e180d 100644 --- a/npm/private/test/BUILD.bazel +++ b/npm/private/test/BUILD.bazel @@ -10,7 +10,7 @@ load(":transitive_closure_tests.bzl", "transitive_closure_tests") load(":translate_lock_helpers_tests.bzl", "translate_lock_helpers_tests") load(":utils_tests.bzl", "utils_tests") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() # Unit tests utils_tests(name = "test_utils") diff --git a/npm/private/test/npm_package/BUILD.bazel b/npm/private/test/npm_package/BUILD.bazel index 186906f2b..f51f77092 100644 --- a/npm/private/test/npm_package/BUILD.bazel +++ b/npm/private/test/npm_package/BUILD.bazel @@ -4,7 +4,7 @@ load("@npm//:defs.bzl", "npm_link_all_packages") load("//js:defs.bzl", "js_library") load("//npm:defs.bzl", "npm_package") -npm_link_all_packages(name = "node_modules") +npm_link_all_packages() js_library( name = "lib_a", diff --git a/npm/private/test/snapshots/fsevents_links_defs.bzl b/npm/private/test/snapshots/fsevents_links_defs.bzl index 725af34e4..6c750a43a 100644 --- a/npm/private/test/snapshots/fsevents_links_defs.bzl +++ b/npm/private/test/snapshots/fsevents_links_defs.bzl @@ -16,18 +16,17 @@ _PACKAGE_STORE_NAME = "fsevents@2.3.2" # Generated npm_package_store targets for npm package fsevents@2.3.2 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.2/pkg": "fsevents", + ":.aspect_rules_js/fsevents@2.3.2/pkg": "fsevents", }, ref_deps = {}, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.2/pkg_pre_lc_lite": "fsevents", + ":.aspect_rules_js/fsevents@2.3.2/pkg_pre_lc_lite": "fsevents", }, dev = True, has_lifecycle_build_target = True, @@ -44,26 +43,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package fsevents@2.3.2 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package fsevents@2.3.2 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = True, - fail_if_no_link = True): +def npm_link_imported_package(link = True, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/npm/private/test/snapshots/npm_defs.bzl b/npm/private/test/snapshots/npm_defs.bzl index 064ad6e23..1df19ddd5 100644 --- a/npm/private/test/snapshots/npm_defs.bzl +++ b/npm/private/test/snapshots/npm_defs.bzl @@ -1107,7 +1107,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store = _LINK_PACKAGES = ["", "examples/js_binary", "examples/js_lib_pkg/a", "examples/js_lib_pkg/b", "examples/linked_consumer", "examples/linked_empty_node_modules", "examples/linked_lib", "examples/linked_pkg", "examples/macro", "examples/nextjs", "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/runfiles", "examples/stack_traces", "examples/webpack_cli", "js/private/coverage/bundle", "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 = []): +def npm_link_all_packages(imported_links = []): bazel_package = native.package_name() root_package = "" is_root = bazel_package == root_package @@ -1119,7 +1119,7 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets = {} for link_fn in imported_links: - new_link_targets, new_scope_targets = link_fn(name) + new_link_targets, new_scope_targets = link_fn() link_targets.extend(new_link_targets) for _scope, _targets in new_scope_targets.items(): if _scope not in scope_targets: @@ -1127,1451 +1127,1450 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): scope_targets[_scope].extend(_targets) if is_root: - store_0(name) - store_1(name) - store_2(name) - store_3(name) - store_4(name) - store_5(name) - store_6(name) - store_7(name) - store_8(name) - store_9(name) - store_10(name) - store_11(name) - store_12(name) - store_13(name) - store_14(name) - store_15(name) - store_16(name) - store_17(name) - store_18(name) - store_19(name) - store_20(name) - store_21(name) - store_22(name) - store_23(name) - store_24(name) - store_25(name) - store_26(name) - store_27(name) - store_28(name) - store_29(name) - store_30(name) - store_31(name) - store_32(name) - store_33(name) - store_34(name) - store_35(name) - store_36(name) - store_37(name) - store_38(name) - store_39(name) - store_40(name) - store_41(name) - store_42(name) - store_43(name) - store_44(name) - store_45(name) - store_46(name) - store_47(name) - store_48(name) - store_49(name) - store_50(name) - store_51(name) - store_52(name) - store_53(name) - store_54(name) - store_55(name) - store_56(name) - store_57(name) - store_58(name) - store_59(name) - store_60(name) - store_61(name) - store_62(name) - store_63(name) - store_64(name) - store_65(name) - store_66(name) - store_67(name) - store_68(name) - store_69(name) - store_70(name) - store_71(name) - store_72(name) - store_73(name) - store_74(name) - store_75(name) - store_76(name) - store_77(name) - store_78(name) - store_79(name) - store_80(name) - store_81(name) - store_82(name) - store_83(name) - store_84(name) - store_85(name) - store_86(name) - store_87(name) - store_88(name) - store_89(name) - store_90(name) - store_91(name) - store_92(name) - store_93(name) - store_94(name) - store_95(name) - store_96(name) - store_97(name) - store_98(name) - store_99(name) - store_100(name) - store_101(name) - store_102(name) - store_103(name) - store_104(name) - store_105(name) - store_106(name) - store_107(name) - store_108(name) - store_109(name) - store_110(name) - store_111(name) - store_112(name) - store_113(name) - store_114(name) - store_115(name) - store_116(name) - store_117(name) - store_118(name) - store_119(name) - store_120(name) - store_121(name) - store_122(name) - store_123(name) - store_124(name) - store_125(name) - store_126(name) - store_127(name) - store_128(name) - store_129(name) - store_130(name) - store_131(name) - store_132(name) - store_133(name) - store_134(name) - store_135(name) - store_136(name) - store_137(name) - store_138(name) - store_139(name) - store_140(name) - store_141(name) - store_142(name) - store_143(name) - store_144(name) - store_145(name) - store_146(name) - store_147(name) - store_148(name) - store_149(name) - store_150(name) - store_151(name) - store_152(name) - store_153(name) - store_154(name) - store_155(name) - store_156(name) - store_157(name) - store_158(name) - store_159(name) - store_160(name) - store_161(name) - store_162(name) - store_163(name) - store_164(name) - store_165(name) - store_166(name) - store_167(name) - store_168(name) - store_169(name) - store_170(name) - store_171(name) - store_172(name) - store_173(name) - store_174(name) - store_175(name) - store_176(name) - store_177(name) - store_178(name) - store_179(name) - store_180(name) - store_181(name) - store_182(name) - store_183(name) - store_184(name) - store_185(name) - store_186(name) - store_187(name) - store_188(name) - store_189(name) - store_190(name) - store_191(name) - store_192(name) - store_193(name) - store_194(name) - store_195(name) - store_196(name) - store_197(name) - store_198(name) - store_199(name) - store_200(name) - store_201(name) - store_202(name) - store_203(name) - store_204(name) - store_205(name) - store_206(name) - store_207(name) - store_208(name) - store_209(name) - store_210(name) - store_211(name) - store_212(name) - store_213(name) - store_214(name) - store_215(name) - store_216(name) - store_217(name) - store_218(name) - store_219(name) - store_220(name) - store_221(name) - store_222(name) - store_223(name) - store_224(name) - store_225(name) - store_226(name) - store_227(name) - store_228(name) - store_229(name) - store_230(name) - store_231(name) - store_232(name) - store_233(name) - store_234(name) - store_235(name) - store_236(name) - store_237(name) - store_238(name) - store_239(name) - store_240(name) - store_241(name) - store_242(name) - store_243(name) - store_244(name) - store_245(name) - store_246(name) - store_247(name) - store_248(name) - store_249(name) - store_250(name) - store_251(name) - store_252(name) - store_253(name) - store_254(name) - store_255(name) - store_256(name) - store_257(name) - store_258(name) - store_259(name) - store_260(name) - store_261(name) - store_262(name) - store_263(name) - store_264(name) - store_265(name) - store_266(name) - store_267(name) - store_268(name) - store_269(name) - store_270(name) - store_271(name) - store_272(name) - store_273(name) - store_274(name) - store_275(name) - store_276(name) - store_277(name) - store_278(name) - store_279(name) - store_280(name) - store_281(name) - store_282(name) - store_283(name) - store_284(name) - store_285(name) - store_286(name) - store_287(name) - store_288(name) - store_289(name) - store_290(name) - store_291(name) - store_292(name) - store_293(name) - store_294(name) - store_295(name) - store_296(name) - store_297(name) - store_298(name) - store_299(name) - store_300(name) - store_301(name) - store_302(name) - store_303(name) - store_304(name) - store_305(name) - store_306(name) - store_307(name) - store_308(name) - store_309(name) - store_310(name) - store_311(name) - store_312(name) - store_313(name) - store_314(name) - store_315(name) - store_316(name) - store_317(name) - store_318(name) - store_319(name) - store_320(name) - store_321(name) - store_322(name) - store_323(name) - store_324(name) - store_325(name) - store_326(name) - store_327(name) - store_328(name) - store_329(name) - store_330(name) - store_331(name) - store_332(name) - store_333(name) - store_334(name) - store_335(name) - store_336(name) - store_337(name) - store_338(name) - store_339(name) - store_340(name) - store_341(name) - store_342(name) - store_343(name) - store_344(name) - store_345(name) - store_346(name) - store_347(name) - store_348(name) - store_349(name) - store_350(name) - store_351(name) - store_352(name) - store_353(name) - store_354(name) - store_355(name) - store_356(name) - store_357(name) - store_358(name) - store_359(name) - store_360(name) - store_361(name) - store_362(name) - store_363(name) - store_364(name) - store_365(name) - store_366(name) - store_367(name) - store_368(name) - store_369(name) - store_370(name) - store_371(name) - store_372(name) - store_373(name) - store_374(name) - store_375(name) - store_376(name) - store_377(name) - store_378(name) - store_379(name) - store_380(name) - store_381(name) - store_382(name) - store_383(name) - store_384(name) - store_385(name) - store_386(name) - store_387(name) - store_388(name) - store_389(name) - store_390(name) - store_391(name) - store_392(name) - store_393(name) - store_394(name) - store_395(name) - store_396(name) - store_397(name) - store_398(name) - store_399(name) - store_400(name) - store_401(name) - store_402(name) - store_403(name) - store_404(name) - store_405(name) - store_406(name) - store_407(name) - store_408(name) - store_409(name) - store_410(name) - store_411(name) - store_412(name) - store_413(name) - store_414(name) - store_415(name) - store_416(name) - store_417(name) - store_418(name) - store_419(name) - store_420(name) - store_421(name) - store_422(name) - store_423(name) - store_424(name) - store_425(name) - store_426(name) - store_427(name) - store_428(name) - store_429(name) - store_430(name) - store_431(name) - store_432(name) - store_433(name) - store_434(name) - store_435(name) - store_436(name) - store_437(name) - store_438(name) - store_439(name) - store_440(name) - store_441(name) - store_442(name) - store_443(name) - store_444(name) - store_445(name) - store_446(name) - store_447(name) - store_448(name) - store_449(name) - store_450(name) - store_451(name) - store_452(name) - store_453(name) - store_454(name) - store_455(name) - store_456(name) - store_457(name) - store_458(name) - store_459(name) - store_460(name) - store_461(name) - store_462(name) - store_463(name) - store_464(name) - store_465(name) - store_466(name) - store_467(name) - store_468(name) - store_469(name) - store_470(name) - store_471(name) - store_472(name) - store_473(name) - store_474(name) - store_475(name) - store_476(name) - store_477(name) - store_478(name) - store_479(name) - store_480(name) - store_481(name) - store_482(name) - store_483(name) - store_484(name) - store_485(name) - store_486(name) - store_487(name) - store_488(name) - store_489(name) - store_490(name) - store_491(name) - store_492(name) - store_493(name) - store_494(name) - store_495(name) - store_496(name) - store_497(name) - store_498(name) - store_499(name) - store_500(name) - store_501(name) - store_502(name) - store_503(name) - store_504(name) - store_505(name) - store_506(name) - store_507(name) - store_508(name) - store_509(name) - store_510(name) - store_511(name) - store_512(name) - store_513(name) - store_514(name) - store_515(name) - store_516(name) - store_517(name) - store_518(name) - store_519(name) - store_520(name) - store_521(name) - store_522(name) - store_523(name) - store_524(name) - store_525(name) - store_526(name) - store_527(name) - store_528(name) - store_529(name) - store_530(name) - store_531(name) - store_532(name) - store_533(name) - store_534(name) - store_535(name) - store_536(name) - store_537(name) - store_538(name) - store_539(name) - store_540(name) - store_541(name) - store_542(name) - store_543(name) - store_544(name) - store_545(name) - store_546(name) - store_547(name) - store_548(name) - store_549(name) - store_550(name) - store_551(name) - store_552(name) - store_553(name) - store_554(name) - store_555(name) - store_556(name) - store_557(name) - store_558(name) - store_559(name) - store_560(name) - store_561(name) - store_562(name) - store_563(name) - store_564(name) - store_565(name) - store_566(name) - store_567(name) - store_568(name) - store_569(name) - store_570(name) - store_571(name) - store_572(name) - store_573(name) - store_574(name) - store_575(name) - store_576(name) - store_577(name) - store_578(name) - store_579(name) - store_580(name) - store_581(name) - store_582(name) - store_583(name) - store_584(name) - store_585(name) - store_586(name) - store_587(name) - store_588(name) - store_589(name) - store_590(name) - store_591(name) - store_592(name) - store_593(name) - store_594(name) - store_595(name) - store_596(name) - store_597(name) - store_598(name) - store_599(name) - store_600(name) - store_601(name) - store_602(name) - store_603(name) - store_604(name) - store_605(name) - store_606(name) - store_607(name) - store_608(name) - store_609(name) - store_610(name) - store_611(name) - store_612(name) - store_613(name) - store_614(name) - store_615(name) - store_616(name) - store_617(name) - store_618(name) - store_619(name) - store_620(name) - store_621(name) - store_622(name) - store_623(name) - store_624(name) - store_625(name) - store_626(name) - store_627(name) - store_628(name) - store_629(name) - store_630(name) - store_631(name) - store_632(name) - store_633(name) - store_634(name) - store_635(name) - store_636(name) - store_637(name) - store_638(name) - store_639(name) - store_640(name) - store_641(name) - store_642(name) - store_643(name) - store_644(name) - store_645(name) - store_646(name) - store_647(name) - store_648(name) - store_649(name) - store_650(name) - store_651(name) - store_652(name) - store_653(name) - store_654(name) - store_655(name) - store_656(name) - store_657(name) - store_658(name) - store_659(name) - store_660(name) - store_661(name) - store_662(name) - store_663(name) - store_664(name) - store_665(name) - store_666(name) - store_667(name) - store_668(name) - store_669(name) - store_670(name) - store_671(name) - store_672(name) - store_673(name) - store_674(name) - store_675(name) - store_676(name) - store_677(name) - store_678(name) - store_679(name) - store_680(name) - store_681(name) - store_682(name) - store_683(name) - store_684(name) - store_685(name) - store_686(name) - store_687(name) - store_688(name) - store_689(name) - store_690(name) - store_691(name) - store_692(name) - store_693(name) - store_694(name) - store_695(name) - store_696(name) - store_697(name) - store_698(name) - store_699(name) - store_700(name) - store_701(name) - store_702(name) - store_703(name) - store_704(name) - store_705(name) - store_706(name) - store_707(name) - store_708(name) - store_709(name) - store_710(name) - store_711(name) - store_712(name) - store_713(name) - store_714(name) - store_715(name) - store_716(name) - store_717(name) - store_718(name) - store_719(name) - store_720(name) - store_721(name) - store_722(name) - store_723(name) - store_724(name) - store_725(name) - store_726(name) - store_727(name) - store_728(name) - store_729(name) - store_730(name) - store_731(name) - store_732(name) - store_733(name) - store_734(name) - store_735(name) - store_736(name) - store_737(name) - store_738(name) - store_739(name) - store_740(name) - store_741(name) - store_742(name) - store_743(name) - store_744(name) - store_745(name) - store_746(name) - store_747(name) - store_748(name) - store_749(name) - store_750(name) - store_751(name) - store_752(name) - store_753(name) - store_754(name) - store_755(name) - store_756(name) - store_757(name) - store_758(name) - store_759(name) - store_760(name) - store_761(name) - store_762(name) - store_763(name) - store_764(name) - store_765(name) - store_766(name) - store_767(name) - store_768(name) - store_769(name) - store_770(name) - store_771(name) - store_772(name) - store_773(name) - store_774(name) - store_775(name) - store_776(name) - store_777(name) - store_778(name) - store_779(name) - store_780(name) - store_781(name) - store_782(name) - store_783(name) - store_784(name) - store_785(name) - store_786(name) - store_787(name) - store_788(name) - store_789(name) - store_790(name) - store_791(name) - store_792(name) - store_793(name) - store_794(name) - store_795(name) - store_796(name) - store_797(name) - store_798(name) - store_799(name) - store_800(name) - store_801(name) - store_802(name) - store_803(name) - store_804(name) - store_805(name) - store_806(name) - store_807(name) - store_808(name) - store_809(name) - store_810(name) - store_811(name) - store_812(name) - store_813(name) - store_814(name) - store_815(name) - store_816(name) - store_817(name) - store_818(name) - store_819(name) - store_820(name) - store_821(name) - store_822(name) - store_823(name) - store_824(name) - store_825(name) - store_826(name) - store_827(name) - store_828(name) - store_829(name) - store_830(name) - store_831(name) - store_832(name) - store_833(name) - store_834(name) - store_835(name) - store_836(name) - store_837(name) - store_838(name) - store_839(name) - store_840(name) - store_841(name) - store_842(name) - store_843(name) - store_844(name) - store_845(name) - store_846(name) - store_847(name) - store_848(name) - store_849(name) - store_850(name) - store_851(name) - store_852(name) - store_853(name) - store_854(name) - store_855(name) - store_856(name) - store_857(name) - store_858(name) - store_859(name) - store_860(name) - store_861(name) - store_862(name) - store_863(name) - store_864(name) - store_865(name) - store_866(name) - store_867(name) - store_868(name) - store_869(name) - store_870(name) - store_871(name) - store_872(name) - store_873(name) - store_874(name) - store_875(name) - store_876(name) - store_877(name) - store_878(name) - store_879(name) - store_880(name) - store_881(name) - store_882(name) - store_883(name) - store_884(name) - store_885(name) - store_886(name) - store_887(name) - store_888(name) - store_889(name) - store_890(name) - store_891(name) - store_892(name) - store_893(name) - store_894(name) - store_895(name) - store_896(name) - store_897(name) - store_898(name) - store_899(name) - store_900(name) - store_901(name) - store_902(name) - store_903(name) - store_904(name) - store_905(name) - store_906(name) - store_907(name) - store_908(name) - store_909(name) - store_910(name) - store_911(name) - store_912(name) - store_913(name) - store_914(name) - store_915(name) - store_916(name) - store_917(name) - store_918(name) - store_919(name) - store_920(name) - store_921(name) - store_922(name) - store_923(name) - store_924(name) - store_925(name) - store_926(name) - store_927(name) - store_928(name) - store_929(name) - store_930(name) - store_931(name) - store_932(name) - store_933(name) - store_934(name) - store_935(name) - store_936(name) - store_937(name) - store_938(name) - store_939(name) - store_940(name) - store_941(name) - store_942(name) - store_943(name) - store_944(name) - store_945(name) - store_946(name) - store_947(name) - store_948(name) - store_949(name) - store_950(name) - store_951(name) - store_952(name) - store_953(name) - store_954(name) - store_955(name) - store_956(name) - store_957(name) - store_958(name) - store_959(name) - store_960(name) - store_961(name) - store_962(name) - store_963(name) - store_964(name) - store_965(name) - store_966(name) - store_967(name) - store_968(name) - store_969(name) - store_970(name) - store_971(name) - store_972(name) - store_973(name) - store_974(name) - store_975(name) - store_976(name) - store_977(name) - store_978(name) - store_979(name) - store_980(name) - store_981(name) - store_982(name) - store_983(name) - store_984(name) - store_985(name) - store_986(name) - store_987(name) - store_988(name) - store_989(name) - store_990(name) - store_991(name) - store_992(name) - store_993(name) - store_994(name) - store_995(name) - store_996(name) - store_997(name) - store_998(name) - store_999(name) - store_1000(name) - store_1001(name) - store_1002(name) - store_1003(name) - store_1004(name) - store_1005(name) - store_1006(name) - store_1007(name) - store_1008(name) - store_1009(name) - store_1010(name) - store_1011(name) - store_1012(name) - store_1013(name) - store_1014(name) - store_1015(name) - store_1016(name) - store_1017(name) - store_1018(name) - store_1019(name) - store_1020(name) - store_1021(name) - store_1022(name) - store_1023(name) - store_1024(name) - store_1025(name) - store_1026(name) - store_1027(name) - store_1028(name) - store_1029(name) - store_1030(name) - store_1031(name) - store_1032(name) - store_1033(name) - store_1034(name) - store_1035(name) - store_1036(name) - store_1037(name) - store_1038(name) - store_1039(name) - store_1040(name) - store_1041(name) - store_1042(name) - store_1043(name) - store_1044(name) - store_1045(name) - store_1046(name) - store_1047(name) - store_1048(name) - store_1049(name) - store_1050(name) - store_1051(name) - store_1052(name) - store_1053(name) - store_1054(name) - store_1055(name) - store_1056(name) - store_1057(name) - store_1058(name) - store_1059(name) - store_1060(name) - store_1061(name) - store_1062(name) - store_1063(name) - store_1064(name) - store_1065(name) - store_1066(name) - store_1067(name) - store_1068(name) - store_1069(name) - store_1070(name) - store_1071(name) - store_1072(name) - store_1073(name) - store_1074(name) - store_1075(name) - store_1076(name) - store_1077(name) - store_1078(name) - store_1079(name) - store_1080(name) - store_1081(name) - store_1082(name) - store_1083(name) - store_1084(name) - store_1085(name) - store_1086(name) - store_1087(name) - store_1088(name) - store_1089(name) - store_1090(name) - store_1091(name) - store_1092(name) - store_1093(name) + store_0() + store_1() + store_2() + store_3() + store_4() + store_5() + store_6() + store_7() + store_8() + store_9() + store_10() + store_11() + store_12() + store_13() + store_14() + store_15() + store_16() + store_17() + store_18() + store_19() + store_20() + store_21() + store_22() + store_23() + store_24() + store_25() + store_26() + store_27() + store_28() + store_29() + store_30() + store_31() + store_32() + store_33() + store_34() + store_35() + store_36() + store_37() + store_38() + store_39() + store_40() + store_41() + store_42() + store_43() + store_44() + store_45() + store_46() + store_47() + store_48() + store_49() + store_50() + store_51() + store_52() + store_53() + store_54() + store_55() + store_56() + store_57() + store_58() + store_59() + store_60() + store_61() + store_62() + store_63() + store_64() + store_65() + store_66() + store_67() + store_68() + store_69() + store_70() + store_71() + store_72() + store_73() + store_74() + store_75() + store_76() + store_77() + store_78() + store_79() + store_80() + store_81() + store_82() + store_83() + store_84() + store_85() + store_86() + store_87() + store_88() + store_89() + store_90() + store_91() + store_92() + store_93() + store_94() + store_95() + store_96() + store_97() + store_98() + store_99() + store_100() + store_101() + store_102() + store_103() + store_104() + store_105() + store_106() + store_107() + store_108() + store_109() + store_110() + store_111() + store_112() + store_113() + store_114() + store_115() + store_116() + store_117() + store_118() + store_119() + store_120() + store_121() + store_122() + store_123() + store_124() + store_125() + store_126() + store_127() + store_128() + store_129() + store_130() + store_131() + store_132() + store_133() + store_134() + store_135() + store_136() + store_137() + store_138() + store_139() + store_140() + store_141() + store_142() + store_143() + store_144() + store_145() + store_146() + store_147() + store_148() + store_149() + store_150() + store_151() + store_152() + store_153() + store_154() + store_155() + store_156() + store_157() + store_158() + store_159() + store_160() + store_161() + store_162() + store_163() + store_164() + store_165() + store_166() + store_167() + store_168() + store_169() + store_170() + store_171() + store_172() + store_173() + store_174() + store_175() + store_176() + store_177() + store_178() + store_179() + store_180() + store_181() + store_182() + store_183() + store_184() + store_185() + store_186() + store_187() + store_188() + store_189() + store_190() + store_191() + store_192() + store_193() + store_194() + store_195() + store_196() + store_197() + store_198() + store_199() + store_200() + store_201() + store_202() + store_203() + store_204() + store_205() + store_206() + store_207() + store_208() + store_209() + store_210() + store_211() + store_212() + store_213() + store_214() + store_215() + store_216() + store_217() + store_218() + store_219() + store_220() + store_221() + store_222() + store_223() + store_224() + store_225() + store_226() + store_227() + store_228() + store_229() + store_230() + store_231() + store_232() + store_233() + store_234() + store_235() + store_236() + store_237() + store_238() + store_239() + store_240() + store_241() + store_242() + store_243() + store_244() + store_245() + store_246() + store_247() + store_248() + store_249() + store_250() + store_251() + store_252() + store_253() + store_254() + store_255() + store_256() + store_257() + store_258() + store_259() + store_260() + store_261() + store_262() + store_263() + store_264() + store_265() + store_266() + store_267() + store_268() + store_269() + store_270() + store_271() + store_272() + store_273() + store_274() + store_275() + store_276() + store_277() + store_278() + store_279() + store_280() + store_281() + store_282() + store_283() + store_284() + store_285() + store_286() + store_287() + store_288() + store_289() + store_290() + store_291() + store_292() + store_293() + store_294() + store_295() + store_296() + store_297() + store_298() + store_299() + store_300() + store_301() + store_302() + store_303() + store_304() + store_305() + store_306() + store_307() + store_308() + store_309() + store_310() + store_311() + store_312() + store_313() + store_314() + store_315() + store_316() + store_317() + store_318() + store_319() + store_320() + store_321() + store_322() + store_323() + store_324() + store_325() + store_326() + store_327() + store_328() + store_329() + store_330() + store_331() + store_332() + store_333() + store_334() + store_335() + store_336() + store_337() + store_338() + store_339() + store_340() + store_341() + store_342() + store_343() + store_344() + store_345() + store_346() + store_347() + store_348() + store_349() + store_350() + store_351() + store_352() + store_353() + store_354() + store_355() + store_356() + store_357() + store_358() + store_359() + store_360() + store_361() + store_362() + store_363() + store_364() + store_365() + store_366() + store_367() + store_368() + store_369() + store_370() + store_371() + store_372() + store_373() + store_374() + store_375() + store_376() + store_377() + store_378() + store_379() + store_380() + store_381() + store_382() + store_383() + store_384() + store_385() + store_386() + store_387() + store_388() + store_389() + store_390() + store_391() + store_392() + store_393() + store_394() + store_395() + store_396() + store_397() + store_398() + store_399() + store_400() + store_401() + store_402() + store_403() + store_404() + store_405() + store_406() + store_407() + store_408() + store_409() + store_410() + store_411() + store_412() + store_413() + store_414() + store_415() + store_416() + store_417() + store_418() + store_419() + store_420() + store_421() + store_422() + store_423() + store_424() + store_425() + store_426() + store_427() + store_428() + store_429() + store_430() + store_431() + store_432() + store_433() + store_434() + store_435() + store_436() + store_437() + store_438() + store_439() + store_440() + store_441() + store_442() + store_443() + store_444() + store_445() + store_446() + store_447() + store_448() + store_449() + store_450() + store_451() + store_452() + store_453() + store_454() + store_455() + store_456() + store_457() + store_458() + store_459() + store_460() + store_461() + store_462() + store_463() + store_464() + store_465() + store_466() + store_467() + store_468() + store_469() + store_470() + store_471() + store_472() + store_473() + store_474() + store_475() + store_476() + store_477() + store_478() + store_479() + store_480() + store_481() + store_482() + store_483() + store_484() + store_485() + store_486() + store_487() + store_488() + store_489() + store_490() + store_491() + store_492() + store_493() + store_494() + store_495() + store_496() + store_497() + store_498() + store_499() + store_500() + store_501() + store_502() + store_503() + store_504() + store_505() + store_506() + store_507() + store_508() + store_509() + store_510() + store_511() + store_512() + store_513() + store_514() + store_515() + store_516() + store_517() + store_518() + store_519() + store_520() + store_521() + store_522() + store_523() + store_524() + store_525() + store_526() + store_527() + store_528() + store_529() + store_530() + store_531() + store_532() + store_533() + store_534() + store_535() + store_536() + store_537() + store_538() + store_539() + store_540() + store_541() + store_542() + store_543() + store_544() + store_545() + store_546() + store_547() + store_548() + store_549() + store_550() + store_551() + store_552() + store_553() + store_554() + store_555() + store_556() + store_557() + store_558() + store_559() + store_560() + store_561() + store_562() + store_563() + store_564() + store_565() + store_566() + store_567() + store_568() + store_569() + store_570() + store_571() + store_572() + store_573() + store_574() + store_575() + store_576() + store_577() + store_578() + store_579() + store_580() + store_581() + store_582() + store_583() + store_584() + store_585() + store_586() + store_587() + store_588() + store_589() + store_590() + store_591() + store_592() + store_593() + store_594() + store_595() + store_596() + store_597() + store_598() + store_599() + store_600() + store_601() + store_602() + store_603() + store_604() + store_605() + store_606() + store_607() + store_608() + store_609() + store_610() + store_611() + store_612() + store_613() + store_614() + store_615() + store_616() + store_617() + store_618() + store_619() + store_620() + store_621() + store_622() + store_623() + store_624() + store_625() + store_626() + store_627() + store_628() + store_629() + store_630() + store_631() + store_632() + store_633() + store_634() + store_635() + store_636() + store_637() + store_638() + store_639() + store_640() + store_641() + store_642() + store_643() + store_644() + store_645() + store_646() + store_647() + store_648() + store_649() + store_650() + store_651() + store_652() + store_653() + store_654() + store_655() + store_656() + store_657() + store_658() + store_659() + store_660() + store_661() + store_662() + store_663() + store_664() + store_665() + store_666() + store_667() + store_668() + store_669() + store_670() + store_671() + store_672() + store_673() + store_674() + store_675() + store_676() + store_677() + store_678() + store_679() + store_680() + store_681() + store_682() + store_683() + store_684() + store_685() + store_686() + store_687() + store_688() + store_689() + store_690() + store_691() + store_692() + store_693() + store_694() + store_695() + store_696() + store_697() + store_698() + store_699() + store_700() + store_701() + store_702() + store_703() + store_704() + store_705() + store_706() + store_707() + store_708() + store_709() + store_710() + store_711() + store_712() + store_713() + store_714() + store_715() + store_716() + store_717() + store_718() + store_719() + store_720() + store_721() + store_722() + store_723() + store_724() + store_725() + store_726() + store_727() + store_728() + store_729() + store_730() + store_731() + store_732() + store_733() + store_734() + store_735() + store_736() + store_737() + store_738() + store_739() + store_740() + store_741() + store_742() + store_743() + store_744() + store_745() + store_746() + store_747() + store_748() + store_749() + store_750() + store_751() + store_752() + store_753() + store_754() + store_755() + store_756() + store_757() + store_758() + store_759() + store_760() + store_761() + store_762() + store_763() + store_764() + store_765() + store_766() + store_767() + store_768() + store_769() + store_770() + store_771() + store_772() + store_773() + store_774() + store_775() + store_776() + store_777() + store_778() + store_779() + store_780() + store_781() + store_782() + store_783() + store_784() + store_785() + store_786() + store_787() + store_788() + store_789() + store_790() + store_791() + store_792() + store_793() + store_794() + store_795() + store_796() + store_797() + store_798() + store_799() + store_800() + store_801() + store_802() + store_803() + store_804() + store_805() + store_806() + store_807() + store_808() + store_809() + store_810() + store_811() + store_812() + store_813() + store_814() + store_815() + store_816() + store_817() + store_818() + store_819() + store_820() + store_821() + store_822() + store_823() + store_824() + store_825() + store_826() + store_827() + store_828() + store_829() + store_830() + store_831() + store_832() + store_833() + store_834() + store_835() + store_836() + store_837() + store_838() + store_839() + store_840() + store_841() + store_842() + store_843() + store_844() + store_845() + store_846() + store_847() + store_848() + store_849() + store_850() + store_851() + store_852() + store_853() + store_854() + store_855() + store_856() + store_857() + store_858() + store_859() + store_860() + store_861() + store_862() + store_863() + store_864() + store_865() + store_866() + store_867() + store_868() + store_869() + store_870() + store_871() + store_872() + store_873() + store_874() + store_875() + store_876() + store_877() + store_878() + store_879() + store_880() + store_881() + store_882() + store_883() + store_884() + store_885() + store_886() + store_887() + store_888() + store_889() + store_890() + store_891() + store_892() + store_893() + store_894() + store_895() + store_896() + store_897() + store_898() + store_899() + store_900() + store_901() + store_902() + store_903() + store_904() + store_905() + store_906() + store_907() + store_908() + store_909() + store_910() + store_911() + store_912() + store_913() + store_914() + store_915() + store_916() + store_917() + store_918() + store_919() + store_920() + store_921() + store_922() + store_923() + store_924() + store_925() + store_926() + store_927() + store_928() + store_929() + store_930() + store_931() + store_932() + store_933() + store_934() + store_935() + store_936() + store_937() + store_938() + store_939() + store_940() + store_941() + store_942() + store_943() + store_944() + store_945() + store_946() + store_947() + store_948() + store_949() + store_950() + store_951() + store_952() + store_953() + store_954() + store_955() + store_956() + store_957() + store_958() + store_959() + store_960() + store_961() + store_962() + store_963() + store_964() + store_965() + store_966() + store_967() + store_968() + store_969() + store_970() + store_971() + store_972() + store_973() + store_974() + store_975() + store_976() + store_977() + store_978() + store_979() + store_980() + store_981() + store_982() + store_983() + store_984() + store_985() + store_986() + store_987() + store_988() + store_989() + store_990() + store_991() + store_992() + store_993() + store_994() + store_995() + store_996() + store_997() + store_998() + store_999() + store_1000() + store_1001() + store_1002() + store_1003() + store_1004() + store_1005() + store_1006() + store_1007() + store_1008() + store_1009() + store_1010() + store_1011() + store_1012() + store_1013() + store_1014() + store_1015() + store_1016() + store_1017() + store_1018() + store_1019() + store_1020() + store_1021() + store_1022() + store_1023() + store_1024() + store_1025() + store_1026() + store_1027() + store_1028() + store_1029() + store_1030() + store_1031() + store_1032() + store_1033() + store_1034() + store_1035() + store_1036() + store_1037() + store_1038() + store_1039() + store_1040() + store_1041() + store_1042() + store_1043() + store_1044() + store_1045() + store_1046() + store_1047() + store_1048() + store_1049() + store_1050() + store_1051() + store_1052() + store_1053() + store_1054() + store_1055() + store_1056() + store_1057() + store_1058() + store_1059() + store_1060() + store_1061() + store_1062() + store_1063() + store_1064() + store_1065() + store_1066() + store_1067() + store_1068() + store_1069() + store_1070() + store_1071() + store_1072() + store_1073() + store_1074() + store_1075() + store_1076() + store_1077() + store_1078() + store_1079() + store_1080() + store_1081() + store_1082() + store_1083() + store_1084() + store_1085() + store_1086() + store_1087() + store_1088() + store_1089() + store_1090() + store_1091() + store_1092() + store_1093() if link: if bazel_package == "js/private/worker/src": - link_1("{}/abortcontroller-polyfill".format(name), link_root_name = name, link_alias = "abortcontroller-polyfill") - link_targets.append(":{}/abortcontroller-polyfill".format(name)) - link_195("{}/@rollup/plugin-commonjs".format(name), link_root_name = name, link_alias = "@rollup/plugin-commonjs") - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) + link_1("abortcontroller-polyfill") + link_targets.append(":node_modules/abortcontroller-polyfill") + link_195("@rollup/plugin-commonjs") + link_targets.append(":node_modules/@rollup/plugin-commonjs") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_196("{}/@rollup/plugin-json".format(name), link_root_name = name, link_alias = "@rollup/plugin-json") - link_targets.append(":{}/@rollup/plugin-json".format(name)) + link_196("@rollup/plugin-json") + link_targets.append(":node_modules/@rollup/plugin-json") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_197("{}/@rollup/plugin-node-resolve".format(name), link_root_name = name, link_alias = "@rollup/plugin-node-resolve") - link_targets.append(":{}/@rollup/plugin-node-resolve".format(name)) + link_197("@rollup/plugin-node-resolve") + link_targets.append(":node_modules/@rollup/plugin-node-resolve") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_198("{}/@rollup/plugin-typescript".format(name), link_root_name = name, link_alias = "@rollup/plugin-typescript") - link_targets.append(":{}/@rollup/plugin-typescript".format(name)) + link_198("@rollup/plugin-typescript") + link_targets.append(":node_modules/@rollup/plugin-typescript") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_254("{}/@types/google-protobuf".format(name), link_root_name = name, link_alias = "@types/google-protobuf") - link_targets.append(":{}/@types/google-protobuf".format(name)) + link_254("@types/google-protobuf") + link_targets.append(":node_modules/@types/google-protobuf") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_262("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_262("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_562("{}/google-protobuf".format(name), link_root_name = name, link_alias = "google-protobuf") - link_targets.append(":{}/google-protobuf".format(name)) - link_917("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_1022("{}/tslib".format(name), link_root_name = name, link_alias = "tslib") - link_targets.append(":{}/tslib".format(name)) - link_1033("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) + link_562("google-protobuf") + link_targets.append(":node_modules/google-protobuf") + link_917("rollup") + link_targets.append(":node_modules/rollup") + link_1022("tslib") + link_targets.append(":node_modules/tslib") + link_1033("typescript") + link_targets.append(":node_modules/typescript") elif bazel_package == "js/private/test/image": - link_6("{}/acorn".format(name), link_root_name = name, link_alias = "acorn") - link_targets.append(":{}/acorn".format(name)) + link_6("acorn") + link_targets.append(":node_modules/acorn") elif bazel_package == "examples/npm_deps": - link_7("{}/acorn".format(name), link_root_name = name, link_alias = "acorn") - link_targets.append(":{}/acorn".format(name)) - link_43("{}/@aspect-test/a".format(name), link_root_name = name, link_alias = "@aspect-test/a") - link_targets.append(":{}/@aspect-test/a".format(name)) + link_7("acorn") + link_targets.append(":node_modules/acorn") + link_43("@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/a") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_45("{}/@aspect-test/c".format(name), link_root_name = name, link_alias = "@aspect-test/c") - link_targets.append(":{}/@aspect-test/c".format(name)) + link_45("@aspect-test/c") + link_targets.append(":node_modules/@aspect-test/c") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_130("{}/@gregmagolan/test-b".format(name), link_root_name = name, link_alias = "@gregmagolan/test-b") - link_targets.append(":{}/@gregmagolan/test-b".format(name)) + link_130("@gregmagolan/test-b") + link_targets.append(":node_modules/@gregmagolan/test-b") if "@gregmagolan" not in scope_targets: scope_targets["@gregmagolan"] = [link_targets[-1]] else: scope_targets["@gregmagolan"].append(link_targets[-1]) - link_194("{}/@rollup/plugin-commonjs".format(name), link_root_name = name, link_alias = "@rollup/plugin-commonjs") - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) + link_194("@rollup/plugin-commonjs") + link_targets.append(":node_modules/@rollup/plugin-commonjs") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_419("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_711("{}/meaning-of-life".format(name), link_root_name = name, link_alias = "meaning-of-life") - link_targets.append(":{}/meaning-of-life".format(name)) - link_748("{}/mobx-react".format(name), link_root_name = name, link_alias = "mobx-react") - link_targets.append(":{}/mobx-react".format(name)) - link_749("{}/mobx".format(name), link_root_name = name, link_alias = "mobx") - link_targets.append(":{}/mobx".format(name)) - link_764("{}/ms".format(name), link_root_name = name, link_alias = "ms") - link_targets.append(":{}/ms".format(name)) - link_885("{}/react".format(name), link_root_name = name, link_alias = "react") - link_targets.append(":{}/react".format(name)) - link_916("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) - link_1051("{}/uvu".format(name), link_root_name = name, link_alias = "uvu") - link_targets.append(":{}/uvu".format(name)) + link_419("debug") + link_targets.append(":node_modules/debug") + link_711("meaning-of-life") + link_targets.append(":node_modules/meaning-of-life") + link_748("mobx-react") + link_targets.append(":node_modules/mobx-react") + link_749("mobx") + link_targets.append(":node_modules/mobx") + link_764("ms") + link_targets.append(":node_modules/ms") + link_885("react") + link_targets.append(":node_modules/react") + link_916("rollup") + link_targets.append(":node_modules/rollup") + link_1051("uvu") + link_targets.append(":node_modules/uvu") elif bazel_package == "examples/npm_package/packages/pkg_a": - link_7("{}/acorn".format(name), link_root_name = name, link_alias = "acorn") - link_targets.append(":{}/acorn".format(name)) - link_1050("{}/uuid".format(name), link_root_name = name, link_alias = "uuid") - link_targets.append(":{}/uuid".format(name)) + link_7("acorn") + link_targets.append(":node_modules/acorn") + link_1050("uuid") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/npm_package/packages/pkg_d": - link_7("{}/acorn".format(name), link_root_name = name, link_alias = "acorn") - link_targets.append(":{}/acorn".format(name)) - link_1050("{}/uuid".format(name), link_root_name = name, link_alias = "uuid") - link_targets.append(":{}/uuid".format(name)) + link_7("acorn") + link_targets.append(":node_modules/acorn") + link_1050("uuid") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/npm_package/packages/pkg_b": - link_8("{}/acorn".format(name), link_root_name = name, link_alias = "acorn") - link_targets.append(":{}/acorn".format(name)) - link_1050("{}/uuid".format(name), link_root_name = name, link_alias = "uuid") - link_targets.append(":{}/uuid".format(name)) + link_8("acorn") + link_targets.append(":node_modules/acorn") + link_1050("uuid") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/linked_lib": - link_47("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_47("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_47("{}/alias-e".format(name), link_root_name = name, link_alias = "alias-e") - link_targets.append(":{}/alias-e".format(name)) - link_48("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_47("alias-e") + link_targets.append(":node_modules/alias-e") + link_48("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_261("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_261("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "examples/linked_pkg": - link_47("{}/@aspect-test/e".format(name), link_root_name = name, link_alias = "@aspect-test/e") - link_targets.append(":{}/@aspect-test/e".format(name)) + link_47("@aspect-test/e") + link_targets.append(":node_modules/@aspect-test/e") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_47("{}/alias-e".format(name), link_root_name = name, link_alias = "alias-e") - link_targets.append(":{}/alias-e".format(name)) - link_48("{}/@aspect-test/f".format(name), link_root_name = name, link_alias = "@aspect-test/f") - link_targets.append(":{}/@aspect-test/f".format(name)) + link_47("alias-e") + link_targets.append(":node_modules/alias-e") + link_48("@aspect-test/f") + link_targets.append(":node_modules/@aspect-test/f") if "@aspect-test" not in scope_targets: scope_targets["@aspect-test"] = [link_targets[-1]] else: scope_targets["@aspect-test"].append(link_targets[-1]) - link_261("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_261("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "examples/runfiles": - link_73("{}/@bazel/runfiles".format(name), link_root_name = name, link_alias = "@bazel/runfiles") - link_targets.append(":{}/@bazel/runfiles".format(name)) + link_73("@bazel/runfiles") + link_targets.append(":node_modules/@bazel/runfiles") if "@bazel" not in scope_targets: scope_targets["@bazel"] = [link_targets[-1]] else: scope_targets["@bazel"].append(link_targets[-1]) elif bazel_package == "npm/private/test": - link_125("{}/@fastify/send".format(name), link_root_name = name, link_alias = "@fastify/send") - link_targets.append(":{}/@fastify/send".format(name)) + link_125("@fastify/send") + link_targets.append(":node_modules/@fastify/send") if "@fastify" not in scope_targets: scope_targets["@fastify"] = [link_targets[-1]] else: scope_targets["@fastify"].append(link_targets[-1]) - link_126("{}/@figma/nodegit".format(name), link_root_name = name, link_alias = "@figma/nodegit") - link_targets.append(":{}/@figma/nodegit".format(name)) + link_126("@figma/nodegit") + link_targets.append(":node_modules/@figma/nodegit") if "@figma" not in scope_targets: scope_targets["@figma"] = [link_targets[-1]] else: scope_targets["@figma"].append(link_targets[-1]) - link_163("{}/@kubernetes/client-node".format(name), link_root_name = name, link_alias = "@kubernetes/client-node") - link_targets.append(":{}/@kubernetes/client-node".format(name)) + link_163("@kubernetes/client-node") + link_targets.append(":node_modules/@kubernetes/client-node") if "@kubernetes" not in scope_targets: scope_targets["@kubernetes"] = [link_targets[-1]] else: scope_targets["@kubernetes"].append(link_targets[-1]) - link_191("{}/@plotly/regl".format(name), link_root_name = name, link_alias = "@plotly/regl") - link_targets.append(":{}/@plotly/regl".format(name)) + link_191("@plotly/regl") + link_targets.append(":node_modules/@plotly/regl") if "@plotly" not in scope_targets: scope_targets["@plotly"] = [link_targets[-1]] else: scope_targets["@plotly"].append(link_targets[-1]) - link_191("{}/regl".format(name), link_root_name = name, link_alias = "regl") - link_targets.append(":{}/regl".format(name)) - link_322("{}/bufferutil".format(name), link_root_name = name, link_alias = "bufferutil") - link_targets.append(":{}/bufferutil".format(name)) - link_421("{}/debug".format(name), link_root_name = name, link_alias = "debug") - link_targets.append(":{}/debug".format(name)) - link_471("{}/esbuild".format(name), link_root_name = name, link_alias = "esbuild") - link_targets.append(":{}/esbuild".format(name)) - link_577("{}/hello".format(name), link_root_name = name, link_alias = "hello") - link_targets.append(":{}/hello".format(name)) - link_578("{}/handlebars-helpers/helper-date".format(name), link_root_name = name, link_alias = "handlebars-helpers/helper-date") - link_targets.append(":{}/handlebars-helpers/helper-date".format(name)) - link_579("{}/hot-shots".format(name), link_root_name = name, link_alias = "hot-shots") - link_targets.append(":{}/hot-shots".format(name)) - link_602("{}/inline-fixtures".format(name), link_root_name = name, link_alias = "inline-fixtures") - link_targets.append(":{}/inline-fixtures".format(name)) - link_661("{}/json-stable-stringify".format(name), link_root_name = name, link_alias = "json-stable-stringify") - link_targets.append(":{}/json-stable-stringify".format(name)) - link_693("{}/lodash".format(name), link_root_name = name, link_alias = "lodash") - link_targets.append(":{}/lodash".format(name)) - link_781("{}/node-gyp".format(name), link_root_name = name, link_alias = "node-gyp") - link_targets.append(":{}/node-gyp".format(name)) - link_849("{}/plotly.js".format(name), link_root_name = name, link_alias = "plotly.js") - link_targets.append(":{}/plotly.js".format(name)) - link_850("{}/pngjs".format(name), link_root_name = name, link_alias = "pngjs") - link_targets.append(":{}/pngjs".format(name)) - link_869("{}/protoc-gen-grpc".format(name), link_root_name = name, link_alias = "protoc-gen-grpc") - link_targets.append(":{}/protoc-gen-grpc".format(name)) - link_877("{}/puppeteer".format(name), link_root_name = name, link_alias = "puppeteer") - link_targets.append(":{}/puppeteer".format(name)) - link_928("{}/segfault-handler".format(name), link_root_name = name, link_alias = "segfault-handler") - link_targets.append(":{}/segfault-handler".format(name)) - link_929("{}/semver-first-satisfied".format(name), link_root_name = name, link_alias = "semver-first-satisfied") - link_targets.append(":{}/semver-first-satisfied".format(name)) - link_990("{}/syncpack".format(name), link_root_name = name, link_alias = "syncpack") - link_targets.append(":{}/syncpack".format(name)) - link_1033("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) - link_1044("{}/unused".format(name), link_root_name = name, link_alias = "unused") - link_1059("{}/webpack-bundle-analyzer".format(name), link_root_name = name, link_alias = "webpack-bundle-analyzer") - link_targets.append(":{}/webpack-bundle-analyzer".format(name)) + link_191("regl") + link_targets.append(":node_modules/regl") + link_322("bufferutil") + link_targets.append(":node_modules/bufferutil") + link_421("debug") + link_targets.append(":node_modules/debug") + link_471("esbuild") + link_targets.append(":node_modules/esbuild") + link_577("hello") + link_targets.append(":node_modules/hello") + link_578("handlebars-helpers/helper-date") + link_targets.append(":node_modules/handlebars-helpers/helper-date") + link_579("hot-shots") + link_targets.append(":node_modules/hot-shots") + link_602("inline-fixtures") + link_targets.append(":node_modules/inline-fixtures") + link_661("json-stable-stringify") + link_targets.append(":node_modules/json-stable-stringify") + link_693("lodash") + link_targets.append(":node_modules/lodash") + link_781("node-gyp") + link_targets.append(":node_modules/node-gyp") + link_849("plotly.js") + link_targets.append(":node_modules/plotly.js") + link_850("pngjs") + link_targets.append(":node_modules/pngjs") + link_869("protoc-gen-grpc") + link_targets.append(":node_modules/protoc-gen-grpc") + link_877("puppeteer") + link_targets.append(":node_modules/puppeteer") + link_928("segfault-handler") + link_targets.append(":node_modules/segfault-handler") + link_929("semver-first-satisfied") + link_targets.append(":node_modules/semver-first-satisfied") + link_990("syncpack") + link_targets.append(":node_modules/syncpack") + link_1033("typescript") + link_targets.append(":node_modules/typescript") + link_1044("unused") + link_1059("webpack-bundle-analyzer") + link_targets.append(":node_modules/webpack-bundle-analyzer") elif bazel_package == "js/private/coverage/bundle": - link_195("{}/@rollup/plugin-commonjs".format(name), link_root_name = name, link_alias = "@rollup/plugin-commonjs") - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) + link_195("@rollup/plugin-commonjs") + link_targets.append(":node_modules/@rollup/plugin-commonjs") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_196("{}/@rollup/plugin-json".format(name), link_root_name = name, link_alias = "@rollup/plugin-json") - link_targets.append(":{}/@rollup/plugin-json".format(name)) + link_196("@rollup/plugin-json") + link_targets.append(":node_modules/@rollup/plugin-json") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_197("{}/@rollup/plugin-node-resolve".format(name), link_root_name = name, link_alias = "@rollup/plugin-node-resolve") - link_targets.append(":{}/@rollup/plugin-node-resolve".format(name)) + link_197("@rollup/plugin-node-resolve") + link_targets.append(":node_modules/@rollup/plugin-node-resolve") if "@rollup" not in scope_targets: scope_targets["@rollup"] = [link_targets[-1]] else: scope_targets["@rollup"].append(link_targets[-1]) - link_325("{}/c8".format(name), link_root_name = name, link_alias = "c8") - link_targets.append(":{}/c8".format(name)) - link_917("{}/rollup".format(name), link_root_name = name, link_alias = "rollup") - link_targets.append(":{}/rollup".format(name)) + link_325("c8") + link_targets.append(":node_modules/c8") + link_917("rollup") + link_targets.append(":node_modules/rollup") elif bazel_package == "examples/nextjs": - link_239("{}/@tailwindcss/postcss".format(name), link_root_name = name, link_alias = "@tailwindcss/postcss") - link_targets.append(":{}/@tailwindcss/postcss".format(name)) + link_239("@tailwindcss/postcss") + link_targets.append(":node_modules/@tailwindcss/postcss") if "@tailwindcss" not in scope_targets: scope_targets["@tailwindcss"] = [link_targets[-1]] else: scope_targets["@tailwindcss"].append(link_targets[-1]) - link_776("{}/next".format(name), link_root_name = name, link_alias = "next") - link_targets.append(":{}/next".format(name)) - link_884("{}/react-dom".format(name), link_root_name = name, link_alias = "react-dom") - link_targets.append(":{}/react-dom".format(name)) - link_886("{}/react".format(name), link_root_name = name, link_alias = "react") - link_targets.append(":{}/react".format(name)) - link_991("{}/tailwindcss".format(name), link_root_name = name, link_alias = "tailwindcss") - link_targets.append(":{}/tailwindcss".format(name)) + link_776("next") + link_targets.append(":node_modules/next") + link_884("react-dom") + link_targets.append(":node_modules/react-dom") + link_886("react") + link_targets.append(":node_modules/react") + link_991("tailwindcss") + link_targets.append(":node_modules/tailwindcss") elif bazel_package == "": - link_260("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_260("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_338("{}/chalk".format(name), link_root_name = name, link_alias = "chalk") - link_targets.append(":{}/chalk".format(name)) - link_601("{}/inline-fixtures".format(name), link_root_name = name, link_alias = "inline-fixtures") - link_targets.append(":{}/inline-fixtures".format(name)) - link_667("{}/jsonpath-plus".format(name), link_root_name = name, link_alias = "jsonpath-plus") - link_targets.append(":{}/jsonpath-plus".format(name)) - link_1033("{}/typescript".format(name), link_root_name = name, link_alias = "typescript") - link_targets.append(":{}/typescript".format(name)) + link_338("chalk") + link_targets.append(":node_modules/chalk") + link_601("inline-fixtures") + link_targets.append(":node_modules/inline-fixtures") + link_667("jsonpath-plus") + link_targets.append(":node_modules/jsonpath-plus") + link_1033("typescript") + link_targets.append(":node_modules/typescript") elif bazel_package == "js/private/test/js_run_devserver": - link_260("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_260("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) - link_645("{}/jasmine".format(name), link_root_name = name, link_alias = "jasmine") - link_targets.append(":{}/jasmine".format(name)) + link_645("jasmine") + link_targets.append(":node_modules/jasmine") elif bazel_package == "examples/js_lib_pkg/a": - link_262("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_262("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "examples/js_lib_pkg/b": - link_262("{}/@types/node".format(name), link_root_name = name, link_alias = "@types/node") - link_targets.append(":{}/@types/node".format(name)) + link_262("@types/node") + link_targets.append(":node_modules/@types/node") if "@types" not in scope_targets: scope_targets["@types"] = [link_targets[-1]] else: scope_targets["@types"].append(link_targets[-1]) elif bazel_package == "examples/webpack_cli": - link_272("{}/@vanilla-extract/css".format(name), link_root_name = name, link_alias = "@vanilla-extract/css") - link_targets.append(":{}/@vanilla-extract/css".format(name)) + link_272("@vanilla-extract/css") + link_targets.append(":node_modules/@vanilla-extract/css") if "@vanilla-extract" not in scope_targets: scope_targets["@vanilla-extract"] = [link_targets[-1]] else: scope_targets["@vanilla-extract"].append(link_targets[-1]) - link_276("{}/@vanilla-extract/webpack-plugin".format(name), link_root_name = name, link_alias = "@vanilla-extract/webpack-plugin") - link_targets.append(":{}/@vanilla-extract/webpack-plugin".format(name)) + link_276("@vanilla-extract/webpack-plugin") + link_targets.append(":node_modules/@vanilla-extract/webpack-plugin") if "@vanilla-extract" not in scope_targets: scope_targets["@vanilla-extract"] = [link_targets[-1]] else: scope_targets["@vanilla-extract"].append(link_targets[-1]) - link_392("{}/css-loader".format(name), link_root_name = name, link_alias = "css-loader") - link_targets.append(":{}/css-loader".format(name)) - link_709("{}/mathjs".format(name), link_root_name = name, link_alias = "mathjs") - link_targets.append(":{}/mathjs".format(name)) - link_719("{}/mini-css-extract-plugin".format(name), link_root_name = name, link_alias = "mini-css-extract-plugin") - link_targets.append(":{}/mini-css-extract-plugin".format(name)) - link_1060("{}/webpack-cli".format(name), link_root_name = name, link_alias = "webpack-cli") - link_targets.append(":{}/webpack-cli".format(name)) - link_1063("{}/webpack".format(name), link_root_name = name, link_alias = "webpack") - link_targets.append(":{}/webpack".format(name)) + link_392("css-loader") + link_targets.append(":node_modules/css-loader") + link_709("mathjs") + link_targets.append(":node_modules/mathjs") + link_719("mini-css-extract-plugin") + link_targets.append(":node_modules/mini-css-extract-plugin") + link_1060("webpack-cli") + link_targets.append(":node_modules/webpack-cli") + link_1063("webpack") + link_targets.append(":node_modules/webpack") elif bazel_package == "examples/npm_package/libs/lib_a": - link_337("{}/chalk".format(name), link_root_name = name, link_alias = "chalk") - link_targets.append(":{}/chalk".format(name)) + link_337("chalk") + link_targets.append(":node_modules/chalk") elif bazel_package == "npm/private/test/npm_package": - link_337("{}/chalk".format(name), link_root_name = name, link_alias = "chalk") - link_targets.append(":{}/chalk".format(name)) - link_338("{}/chalk-alt".format(name), link_root_name = name, link_alias = "chalk-alt") - link_targets.append(":{}/chalk-alt".format(name)) + link_337("chalk") + link_targets.append(":node_modules/chalk") + link_338("chalk-alt") + link_targets.append(":node_modules/chalk-alt") elif bazel_package == "examples/macro": - link_750("{}/mocha-junit-reporter".format(name), link_root_name = name, link_alias = "mocha-junit-reporter") - link_targets.append(":{}/mocha-junit-reporter".format(name)) - link_751("{}/mocha-multi-reporters".format(name), link_root_name = name, link_alias = "mocha-multi-reporters") - link_targets.append(":{}/mocha-multi-reporters".format(name)) - link_752("{}/mocha".format(name), link_root_name = name, link_alias = "mocha") - link_targets.append(":{}/mocha".format(name)) + link_750("mocha-junit-reporter") + link_targets.append(":node_modules/mocha-junit-reporter") + link_751("mocha-multi-reporters") + link_targets.append(":node_modules/mocha-multi-reporters") + link_752("mocha") + link_targets.append(":node_modules/mocha") elif bazel_package == "examples/stack_traces": - link_954("{}/source-map-support".format(name), link_root_name = name, link_alias = "source-map-support") - link_targets.append(":{}/source-map-support".format(name)) + link_954("source-map-support") + link_targets.append(":node_modules/source-map-support") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "is-odd@0.0.0", src = "//npm/private/test/vendored/is-odd:pkg", package = "is-odd", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/is-number@6.0.0".format(name): "is-number", + "//:.aspect_rules_js/is-number@6.0.0": "is-number", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2579,14 +2578,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "semver-max@0.0.0", src = "//npm/private/test/vendored/semver-max:pkg", package = "semver-max", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/is-odd@0.0.0".format(name): "is-odd", - "//:.aspect_rules_js/{}/semver@5.7.1".format(name): "semver", + "//:.aspect_rules_js/is-odd@0.0.0": "is-odd", + "//:.aspect_rules_js/semver@5.7.1": "semver", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2594,14 +2592,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@mycorp+pkg-a@0.0.0", src = "//examples/npm_package/packages/pkg_a:pkg", package = "@mycorp/pkg-a", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/acorn@8.7.1".format(name): "acorn", - "//:.aspect_rules_js/{}/uuid@8.3.2".format(name): "uuid", + "//:.aspect_rules_js/acorn@8.7.1": "acorn", + "//:.aspect_rules_js/uuid@8.3.2": "uuid", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2610,8 +2607,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/js_binary", "examples/npm_deps", "js/private/test/image"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@mycorp/pkg-a".format(name), - src = "//:.aspect_rules_js/{}/@mycorp+pkg-a@0.0.0".format(name), + name = "node_modules/@mycorp/pkg-a", + src = "//:.aspect_rules_js/@mycorp+pkg-a@0.0.0", visibility = ["//examples:__subpackages__"], tags = ["manual"], ) @@ -2619,8 +2616,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@mycorp/pkg-a/dir".format(name), - srcs = [":{}/@mycorp/pkg-a".format(name)], + name = "node_modules/@mycorp/pkg-a/dir", + srcs = [":node_modules/@mycorp/pkg-a"], output_group = "package_directory", visibility = ["//examples:__subpackages__"], tags = ["manual"], @@ -2628,7 +2625,6 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "js_lib_pkg_a@0.0.0", src = "//examples/js_lib_pkg/a:pkg", package = "js_lib_pkg_a", @@ -2641,8 +2637,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/js_lib_pkg/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/js_lib_pkg_a".format(name), - src = "//:.aspect_rules_js/{}/js_lib_pkg_a@0.0.0".format(name), + name = "node_modules/js_lib_pkg_a", + src = "//:.aspect_rules_js/js_lib_pkg_a@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2650,17 +2646,16 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/js_lib_pkg_a/dir".format(name), - srcs = [":{}/js_lib_pkg_a".format(name)], + name = "node_modules/js_lib_pkg_a/dir", + srcs = [":node_modules/js_lib_pkg_a"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/js_lib_pkg_a".format(name)) + link_targets.append(":node_modules/js_lib_pkg_a") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "js_lib_pkg_a-alias@0.0.0", src = "//examples/js_lib_pkg/a:pkg", package = "js_lib_pkg_a-alias", @@ -2673,8 +2668,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/js_lib_pkg/b"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/js_lib_pkg_a-alias".format(name), - src = "//:.aspect_rules_js/{}/js_lib_pkg_a-alias@0.0.0".format(name), + name = "node_modules/js_lib_pkg_a-alias", + src = "//:.aspect_rules_js/js_lib_pkg_a-alias@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2682,23 +2677,22 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/js_lib_pkg_a-alias/dir".format(name), - srcs = [":{}/js_lib_pkg_a-alias".format(name)], + name = "node_modules/js_lib_pkg_a-alias/dir", + srcs = [":node_modules/js_lib_pkg_a-alias"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/js_lib_pkg_a-alias".format(name)) + link_targets.append(":node_modules/js_lib_pkg_a-alias") if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+test@0.0.0", src = "//examples/linked_pkg:pkg", package = "@lib/test", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+e@1.0.0".format(name): "@aspect-test/e,alias-e", + "//:.aspect_rules_js/@aspect-test+e@1.0.0": "@aspect-test/e,alias-e", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2707,8 +2701,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/linked_consumer"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/test".format(name), - src = "//:.aspect_rules_js/{}/@lib+test@0.0.0".format(name), + name = "node_modules/@lib/test", + src = "//:.aspect_rules_js/@lib+test@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2716,13 +2710,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/test/dir".format(name), - srcs = [":{}/@lib/test".format(name)], + name = "node_modules/@lib/test/dir", + srcs = [":node_modules/@lib/test"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/test".format(name)) + link_targets.append(":node_modules/@lib/test") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -2730,13 +2724,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@lib+test2@0.0.0", src = "//examples/linked_lib:pkg", package = "@lib/test2", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@aspect-test+e@1.0.0".format(name): "@aspect-test/e,alias-e", + "//:.aspect_rules_js/@aspect-test+e@1.0.0": "@aspect-test/e,alias-e", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2745,8 +2738,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/linked_consumer"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@lib/test2".format(name), - src = "//:.aspect_rules_js/{}/@lib+test2@0.0.0".format(name), + name = "node_modules/@lib/test2", + src = "//:.aspect_rules_js/@lib+test2@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2754,13 +2747,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@lib/test2/dir".format(name), - srcs = [":{}/@lib/test2".format(name)], + name = "node_modules/@lib/test2/dir", + srcs = [":node_modules/@lib/test2"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@lib/test2".format(name)) + link_targets.append(":node_modules/@lib/test2") if "@lib" not in scope_targets: scope_targets["@lib"] = [link_targets[-1]] else: @@ -2768,14 +2761,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@mycorp+pkg-d@0.0.0", src = "//examples/npm_package/packages/pkg_d:pkg", package = "@mycorp/pkg-d", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/acorn@8.7.1".format(name): "acorn", - "//:.aspect_rules_js/{}/uuid@8.3.2".format(name): "uuid", + "//:.aspect_rules_js/acorn@8.7.1": "acorn", + "//:.aspect_rules_js/uuid@8.3.2": "uuid", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2784,8 +2776,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/npm_deps", "examples/npm_package/packages/pkg_e", "js/private/test/image"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@mycorp/pkg-d".format(name), - src = "//:.aspect_rules_js/{}/@mycorp+pkg-d@0.0.0".format(name), + name = "node_modules/@mycorp/pkg-d", + src = "//:.aspect_rules_js/@mycorp+pkg-d@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2793,13 +2785,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@mycorp/pkg-d/dir".format(name), - srcs = [":{}/@mycorp/pkg-d".format(name)], + name = "node_modules/@mycorp/pkg-d/dir", + srcs = [":node_modules/@mycorp/pkg-d"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@mycorp/pkg-d".format(name)) + link_targets.append(":node_modules/@mycorp/pkg-d") if "@mycorp" not in scope_targets: scope_targets["@mycorp"] = [link_targets[-1]] else: @@ -2807,13 +2799,12 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "@mycorp+pkg-e@0.0.0", src = "//examples/npm_package/packages/pkg_e:pkg", package = "@mycorp/pkg-e", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/@mycorp+pkg-d@0.0.0".format(name): "@mycorp/pkg-d", + "//:.aspect_rules_js/@mycorp+pkg-d@0.0.0": "@mycorp/pkg-d", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2822,8 +2813,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["examples/npm_deps"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/@mycorp/pkg-e".format(name), - src = "//:.aspect_rules_js/{}/@mycorp+pkg-e@0.0.0".format(name), + name = "node_modules/@mycorp/pkg-e", + src = "//:.aspect_rules_js/@mycorp+pkg-e@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2831,13 +2822,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/@mycorp/pkg-e/dir".format(name), - srcs = [":{}/@mycorp/pkg-e".format(name)], + name = "node_modules/@mycorp/pkg-e/dir", + srcs = [":node_modules/@mycorp/pkg-e"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/@mycorp/pkg-e".format(name)) + link_targets.append(":node_modules/@mycorp/pkg-e") if "@mycorp" not in scope_targets: scope_targets["@mycorp"] = [link_targets[-1]] else: @@ -2845,14 +2836,13 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if is_root: _npm_local_package_store( - link_root_name = name, package_store_name = "test-npm_package@0.0.0", src = "//npm/private/test/npm_package:pkg", package = "test-npm_package", version = "0.0.0", deps = { - "//:.aspect_rules_js/{}/chalk@5.0.1".format(name): "chalk", - "//:.aspect_rules_js/{}/chalk@5.1.1".format(name): "chalk-alt", + "//:.aspect_rules_js/chalk@5.0.1": "chalk", + "//:.aspect_rules_js/chalk@5.1.1": "chalk-alt", }, visibility = ["//visibility:public"], tags = ["manual"], @@ -2861,8 +2851,8 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): if bazel_package in ["npm/private/test"]: # terminal target for direct dependencies _npm_link_package_store( - name = "{}/test-npm_package".format(name), - src = "//:.aspect_rules_js/{}/test-npm_package@0.0.0".format(name), + name = "node_modules/test-npm_package", + src = "//:.aspect_rules_js/test-npm_package@0.0.0", visibility = ["//visibility:public"], tags = ["manual"], ) @@ -2870,31 +2860,31 @@ def npm_link_all_packages(name = "node_modules", imported_links = []): # filegroup target that provides a single file which is # package directory for use in $(execpath) and $(rootpath) native.filegroup( - name = "{}/test-npm_package/dir".format(name), - srcs = [":{}/test-npm_package".format(name)], + name = "node_modules/test-npm_package/dir", + srcs = [":node_modules/test-npm_package"], output_group = "package_directory", visibility = ["//visibility:public"], tags = ["manual"], ) - link_targets.append(":{}/test-npm_package".format(name)) + link_targets.append(":node_modules/test-npm_package") for scope, scoped_targets in scope_targets.items(): _js_library( - name = "{}/{}".format(name, scope), + name = "node_modules/{}".format(scope), srcs = scoped_targets, tags = ["manual"], visibility = ["//visibility:public"], ) _js_library( - name = name, + name = "node_modules", srcs = link_targets, tags = ["manual"], visibility = ["//visibility:public"], ) # buildifier: disable=function-docstring -def npm_link_targets(name = "node_modules", package = None): +def npm_link_targets(package = None): bazel_package = package if package != None else native.package_name() link = bazel_package in _LINK_PACKAGES @@ -2902,145 +2892,145 @@ def npm_link_targets(name = "node_modules", package = None): if link: if bazel_package == "js/private/worker/src": - link_targets.append(":{}/abortcontroller-polyfill".format(name)) - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) - link_targets.append(":{}/@rollup/plugin-json".format(name)) - link_targets.append(":{}/@rollup/plugin-node-resolve".format(name)) - link_targets.append(":{}/@rollup/plugin-typescript".format(name)) - link_targets.append(":{}/@types/google-protobuf".format(name)) - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/google-protobuf".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/tslib".format(name)) - link_targets.append(":{}/typescript".format(name)) + link_targets.append(":node_modules/abortcontroller-polyfill") + link_targets.append(":node_modules/@rollup/plugin-commonjs") + link_targets.append(":node_modules/@rollup/plugin-json") + link_targets.append(":node_modules/@rollup/plugin-node-resolve") + link_targets.append(":node_modules/@rollup/plugin-typescript") + link_targets.append(":node_modules/@types/google-protobuf") + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/google-protobuf") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/tslib") + link_targets.append(":node_modules/typescript") elif bazel_package == "js/private/test/image": - link_targets.append(":{}/acorn".format(name)) + link_targets.append(":node_modules/acorn") elif bazel_package == "examples/npm_deps": - link_targets.append(":{}/acorn".format(name)) - link_targets.append(":{}/@aspect-test/a".format(name)) - link_targets.append(":{}/@aspect-test/c".format(name)) - link_targets.append(":{}/@gregmagolan/test-b".format(name)) - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/meaning-of-life".format(name)) - link_targets.append(":{}/mobx-react".format(name)) - link_targets.append(":{}/mobx".format(name)) - link_targets.append(":{}/ms".format(name)) - link_targets.append(":{}/react".format(name)) - link_targets.append(":{}/rollup".format(name)) - link_targets.append(":{}/uvu".format(name)) + link_targets.append(":node_modules/acorn") + link_targets.append(":node_modules/@aspect-test/a") + link_targets.append(":node_modules/@aspect-test/c") + link_targets.append(":node_modules/@gregmagolan/test-b") + link_targets.append(":node_modules/@rollup/plugin-commonjs") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/meaning-of-life") + link_targets.append(":node_modules/mobx-react") + link_targets.append(":node_modules/mobx") + link_targets.append(":node_modules/ms") + link_targets.append(":node_modules/react") + link_targets.append(":node_modules/rollup") + link_targets.append(":node_modules/uvu") elif bazel_package == "examples/npm_package/packages/pkg_a": - link_targets.append(":{}/acorn".format(name)) - link_targets.append(":{}/uuid".format(name)) + link_targets.append(":node_modules/acorn") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/npm_package/packages/pkg_d": - link_targets.append(":{}/acorn".format(name)) - link_targets.append(":{}/uuid".format(name)) + link_targets.append(":node_modules/acorn") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/npm_package/packages/pkg_b": - link_targets.append(":{}/acorn".format(name)) - link_targets.append(":{}/uuid".format(name)) + link_targets.append(":node_modules/acorn") + link_targets.append(":node_modules/uuid") elif bazel_package == "examples/linked_lib": - link_targets.append(":{}/@aspect-test/e".format(name)) - link_targets.append(":{}/alias-e".format(name)) - link_targets.append(":{}/@aspect-test/f".format(name)) - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@aspect-test/e") + link_targets.append(":node_modules/alias-e") + link_targets.append(":node_modules/@aspect-test/f") + link_targets.append(":node_modules/@types/node") elif bazel_package == "examples/linked_pkg": - link_targets.append(":{}/@aspect-test/e".format(name)) - link_targets.append(":{}/alias-e".format(name)) - link_targets.append(":{}/@aspect-test/f".format(name)) - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@aspect-test/e") + link_targets.append(":node_modules/alias-e") + link_targets.append(":node_modules/@aspect-test/f") + link_targets.append(":node_modules/@types/node") elif bazel_package == "examples/runfiles": - link_targets.append(":{}/@bazel/runfiles".format(name)) + link_targets.append(":node_modules/@bazel/runfiles") elif bazel_package == "npm/private/test": - link_targets.append(":{}/@fastify/send".format(name)) - link_targets.append(":{}/@figma/nodegit".format(name)) - link_targets.append(":{}/@kubernetes/client-node".format(name)) - link_targets.append(":{}/@plotly/regl".format(name)) - link_targets.append(":{}/regl".format(name)) - link_targets.append(":{}/bufferutil".format(name)) - link_targets.append(":{}/debug".format(name)) - link_targets.append(":{}/esbuild".format(name)) - link_targets.append(":{}/hello".format(name)) - link_targets.append(":{}/handlebars-helpers/helper-date".format(name)) - link_targets.append(":{}/hot-shots".format(name)) - link_targets.append(":{}/inline-fixtures".format(name)) - link_targets.append(":{}/json-stable-stringify".format(name)) - link_targets.append(":{}/lodash".format(name)) - link_targets.append(":{}/node-gyp".format(name)) - link_targets.append(":{}/plotly.js".format(name)) - link_targets.append(":{}/pngjs".format(name)) - link_targets.append(":{}/protoc-gen-grpc".format(name)) - link_targets.append(":{}/puppeteer".format(name)) - link_targets.append(":{}/segfault-handler".format(name)) - link_targets.append(":{}/semver-first-satisfied".format(name)) - link_targets.append(":{}/syncpack".format(name)) - link_targets.append(":{}/typescript".format(name)) - link_targets.append(":{}/webpack-bundle-analyzer".format(name)) + link_targets.append(":node_modules/@fastify/send") + link_targets.append(":node_modules/@figma/nodegit") + link_targets.append(":node_modules/@kubernetes/client-node") + link_targets.append(":node_modules/@plotly/regl") + link_targets.append(":node_modules/regl") + link_targets.append(":node_modules/bufferutil") + link_targets.append(":node_modules/debug") + link_targets.append(":node_modules/esbuild") + link_targets.append(":node_modules/hello") + link_targets.append(":node_modules/handlebars-helpers/helper-date") + link_targets.append(":node_modules/hot-shots") + link_targets.append(":node_modules/inline-fixtures") + link_targets.append(":node_modules/json-stable-stringify") + link_targets.append(":node_modules/lodash") + link_targets.append(":node_modules/node-gyp") + link_targets.append(":node_modules/plotly.js") + link_targets.append(":node_modules/pngjs") + link_targets.append(":node_modules/protoc-gen-grpc") + link_targets.append(":node_modules/puppeteer") + link_targets.append(":node_modules/segfault-handler") + link_targets.append(":node_modules/semver-first-satisfied") + link_targets.append(":node_modules/syncpack") + link_targets.append(":node_modules/typescript") + link_targets.append(":node_modules/webpack-bundle-analyzer") elif bazel_package == "js/private/coverage/bundle": - link_targets.append(":{}/@rollup/plugin-commonjs".format(name)) - link_targets.append(":{}/@rollup/plugin-json".format(name)) - link_targets.append(":{}/@rollup/plugin-node-resolve".format(name)) - link_targets.append(":{}/c8".format(name)) - link_targets.append(":{}/rollup".format(name)) + link_targets.append(":node_modules/@rollup/plugin-commonjs") + link_targets.append(":node_modules/@rollup/plugin-json") + link_targets.append(":node_modules/@rollup/plugin-node-resolve") + link_targets.append(":node_modules/c8") + link_targets.append(":node_modules/rollup") elif bazel_package == "examples/nextjs": - link_targets.append(":{}/@tailwindcss/postcss".format(name)) - link_targets.append(":{}/next".format(name)) - link_targets.append(":{}/react-dom".format(name)) - link_targets.append(":{}/react".format(name)) - link_targets.append(":{}/tailwindcss".format(name)) + link_targets.append(":node_modules/@tailwindcss/postcss") + link_targets.append(":node_modules/next") + link_targets.append(":node_modules/react-dom") + link_targets.append(":node_modules/react") + link_targets.append(":node_modules/tailwindcss") elif bazel_package == "": - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/chalk".format(name)) - link_targets.append(":{}/inline-fixtures".format(name)) - link_targets.append(":{}/jsonpath-plus".format(name)) - link_targets.append(":{}/typescript".format(name)) + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/chalk") + link_targets.append(":node_modules/inline-fixtures") + link_targets.append(":node_modules/jsonpath-plus") + link_targets.append(":node_modules/typescript") elif bazel_package == "js/private/test/js_run_devserver": - link_targets.append(":{}/@types/node".format(name)) - link_targets.append(":{}/jasmine".format(name)) + link_targets.append(":node_modules/@types/node") + link_targets.append(":node_modules/jasmine") elif bazel_package == "examples/js_lib_pkg/a": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "examples/js_lib_pkg/b": - link_targets.append(":{}/@types/node".format(name)) + link_targets.append(":node_modules/@types/node") elif bazel_package == "examples/webpack_cli": - link_targets.append(":{}/@vanilla-extract/css".format(name)) - link_targets.append(":{}/@vanilla-extract/webpack-plugin".format(name)) - link_targets.append(":{}/css-loader".format(name)) - link_targets.append(":{}/mathjs".format(name)) - link_targets.append(":{}/mini-css-extract-plugin".format(name)) - link_targets.append(":{}/webpack-cli".format(name)) - link_targets.append(":{}/webpack".format(name)) + link_targets.append(":node_modules/@vanilla-extract/css") + link_targets.append(":node_modules/@vanilla-extract/webpack-plugin") + link_targets.append(":node_modules/css-loader") + link_targets.append(":node_modules/mathjs") + link_targets.append(":node_modules/mini-css-extract-plugin") + link_targets.append(":node_modules/webpack-cli") + link_targets.append(":node_modules/webpack") elif bazel_package == "examples/npm_package/libs/lib_a": - link_targets.append(":{}/chalk".format(name)) + link_targets.append(":node_modules/chalk") elif bazel_package == "npm/private/test/npm_package": - link_targets.append(":{}/chalk".format(name)) - link_targets.append(":{}/chalk-alt".format(name)) + link_targets.append(":node_modules/chalk") + link_targets.append(":node_modules/chalk-alt") elif bazel_package == "examples/macro": - link_targets.append(":{}/mocha-junit-reporter".format(name)) - link_targets.append(":{}/mocha-multi-reporters".format(name)) - link_targets.append(":{}/mocha".format(name)) + link_targets.append(":node_modules/mocha-junit-reporter") + link_targets.append(":node_modules/mocha-multi-reporters") + link_targets.append(":node_modules/mocha") elif bazel_package == "examples/stack_traces": - link_targets.append(":{}/source-map-support".format(name)) + link_targets.append(":node_modules/source-map-support") if bazel_package in ["examples/js_binary", "examples/npm_deps", "js/private/test/image"]: - link_targets.append(":{}/@mycorp/pkg-a".format(name)) + link_targets.append(":node_modules/@mycorp/pkg-a") if bazel_package in ["examples/js_lib_pkg/b"]: - link_targets.append(":{}/js_lib_pkg_a".format(name)) + link_targets.append(":node_modules/js_lib_pkg_a") if bazel_package in ["examples/js_lib_pkg/b"]: - link_targets.append(":{}/js_lib_pkg_a-alias".format(name)) + link_targets.append(":node_modules/js_lib_pkg_a-alias") if bazel_package in ["examples/linked_consumer"]: - link_targets.append(":{}/@lib/test".format(name)) + link_targets.append(":node_modules/@lib/test") if bazel_package in ["examples/linked_consumer"]: - link_targets.append(":{}/@lib/test2".format(name)) + link_targets.append(":node_modules/@lib/test2") if bazel_package in ["examples/npm_deps", "examples/npm_package/packages/pkg_e", "js/private/test/image"]: - link_targets.append(":{}/@mycorp/pkg-d".format(name)) + link_targets.append(":node_modules/@mycorp/pkg-d") if bazel_package in ["examples/npm_deps"]: - link_targets.append(":{}/@mycorp/pkg-e".format(name)) + link_targets.append(":node_modules/@mycorp/pkg-e") if bazel_package in ["npm/private/test"]: - link_targets.append(":{}/test-npm_package".format(name)) + link_targets.append(":node_modules/test-npm_package") return link_targets diff --git a/npm/private/test/snapshots/package_json.bzl b/npm/private/test/snapshots/package_json.bzl index a571bbee8..6d1f0eca9 100644 --- a/npm/private/test/snapshots/package_json.bzl +++ b/npm/private/test/snapshots/package_json.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "rollup@2.70.2" -def _rollup_internal(name, link_root_name, **kwargs): +def rollup(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", bin_mnemonic = "Rollup", **kwargs, ) -def _rollup_test_internal(name, link_root_name, **kwargs): +def rollup_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def _rollup_binary_internal(name, link_root_name, **kwargs): +def rollup_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "dist/bin/rollup", **kwargs, ) -def rollup(name, **kwargs): - _rollup_internal(name, "node_modules", **kwargs) - -def rollup_test(name, **kwargs): - _rollup_test_internal(name, "node_modules", **kwargs) - -def rollup_binary(name, **kwargs): - _rollup_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - rollup = lambda name, **kwargs: _rollup_internal(name, link_root_name = link_root_name, **kwargs), - rollup_test = lambda name, **kwargs: _rollup_test_internal(name, link_root_name = link_root_name, **kwargs), - rollup_binary = lambda name, **kwargs: _rollup_binary_internal(name, link_root_name = link_root_name, **kwargs), + rollup = rollup, + rollup_test = rollup_test, + rollup_binary = rollup_binary, rollup_path = "dist/bin/rollup", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/npm/private/test/snapshots/package_json_with_dashes.bzl b/npm/private/test/snapshots/package_json_with_dashes.bzl index 9eec94458..b601d09db 100644 --- a/npm/private/test/snapshots/package_json_with_dashes.bzl +++ b/npm/private/test/snapshots/package_json_with_dashes.bzl @@ -5,54 +5,41 @@ load("@aspect_rules_js//npm/private:npm_import.bzl", "bin_binary_internal", "bin _link_workspace_and_package = "@@//" _package_store_name = "webpack-bundle-analyzer@4.5.0_bufferutil_4.0.8" -def _webpack_bundle_analyzer_internal(name, link_root_name, **kwargs): +def webpack_bundle_analyzer(name, **kwargs): bin_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "lib/bin/analyzer.js", bin_mnemonic = "WebpackBundleAnalyzer", **kwargs, ) -def _webpack_bundle_analyzer_test_internal(name, link_root_name, **kwargs): +def webpack_bundle_analyzer_test(name, **kwargs): bin_test_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "lib/bin/analyzer.js", **kwargs, ) -def _webpack_bundle_analyzer_binary_internal(name, link_root_name, **kwargs): +def webpack_bundle_analyzer_binary(name, **kwargs): bin_binary_internal( name, link_workspace_and_package = _link_workspace_and_package, - link_root_name = link_root_name, package_store_name = _package_store_name, bin_path = "lib/bin/analyzer.js", **kwargs, ) -def webpack_bundle_analyzer(name, **kwargs): - _webpack_bundle_analyzer_internal(name, "node_modules", **kwargs) - -def webpack_bundle_analyzer_test(name, **kwargs): - _webpack_bundle_analyzer_test_internal(name, "node_modules", **kwargs) - -def webpack_bundle_analyzer_binary(name, **kwargs): - _webpack_bundle_analyzer_binary_internal(name, "node_modules", **kwargs) - -def bin_factory(link_root_name): - # bind link_root_name using lambdas +def bin_factory(): return struct( - webpack_bundle_analyzer = lambda name, **kwargs: _webpack_bundle_analyzer_internal(name, link_root_name = link_root_name, **kwargs), - webpack_bundle_analyzer_test = lambda name, **kwargs: _webpack_bundle_analyzer_test_internal(name, link_root_name = link_root_name, **kwargs), - webpack_bundle_analyzer_binary = lambda name, **kwargs: _webpack_bundle_analyzer_binary_internal(name, link_root_name = link_root_name, **kwargs), + webpack_bundle_analyzer = webpack_bundle_analyzer, + webpack_bundle_analyzer_test = webpack_bundle_analyzer_test, + webpack_bundle_analyzer_binary = webpack_bundle_analyzer_binary, webpack_bundle_analyzer_path = "lib/bin/analyzer.js", ) -bin = bin_factory("node_modules") +bin = bin_factory() diff --git a/npm/private/test/snapshots/rollup_links_defs.bzl b/npm/private/test/snapshots/rollup_links_defs.bzl index 098113574..c68ca82a4 100644 --- a/npm/private/test/snapshots/rollup_links_defs.bzl +++ b/npm/private/test/snapshots/rollup_links_defs.bzl @@ -16,22 +16,21 @@ _PACKAGE_STORE_NAME = "rollup@2.70.2" # Generated npm_package_store targets for npm package rollup@2.70.2 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.2/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.70.2/pkg": "rollup", + ":.aspect_rules_js/fsevents@2.3.2/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.70.2/pkg": "rollup", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.2/ref": "fsevents", + ":.aspect_rules_js/fsevents@2.3.2/ref": "fsevents", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/fsevents@2.3.2/pkg": "fsevents", - ":.aspect_rules_js/{link_root_name}/rollup@2.70.2/pkg_pre_lc_lite": "rollup", + ":.aspect_rules_js/fsevents@2.3.2/pkg": "fsevents", + ":.aspect_rules_js/rollup@2.70.2/pkg_pre_lc_lite": "rollup", }, dev = True, has_lifecycle_build_target = False, @@ -46,26 +45,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.70.2 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:public"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = True, ) # Generated npm_package_store and npm_link_package_store targets for npm package rollup@2.70.2 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, diff --git a/npm/private/test/snapshots/unused_links_defs.bzl b/npm/private/test/snapshots/unused_links_defs.bzl index d029334b1..5e3a2860f 100644 --- a/npm/private/test/snapshots/unused_links_defs.bzl +++ b/npm/private/test/snapshots/unused_links_defs.bzl @@ -16,29 +16,28 @@ _PACKAGE_STORE_NAME = "unused@0.2.2" # Generated npm_package_store targets for npm package unused@0.2.2 # buildifier: disable=function-docstring -def npm_imported_package_store(link_root_name): +def npm_imported_package_store(): _npm_imported_package_store( - link_root_name = link_root_name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE, deps = { - ":.aspect_rules_js/{link_root_name}/esprima@1.0.0/pkg": "esprima", - ":.aspect_rules_js/{link_root_name}/minimist@0.0.10/pkg": "minimist", - ":.aspect_rules_js/{link_root_name}/optimist@0.6.0/pkg": "optimist", - ":.aspect_rules_js/{link_root_name}/unused@0.2.2/pkg": "unused", - ":.aspect_rules_js/{link_root_name}/wordwrap@0.0.3/pkg": "wordwrap", + ":.aspect_rules_js/esprima@1.0.0/pkg": "esprima", + ":.aspect_rules_js/minimist@0.0.10/pkg": "minimist", + ":.aspect_rules_js/optimist@0.6.0/pkg": "optimist", + ":.aspect_rules_js/unused@0.2.2/pkg": "unused", + ":.aspect_rules_js/wordwrap@0.0.3/pkg": "wordwrap", }, ref_deps = { - ":.aspect_rules_js/{link_root_name}/esprima@1.0.0/ref": "esprima", - ":.aspect_rules_js/{link_root_name}/optimist@0.6.0/ref": "optimist", + ":.aspect_rules_js/esprima@1.0.0/ref": "esprima", + ":.aspect_rules_js/optimist@0.6.0/ref": "optimist", }, lc_deps = { - ":.aspect_rules_js/{link_root_name}/esprima@1.0.0/pkg": "esprima", - ":.aspect_rules_js/{link_root_name}/minimist@0.0.10/pkg": "minimist", - ":.aspect_rules_js/{link_root_name}/optimist@0.6.0/pkg": "optimist", - ":.aspect_rules_js/{link_root_name}/unused@0.2.2/pkg_pre_lc_lite": "unused", - ":.aspect_rules_js/{link_root_name}/wordwrap@0.0.3/pkg": "wordwrap", + ":.aspect_rules_js/esprima@1.0.0/pkg": "esprima", + ":.aspect_rules_js/minimist@0.0.10/pkg": "minimist", + ":.aspect_rules_js/optimist@0.6.0/pkg": "optimist", + ":.aspect_rules_js/unused@0.2.2/pkg_pre_lc_lite": "unused", + ":.aspect_rules_js/wordwrap@0.0.3/pkg": "wordwrap", }, dev = True, has_lifecycle_build_target = False, @@ -53,26 +52,19 @@ def npm_imported_package_store(link_root_name): # Generated npm_package_store and npm_link_package_store targets for npm package unused@0.2.2 # buildifier: disable=function-docstring -def npm_link_imported_package_store(name, link_root_name, link_alias): - return _npm_link_imported_package_store( +def npm_link_imported_package_store(name): + _npm_link_imported_package_store( name, - link_root_name, - link_alias, root_package = _ROOT_PACKAGE, link_visibility = ["//visibility:private"], bins = {}, package_store_name = _PACKAGE_STORE_NAME, - public_visibility = False, ) # Generated npm_package_store and npm_link_package_store targets for npm package unused@0.2.2 # buildifier: disable=function-docstring -def npm_link_imported_package( - name = "node_modules", - link = None, - fail_if_no_link = True): +def npm_link_imported_package(link = None, fail_if_no_link = True): return _npm_link_imported_package( - name, package = PACKAGE, version = VERSION, root_package = _ROOT_PACKAGE,