diff --git a/.bazelrc b/.bazelrc index cc5ff01a42b727..a57e125d93f60a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -153,5 +153,4 @@ try-import .bazelrc.user # Turn on managed directories feature in Bazel # This allows us to avoid installing a second copy of node_modules -build --experimental_allow_incremental_repository_updates -query --experimental_allow_incremental_repository_updates +common --experimental_allow_incremental_repository_updates diff --git a/WORKSPACE b/WORKSPACE index c5a46ba2ebc8ca..e2579961c2cf27 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -45,7 +45,8 @@ Try running `yarn bazel` instead. # - 0.26.0 Fix for data files in yarn_install and npm_install # - 0.27.12 Adds NodeModuleSources provider for transtive npm deps support # - 0.30.0 yarn_install now uses symlinked node_modules with new managed directories Bazel 0.26.0 feature -check_rules_nodejs_version("0.30.0") +# - 0.31.1 entry_point attribute of nodejs_binary & rollup_bundle is now a label +check_rules_nodejs_version("0.31.1") # Setup the Node.js toolchain node_repositories( @@ -66,6 +67,10 @@ yarn_install( name = "npm", package_json = "//:package.json", yarn_lock = "//:yarn.lock", + # Temporarily disable node_modules symlinking until the fix for + # https://github.com/bazelbuild/bazel/issues/8487 makes it into a + # future Bazel release + symlink_node_modules = False, ) # Install all bazel dependencies of the @npm npm packages diff --git a/integration/bazel/.bazelrc b/integration/bazel/.bazelrc index c7c31f4ca17ee0..1e2c660e9ca4a4 100644 --- a/integration/bazel/.bazelrc +++ b/integration/bazel/.bazelrc @@ -19,5 +19,4 @@ build --symlink_prefix=/ # Turn on managed directories feature in Bazel # This allows us to avoid installing a second copy of node_modules -build --experimental_allow_incremental_repository_updates -query --experimental_allow_incremental_repository_updates +common --experimental_allow_incremental_repository_updates diff --git a/integration/bazel/WORKSPACE b/integration/bazel/WORKSPACE index 447362bd5eb22f..7cf2218b1e1b47 100644 --- a/integration/bazel/WORKSPACE +++ b/integration/bazel/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch rules_nodejs so we can install our npm dependencies http_archive( name = "build_bazel_rules_nodejs", - sha256 = "abcf497e89cfc1d09132adfcd8c07526d026e162ae2cb681dcb896046417ce91", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.30.1/rules_nodejs-0.30.1.tar.gz"], + sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"], ) # Fetch sass rules for compiling sass files diff --git a/package.json b/package.json index 50706201b2c09f..888b904ca6e831 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,9 @@ "@angular-devkit/core": "^8.0.0-beta.15", "@angular-devkit/schematics": "^8.0.0-beta.15", "@angular/bazel": "file:./tools/npm/@angular_bazel", - "@bazel/jasmine": "0.30.1", - "@bazel/karma": "0.30.1", - "@bazel/typescript": "0.30.1", + "@bazel/jasmine": "0.31.1", + "@bazel/karma": "0.31.1", + "@bazel/typescript": "0.31.1", "@microsoft/api-extractor": "^7.0.21", "@schematics/angular": "^8.0.0-beta.15", "@types/angular": "^1.6.47", diff --git a/packages/bazel/package.bzl b/packages/bazel/package.bzl index 74929f02049f05..49507d7613f149 100644 --- a/packages/bazel/package.bzl +++ b/packages/bazel/package.bzl @@ -38,11 +38,12 @@ def rules_angular_dev_dependencies(): ############################################# # Dependencies for generating documentation # ############################################# + # TODO(gregmagolan): update to upstream commit once https://github.com/bazelbuild/rules_sass/pull/87 lands http_archive( name = "io_bazel_rules_sass", - sha256 = "4c87befcb17282b039ba8341df9a6cc45f461bf05776dcf35c7e40c7e79ce374", - strip_prefix = "rules_sass-3a4f31c74513ccfacce3f955b5c006352f7e9587", - url = "https://github.com/bazelbuild/rules_sass/archive/3a4f31c74513ccfacce3f955b5c006352f7e9587.zip", + sha256 = "1c20d2ddc3d42712543e3b77bceac1bfea072849602569a6fc8b107e6d520ac6", + strip_prefix = "rules_sass-d033c0f9f7a2c75b73068f6647a5b0cc5070fd90", + url = "https://github.com/gregmagolan/rules_sass/archive/d033c0f9f7a2c75b73068f6647a5b0cc5070fd90.zip", ) http_archive( diff --git a/packages/bazel/src/builders/files/WORKSPACE.template b/packages/bazel/src/builders/files/WORKSPACE.template index 5dd21b10710d60..05cd3e32eacce2 100644 --- a/packages/bazel/src/builders/files/WORKSPACE.template +++ b/packages/bazel/src/builders/files/WORKSPACE.template @@ -15,8 +15,8 @@ workspace( load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -RULES_NODEJS_VERSION = "0.30.1" -RULES_NODEJS_SHA256 = "abcf497e89cfc1d09132adfcd8c07526d026e162ae2cb681dcb896046417ce91" +RULES_NODEJS_VERSION = "0.31.1" +RULES_NODEJS_SHA256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb" http_archive( name = "build_bazel_rules_nodejs", sha256 = RULES_NODEJS_SHA256, @@ -51,6 +51,10 @@ yarn_install( name = "npm", package_json = "//:package.json", yarn_lock = "//:yarn.lock", + # Temporarily disable node_modules symlinking until the fix for + # https://github.com/bazelbuild/bazel/issues/8487 makes it into a + # future Bazel release + symlink_node_modules = False, ) load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") diff --git a/packages/bazel/src/builders/files/__dot__bazelrc.template b/packages/bazel/src/builders/files/__dot__bazelrc.template index 283d74cf6420c6..215e72a24e3af0 100644 --- a/packages/bazel/src/builders/files/__dot__bazelrc.template +++ b/packages/bazel/src/builders/files/__dot__bazelrc.template @@ -32,5 +32,4 @@ build --define=compile=legacy # Turn on managed directories feature in Bazel # This allows us to avoid installing a second copy of node_modules -build --experimental_allow_incremental_repository_updates -query --experimental_allow_incremental_repository_updates +common --experimental_allow_incremental_repository_updates diff --git a/packages/bazel/src/schematics/ng-add/index.ts b/packages/bazel/src/schematics/ng-add/index.ts index 2f4f0082a67aa5..849785cb1e91f1 100755 --- a/packages/bazel/src/schematics/ng-add/index.ts +++ b/packages/bazel/src/schematics/ng-add/index.ts @@ -50,8 +50,8 @@ function addDevDependenciesToPackageJson(options: Schema) { '@angular/bazel': angularCoreVersion, '@bazel/bazel': '^0.26.0', '@bazel/ibazel': '^0.10.2', - '@bazel/karma': '0.30.0', - '@bazel/typescript': '0.30.0', + '@bazel/karma': '0.31.1', + '@bazel/typescript': '0.31.1', }; const recorder = host.beginUpdate(packageJson); diff --git a/yarn.lock b/yarn.lock index 1debfb085b9873..00d1435bdad411 100644 --- a/yarn.lock +++ b/yarn.lock @@ -137,19 +137,19 @@ resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.9.0.tgz#fd60023acd36313d304cc2f8c2e181b88b5445cd" integrity sha512-E31cefDcdJsx/oii6p/gqKZXSVw0kEg1O73DD2McFcSvnf/p1GYWcQtVgdRQmlviBEytJkJgdX8rtThitRvcow== -"@bazel/jasmine@0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.30.1.tgz#66835814dced5fe77db136c99befff34a6584fc5" - integrity sha512-D7nahHJI15ybm3IlPEXMuZ3BOECfC71SYXjL9b+paKp3DKqj0SN4ILfvREt+s65wx6RCmBSM4SLBYz2rjfE+eQ== +"@bazel/jasmine@0.31.1": + version "0.31.1" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.31.1.tgz#da3de10760fe1e29e9fc748fabc4fcf604f4356a" + integrity sha512-heKo8qzm6DTm8eOlfL69RJJi1GLI9vJDSmBGYgol18K7oXz6JrspGWUL9/TlCYbRUUCt22kqX7f3R+QlD0KrCg== dependencies: jasmine "~3.3.1" jasmine-core "~3.3.0" v8-coverage "1.0.9" -"@bazel/karma@0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.30.1.tgz#5ef08da0abfa5b7e8536a7242a3fc60bf60ed143" - integrity sha512-nDy/Hct/XO1XY8zQeNBVBbff3F5XwRf/TTIM21VksqN0bwn6eVkAm6Pwc96eB/FQ75Xq60vib7v/K5MYjs3EGg== +"@bazel/karma@0.31.1": + version "0.31.1" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.31.1.tgz#fecbb269c7693baa29ad78179cca752fe7c09068" + integrity sha512-PUOTQOD57IjM18iM+MOe9fRUFNJ8RQMq1i1qDaPLStMS/LtJAvDcvWhypK/2wNDdmAGz7U5uLlvl827XbwIuuA== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -163,10 +163,10 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.30.1.tgz#58cf290a366418d713b29123d9c337da6500d764" - integrity sha512-tljA8Nv0of08L+I3cipJ096ni3548Qb4ZJS3bAV/pxPsEub4MB48TlASkWjQRp46oPUS3TrAes2kRQCF+kCxFg== +"@bazel/typescript@0.31.1": + version "0.31.1" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.31.1.tgz#2ccf9997d97903c51e73f82e29433fe444b8d672" + integrity sha512-jUTJjwdc4JSDMt4kIj74gGtctu8xe0YZPJuPxOIS4TdrWcn+dG9Fy7Z8bJLXhePheig1JLY7NBP6BGwrtggzPQ== dependencies: protobufjs "6.8.8" semver "5.6.0"