Skip to content

Commit

Permalink
build(bazel): update to nodejs rules 0.27.8 (angular#29508)
Browse files Browse the repository at this point in the history
* fixes prodmode issue in integration/bazel

BREAKING CHANGE:

@bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json

PR Close angular#29508
  • Loading branch information
gregmagolan authored and wKoza committed Apr 17, 2019
1 parent 990b1de commit 7a3425a
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 33 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,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 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
sha256 = "88e5e579fb9edfbd19791b8a3c6bfbe16ae3444dba4b428e5efd36856db7cf16",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.8/rules_nodejs-0.27.8.tar.gz"],
)

# Check the bazel version and download npm dependencies
Expand Down
4 changes: 2 additions & 2 deletions integration/bazel/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,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 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
sha256 = "88e5e579fb9edfbd19791b8a3c6bfbe16ae3444dba4b428e5efd36856db7cf16",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.8/rules_nodejs-0.27.8.tar.gz"],
)

# Fetch sass rules for compiling sass files
Expand Down
5 changes: 4 additions & 1 deletion integration/bazel/angular-metadata.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
],
"experimentalDecorators": true,
"types": [],
"module": "umd",
"module": "amd",
"moduleResolution": "node"
},
"angularCompilerOptions": {
"enableSummariesForJit": true
},
"include": [
"node_modules/@angular/**/*"
],
Expand Down
3 changes: 2 additions & 1 deletion integration/bazel/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"@angular/bazel": "packages-dist:bazel",
"@angular/compiler": "packages-dist:compiler",
"@angular/compiler-cli": "packages-dist:compiler-cli",
"@bazel/karma": "0.27.7",
"@bazel/karma": "0.27.8",
"@bazel/typescript": "0.27.8",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",
Expand Down
3 changes: 0 additions & 3 deletions integration/bazel/test/e2e/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,5 @@ protractor_web_test_suite(
],
on_prepare = ":ts_on_prepare",
server = "//src:prodserver",
# TODO(kyliau): Re-enable once we figure out why rollup complains about
# "Dynamic requires are not currently supported by rollup-plugin-commonjs"
tags = ["manual"],
deps = [":e2e"],
)
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@angular-devkit/schematics": "^7.3.2",
"@angular/bazel": "file:./tools/npm/@angular_bazel",
"@bazel/jasmine": "0.26.0",
"@bazel/karma": "0.27.7",
"@bazel/typescript": "0.27.7",
"@bazel/karma": "0.27.8",
"@bazel/typescript": "0.27.8",
"@microsoft/api-extractor": "^7.0.21",
"@schematics/angular": "^7.3.5",
"@types/angular": "^1.6.47",
Expand Down Expand Up @@ -86,6 +86,7 @@
"protractor": "^5.4.2",
"reflect-metadata": "^0.1.3",
"rollup": "^1.1.0",
"rollup-plugin-amd": "^3.0.0",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bazel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@angular-devkit/architect": "^0.13.4",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/typescript": "^0.27.7",
"@microsoft/api-extractor": "^7.0.21",
"@schematics/angular": "^7.3.5",
"@types/node": "6.0.84",
Expand All @@ -32,6 +31,7 @@
},
"peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
"@bazel/typescript": "^0.27.8",
"typescript": ">=3.3.3333 <3.4"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/bazel/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ nodejs_binary(
"@npm//@angular-devkit/build-optimizer",
"@npm//is-builtin-module",
"@npm//rollup",
"@npm//rollup-plugin-amd",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
Expand Down
4 changes: 2 additions & 2 deletions packages/bazel/src/builders/files/WORKSPACE.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ workspace(name = "project")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

RULES_NODEJS_VERSION = "0.27.7"
RULES_NODEJS_SHA256 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51"
RULES_NODEJS_VERSION = "0.27.8"
RULES_NODEJS_SHA256 = "88e5e579fb9edfbd19791b8a3c6bfbe16ae3444dba4b428e5efd36856db7cf16"
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = RULES_NODEJS_SHA256,
Expand Down
3 changes: 2 additions & 1 deletion packages/bazel/src/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function addDevDependenciesToPackageJson(options: Schema) {
'@angular/bazel': angularCoreVersion,
'@bazel/bazel': '^0.23.0',
'@bazel/ibazel': '^0.9.0',
'@bazel/karma': '^0.27.7',
'@bazel/karma': '^0.27.8',
'@bazel/typescript': '^0.27.8',
};

const recorder = host.beginUpdate(packageJson);
Expand Down
Loading

0 comments on commit 7a3425a

Please sign in to comment.