Skip to content

Commit

Permalink
chore: cleanup WORKSPACE and MODULE.bazel files
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Apr 21, 2024
1 parent dd2326b commit ac89966
Show file tree
Hide file tree
Showing 35 changed files with 289 additions and 263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
#################################
Expand Down
5 changes: 1 addition & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
14 changes: 4 additions & 10 deletions e2e/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion e2e/git_dep_metadata/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "../..",
Expand Down
14 changes: 9 additions & 5 deletions e2e/gyp_no_install_script/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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.9", 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"],
Expand Down
2 changes: 0 additions & 2 deletions e2e/js_image_oci/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
workspace(name = "js_image_oci")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

###
Expand Down
34 changes: 20 additions & 14 deletions e2e/js_run_devserver/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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",
Expand Down
22 changes: 10 additions & 12 deletions e2e/npm_translate_lock/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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.9", 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"],
Expand Down
17 changes: 8 additions & 9 deletions e2e/npm_translate_lock_auth/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down
22 changes: 10 additions & 12 deletions e2e/npm_translate_lock_empty/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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.9", 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"],
Expand Down
17 changes: 8 additions & 9 deletions e2e/npm_translate_lock_git+ssh/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down
17 changes: 8 additions & 9 deletions e2e/npm_translate_lock_multi/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
17 changes: 8 additions & 9 deletions e2e/npm_translate_lock_partial_clone/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
8 changes: 6 additions & 2 deletions e2e/npm_translate_lock_subdir_patch/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
17 changes: 8 additions & 9 deletions e2e/npm_translate_package_lock/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down
23 changes: 13 additions & 10 deletions e2e/npm_translate_yarn_lock/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down
Loading

0 comments on commit ac89966

Please sign in to comment.