Skip to content

Commit

Permalink
build: rename //:root_modules to //:node_modules.
Browse files Browse the repository at this point in the history
This is necessary as `rules_js` requires this "common name" when dealing
with Yarn workspaces, linking first party dependencies automatically.

In the future, we may be able to send a PR to `rules_js` to support a
custom name somehow.
  • Loading branch information
devversion committed Jan 15, 2025
1 parent 84bbfa5 commit 62e90d0
Show file tree
Hide file tree
Showing 35 changed files with 342 additions and 344 deletions.
10 changes: 4 additions & 6 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ exports_files([
"package.json",
])

npm_link_all_packages(
name = "root_modules",
)
npm_link_all_packages()

rules_js_tsconfig(
name = "build-tsconfig",
src = "tsconfig-build.json",
deps = [
"tsconfig.json",
"//:root_modules/@types/node",
"//:node_modules/@types/node",
],
)

Expand All @@ -48,8 +46,8 @@ rules_js_tsconfig(
src = "tsconfig-test.json",
deps = [
"tsconfig.json",
"//:root_modules/@types/jasmine",
"//:root_modules/@types/node",
"//:node_modules/@types/jasmine",
"//:node_modules/@types/node",
],
)

Expand Down
2 changes: 1 addition & 1 deletion modules/testing/builder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ts_project(
),
data = glob(["projects/**/*"]),
deps = [
"//:root_modules/rxjs",
"//:node_modules/rxjs",
"//packages/angular_devkit/architect:architect_rjs",
"//packages/angular_devkit/architect/node:node_rjs",
"//packages/angular_devkit/architect/testing:testing_rjs",
Expand Down
152 changes: 76 additions & 76 deletions packages/angular/build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -61,49 +61,49 @@ ts_project(
data = RUNTIME_ASSETS,
module_name = "@angular/build",
deps = [
"//:root_modules/@ampproject/remapping",
"//:root_modules/@angular/common",
"//:root_modules/@angular/compiler",
"//:root_modules/@angular/compiler-cli",
"//:root_modules/@angular/core",
"//:root_modules/@angular/localize",
"//:root_modules/@angular/platform-server",
"//:root_modules/@angular/service-worker",
"//:root_modules/@babel/core",
"//:root_modules/@babel/helper-annotate-as-pure",
"//:root_modules/@babel/helper-split-export-declaration",
"//:root_modules/@babel/plugin-syntax-import-attributes",
"//:root_modules/@inquirer/confirm",
"//:root_modules/@types/babel__core",
"//:root_modules/@types/less",
"//:root_modules/@types/node",
"//:root_modules/@types/picomatch",
"//:root_modules/@types/semver",
"//:root_modules/@types/watchpack",
"//:root_modules/@vitejs/plugin-basic-ssl",
"//:root_modules/beasties",
"//:root_modules/browserslist",
"//:root_modules/esbuild",
"//:root_modules/esbuild-wasm",
"//:root_modules/fast-glob",
"//:root_modules/https-proxy-agent",
"//:root_modules/jsonc-parser",
"//:root_modules/listr2",
"//:root_modules/lmdb",
"//:root_modules/magic-string",
"//:root_modules/mrmime",
"//:root_modules/ng-packagr",
"//:root_modules/parse5-html-rewriting-stream",
"//:root_modules/picomatch",
"//:root_modules/piscina",
"//:root_modules/postcss",
"//:root_modules/rollup",
"//:root_modules/sass",
"//:root_modules/semver",
"//:root_modules/tslib",
"//:root_modules/typescript",
"//:root_modules/vite",
"//:root_modules/watchpack",
"//:node_modules/@ampproject/remapping",
"//:node_modules/@angular/common",
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@angular/core",
"//:node_modules/@angular/localize",
"//:node_modules/@angular/platform-server",
"//:node_modules/@angular/service-worker",
"//:node_modules/@babel/core",
"//:node_modules/@babel/helper-annotate-as-pure",
"//:node_modules/@babel/helper-split-export-declaration",
"//:node_modules/@babel/plugin-syntax-import-attributes",
"//:node_modules/@inquirer/confirm",
"//:node_modules/@types/babel__core",
"//:node_modules/@types/less",
"//:node_modules/@types/node",
"//:node_modules/@types/picomatch",
"//:node_modules/@types/semver",
"//:node_modules/@types/watchpack",
"//:node_modules/@vitejs/plugin-basic-ssl",
"//:node_modules/beasties",
"//:node_modules/browserslist",
"//:node_modules/esbuild",
"//:node_modules/esbuild-wasm",
"//:node_modules/fast-glob",
"//:node_modules/https-proxy-agent",
"//:node_modules/jsonc-parser",
"//:node_modules/listr2",
"//:node_modules/lmdb",
"//:node_modules/magic-string",
"//:node_modules/mrmime",
"//:node_modules/ng-packagr",
"//:node_modules/parse5-html-rewriting-stream",
"//:node_modules/picomatch",
"//:node_modules/piscina",
"//:node_modules/postcss",
"//:node_modules/rollup",
"//:node_modules/sass",
"//:node_modules/semver",
"//:node_modules/tslib",
"//:node_modules/typescript",
"//:node_modules/vite",
"//:node_modules/watchpack",
"//packages/angular/ssr:ssr_rjs",
"//packages/angular/ssr/node:node_rjs",
"//packages/angular_devkit/architect:architect_rjs",
Expand All @@ -119,11 +119,11 @@ ts_project(
),
deps = [
":build_rjs",
"//:root_modules/@angular/compiler-cli",
"//:root_modules/@babel/core",
"//:root_modules/@types/jasmine",
"//:root_modules/prettier",
"//:root_modules/typescript",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@babel/core",
"//:node_modules/@types/jasmine",
"//:node_modules/prettier",
"//:node_modules/typescript",
"//packages/angular/build/private:private_rjs",
"//packages/angular_devkit/core:core_rjs",
"//packages/angular_devkit/core/node:node_rjs",
Expand All @@ -150,18 +150,18 @@ ts_project(
"//packages/angular_devkit/core/node:node_rjs",

# Base dependencies for the application in hello-world-app.
"//:root_modules/@angular/common",
"//:root_modules/@angular/compiler",
"//:root_modules/@angular/compiler-cli",
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-browser",
"//:root_modules/@angular/platform-browser-dynamic",
"//:root_modules/@angular/router",
"//:root_modules/rxjs",
"//:root_modules/tslib",
"//:root_modules/typescript",
"//:root_modules/zone.js",
"//:root_modules/buffer",
"//:node_modules/@angular/common",
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-browser",
"//:node_modules/@angular/platform-browser-dynamic",
"//:node_modules/@angular/router",
"//:node_modules/rxjs",
"//:node_modules/tslib",
"//:node_modules/typescript",
"//:node_modules/zone.js",
"//:node_modules/buffer",
],
)

Expand All @@ -180,24 +180,24 @@ ts_project(
"//packages/angular_devkit/core/node:node_rjs",

# dev server only test deps
"//:root_modules/@types/http-proxy",
"//:root_modules/http-proxy",
"//:root_modules/puppeteer",
"//:node_modules/@types/http-proxy",
"//:node_modules/http-proxy",
"//:node_modules/puppeteer",

# Base dependencies for the application in hello-world-app.
"//:root_modules/@angular/common",
"//:root_modules/@angular/compiler",
"//:root_modules/@angular/compiler-cli",
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-browser",
"//:root_modules/@angular/platform-browser-dynamic",
"//:root_modules/@angular/router",
"//:root_modules/ng-packagr",
"//:root_modules/rxjs",
"//:root_modules/tslib",
"//:root_modules/typescript",
"//:root_modules/zone.js",
"//:root_modules/buffer",
"//:node_modules/@angular/common",
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-browser",
"//:node_modules/@angular/platform-browser-dynamic",
"//:node_modules/@angular/router",
"//:node_modules/ng-packagr",
"//:node_modules/rxjs",
"//:node_modules/tslib",
"//:node_modules/typescript",
"//:node_modules/zone.js",
"//:node_modules/buffer",
],
)

Expand Down
44 changes: 22 additions & 22 deletions packages/angular/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@ ts_project(
data = RUNTIME_ASSETS,
module_name = "@angular/cli",
deps = [
"//:root_modules/@angular/core",
"//:root_modules/@inquirer/prompts",
"//:root_modules/@listr2/prompt-adapter-inquirer",
"//:root_modules/@types/ini",
"//:root_modules/@types/node",
"//:root_modules/@types/npm-package-arg",
"//:root_modules/@types/pacote",
"//:root_modules/@types/resolve",
"//:root_modules/@types/semver",
"//:root_modules/@types/yargs",
"//:root_modules/@types/yarnpkg__lockfile",
"//:root_modules/@yarnpkg/lockfile",
"//:root_modules/ini",
"//:root_modules/jsonc-parser",
"//:root_modules/listr2",
"//:root_modules/npm-package-arg",
"//:root_modules/npm-pick-manifest",
"//:root_modules/pacote",
"//:root_modules/semver",
"//:root_modules/yargs",
"//:node_modules/@angular/core",
"//:node_modules/@inquirer/prompts",
"//:node_modules/@listr2/prompt-adapter-inquirer",
"//:node_modules/@types/ini",
"//:node_modules/@types/node",
"//:node_modules/@types/npm-package-arg",
"//:node_modules/@types/pacote",
"//:node_modules/@types/resolve",
"//:node_modules/@types/semver",
"//:node_modules/@types/yargs",
"//:node_modules/@types/yarnpkg__lockfile",
"//:node_modules/@yarnpkg/lockfile",
"//:node_modules/ini",
"//:node_modules/jsonc-parser",
"//:node_modules/listr2",
"//:node_modules/npm-package-arg",
"//:node_modules/npm-pick-manifest",
"//:node_modules/pacote",
"//:node_modules/semver",
"//:node_modules/yargs",
"//packages/angular_devkit/architect:architect_rjs",
"//packages/angular_devkit/architect/node:node_rjs",
"//packages/angular_devkit/core:core_rjs",
Expand Down Expand Up @@ -140,8 +140,8 @@ ts_project(
),
deps = [
":angular-cli_rjs",
"//:root_modules/@types/semver",
"//:root_modules/@types/yargs",
"//:node_modules/@types/semver",
"//:node_modules/@types/yargs",
"//packages/angular_devkit/core:core_rjs",
"//packages/angular_devkit/schematics:schematics_rjs",
"//packages/angular_devkit/schematics/testing:testing_rjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/create/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ts_project(
data = RUNTIME_ASSETS,
module_name = "@angular/create",
deps = [
"//:root_modules/@types/node",
"//:node_modules/@types/node",
"//packages/angular/cli:angular-cli",
],
)
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/pwa/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ts_project(
data = RUNTIME_ASSETS,
module_name = "@angular/pwa",
deps = [
"//:root_modules/@types/node",
"//:root_modules/parse5-html-rewriting-stream",
"//:node_modules/@types/node",
"//:node_modules/parse5-html-rewriting-stream",
"//packages/angular_devkit/schematics:schematics_rjs",
"//packages/schematics/angular:angular_rjs",
],
Expand All @@ -50,7 +50,7 @@ ts_project(
srcs = glob(["pwa/**/*_spec.ts"]),
deps = [
":pwa_rjs",
"//:root_modules/@types/jasmine",
"//:node_modules/@types/jasmine",
"//packages/angular_devkit/schematics/testing:testing_rjs",
],
)
Expand Down
10 changes: 5 additions & 5 deletions packages/angular/ssr/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ ts_project(
source_map = True,
tsconfig = "//:build-tsconfig-angular",
deps = [
"//:root_modules/@angular/common",
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-server",
"//:root_modules/@angular/router",
"//:root_modules/tslib",
"//:node_modules/@angular/common",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-server",
"//:node_modules/@angular/router",
"//:node_modules/tslib",
"//packages/angular/ssr/third_party/beasties:beasties_dts",
],
)
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/ssr/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ ts_project(
source_map = True,
tsconfig = "//:build-tsconfig-angular",
deps = [
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-server",
"//:root_modules/@types/node",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-server",
"//:node_modules/@types/node",
"//packages/angular/ssr:ssr_rjs",
],
)
12 changes: 6 additions & 6 deletions packages/angular/ssr/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ ts_project(
include = ["**/*.ts"],
),
deps = [
"//:root_modules/@angular/common",
"//:root_modules/@angular/compiler",
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-browser",
"//:root_modules/@angular/platform-server",
"//:root_modules/@angular/router",
"//:node_modules/@angular/common",
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-browser",
"//:node_modules/@angular/platform-server",
"//:node_modules/@angular/router",
"//packages/angular/ssr:ssr_rjs",
],
)
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/ssr/test/npm_package/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ts_project(
testonly = True,
srcs = glob(["**/*.ts"]),
deps = [
"//:root_modules/@bazel/runfiles",
"//:node_modules/@bazel/runfiles",
],
)

Expand Down
4 changes: 2 additions & 2 deletions packages/angular/ssr/third_party/beasties/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ js_library(
"index.d.ts",
],
deps = [
"//:root_modules/beasties",
"//:node_modules/beasties",
],
)

Expand All @@ -19,7 +19,7 @@ js_library(
":bundled_beasties_files",
],
deps = [
"//:root_modules/beasties",
"//:node_modules/beasties",
],
)

Expand Down
Loading

0 comments on commit 62e90d0

Please sign in to comment.