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 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. 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.
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.
This finishes the work started in https://github.com/emscripten-core/emsdk/pull/1388 by fixing CI. It avoids a breaking change by:
WORKSPACE
filesContext from the previous PR:
Similarly, it's not possible to update to rules_js v2 in a workspace that also references
emsdk
.