Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Update to nodejs rules 0.31.1 and bazel 0.26.1 (#450)
Browse files Browse the repository at this point in the history
* update to upstream rules_sass commit now that bazelbuild/rules_sass#87 has landed (+2 squashed
* entry_point attributes in rules_nodejs are now labels
* includes temporary post-install patch for @angular/bazel protractor rule which will get removed once that rule is updated in angular repo
  • Loading branch information
gregmagolan authored Jun 11, 2019
1 parent f727d23 commit b97755b
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 42 deletions.
9 changes: 4 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ 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 = "bc180118b9e1c7f2b74dc76a8f798d706fe9fc53470ef9296728267b4cd29441",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.30.2/rules_nodejs-0.30.2.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
http_archive(
name = "io_bazel_rules_sass",
sha256 = "4c87befcb17282b039ba8341df9a6cc45f461bf05776dcf35c7e40c7e79ce374",
strip_prefix = "rules_sass-3a4f31c74513ccfacce3f955b5c006352f7e9587",
url = "https://github.com/bazelbuild/rules_sass/archive/3a4f31c74513ccfacce3f955b5c006352f7e9587.zip",
strip_prefix = "rules_sass-9a00e557c32ac0f26e5d3c66d1d17316874027b3",
url = "https://github.com/bazelbuild/rules_sass/archive/9a00e557c32ac0f26e5d3c66d1d17316874027b3.zip",
)

# Check the bazel version and download npm dependencies
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@
"@angular/cli": "8.0.1",
"@angular/compiler": "8.0.0",
"@angular/compiler-cli": "8.0.0",
"@bazel/bazel": "^0.26.0-rc13",
"@bazel/bazel": "^0.26.1",
"@bazel/benchmark-runner": "0.1.0",
"@bazel/buildifier": "0.25.1",
"@bazel/ibazel": "0.10.3",
"@bazel/karma": "~0.30.0",
"@bazel/typescript": "~0.30.0",
"@bazel/karma": "~0.31.1",
"@bazel/typescript": "~0.31.1",
"@types/jasmine": "3.3.13",
"@types/node": "6.14.6",
"clang-format": "1.2.4",
"core-js": "2.6.8",
"firebase-tools": "6.11.0",
"husky": "0.14.3",
"protractor": "6.0.0",
"shelljs": "0.8.3",
"ts-morph": "2.1.2",
"typescript": "3.4.5"
},
Expand All @@ -53,7 +54,7 @@
"e2e": "bazel test //e2e:all",
"test": "bazel test //src/...",
"benchmark": "ibazel-benchmark-runner //src:devserver src/app/hello-world/hello-world.component.ts --url=http://localhost:5432",
"postinstall": "ngc -p angular-metadata.tsconfig.json",
"postinstall": "ngc -p angular-metadata.tsconfig.json && node --preserve-symlinks --preserve-symlinks-main ./postinstall-patches.js",
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
"bazel:lint": "yarn bazel:format --lint=warn",
"bazel:lint-fix": "yarn bazel:format --lint=fix",
Expand Down
12 changes: 12 additions & 0 deletions postinstall-patches.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const {set, sed} = require('shelljs');
const log = console.log;

// fail on first error
set('-e');
// print commands as being executed
set('-v');

log('\n# patch: @angular/bazel for new entry_point labels');
sed('-i', 'entry_point = \"protractor/bin/protractor\"',
'entry_point = \"@npm//node_modules/protractor:bin/protractor\"',
'node_modules/@angular/bazel/src/protractor/protractor_web_test.bzl');
4 changes: 2 additions & 2 deletions src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ rollup_bundle(
"src/app/hello-world/hello-world.module.ngfactory",
"src/app/todos/todos.module.ngfactory",
] + GENERATED_FEATURES,
entry_point = "src/main.prod",
entry_point = ":main.prod.ts",
deps = [
"//src",
"@npm//@angular/common",
Expand Down Expand Up @@ -210,7 +210,7 @@ history_server(
nodejs_image(
name = "nodejs_image",
data = [":prodapp"],
entry_point = "history-server/modules/cli.js",
entry_point = "@history-server_runtime_deps//node_modules/history-server:modules/cli.js",
node_modules = "@history-server_runtime_deps//:node_modules",
# Actions created by this rule are I/O-bound,
# so there is no benefit to running them remotely
Expand Down
62 changes: 31 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,29 @@
dependencies:
tslib "^1.9.0"

"@bazel/[email protected].0-rc13":
version "0.26.0-rc13"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.0-rc13.tgz#b580f470e2e221a3dd0e449c2b652ebfda661644"
integrity sha512-I1TvJuD49UtiE8yt8vRcejvG/ISX09MdFTXRIhHKnB+soRZF2zbUtqs0H4ugMK2fzb80T/QK3QmXbjSfcZbx2w==

"@bazel/[email protected].0-rc13":
version "0.26.0-rc13"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.0-rc13.tgz#2b794b23b8954fe08b3c5f8a8b50c69e26ac08aa"
integrity sha512-VIyJMR18ItGZFwMSRxYU+5bTohsn45yfrpjFdVP+aVcIl2c4KuPAyM4dTKwjGUUeDDGUDMb809PjyTgsRe5x3w==

"@bazel/[email protected].0-rc13":
version "0.26.0-rc13"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.0-rc13.tgz#fe862c700c35a41d43ee3223f8dbe5f735395e68"
integrity sha512-8nAntbZTFp9xv504L5u4aLMKgkq2rhgqW+fJwcNmVz9Wg3cKVMxl+G49cYzImGxqrv9MFLe3lD1ldBYdoEvNqg==

"@bazel/bazel@^0.26.0-rc13":
version "0.26.0-rc13"
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.26.0-rc13.tgz#42060745c43f1f5b84d1b46be112f3caf8b49710"
integrity sha512-V+z0ybU+aXHoXSKK0Z1kq/6QLct+NAMFH21FFxwEaEKvAd4RT2N2+FCBJh4BNjWH62ONRI33znRxy9avabuenQ==
"@bazel/[email protected].1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.1.tgz#1b5c69b635e5c2a8c3090fa5f6bcb45735f06045"
integrity sha512-9VjrR+ce+iS9xS1lgeAo1RAPXlxCvez/r3smN1lP4s4YNF0s5LAT0cevIl6Zz2nwyEha/6JvY3v6Euemy36F0w==

"@bazel/[email protected].1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.1.tgz#04dd194bdcd6b9d45bd865a9a60c280d0d600251"
integrity sha512-oZooDxI1C4p7o18zx2Uns2cK/NN2hgF2YSBKH0aVDPAAxQA85h+g124CWDEbsghOdRMSBM0Hd0SSeIqwZcqLSw==

"@bazel/[email protected].1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.1.tgz#9351f07313173b1f98006da8131c94db7aa7c506"
integrity sha512-0FkOo8+bxw13X2m6ALhXX2241gG9ZXgcLu0E/IbCWy/TmOB5bR0Z73CslszWbXIldVYnANuhFmnkxIa745Du5Q==

"@bazel/bazel@^0.26.1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.26.1.tgz#de5febbd1f4b457aa870fb69492f474850283e5d"
integrity sha512-x0IR0KEML4JGG6QpAOpHQHWpMqM1YQjOi8zY1jjLwiRHhC3Y8Tc/Mcspnd6zUnjfs7MerPfppkyx2jaEnZwUuQ==
optionalDependencies:
"@bazel/bazel-darwin_x64" "0.26.0-rc13"
"@bazel/bazel-linux_x64" "0.26.0-rc13"
"@bazel/bazel-win32_x64" "0.26.0-rc13"
"@bazel/bazel-darwin_x64" "0.26.1"
"@bazel/bazel-linux_x64" "0.26.1"
"@bazel/bazel-win32_x64" "0.26.1"

"@bazel/[email protected]":
version "0.1.0"
Expand Down Expand Up @@ -270,10 +270,10 @@
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.3.1.tgz#5f02f208f138e581bbdb1534d5c013d7a0ac9799"
integrity sha1-XwLyCPE45YG72xU01cAT16Csl5k=

"@bazel/karma@~0.30.0":
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"
Expand All @@ -287,10 +287,10 @@
semver "5.6.0"
tmp "0.0.33"

"@bazel/typescript@~0.30.0":
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"
Expand Down Expand Up @@ -5127,7 +5127,7 @@ [email protected]:
interpret "^1.0.0"
rechoir "^0.6.2"

shelljs@^0.8.1:
shelljs@0.8.3, shelljs@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
Expand Down

0 comments on commit b97755b

Please sign in to comment.