build: update to latest Bazel rules_typescript (#27138)
PR Close #27138
This commit is contained in:
parent
20ea5b5634
commit
81e975ad93
|
@ -13,8 +13,8 @@
|
|||
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
|
||||
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
|
||||
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"@types/jasmine": "2.8.8",
|
||||
"@types/source-map": "0.5.1",
|
||||
"protractor": "5.1.2",
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"dependencies": {
|
||||
"@angular-devkit/core": "^7.0.4",
|
||||
"@angular-devkit/schematics": "^7.0.4",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"@schematics/angular": "^7.0.4",
|
||||
"@types/chokidar": "1.7.3",
|
||||
"@types/convert-source-map": "^1.5.1",
|
||||
|
@ -90,7 +90,7 @@
|
|||
"devDependencies": {
|
||||
"@bazel/bazel": "^0.18.1",
|
||||
"@bazel/ibazel": "^0.1.1",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@types/angular": "^1.6.47",
|
||||
"@types/base64-js": "1.2.5",
|
||||
"@types/jasminewd2": "^2.0.4",
|
||||
|
|
|
@ -32,8 +32,8 @@ def rules_angular_dependencies():
|
|||
_maybe(
|
||||
http_archive,
|
||||
name = "build_bazel_rules_typescript",
|
||||
url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip",
|
||||
strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f",
|
||||
url = "https://github.com/bazelbuild/rules_typescript/archive/0.21.0.zip",
|
||||
strip_prefix = "rules_typescript-0.21.0",
|
||||
)
|
||||
|
||||
# Needed for Remote Execution
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"dependencies": {
|
||||
"@angular-devkit/core": "^7.0.4",
|
||||
"@angular-devkit/schematics": "^7.0.4",
|
||||
"@bazel/typescript": "^0.20.3",
|
||||
"@bazel/typescript": "^0.21.0",
|
||||
"@schematics/angular": "^7.0.4",
|
||||
"@types/node": "6.0.84",
|
||||
"shelljs": "0.8.2",
|
||||
|
|
|
@ -21,9 +21,6 @@ const NGC_ASSETS = /\.(css|html|ngsummary\.json)$/;
|
|||
|
||||
const BAZEL_BIN = /\b(blaze|bazel)-out\b.*?\bbin\b/;
|
||||
|
||||
// TODO(alexeagle): probably not needed, see
|
||||
// https://github.com/bazelbuild/rules_typescript/issues/28
|
||||
const ALLOW_NON_HERMETIC_READS = true;
|
||||
// Note: We compile the content of node_modules with plain ngc command line.
|
||||
const ALL_DEPS_COMPILED_WITH_BAZEL = false;
|
||||
|
||||
|
@ -58,7 +55,6 @@ export function runOneBuild(args: string[], inputs?: {[path: string]: string}):
|
|||
const compilerOpts = ng.createNgCompilerOptions(basePath, config, tsOptions);
|
||||
const tsHost = ts.createCompilerHost(compilerOpts, true);
|
||||
const {diagnostics} = compile({
|
||||
allowNonHermeticReads: ALLOW_NON_HERMETIC_READS,
|
||||
allDepsCompiledWithBazel: ALL_DEPS_COMPILED_WITH_BAZEL,
|
||||
compilerOpts,
|
||||
tsHost,
|
||||
|
@ -84,9 +80,8 @@ export function relativeToRootDirs(filePath: string, rootDirs: string[]): string
|
|||
return filePath;
|
||||
}
|
||||
|
||||
export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true, compilerOpts,
|
||||
tsHost, bazelOpts, files, inputs, expectedOuts, gatherDiagnostics}: {
|
||||
allowNonHermeticReads: boolean,
|
||||
export function compile({allDepsCompiledWithBazel = true, compilerOpts, tsHost, bazelOpts, files,
|
||||
inputs, expectedOuts, gatherDiagnostics}: {
|
||||
allDepsCompiledWithBazel?: boolean,
|
||||
compilerOpts: ng.CompilerOptions,
|
||||
tsHost: ts.CompilerHost, inputs?: {[path: string]: string},
|
||||
|
@ -104,7 +99,7 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
|||
}
|
||||
|
||||
if (inputs) {
|
||||
fileLoader = new CachedFileLoader(fileCache, allowNonHermeticReads);
|
||||
fileLoader = new CachedFileLoader(fileCache);
|
||||
// Resolve the inputs to absolute paths to match TypeScript internals
|
||||
const resolvedInputs: {[path: string]: string} = {};
|
||||
const inputKeys = Object.keys(inputs);
|
||||
|
@ -186,8 +181,7 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
|||
}
|
||||
|
||||
const bazelHost = new CompilerHost(
|
||||
files, compilerOpts, bazelOpts, tsHost, fileLoader, allowNonHermeticReads,
|
||||
generatedFileModuleResolver);
|
||||
files, compilerOpts, bazelOpts, tsHost, fileLoader, generatedFileModuleResolver);
|
||||
|
||||
// Also need to disable decorator downleveling in the BazelHost in Ivy mode.
|
||||
if (isInIvyMode) {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
"@angular/bazel": "6.1.9",
|
||||
"@angular/compiler": "6.1.9",
|
||||
"@angular/compiler-cli": "6.1.9",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"typescript": "~3.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@bazel/karma@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
|
||||
"@bazel/karma@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.21.0.tgz#c5ed4c141f44d0e7e18586ad4cff5bd54f70f3cc"
|
||||
dependencies:
|
||||
jasmine-core "2.8.0"
|
||||
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
|
||||
|
@ -40,13 +40,12 @@
|
|||
requirejs "2.3.5"
|
||||
tmp "0.0.33"
|
||||
|
||||
"@bazel/typescript@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
|
||||
"@bazel/typescript@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.21.0.tgz#41c304f77a42c6a016280d0f4c20e0749c3f4b2a"
|
||||
dependencies:
|
||||
protobufjs "5.0.3"
|
||||
source-map-support "0.5.9"
|
||||
tsickle "0.28.0"
|
||||
tsutils "2.27.2"
|
||||
|
||||
"@bazel/typescript@^0.15.0":
|
||||
|
@ -1694,7 +1693,7 @@ karma-sourcemap-loader@0.3.7:
|
|||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
karma@alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a:
|
||||
"karma@github:alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a":
|
||||
version "1.7.1"
|
||||
resolved "https://codeload.github.com/alexeagle/karma/tar.gz/fa1a84ac881485b5657cb669e9b4e5da77b79f0a"
|
||||
dependencies:
|
||||
|
@ -3017,15 +3016,6 @@ tsickle@0.25.x:
|
|||
source-map "^0.5.6"
|
||||
source-map-support "^0.4.2"
|
||||
|
||||
tsickle@0.28.0:
|
||||
version "0.28.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.28.0.tgz#6cd6fa004766c6ad9261b599c83866ee97cc7875"
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
mkdirp "^0.5.1"
|
||||
source-map "^0.6.0"
|
||||
source-map-support "^0.5.0"
|
||||
|
||||
tsickle@^0.32.1:
|
||||
version "0.32.1"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
|
||||
|
|
27
yarn.lock
27
yarn.lock
|
@ -50,10 +50,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.1.1.tgz#f970c08b4e4efb0ab17e04ade3cc610554f33bed"
|
||||
integrity sha1-+XDAi05O+wqxfgSt48xhBVTzO+0=
|
||||
|
||||
"@bazel/karma@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
|
||||
integrity sha512-IgWfTpK9XLEI977DS2kHIEO1QfFTEOBxeNDDjHtd1onmzyMCLROphTOBZ/g42ybUIWyJhS9DK4U3bLSMQE0Bng==
|
||||
"@bazel/karma@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.21.0.tgz#c5ed4c141f44d0e7e18586ad4cff5bd54f70f3cc"
|
||||
integrity sha512-V5kxijZ7j/6x7+yNxPhhPrjO0APtNrlr5Gg/I9JRy3/SE3Y88yrPNIiEApLkfYWYWGQuoJO2LifUZA8BOXwLEA==
|
||||
dependencies:
|
||||
jasmine-core "2.8.0"
|
||||
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
|
||||
|
@ -66,14 +66,13 @@
|
|||
requirejs "2.3.5"
|
||||
tmp "0.0.33"
|
||||
|
||||
"@bazel/typescript@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
|
||||
integrity sha512-BZmfzaNkgS++53CGEUk5p9FXOG+k8FNWCDbxzYljoIGP60aIkw4UgRQ24ReBwhCMg6M6KW609yje7AvDZkA6bg==
|
||||
"@bazel/typescript@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.21.0.tgz#41c304f77a42c6a016280d0f4c20e0749c3f4b2a"
|
||||
integrity sha512-ASXj0RFybmqoa3LwqkTU3gNkX9bY9wL/VDNo5hlp9pynYWl4RMpe9V3m/qDIdtSuLJ+qD+Z3FKT/OcpWQHMlYA==
|
||||
dependencies:
|
||||
protobufjs "5.0.3"
|
||||
source-map-support "0.5.9"
|
||||
tsickle "0.28.0"
|
||||
tsutils "2.27.2"
|
||||
|
||||
"@schematics/angular@^7.0.4":
|
||||
|
@ -8308,16 +8307,6 @@ trim-off-newlines@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
|
||||
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
|
||||
|
||||
tsickle@0.28.0:
|
||||
version "0.28.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.28.0.tgz#6cd6fa004766c6ad9261b599c83866ee97cc7875"
|
||||
integrity sha512-cb/Z4NlKMPGiIIbgmklfBJIxDl4EQoYqC+0/BnPxZWzWcUvikeOHFkkkEmabJVqKh47jUqOwU/uMAu6UvhicZg==
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
mkdirp "^0.5.1"
|
||||
source-map "^0.6.0"
|
||||
source-map-support "^0.5.0"
|
||||
|
||||
tsickle@0.32.1:
|
||||
version "0.32.1"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
|
||||
|
|
Loading…
Reference in New Issue