Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit ad673a6

Browse files
committed
build: migrate to latest bazel dependencies and use module.bazel
1 parent 4cba12b commit ad673a6

35 files changed

+5823
-759
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# @generated
12
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_workspace", pnpm_lock = "//integration/workspace:pnpm-lock.yaml").
23
# This file should be checked into version control along with the pnpm-lock.yaml file.
34
.npmrc=974837034
4-
integration/workspace/pnpm-lock.yaml=-1835679858
5+
integration/workspace/pnpm-lock.yaml=-908240955
56
integration/workspace/yarn.lock=324353828
67
integration/workspace/package.json=-1993643597
78
integration/workspace/pnpm-workspace.yaml=1163575902

.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE5NDc2NjEwNDI=

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_project", pnpm_lock = "//integration/project:pnpm-lock.yaml").
33
# This file should be checked into version control along with the pnpm-lock.yaml file.
44
.npmrc=974837034
5-
integration/project/pnpm-lock.yaml=-2108388700
5+
integration/project/pnpm-lock.yaml=2145650826
66
integration/project/yarn.lock=1608320625
77
integration/project/package.json=239980869
88
integration/project/pnpm-workspace.yaml=1163575902
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# @generated
12
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_pre_apf_project", pnpm_lock = "//integration/pre_apf_project:pnpm-lock.yaml").
23
# This file should be checked into version control along with the pnpm-lock.yaml file.
34
.npmrc=974837034
4-
integration/pre_apf_project/pnpm-lock.yaml=2141171294
5+
integration/pre_apf_project/pnpm-lock.yaml=-921563025
56
integration/pre_apf_project/yarn.lock=-941201574
67
integration/pre_apf_project/package.json=666737612
78
integration/pre_apf_project/pnpm-workspace.yaml=1163575902

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ test:debug --test_timeout=9999
2727
test:debug --nocache_test_results
2828
# ======================================================================================================================
2929

30+
# Required by `rules_ts`.
31+
common --@aspect_rules_ts//ts:skipLibCheck=always
32+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
33+
3034
###############################
3135
# Filesystem interactions #
3236
###############################

.npmrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
# Yarn Berry doesn't check engines at all, so pnpm shouldn't either.
2+
engine-strict = false
3+
14
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
25
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
36
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
47
hoist=false
58

6-
# Allow for missing peer dependencies on pnpm import.
7-
# See https://github.com/aspect-build/rules_js/pull/445 for more context.
8-
strict-peer-dependencies=false
9+
# Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used
10+
# for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue
11+
# to rely on peer dependency placeholders substituted via Bazel.
12+
auto-install-peers=false

BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@aspect_rules_js//js:defs.bzl", "js_library")
2-
load("@aspect_rules_js//js/private:expand_template.bzl", "expand_template")
2+
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template_rule")
33
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
44
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
55
load("@npm//:defs.bzl", "npm_link_all_packages")
@@ -19,7 +19,7 @@ ts_config(
1919
visibility = ["//visibility:public"],
2020
)
2121

22-
expand_template(
22+
expand_template_rule(
2323
name = "package_json_expanded",
2424
out = "package_expanded.json",
2525
stamp_substitutions = {

MODULE.bazel

Lines changed: 121 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,121 @@
1-
###############################################################################
2-
# Bazel now uses Bzlmod by default to manage external dependencies.
3-
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
4-
#
5-
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
6-
###############################################################################
1+
"""Rules/toolchains for vscode-ng-language-service with Bazel."""
2+
3+
module(
4+
name = "vscode",
5+
)
6+
7+
bazel_dep(name = "tar.bzl", version = "0.5.5")
8+
bazel_dep(name = "rules_nodejs", version = "6.5.0")
9+
bazel_dep(name = "bazel_skylib", version = "1.8.1")
10+
bazel_dep(name = "aspect_bazel_lib", version = "2.21.1")
11+
bazel_dep(name = "aspect_rules_esbuild", version = "0.22.1")
12+
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.0")
13+
bazel_dep(name = "aspect_rules_js", version = "2.5.0")
14+
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")
15+
16+
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
17+
rules_ts_ext.deps(
18+
name = "angular_npm_typescript",
19+
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
20+
ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
21+
ts_version = "5.9.2",
22+
)
23+
use_repo(rules_ts_ext, **{"npm_typescript": "angular_npm_typescript"})
24+
25+
26+
27+
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
28+
use_repo(pnpm, "pnpm")
29+
30+
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
31+
npm.npm_translate_lock(
32+
name = "npm",
33+
data = [
34+
"//:package.json",
35+
"//:pnpm-workspace.yaml",
36+
],
37+
npmrc = "//:.npmrc",
38+
pnpm_lock = "//:pnpm-lock.yaml",
39+
public_hoist_packages = {
40+
# Hoist transitive closure of npm deps needed for vsce; this set was determined manually by
41+
# running `bazel build //:vsix` and burning down missing packages. We do this so that we
42+
# don't have to run an additional `npm install` action to create a node_modules within the
43+
# //:npm npm_package where the vsce build takes place.
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
},
54+
verify_node_modules_ignored = "//:.bazelignore",
55+
yarn_lock = "//:yarn.lock",
56+
)
57+
58+
npm.npm_translate_lock(
59+
name = "npm_integration_pre_standalone_project",
60+
data = [
61+
"//integration/pre_standalone_project:package.json",
62+
"//integration/pre_standalone_project:pnpm-workspace.yaml",
63+
],
64+
npmrc = "//:.npmrc",
65+
pnpm_lock = "//integration/pre_standalone_project:pnpm-lock.yaml",
66+
verify_node_modules_ignored = "//:.bazelignore",
67+
)
68+
69+
npm.npm_translate_lock(
70+
name = "npm_integration_workspace",
71+
data = [
72+
"//integration/workspace:package.json",
73+
"//integration/workspace:pnpm-workspace.yaml",
74+
],
75+
npmrc = "//:.npmrc",
76+
pnpm_lock = "//integration/workspace:pnpm-lock.yaml",
77+
verify_node_modules_ignored = "//:.bazelignore",
78+
yarn_lock = "//integration/workspace:yarn.lock",
79+
)
80+
81+
npm.npm_translate_lock(
82+
name = "npm_integration_pre_apf_project",
83+
data = [
84+
"//integration/pre_apf_project:package.json",
85+
"//integration/pre_apf_project:pnpm-workspace.yaml",
86+
],
87+
npmrc = "//:.npmrc",
88+
pnpm_lock = "//integration/pre_apf_project:pnpm-lock.yaml",
89+
verify_node_modules_ignored = "//:.bazelignore",
90+
yarn_lock = "//integration/pre_apf_project:yarn.lock",
91+
)
92+
93+
94+
npm.npm_translate_lock(
95+
name = "npm_integration_project",
96+
data = [
97+
"//integration/project:package.json",
98+
"//integration/project:pnpm-workspace.yaml",
99+
],
100+
npmrc = "//:.npmrc",
101+
pnpm_lock = "//integration/project:pnpm-lock.yaml",
102+
verify_node_modules_ignored = "//:.bazelignore",
103+
yarn_lock = "//integration/project:yarn.lock",
104+
)
105+
106+
107+
108+
109+
110+
use_repo(npm, "npm", "npm_integration_pre_standalone_project", "npm_integration_workspace", "npm_integration_pre_apf_project", "npm_integration_project")
111+
112+
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
113+
node.toolchain(node_version = "22.11.0")
114+
use_repo(node, "nodejs_toolchains")
115+
use_repo(node, "nodejs_darwin_amd64")
116+
use_repo(node, "nodejs_darwin_arm64")
117+
use_repo(node, "nodejs_linux_amd64")
118+
use_repo(node, "nodejs_linux_arm64")
119+
use_repo(node, "nodejs_linux_ppc64le")
120+
use_repo(node, "nodejs_linux_s390x")
121+
use_repo(node, "nodejs_windows_amd64")

0 commit comments

Comments
 (0)