diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 6f78ff234..325e258c8 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -34,7 +34,7 @@ bazel_dep(name = "aspect_rules_js", version = "${TAG:1}") # By default you get the node version from DEFAULT_NODE_VERSION in @rules_nodejs//nodejs:repositories.bzl # Optionally you can pin a different node version: bazel_dep(name = "rules_nodejs", version = "6.1.0") -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) node.toolchain(node_version = "16.14.2") ################################# diff --git a/WORKSPACE b/WORKSPACE index bb565626f..6cb8500a4 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,7 +1,4 @@ -workspace( - # see https://docs.bazel.build/versions/main/skylark/deploying.html#workspace - name = "aspect_rules_js", -) +workspace(name = "aspect_rules_js") # buildifier: disable=bzl-visibility load("//js/private:dev_deps.bzl", "rules_js_dev_dependencies") diff --git a/e2e/bzlmod/MODULE.bazel b/e2e/bzlmod/MODULE.bazel index 3432bdb80..ba15e2b9c 100644 --- a/e2e/bzlmod/MODULE.bazel +++ b/e2e/bzlmod/MODULE.bazel @@ -1,18 +1,12 @@ -module( - name = "e2e_bzlmod", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "bazel_skylib", version = "1.5.0") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + npm = use_extension( "@aspect_rules_js//npm:extensions.bzl", "npm", diff --git a/e2e/git_dep_metadata/MODULE.bazel b/e2e/git_dep_metadata/MODULE.bazel index 53790230c..ab6d05ff6 100644 --- a/e2e/git_dep_metadata/MODULE.bazel +++ b/e2e/git_dep_metadata/MODULE.bazel @@ -3,7 +3,7 @@ module( compatibility_level = 1, ) -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", diff --git a/e2e/gyp_no_install_script/MODULE.bazel b/e2e/gyp_no_install_script/MODULE.bazel index 86ed09043..af80dc73e 100644 --- a/e2e/gyp_no_install_script/MODULE.bazel +++ b/e2e/gyp_no_install_script/MODULE.bazel @@ -1,13 +1,17 @@ -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "platforms", version = "0.0.8") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/js_image_oci/WORKSPACE b/e2e/js_image_oci/WORKSPACE index c8c8e2bc6..fda24dc20 100644 --- a/e2e/js_image_oci/WORKSPACE +++ b/e2e/js_image_oci/WORKSPACE @@ -1,5 +1,3 @@ -workspace(name = "js_image_oci") - load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") ### diff --git a/e2e/js_run_devserver/MODULE.bazel b/e2e/js_run_devserver/MODULE.bazel index d0d7d9c42..b5d42df7d 100644 --- a/e2e/js_run_devserver/MODULE.bazel +++ b/e2e/js_run_devserver/MODULE.bazel @@ -1,23 +1,25 @@ -module( - name = "e2e_js_run_devserver", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_go", version = "0.46.0") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True) + +pnpm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "pnpm", + dev_dependency = True, +) use_repo(pnpm, "pnpm") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", bins = { @@ -32,7 +34,11 @@ npm.npm_translate_lock( ) use_repo(npm, "npm") -go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") +go_sdk = use_extension( + "@rules_go//go:extensions.bzl", + "go_sdk", + dev_dependency = True, +) go_sdk.download( name = "go_sdk", version = "1.20.3", diff --git a/e2e/npm_translate_lock/MODULE.bazel b/e2e/npm_translate_lock/MODULE.bazel index c83b1fcea..8f0d00a01 100644 --- a/e2e/npm_translate_lock/MODULE.bazel +++ b/e2e/npm_translate_lock/MODULE.bazel @@ -1,20 +1,18 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "platforms", version = "0.0.8") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/npm_translate_lock_auth/MODULE.bazel b/e2e/npm_translate_lock_auth/MODULE.bazel index b3beb9aa9..88a8992eb 100644 --- a/e2e/npm_translate_lock_auth/MODULE.bazel +++ b/e2e/npm_translate_lock_auth/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock_auth", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/npm_translate_lock_empty/MODULE.bazel b/e2e/npm_translate_lock_empty/MODULE.bazel index 6b6bda52c..62f2bad99 100644 --- a/e2e/npm_translate_lock_empty/MODULE.bazel +++ b/e2e/npm_translate_lock_empty/MODULE.bazel @@ -1,20 +1,18 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "platforms", version = "0.0.8") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/npm_translate_lock_git+ssh/MODULE.bazel b/e2e/npm_translate_lock_git+ssh/MODULE.bazel index e99465505..88a8992eb 100644 --- a/e2e/npm_translate_lock_git+ssh/MODULE.bazel +++ b/e2e/npm_translate_lock_git+ssh/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock_git_ssh", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/npm_translate_lock_multi/MODULE.bazel b/e2e/npm_translate_lock_multi/MODULE.bazel index 4f55561b7..e48a3a3f7 100644 --- a/e2e/npm_translate_lock_multi/MODULE.bazel +++ b/e2e/npm_translate_lock_multi/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock_multi", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "app1_npm", npmrc = "//:.npmrc", diff --git a/e2e/npm_translate_lock_partial_clone/MODULE.bazel b/e2e/npm_translate_lock_partial_clone/MODULE.bazel index 1d3c70bcb..569a7017a 100644 --- a/e2e/npm_translate_lock_partial_clone/MODULE.bazel +++ b/e2e/npm_translate_lock_partial_clone/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/npm_translate_lock_subdir_patch/MODULE.bazel b/e2e/npm_translate_lock_subdir_patch/MODULE.bazel index e95807e80..5d00d372d 100644 --- a/e2e/npm_translate_lock_subdir_patch/MODULE.bazel +++ b/e2e/npm_translate_lock_subdir_patch/MODULE.bazel @@ -1,10 +1,14 @@ -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/npm_translate_package_lock/MODULE.bazel b/e2e/npm_translate_package_lock/MODULE.bazel index 957f9b26a..c812bab98 100644 --- a/e2e/npm_translate_package_lock/MODULE.bazel +++ b/e2e/npm_translate_package_lock/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_translate_package_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/npm_translate_yarn_lock/MODULE.bazel b/e2e/npm_translate_yarn_lock/MODULE.bazel index a4b07e9c9..bb1c70ab2 100644 --- a/e2e/npm_translate_yarn_lock/MODULE.bazel +++ b/e2e/npm_translate_yarn_lock/MODULE.bazel @@ -1,24 +1,27 @@ -module( - name = "e2e_translate_yarn_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +pnpm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "pnpm", + dev_dependency = True, +) pnpm.pnpm( name = "pnpm-old-version", pnpm_version = "7.33.3", ) use_repo(pnpm, "pnpm-old-version") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = ["//:package.json"], diff --git a/e2e/package_json_module/MODULE.bazel b/e2e/package_json_module/MODULE.bazel index 71e6aace0..057a868ca 100644 --- a/e2e/package_json_module/MODULE.bazel +++ b/e2e/package_json_module/MODULE.bazel @@ -1,16 +1,14 @@ -module( - name = "e2e_package_json_module", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", pnpm_lock = "//:pnpm-lock.yaml", diff --git a/e2e/patch_from_repo/MODULE.bazel b/e2e/patch_from_repo/MODULE.bazel index fae49255b..e123c5ac6 100644 --- a/e2e/patch_from_repo/MODULE.bazel +++ b/e2e/patch_from_repo/MODULE.bazel @@ -1,18 +1,22 @@ -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "local_repo", version = "0.0.0") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) +bazel_dep(name = "local_repo", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "local_repo", path = "./local_repo", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/pnpm_lockfiles/MODULE.bazel b/e2e/pnpm_lockfiles/MODULE.bazel index f82b2e9bd..46685cdf5 100644 --- a/e2e/pnpm_lockfiles/MODULE.bazel +++ b/e2e/pnpm_lockfiles/MODULE.bazel @@ -1,25 +1,28 @@ -module( - name = "e2e_pnpm_lockfiles", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) + +node = use_extension( + "@rules_nodejs//nodejs:extensions.bzl", + "node", + dev_dependency = True, +) use_repo(node, "nodejs_toolchains") use_repo(node, "nodejs_darwin_amd64") use_repo(node, "nodejs_darwin_arm64") use_repo(node, "nodejs_linux_amd64") use_repo(node, "nodejs_linux_arm64") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) [ npm.npm_translate_lock( diff --git a/e2e/pnpm_repo_install/MODULE.bazel b/e2e/pnpm_repo_install/MODULE.bazel index 759db7493..6852a17b7 100644 --- a/e2e/pnpm_repo_install/MODULE.bazel +++ b/e2e/pnpm_repo_install/MODULE.bazel @@ -1,24 +1,27 @@ -module( - name = "e2e_pnpm_workspace", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) + +node = use_extension( + "@rules_nodejs//nodejs:extensions.bzl", + "node", + dev_dependency = True, +) use_repo(node, "nodejs_toolchains") use_repo(node, "nodejs_darwin_amd64") use_repo(node, "nodejs_darwin_arm64") use_repo(node, "nodejs_linux_amd64") use_repo(node, "nodejs_linux_arm64") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", pnpm_lock = "//:pnpm-lock.yaml", @@ -26,5 +29,9 @@ npm.npm_translate_lock( ) use_repo(npm, "npm") -pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") +pnpm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "pnpm", + dev_dependency = True, +) use_repo(pnpm, "pnpm") diff --git a/e2e/pnpm_workspace/MODULE.bazel b/e2e/pnpm_workspace/MODULE.bazel index 4066568e9..a4824e9f6 100644 --- a/e2e/pnpm_workspace/MODULE.bazel +++ b/e2e/pnpm_workspace/MODULE.bazel @@ -1,26 +1,29 @@ -module( - name = "e2e_pnpm_workspace", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) + +node = use_extension( + "@rules_nodejs//nodejs:extensions.bzl", + "node", + dev_dependency = True, +) use_repo(node, "nodejs_toolchains") use_repo(node, "nodejs_darwin_amd64") use_repo(node, "nodejs_darwin_arm64") use_repo(node, "nodejs_linux_amd64") use_repo(node, "nodejs_linux_arm64") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", bins = { diff --git a/e2e/pnpm_workspace_deps/MODULE.bazel b/e2e/pnpm_workspace_deps/MODULE.bazel index 264ddc99d..ab3a5d584 100644 --- a/e2e/pnpm_workspace_deps/MODULE.bazel +++ b/e2e/pnpm_workspace_deps/MODULE.bazel @@ -1,16 +1,14 @@ -module( - name = "e2e_pnpm_workspace_deps", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/pnpm_workspace_rerooted/MODULE.bazel b/e2e/pnpm_workspace_rerooted/MODULE.bazel index 92a1ae1bc..4ce81b530 100644 --- a/e2e/pnpm_workspace_rerooted/MODULE.bazel +++ b/e2e/pnpm_workspace_rerooted/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_pnpm_workspace_rerooted", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) + +node = use_extension( + "@rules_nodejs//nodejs:extensions.bzl", + "node", + dev_dependency = True, +) node.toolchain( name = "nodejs", node_version = "16.14.2", @@ -26,7 +25,11 @@ register_toolchains( "@nodejs_toolchains//:all", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", bins = { diff --git a/e2e/rules_foo/WORKSPACE b/e2e/rules_foo/WORKSPACE index e3893c614..c7f798759 100644 --- a/e2e/rules_foo/WORKSPACE +++ b/e2e/rules_foo/WORKSPACE @@ -1,6 +1,3 @@ -# This workspace is loaded as a local_repository -workspace(name = "rules_foo") - local_repository( name = "aspect_rules_js", path = "../..", @@ -14,7 +11,7 @@ load("@aspect_rules_js//js:toolchains.bzl", "rules_js_register_toolchains") rules_js_register_toolchains(node_version = "16.14.2") -load("@rules_foo//foo:repositories.bzl", "foo_repositories") +load("//foo:repositories.bzl", "foo_repositories") foo_repositories(name = "foo") diff --git a/e2e/rules_foo/foo/repositories.bzl b/e2e/rules_foo/foo/repositories.bzl index feb71bbfb..1564c6a58 100755 --- a/e2e/rules_foo/foo/repositories.bzl +++ b/e2e/rules_foo/foo/repositories.bzl @@ -5,7 +5,7 @@ load("@aspect_rules_js//npm:repositories.bzl", _npm_translate_lock = "npm_transl def foo_repositories(name): _npm_translate_lock( name = name, - pnpm_lock = "@rules_foo//foo:pnpm-lock.yaml", + pnpm_lock = "//foo:pnpm-lock.yaml", # We'll be linking in the @foo repository and not the repository where the pnpm-lock file is located link_workspace = name, # Override the Bazel package where pnpm-lock.yaml is located and link to the specified package instead diff --git a/e2e/stamped_package_json/MODULE.bazel b/e2e/stamped_package_json/MODULE.bazel index 75d06dfb5..b65458374 100644 --- a/e2e/stamped_package_json/MODULE.bazel +++ b/e2e/stamped_package_json/MODULE.bazel @@ -1,10 +1,11 @@ +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) + module( version = "0.0.0", compatibility_level = 1, ) -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", diff --git a/e2e/update_pnpm_lock/MODULE.bazel b/e2e/update_pnpm_lock/MODULE.bazel index 5f31ee35b..07d84753e 100644 --- a/e2e/update_pnpm_lock/MODULE.bazel +++ b/e2e/update_pnpm_lock/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/update_pnpm_lock_with_import/MODULE.bazel b/e2e/update_pnpm_lock_with_import/MODULE.bazel index 8d3f14959..9997e4156 100644 --- a/e2e/update_pnpm_lock_with_import/MODULE.bazel +++ b/e2e/update_pnpm_lock_with_import/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) # Validate that we can use a yarn.lock file in place of pnpm-lock.yaml npm.npm_translate_lock( diff --git a/e2e/vendored_node/MODULE.bazel b/e2e/vendored_node/MODULE.bazel index 2b1239638..71508f5a3 100644 --- a/e2e/vendored_node/MODULE.bazel +++ b/e2e/vendored_node/MODULE.bazel @@ -1,16 +1,10 @@ -module( - name = "e2e_vendored_node", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "aspect_rules_js", version = "0.0.0") -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "platforms", version = "0.0.4") - +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) +bazel_dep(name = "platforms", version = "0.0.4", dev_dependency = True) + register_toolchains("//toolchains:all") diff --git a/e2e/vendored_tarfile/MODULE.bazel b/e2e/vendored_tarfile/MODULE.bazel index e23b384a1..aea102a18 100644 --- a/e2e/vendored_tarfile/MODULE.bazel +++ b/e2e/vendored_tarfile/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_vendored_tarfile", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/verify_patches/MODULE.bazel b/e2e/verify_patches/MODULE.bazel index db7c16685..9b841bdd5 100644 --- a/e2e/verify_patches/MODULE.bazel +++ b/e2e/verify_patches/MODULE.bazel @@ -1,17 +1,16 @@ -module( - name = "e2e_npm_translate_lock", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", data = [ diff --git a/e2e/webpack_devserver/MODULE.bazel b/e2e/webpack_devserver/MODULE.bazel index edcecccc1..ec6f93f35 100644 --- a/e2e/webpack_devserver/MODULE.bazel +++ b/e2e/webpack_devserver/MODULE.bazel @@ -1,13 +1,18 @@ -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_go", version = "0.46.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", npmrc = "//:.npmrc", @@ -16,10 +21,18 @@ npm.npm_translate_lock( ) use_repo(npm, "npm") -pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") +pnpm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "pnpm", + dev_dependency = True, +) use_repo(pnpm, "pnpm") -go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") +go_sdk = use_extension( + "@rules_go//go:extensions.bzl", + "go_sdk", + dev_dependency = True, +) go_sdk.download( name = "go_sdk", version = "1.20.3", diff --git a/e2e/webpack_devserver_esm/MODULE.bazel b/e2e/webpack_devserver_esm/MODULE.bazel index edcecccc1..ec6f93f35 100644 --- a/e2e/webpack_devserver_esm/MODULE.bazel +++ b/e2e/webpack_devserver_esm/MODULE.bazel @@ -1,13 +1,18 @@ -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_go", version = "0.46.0") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True) + +npm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "npm", + dev_dependency = True, +) npm.npm_translate_lock( name = "npm", npmrc = "//:.npmrc", @@ -16,10 +21,18 @@ npm.npm_translate_lock( ) use_repo(npm, "npm") -pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") +pnpm = use_extension( + "@aspect_rules_js//npm:extensions.bzl", + "pnpm", + dev_dependency = True, +) use_repo(pnpm, "pnpm") -go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") +go_sdk = use_extension( + "@rules_go//go:extensions.bzl", + "go_sdk", + dev_dependency = True, +) go_sdk.download( name = "go_sdk", version = "1.20.3", diff --git a/e2e/worker/MODULE.bazel b/e2e/worker/MODULE.bazel index b9d8a7f93..634dce002 100644 --- a/e2e/worker/MODULE.bazel +++ b/e2e/worker/MODULE.bazel @@ -1,19 +1,18 @@ -module( - name = "e2e_worker", - version = "0.0.0", - compatibility_level = 1, -) - -bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "rules_nodejs", version = "6.1.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1") -bazel_dep(name = "aspect_rules_js", version = "0.0.0") +bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) local_path_override( module_name = "aspect_rules_js", path = "../..", ) -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") +bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "rules_nodejs", version = "6.1.0", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) + +node = use_extension( + "@rules_nodejs//nodejs:extensions.bzl", + "node", + dev_dependency = True, +) use_repo(node, "nodejs_toolchains") use_repo(node, "nodejs_darwin_amd64") use_repo(node, "nodejs_darwin_arm64")