From 0402d55e94cf21301b5203f67b44661cd2222a09 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 26 Mar 2019 20:15:02 +0100 Subject: [PATCH] build: use older rules_nodejs version with uglify (#15613) We recently updated to a more recent "rules_nodejs" version that no longer runs with `uglify`. This is problematic as we didn't update the `@angular/bazel` package. Our current version of `@angular/bazel` depends on the rollup-uglify build targets in the NodeJS Bazel repository. --- WORKSPACE | 6 ++++-- package.json | 4 ++-- yarn.lock | 17 +++++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 7bbc1055362..cd804dc40ec 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,8 +5,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Add NodeJS rules (explicitly used for sass bundle rules) http_archive( name = "build_bazel_rules_nodejs", - sha256 = "88e5e579fb9edfbd19791b8a3c6bfbe16ae3444dba4b428e5efd36856db7cf16", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.8/rules_nodejs-0.27.8.tar.gz"], + sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c", + # Temporarily locked to a version of the NodeJS rules that still comes with rollup-uglify. This + # is necessary until we update "@angular/bazel" to the latest version that uses rollup-terser. + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"], ) # Add sass rules diff --git a/package.json b/package.json index 00f16a240bc..f8d9628cd46 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "@angular/upgrade": "8.0.0-beta.9", "@bazel/ibazel": "^0.9.0", "@bazel/jasmine": "0.26.0", - "@bazel/karma": "0.27.8", - "@bazel/typescript": "0.27.8", + "@bazel/karma": "0.26.0", + "@bazel/typescript": "0.26.0", "@firebase/app-types": "^0.3.2", "@octokit/rest": "^15.9.4", "@schematics/angular": "7.3.6", diff --git a/yarn.lock b/yarn.lock index 3ae81bb733d..c9820a5e747 100644 --- a/yarn.lock +++ b/yarn.lock @@ -326,10 +326,10 @@ dependencies: jasmine "~3.3.1" -"@bazel/karma@0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.27.8.tgz#e9c4ef4190b2da3c23b01bc7b79830c3985cfb1f" - integrity sha512-H6TDIUcP+nW4dvjQeCINAyGLMnEV45maAM0HxModAe0cKfVxBpZrVKwG6ZuKChvQWY2nLDtN3C9K/GGISxP7hg== +"@bazel/karma@0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.26.0.tgz#6ad796686f5775df33a96fa5ef3df76a66aed3b2" + integrity sha512-yZv0fgAjVrfrM0ld8e+wNaPIpYCpwBzVQi2GUErsKStUZXPUUofpBwBjlYsdY1Osn5/FmAF9e6xDkk1JWn/wSg== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -343,11 +343,12 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.27.8.tgz#b9a566e4a95c0425b52961e9e899b59c7b22efcf" - integrity sha512-beApzTtgm+lKrhQf5OgPk1amGfi5PJ1DCVVWYbNsbJP/Joi+NgCrgykG55NbaJIzEc+6IQoh8y0QUVMYRt562Q== +"@bazel/typescript@0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.26.0.tgz#c06139d76c8b9d3a3ed98a721b776fedb4b11c82" + integrity sha512-dh/Y/SZzmeChsLap8FVHYl0FuaeLh/6t9WBVhm5nOgyVrqfEyVpNzy4W20E4NqnmJY2/PqmD5qncf+Oo1q9h1A== dependencies: + jasmine-core "2.8.0" protobufjs "5.0.3" semver "5.6.0" source-map-support "0.5.9"