build(bazel): use fine-grained npm deps (#26111) (#26488)

PR Close #26488
This commit is contained in:
Greg Magolan
2018-10-04 13:14:14 -07:00
committed by Igor Minar
parent b6c9678f21
commit 1f3331f5e6
104 changed files with 6687 additions and 1820 deletions
+6 -3
View File
@@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "npm_package")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config", "ts_library")
load("//tools:defaults.bzl", "npm_package", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config")
ts_config(
name = "tsconfig",
@@ -21,7 +21,6 @@ ts_library(
],
),
module_name = "@angular/compiler-cli",
node_modules = "@angular_deps//:node_modules",
tsconfig = ":tsconfig",
deps = [
"//packages/compiler",
@@ -32,6 +31,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/switch",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/typecheck",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types",
"@ngdeps//tsickle",
"@ngdeps//typescript",
],
)
@@ -16,6 +16,7 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-server",
"//packages/router",
"@ngdeps//reflect-metadata",
"@rxjs",
],
)
@@ -6,7 +6,11 @@ ng_module(
entry_point = "index.ts",
flat_module_out_file = "flat_module_filename",
module_name = "some_npm_module",
deps = ["//packages/core"],
node_modules = "@ngdeps//typescript:typescript__typings",
deps = [
"//packages/core",
"@ngdeps//@types",
],
)
load(":extract_flat_module_index.bzl", "extract_flat_module_index")
@@ -17,5 +17,14 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/translator",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/node",
"@ngdeps//@types/shelljs",
"@ngdeps//@types/source-map",
"@ngdeps//@types/yargs",
"@ngdeps//dependency-graph",
"@ngdeps//magic-string",
"@ngdeps//source-map",
"@ngdeps//typescript",
],
)
@@ -13,6 +13,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/mock-fs",
"@ngdeps//magic-string",
"@ngdeps//typescript",
],
)
@@ -22,5 +26,7 @@ jasmine_node_test(
deps = [
":test_lib",
"//tools/testing:node_no_angular",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
],
)
@@ -16,5 +16,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/typecheck",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)
@@ -15,6 +15,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)
@@ -11,5 +11,6 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/diagnostics",
deps = [
"//packages/compiler",
"@ngdeps//typescript",
],
)
@@ -9,4 +9,5 @@ ts_library(
"src/**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/host",
deps = ["@ngdeps//typescript"],
)
@@ -14,5 +14,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)
@@ -14,6 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)
@@ -14,5 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)
@@ -10,5 +10,6 @@ ts_library(
]),
deps = [
"//packages:types",
"@ngdeps//typescript",
],
)
@@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
///<reference types="jasmine"/>
import * as path from 'path';
import * as ts from 'typescript';
@@ -17,5 +17,6 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/translator",
"//packages/compiler-cli/src/ngtsc/typecheck",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)
@@ -11,5 +11,7 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/util",
deps = [
"//packages:types",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)
@@ -12,6 +12,7 @@ ts_library(
"//packages:types",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)
+8
View File
@@ -17,6 +17,7 @@ ts_library(
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@@ -31,6 +32,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@@ -45,6 +47,7 @@ jasmine_node_test(
"//packages/common:npm_package",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
],
)
@@ -59,6 +62,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@@ -76,6 +80,8 @@ jasmine_node_test(
":ngc_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
"@ngdeps//tsickle",
],
)
@@ -90,6 +96,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@@ -118,6 +125,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@@ -11,6 +11,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler/test:test_utils",
"@ngdeps//typescript",
],
)
@@ -12,6 +12,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)
@@ -24,6 +25,7 @@ ts_library(
":mocks",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@@ -53,6 +55,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)
@@ -83,6 +86,7 @@ ts_library(
"//packages/compiler-cli/test:test_utils",
"//packages/compiler/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)
@@ -10,6 +10,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)
@@ -10,6 +10,7 @@ ts_library(
deps = [
"//packages/compiler-cli/src/ngcc",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//@types/mock-fs",
],
)
@@ -23,5 +24,10 @@ jasmine_node_test(
deps = [
":ngcc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//@types/mock-fs",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
"@ngdeps//shelljs",
"@ngdeps//yargs",
],
)
@@ -8,6 +8,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@@ -20,5 +21,6 @@ jasmine_node_test(
deps = [
":ngtsc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//minimist",
],
)
+1 -2
View File
@@ -136,8 +136,7 @@ export function setupBazelTo(basePath: string) {
}
// Link typescript
const typescriptSource =
path.join(sources, 'angular/external/angular_deps/node_modules/typescript');
const typescriptSource = path.join(sources, 'angular/external/ngdeps/node_modules/typescript');
const typescriptDest = path.join(nodeModulesPath, 'typescript');
if (fs.existsSync(typescriptSource)) {
fs.symlinkSync(typescriptSource, typescriptDest);
@@ -12,6 +12,7 @@ ts_library(
"//packages/compiler/test:test_utils",
"//packages/core",
"//packages/platform-browser",
"@ngdeps//typescript",
],
)
@@ -28,5 +29,6 @@ jasmine_node_test(
":test_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//source-map",
],
)