diff --git a/integration/bazel/src/package.json b/integration/bazel/src/package.json index 97a1dd63a8..cb45d19b46 100644 --- a/integration/bazel/src/package.json +++ b/integration/bazel/src/package.json @@ -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", diff --git a/package.json b/package.json index 9e1e02e858..12c1e8fb97 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/bazel/package.bzl b/packages/bazel/package.bzl index f53fddbbae..2541113801 100644 --- a/packages/bazel/package.bzl +++ b/packages/bazel/package.bzl @@ -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 diff --git a/packages/bazel/package.json b/packages/bazel/package.json index 5f2461535b..2d126fc971 100644 --- a/packages/bazel/package.json +++ b/packages/bazel/package.json @@ -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", diff --git a/packages/bazel/src/ngc-wrapped/index.ts b/packages/bazel/src/ngc-wrapped/index.ts index e1304fb91e..d875cd0bbe 100644 --- a/packages/bazel/src/ngc-wrapped/index.ts +++ b/packages/bazel/src/ngc-wrapped/index.ts @@ -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) { diff --git a/tools/npm/package.json b/tools/npm/package.json index f0587dda30..7f9af0e34b 100644 --- a/tools/npm/package.json +++ b/tools/npm/package.json @@ -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": { diff --git a/tools/npm/yarn.lock b/tools/npm/yarn.lock index 91b5f3192f..47b51e66a6 100644 --- a/tools/npm/yarn.lock +++ b/tools/npm/yarn.lock @@ -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" diff --git a/yarn.lock b/yarn.lock index b2d5a70797..4ede5d8d10 100644 --- a/yarn.lock +++ b/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"