-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: migrate
@angular/ssr
to ts_project
Migrates `@angular/ssr` to `ts_project`. Possible after various upstream fixes for `ng_package` and interop changes.
- Loading branch information
1 parent
e76800c
commit 8c94d22
Showing
16 changed files
with
126 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
load("//tools:defaults.bzl", "ts_library") | ||
load("//tools:interop.bzl", "ts_project") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
ts_library( | ||
ts_project( | ||
name = "node", | ||
srcs = glob( | ||
[ | ||
"*.ts", | ||
"src/**/*.ts", | ||
], | ||
), | ||
args = [ | ||
"--types", | ||
"node", | ||
], | ||
module_name = "@angular/ssr/node", | ||
source_map = True, | ||
tsconfig = "//:build-tsconfig-angular", | ||
deps = [ | ||
"//packages/angular/ssr", | ||
"@npm//@angular/core", | ||
"@npm//@angular/platform-server", | ||
"@npm//@types/node", | ||
"//:root_modules/@angular/core", | ||
"//:root_modules/@angular/platform-server", | ||
"//:root_modules/@types/node", | ||
"//packages/angular/ssr:ssr_rjs", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
load("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl", "spec_bundle") | ||
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") | ||
load("//tools:defaults.bzl", "ts_library") | ||
load("//tools:interop.bzl", "ts_project") | ||
|
||
ts_library( | ||
ts_project( | ||
name = "unit_test_lib", | ||
testonly = True, | ||
srcs = glob(["**/*_spec.ts"]), | ||
deps = [ | ||
"//packages/angular/ssr/node", | ||
"//packages/angular/ssr/node:node_rjs", | ||
], | ||
) | ||
|
||
# TODO: Clean this up when this repo runs ESM consistently. | ||
spec_bundle( | ||
name = "esm_tests_bundled", | ||
downlevel_async_await = False, | ||
platform = "node", | ||
run_angular_linker = False, | ||
deps = [ | ||
":unit_test_lib", | ||
], | ||
) | ||
|
||
jasmine_node_test( | ||
name = "test", | ||
deps = [ | ||
":unit_test_lib", | ||
":esm_tests_bundled", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,35 @@ | ||
load("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl", "spec_bundle") | ||
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") | ||
load("//tools:defaults.bzl", "ts_library") | ||
load("//tools:interop.bzl", "ts_project") | ||
|
||
ESM_TESTS = [ | ||
"app_spec.ts", | ||
"app-engine_spec.ts", | ||
"routes/router_spec.ts", | ||
"routes/route-tree_spec.ts", | ||
"routes/ng-routes_spec.ts", | ||
] | ||
|
||
ts_library( | ||
ts_project( | ||
name = "unit_test_lib", | ||
testonly = True, | ||
srcs = glob( | ||
include = ["**/*_spec.ts"], | ||
exclude = ESM_TESTS + ["npm_package/**"], | ||
include = ["**/*.ts"], | ||
), | ||
deps = [ | ||
"//packages/angular/ssr", | ||
], | ||
) | ||
|
||
ts_library( | ||
name = "unit_test_with_esm_deps_lib", | ||
testonly = True, | ||
srcs = ESM_TESTS + ["testing-utils.ts"], | ||
deps = [ | ||
"//packages/angular/ssr", | ||
"@npm//@angular/common", | ||
"@npm//@angular/compiler", | ||
"@npm//@angular/core", | ||
"@npm//@angular/platform-browser", | ||
"@npm//@angular/platform-server", | ||
"@npm//@angular/router", | ||
"//: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", | ||
"//packages/angular/ssr:ssr_rjs", | ||
], | ||
) | ||
|
||
spec_bundle( | ||
name = "unit_test_with_esm_deps_lib_bundled", | ||
name = "esm_tests_bundled", | ||
downlevel_async_await = False, | ||
platform = "node", | ||
run_angular_linker = False, | ||
deps = [ | ||
":unit_test_with_esm_deps_lib", | ||
":unit_test_lib", | ||
], | ||
) | ||
|
||
jasmine_node_test( | ||
name = "test", | ||
deps = [ | ||
":unit_test_lib", | ||
":unit_test_with_esm_deps_lib_bundled", | ||
], | ||
deps = [":esm_tests_bundled"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/@angular+bazel+19.0.0-next.7.patch → patches/@angular+bazel+19.1.0-next.4.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.