Skip to content

Commit

Permalink
Updates nodejs_register_toolchains() calls to use the Node version …
Browse files Browse the repository at this point in the history
…from `.nvmrc`.

This reduces duplication in the version numbers and consolidates on a single source of truth. I also added a `.nvmrc` to `examples/external/` as a symlink to the root `.nvmrc`.
  • Loading branch information
dgp1130 committed Feb 18, 2023
1 parent 92ecea5 commit 66988ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rules_js_dependencies()
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs", # Default name used by most tools.
node_version = "16.10.0",
use_nvmrc = "//:.nvmrc",
)

# Install NPM packages from the lockfile.
Expand Down
1 change: 1 addition & 0 deletions examples/external/.nvmrc
2 changes: 1 addition & 1 deletion examples/external/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rules_js_dependencies()
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = "16.10.0",
use_nvmrc = "//:.nvmrc",
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
Expand Down

0 comments on commit 66988ba

Please sign in to comment.