Skip to content

Commit

Permalink
Upgrade to rules_nodejs 5.8.0 (#1150)
Browse files Browse the repository at this point in the history
Fixes #1020
  • Loading branch information
jfirebaugh authored Dec 20, 2022
1 parent 63a63e1 commit 5b80c10
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
30 changes: 22 additions & 8 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

def deps():
excludes = native.existing_rules().keys()

if "build_bazel_rules_nodejs" not in excludes:
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "4501158976b9da216295ac65d872b1be51e3eeb805273e68c516d2eb36ae1fbb",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.1/rules_nodejs-4.4.1.tar.gz"],
)
maybe(
http_archive,
name = "bazel_skylib",
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
],
)
maybe(
http_archive,
name = "rules_nodejs",
sha256 = "08337d4fffc78f7fe648a93be12ea2fc4e8eb9795a4e6aa48595b66b34555626",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.0/rules_nodejs-core-5.8.0.tar.gz"],
)
maybe(
http_archive,
name = "build_bazel_rules_nodejs",
sha256 = "dcc55f810142b6cf46a44d0180a5a7fb923c04a5061e2e8d8eb05ccccc60864b",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.0/rules_nodejs-5.8.0.tar.gz"],
)
7 changes: 1 addition & 6 deletions bazel/emscripten_toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ load(":toolchain.bzl", "emscripten_cc_toolchain_config_rule")

package(default_visibility = ["//visibility:public"])

# Name depends on rules_nodejs version being used.
# https://github.com/emscripten-core/emsdk/issues/1020
# https://github.com/bazelbuild/rules_nodejs/issues/3375
node_files = "@nodejs_host//:node_files" if existing_rule("@nodejs_host//:node_files") else "@nodejs//:node_files"

filegroup(
name = "common_files",
srcs = [
"emscripten_config",
"env.sh",
"env.bat",
node_files,
"@nodejs//:node_files",
],
)

Expand Down

0 comments on commit 5b80c10

Please sign in to comment.