From 15ec52318de62b30c9ef1f9b729d42cecdeacb98 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Fri, 29 Mar 2024 09:14:42 -0400 Subject: [PATCH] refactor: set minimum rules_nodejs version to 6.0.5 --- .github/workflows/release_prep.sh | 2 +- MODULE.bazel | 12 +----------- WORKSPACE | 12 ------------ js/repositories.bzl | 6 +++--- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 05f74f566..85008cee6 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -33,7 +33,7 @@ bazel_dep(name = "aspect_rules_js", version = "${TAG:1}") ####### Node.js version ######### # 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 = "5.8.2") +bazel_dep(name = "rules_nodejs", version = "6.0.5") node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") node.toolchain(node_version = "16.14.2") ################################# diff --git a/MODULE.bazel b/MODULE.bazel index cc33b51ba..0c09ef0b9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,17 +12,7 @@ bazel_dep(name = "aspect_bazel_lib", version = "2.7.0") bazel_dep(name = "aspect_rules_lint", version = "0.12.0") bazel_dep(name = "bazel_features", version = "1.9.0") bazel_dep(name = "bazel_skylib", version = "1.5.0") - -# Keep v5 in to avoid breaking changes. -# TODO(2.0): change minimum to v6 -bazel_dep(name = "rules_nodejs", version = "5.8.2") - -# Override rules_nodejs to v6 to test the latest and recommended version internally. -single_version_override( - module_name = "rules_nodejs", - version = "6.1.0", -) - +bazel_dep(name = "rules_nodejs", version = "6.1.0") bazel_dep(name = "platforms", version = "0.0.5") node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") diff --git a/WORKSPACE b/WORKSPACE index ba9f1bed9..31c5d54ad 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,18 +3,6 @@ workspace( name = "aspect_rules_js", ) -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# Override rules_nodejs to v6 to test the latest and recommended versional internally, -# while keeping v5 in rules_js_dependencies() to avoid breaking changes. -# TODO(2.0): change minimum to v6 in repositories.bzl -http_archive( - name = "rules_nodejs", - sha256 = "dddd60acc3f2f30359bef502c9d788f67e33814b0ddd99aa27c5a15eb7a41b8c", - strip_prefix = "rules_nodejs-6.1.0", - url = "https://github.com/bazelbuild/rules_nodejs/releases/download/v6.1.0/rules_nodejs-v6.1.0.tar.gz", -) - load("//js:dev_repositories.bzl", "rules_js_dev_dependencies") rules_js_dev_dependencies() diff --git a/js/repositories.bzl b/js/repositories.bzl index e0a243caa..fa5321259 100644 --- a/js/repositories.bzl +++ b/js/repositories.bzl @@ -14,11 +14,11 @@ def rules_js_dependencies(): urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz"], ) - # TODO(2.0): update to rules_nodejs v6 http_archive( name = "rules_nodejs", - sha256 = "8fc8e300cb67b89ceebd5b8ba6896ff273c84f6099fc88d23f24e7102319d8fd", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.4/rules_nodejs-core-5.8.4.tar.gz"], + sha256 = "a50986c7d2f2dc43a5b9b81a6245fd89bdc4866f1d5e316d9cef2782dd859292", + strip_prefix = "rules_nodejs-6.0.5", + url = "https://github.com/bazelbuild/rules_nodejs/releases/download/v6.0.5/rules_nodejs-v6.0.5.tar.gz", ) http_archive(