-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazel: update rules_nodejs and migrate to rules_js (#1436)
This finishes the work started in #1388 by fixing CI. It avoids a breaking change by: * Using the latest rules_js 1.x.x version, instead of updating to rules_js 2 (which removes support for bazel 5). * Copying the contents of [rules_js_dependencies](https://github.com/aspect-build/rules_js/blob/main/js/repositories.bzl) instead of calling it, as the call would need to be added by users in their `WORKSPACE` files Context from the previous PR: > Bazel's Node.js dependency comes from [rules_nodejs](https://github.com/bazelbuild/rules_nodejs/). Previously, bazel/deps.bzl was using rules_nodejs 5.8.0, released in 2022 and only supported Node.js toolchains up to 18.12.1. > This PR bumps rules_nodejs to latest 6.1.1. It also replaces build_bazel_rules_nodejs with [rules_js](https://github.com/aspect-build/rules_js), since npm_install that bazel/emscripten_deps.bzl used was deprecated. The README of rules_nodejs now recommends migrating to rules_js for everything other than the Node.js toolchain: (bazel-contrib/rules_nodejs@371e8ca) > Impetus Our repo builds with Bazel and uses Emscripten and Node.js. Tried to upgrade Node.js 18 to Node.js 20 and saw that emsdk didn't support rules_nodejs 6+ in the same workspace. Similarly, it's not possible to update to rules_js v2 in a workspace that also references `emsdk`.
- Loading branch information
1 parent
6abe512
commit c7d7853
Showing
2 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters