Skip to content

Commit

Permalink
fix: create WORKSPACE.bzlmod to not overlap WORKSPACE and MODULE support
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed May 23, 2024
1 parent 242bb58 commit 118e969
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,47 @@ register_toolchains("@esbuild_toolchains//:all")

bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")

# Node versions for testing
node_dev = use_extension(
"@rules_nodejs//nodejs:extensions.bzl",
"node",
dev_dependency = True,
)
use_repo(node_dev, "node18_linux_amd64")
use_repo(node_dev, "node18_darwin_arm64")
use_repo(node_dev, "node18_darwin_amd64")
use_repo(node_dev, "node18_linux_arm64")
use_repo(node_dev, "node18_linux_s390x")
use_repo(node_dev, "node18_linux_ppc64le")
use_repo(node_dev, "node18_windows_amd64")
use_repo(node_dev, "node16_linux_amd64")
use_repo(node_dev, "node16_darwin_arm64")
use_repo(node_dev, "node16_darwin_amd64")
use_repo(node_dev, "node16_linux_arm64")
use_repo(node_dev, "node16_linux_s390x")
use_repo(node_dev, "node16_linux_ppc64le")
use_repo(node_dev, "node16_windows_amd64")
node_dev.toolchain(node_version = "16.14.2")
node_dev.toolchain(
name = "node16",
node_version = "16.9.0",
)
node_dev.toolchain(
name = "node18",
node_version = "18.14.2",
)

# Install additional packages to test esbuild plugins
npm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
"npm",
dev_dependency = True,
)
npm.npm_translate_lock(
name = "esbuild_plugins",
npmrc = "//:.npmrc",
pnpm_lock = "//examples/plugins:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "esbuild_plugins")
Empty file added WORKSPACE.bzlmod
Empty file.

0 comments on commit 118e969

Please sign in to comment.