Skip to content

Commit

Permalink
Upgrades Bazel to 4.2.0, rules_nodejs and @bazel/* packages to …
Browse files Browse the repository at this point in the history
…`4.0.0`, and NodeJS to `12.22.5`.

These are the latest Bazel and `rules_nodejs` versions, necessary to include some fixes/improvements for re-exporting `js_library()` and `ts_library()` targets, see #39 (comment).

`[email protected]` actually updates NodeJS to `14.17.5`, however this breaks `@bazel/[email protected]` and there is no later release for it. There is actually a fix, but it hasn't been released. I filed bazelbuild/rules_postcss#73 to request a release, but for now I'm keeping NodeJS at `12.22.5`, which is the current latest release that does not include the v14 breaking change. Note that NodeJS v13 is already unsupported as it is not an LTS release.

This is the most I can upgrade Bazel/`rules_nodejs` without breaking `@bazel/postcss`.
  • Loading branch information
dgp1130 committed Aug 28, 2021
1 parent df68bd0 commit 1c8a283
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 131 deletions.
3 changes: 1 addition & 2 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
3.0.0

4.2.0
7 changes: 4 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ workspace(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
)

# The npm_install rule runs yarn anytime the package.json or package-lock.json file changes.
# It also extracts any Bazel rules distributed in an npm package.
load("@build_bazel_rules_nodejs//:index.bzl", "npm_install")
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "npm_install")
node_repositories(node_version = "12.22.5")
npm_install(
# Name this npm so that Bazel Label references look like @npm//package
name = "npm",
Expand Down
Loading

0 comments on commit 1c8a283

Please sign in to comment.