Skip to content

Commit

Permalink
build: update rules_js and pnpm version
Browse files Browse the repository at this point in the history
Updated tooling allows to use lockfile version 9 in pnpm-lock.yaml.
We've recently seen that dependabot PRs for dependency updates seem to
create lock files with that lockfile version; as the tooling did not
support it, the dependabot changes could not be used. Plausibly,
dependabot PRs will work after this change.

Note that pnpm cannot be upgraded to the very latest version 9.5.0, as
this needs to be explicitly enabled in aspect_rules_js first.

Note that I've explicitly "downgraded" the nodejs node_version to the
default version used in the previous rules_nodejs version. The default
version of the current rules_nodjs version requires a too new glibc for
my ancient setup.
  • Loading branch information
matzf committed Jul 11, 2024
1 parent 6d7948b commit 63cadee
Show file tree
Hide file tree
Showing 3 changed files with 2,552 additions and 1,989 deletions.
17 changes: 9 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ lint_setup({

http_archive(
name = "aspect_bazel_lib",
sha256 = "a185ccff9c1b8589c63f66d7eb908de15c5d6bb05562be5f46336c53e7a7326a",
strip_prefix = "bazel-lib-2.0.0-rc1",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.0-rc1/bazel-lib-v2.0.0-rc1.tar.gz",
sha256 = "714cf8ce95a198bab0a6a3adaffea99e929d2f01bf6d4a59a2e6d6af72b4818c",
strip_prefix = "bazel-lib-2.7.8",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.8/bazel-lib-v2.7.8.tar.gz",
)

load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
Expand Down Expand Up @@ -257,9 +257,9 @@ install_python_lint_deps()

http_archive(
name = "aspect_rules_js",
sha256 = "a949d56fed8fa0a8dd82a0a660acc949253a05b2b0c52a07e4034e27f11218f6",
strip_prefix = "rules_js-1.33.1",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.33.1/rules_js-v1.33.1.tar.gz",
sha256 = "a723815986f3dd8b2c58d0ea76fde0ed56eed65de3212df712e631e5fc7d8790",
strip_prefix = "rules_js-2.0.0-rc6",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc6/rules_js-v2.0.0-rc6.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
Expand All @@ -270,13 +270,14 @@ load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_r

nodejs_register_toolchains(
name = "nodejs",
node_version = DEFAULT_NODE_VERSION,
node_version = "16.19.0", # use DEFAULT_NODE_VERSION from previous version rules_nodejs; the current version links against too new glibc
)

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

npm_translate_lock(
name = "npm",
pnpm_version = "9.4.0",
pnpm_lock = "@com_github_scionproto_scion//private/mgmtapi/tools:pnpm-lock.yaml",
verify_node_modules_ignored = "@com_github_scionproto_scion//:.bazelignore",
)
Expand Down
1 change: 1 addition & 0 deletions private/mgmtapi/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"@stoplight/spectral-cli": "^6.11.0"
},
"pnpm": {
"onlyBuiltDependencies": [],
"packageExtensions": {
"styled-components@5.3.11": {
"dependencies": {
Expand Down
Loading

0 comments on commit 63cadee

Please sign in to comment.