mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
49672c437b
Preserve NgClass import on partial migration and increment skippedNgClassCount when an unmigrable mixed binding is encountered.
210 lines
7.6 KiB
Python
210 lines
7.6 KiB
Python
load("@aspect_rules_js//js:defs.bzl", "js_library")
|
|
load("@npm//:rollup/package_json.bzl", rollup = "bin")
|
|
load("//tools:defaults.bzl", "npm_package", "ts_config")
|
|
|
|
exports_files([
|
|
"tsconfig.json",
|
|
"migrations.json",
|
|
"collection.json",
|
|
])
|
|
|
|
js_library(
|
|
name = "schematics_jsons",
|
|
srcs = [
|
|
"collection.json",
|
|
"migrations.json",
|
|
"tsconfig.json",
|
|
],
|
|
visibility = ["//packages/core/schematics:__subpackages__"],
|
|
)
|
|
|
|
ts_config(
|
|
name = "tsconfig_build",
|
|
src = "tsconfig.json",
|
|
visibility = ["//packages/core/schematics:__subpackages__"],
|
|
deps = [
|
|
"//:node_modules/@types/node",
|
|
],
|
|
)
|
|
|
|
ts_config(
|
|
name = "tsconfig_test",
|
|
src = "tsconfig-test.json",
|
|
visibility = ["//packages/core/schematics:__subpackages__"],
|
|
deps = [
|
|
":tsconfig_build",
|
|
"//:node_modules/@types/jasmine",
|
|
],
|
|
)
|
|
|
|
npm_package(
|
|
srcs = [
|
|
"collection.json",
|
|
"migrations.json",
|
|
":bundles",
|
|
"//packages/core/schematics/ng-generate/cleanup-unused-imports:static_files",
|
|
"//packages/core/schematics/ng-generate/common-to-standalone-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/control-flow-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/inject-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/ngclass-to-class-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/ngstyle-to-style-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/output-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/route-lazy-loading:static_files",
|
|
"//packages/core/schematics/ng-generate/router-testing-module-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/self-closing-tags-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/service-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/signal-input-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/signal-queries-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/signals:static_files",
|
|
"//packages/core/schematics/ng-generate/standalone-migration:static_files",
|
|
],
|
|
visibility = ["//packages/core:__pkg__"],
|
|
)
|
|
|
|
bundle_entrypoints = [
|
|
[
|
|
"inject-migration",
|
|
"packages/core/schematics/ng-generate/inject-migration/index.js",
|
|
],
|
|
[
|
|
"route-lazy-loading",
|
|
"packages/core/schematics/ng-generate/route-lazy-loading/index.js",
|
|
],
|
|
[
|
|
"standalone-migration",
|
|
"packages/core/schematics/ng-generate/standalone-migration/index.js",
|
|
],
|
|
[
|
|
"cleanup-unused-imports",
|
|
"packages/core/schematics/ng-generate/cleanup-unused-imports/index.js",
|
|
],
|
|
[
|
|
"signals",
|
|
"packages/core/schematics/ng-generate/signals/index.js",
|
|
],
|
|
[
|
|
"signal-input-migration",
|
|
"packages/core/schematics/ng-generate/signal-input-migration/index.js",
|
|
],
|
|
[
|
|
"signal-queries-migration",
|
|
"packages/core/schematics/ng-generate/signal-queries-migration/index.js",
|
|
],
|
|
[
|
|
"output-migration",
|
|
"packages/core/schematics/ng-generate/output-migration/index.js",
|
|
],
|
|
[
|
|
"self-closing-tags-migration",
|
|
"packages/core/schematics/ng-generate/self-closing-tags-migration/index.js",
|
|
],
|
|
[
|
|
"service-migration",
|
|
"packages/core/schematics/ng-generate/service-migration/index.js",
|
|
],
|
|
[
|
|
"common-to-standalone-migration",
|
|
"packages/core/schematics/ng-generate/common-to-standalone-migration/index.js",
|
|
],
|
|
[
|
|
"change-detection-eager",
|
|
"packages/core/schematics/migrations/change-detection-eager/index.js",
|
|
],
|
|
[
|
|
"control-flow-migration",
|
|
"packages/core/schematics/ng-generate/control-flow-migration/index.js",
|
|
],
|
|
[
|
|
"ngclass-to-class-migration",
|
|
"packages/core/schematics/ng-generate/ngclass-to-class-migration/index.js",
|
|
],
|
|
[
|
|
"ngstyle-to-style-migration",
|
|
"packages/core/schematics/ng-generate/ngstyle-to-style-migration/index.js",
|
|
],
|
|
[
|
|
"router-testing-module-migration",
|
|
"packages/core/schematics/ng-generate/router-testing-module-migration/index.js",
|
|
],
|
|
[
|
|
"http-xhr-backend",
|
|
"packages/core/schematics/migrations/http-xhr-backend/index.js",
|
|
],
|
|
[
|
|
"strict-templates-default",
|
|
"packages/core/schematics/migrations/strict-templates-default/index.js",
|
|
],
|
|
[
|
|
"can-match-snapshot-required",
|
|
"packages/core/schematics/migrations/can-match-snapshot-required/index.js",
|
|
],
|
|
[
|
|
"incremental-hydration",
|
|
"packages/core/schematics/migrations/incremental-hydration/index.js",
|
|
],
|
|
[
|
|
"strict-safe-navigation-narrow",
|
|
"packages/core/schematics/migrations/strict-safe-navigation-narrow/index.js",
|
|
],
|
|
[
|
|
"model-output",
|
|
"packages/core/schematics/migrations/model-output/index.js",
|
|
],
|
|
[
|
|
"safe-optional-chaining",
|
|
"packages/core/schematics/migrations/safe-optional-chaining/index.js",
|
|
],
|
|
]
|
|
|
|
rollup.rollup(
|
|
name = "bundles",
|
|
srcs = [
|
|
"rollup.config.js",
|
|
"//:node_modules/@rollup/plugin-commonjs",
|
|
"//:node_modules/@rollup/plugin-node-resolve",
|
|
"//:node_modules/magic-string",
|
|
"//:node_modules/semver",
|
|
"//packages/core/schematics:tsconfig_build",
|
|
"//packages/core/schematics/migrations/can-match-snapshot-required",
|
|
"//packages/core/schematics/migrations/change-detection-eager",
|
|
"//packages/core/schematics/migrations/http-xhr-backend",
|
|
"//packages/core/schematics/migrations/incremental-hydration",
|
|
"//packages/core/schematics/migrations/model-output",
|
|
"//packages/core/schematics/migrations/safe-optional-chaining",
|
|
"//packages/core/schematics/migrations/strict-safe-navigation-narrow",
|
|
"//packages/core/schematics/migrations/strict-templates-default",
|
|
"//packages/core/schematics/ng-generate/cleanup-unused-imports",
|
|
"//packages/core/schematics/ng-generate/common-to-standalone-migration",
|
|
"//packages/core/schematics/ng-generate/control-flow-migration",
|
|
"//packages/core/schematics/ng-generate/inject-migration",
|
|
"//packages/core/schematics/ng-generate/ngclass-to-class-migration",
|
|
"//packages/core/schematics/ng-generate/ngstyle-to-style-migration",
|
|
"//packages/core/schematics/ng-generate/output-migration",
|
|
"//packages/core/schematics/ng-generate/route-lazy-loading",
|
|
"//packages/core/schematics/ng-generate/router-testing-module-migration",
|
|
"//packages/core/schematics/ng-generate/self-closing-tags-migration",
|
|
"//packages/core/schematics/ng-generate/service-migration",
|
|
"//packages/core/schematics/ng-generate/signal-input-migration",
|
|
"//packages/core/schematics/ng-generate/signal-queries-migration",
|
|
"//packages/core/schematics/ng-generate/signals",
|
|
"//packages/core/schematics/ng-generate/standalone-migration",
|
|
"//tools/bazel/rollup:path-plugin",
|
|
],
|
|
args = [
|
|
"--format=cjs",
|
|
"--config=$(rootpath rollup.config.js)",
|
|
"--dir=packages/core/schematics/bundles",
|
|
"--no-sourcemap",
|
|
] + ["--input=%s=%s" % (name, path) for [
|
|
name,
|
|
path,
|
|
] in bundle_entrypoints],
|
|
out_dirs = [
|
|
"bundles",
|
|
],
|
|
visibility = [
|
|
"//packages/core/schematics/ng-generate/ngclass-to-class-migration:__pkg__",
|
|
"//packages/core/schematics/test:__pkg__",
|
|
],
|
|
)
|