Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove deps on legacy nodejs rules rollup_bundle internals #33607

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -29,7 +29,7 @@ var_4_win: &cache_key_win_fallback v5-angular-win-node-12.0-

# Cache key for the Material unit tests job. **Note** when updating the SHA in the cache keys,
# also update the SHA for the "MATERIAL_REPO_COMMIT" environment variable.
var_5: &material_unit_tests_cache_key v5-angular-material-50514b2358f394f1f6d634fa181b563b7edd738b
var_5: &material_unit_tests_cache_key v5-angular-material-bc1c454391370e75cf604f94bc2e9131e9aef94e
var_6: &material_unit_tests_cache_key_fallback v5-angular-material-

# Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and
Expand Down
2 changes: 1 addition & 1 deletion .circleci/env.sh
Expand Up @@ -84,7 +84,7 @@ setPublicVar MATERIAL_REPO_TMP_DIR "/tmp/material2"
setPublicVar MATERIAL_REPO_URL "https://github.com/angular/material2.git"
setPublicVar MATERIAL_REPO_BRANCH "master"
# **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI "config.yml".
setPublicVar MATERIAL_REPO_COMMIT "50514b2358f394f1f6d634fa181b563b7edd738b"
setPublicVar MATERIAL_REPO_COMMIT "bc1c454391370e75cf604f94bc2e9131e9aef94e"

# Source `$BASH_ENV` to make the variables available immediately.
source $BASH_ENV;
4 changes: 2 additions & 2 deletions integration/bazel/package.json
Expand Up @@ -30,11 +30,11 @@
"@bazel/typescript": "0.39.1",
"@types/jasmine": "2.8.8",
"http-server": "^0.11.1",
"rollup": "^1.21.4",
"rollup": "~1.25.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"terser": "4.3.1",
"terser": "^4.3.9",
"typescript": "3.6.4"
},
"scripts": {
Expand Down
48 changes: 24 additions & 24 deletions integration/bazel/yarn.lock
Expand Up @@ -63,29 +63,29 @@
"@angular/router@file:../../dist/packages-dist/router":
version "9.0.0-next.14"

"@bazel/bazel-darwin_x64@0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.28.1.tgz#415658785e1dbd6f7ab5c8f2b98c1c99c614e1d5"
integrity sha512-VDKWmplAfa4uCAbkIQ5nRn04MFQqtsPNuc2HkluJ8OIum773yC2dPR+OlLBKxrlBuKJYB27TtbOwOa6w/uK7aw==
"@bazel/bazel-darwin_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab"
integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA==

"@bazel/bazel-linux_x64@0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.28.1.tgz#f78006089e17660261088272a0e04fc886572e34"
integrity sha512-n4XfNxagYhejQD32V4XSxT/qzuH1l/2jxslbKSak66/uQ+wad8Ew9rjNb4JUin3xtrfFtzmxx2jpQkybZsRVGA==
"@bazel/bazel-linux_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659"
integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw==

"@bazel/bazel-win32_x64@0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.28.1.tgz#60a2819618cf7582cc35ac16c01763a5e807b414"
integrity sha512-T4xksGfKikaHS4zxnGT6r5R436mz9j2lz//L1vc5sJnaEF/1e2Gv6MLl86vfZW2Xxo6iIEi6ntSzgYxP2Blohw==
"@bazel/bazel-win32_x64@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd"
integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA==

"@bazel/bazel@file:../../node_modules/@bazel/bazel":
version "0.28.1"
version "1.0.0"
dependencies:
"@bazel/hide-bazel-files" latest
optionalDependencies:
"@bazel/bazel-darwin_x64" "0.28.1"
"@bazel/bazel-linux_x64" "0.28.1"
"@bazel/bazel-win32_x64" "0.28.1"
"@bazel/bazel-darwin_x64" "1.0.0"
"@bazel/bazel-linux_x64" "1.0.0"
"@bazel/bazel-win32_x64" "1.0.0"

"@bazel/hide-bazel-files@latest":
version "0.38.3"
Expand Down Expand Up @@ -2867,10 +2867,10 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.8.1:
dependencies:
estree-walker "^0.6.1"

rollup@^1.21.4:
version "1.26.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.0.tgz#cf40fd5e1edc4d7f3d4235a0a43f1c2be1cf294b"
integrity sha512-5HljNYn9icFvXX+Oe97qY5TWvnWhKqgGT0HGeWWqFPx7w7+Anzg7dfHMtUif7YYy6QxAgynDSwK6uxbgcrVUxw==
rollup@~1.25.0:
version "1.25.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d"
integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg==
dependencies:
"@types/estree" "*"
"@types/node" "*"
Expand Down Expand Up @@ -3296,10 +3296,10 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.3"

terser@4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65"
integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==
terser@^4.3.9:
version "4.3.9"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8"
integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -44,6 +44,7 @@
"@bazel/jasmine": "0.39.1",
"@bazel/karma": "0.39.1",
"@bazel/protractor": "0.39.1",
"@bazel/terser": "0.39.1",
"@bazel/typescript": "0.39.1",
"@microsoft/api-extractor": "^7.3.9",
"@schematics/angular": "^8.0.0-beta.15",
Expand Down Expand Up @@ -102,18 +103,17 @@
"nodejs-websocket": "^1.7.2",
"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-json": "^4.0.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup": "~1.25.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rxjs": "^6.5.3",
"selenium-webdriver": "3.5.0",
"shelljs": "^0.8.1",
"source-map": "^0.6.1",
"source-map-support": "0.5.9",
"systemjs": "0.18.10",
"terser": "4.3.3",
"tsickle": "0.37.0",
"tslib": "^1.10.0",
"tslint": "5.7.0",
Expand Down
1 change: 0 additions & 1 deletion packages/bazel/docs/BUILD.bazel
Expand Up @@ -4,7 +4,6 @@ skylark_doc(
name = "docs",
srcs = [
"//packages/bazel/src:ng_module.bzl",
"//packages/bazel/src:ng_rollup_bundle.bzl",
"//packages/bazel/src/ng_package:ng_package.bzl",
],
format = "html",
Expand Down
11 changes: 6 additions & 5 deletions packages/bazel/package.json
Expand Up @@ -33,10 +33,11 @@
"peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
"@bazel/typescript": "0.*",
"typescript": ">=3.6 <3.7"
},
"devDependencies": {

"typescript": ">=3.6 <3.7",
"rollup": ">=1.20.0",
"rollup-plugin-commonjs": ">=9.0.0",
"rollup-plugin-node-resolve": ">=4.2.0",
"rollup-plugin-sourcemaps": ">=0.4.0"
},
"repository": {
"type": "git",
Expand All @@ -47,4 +48,4 @@
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}
}
17 changes: 0 additions & 17 deletions packages/bazel/src/BUILD.bazel
Expand Up @@ -10,23 +10,6 @@ exports_files(glob(["*.bzl"]))

load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")

nodejs_binary(
name = "rollup_with_build_optimizer",
data = [
"@npm//@angular-devkit/build-optimizer",
"@npm//is-builtin-module",
"@npm//rollup",
"@npm//rollup-plugin-amd",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-json",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
],
entry_point = "@npm//:node_modules/rollup/bin/rollup",
install_source_map_support = False,
visibility = ["//visibility:public"],
)

filegroup(
name = "empty_node_modules",
srcs = [],
Expand Down
24 changes: 22 additions & 2 deletions packages/bazel/src/ng_package/BUILD.bazel
Expand Up @@ -27,9 +27,29 @@ nodejs_binary(
install_source_map_support = False,
)

exports_files(["ng_package.bzl"])
nodejs_binary(
name = "rollup_for_ng_package",
data = [
"@npm//rollup",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
],
entry_point = "@npm//:node_modules/rollup/dist/bin/rollup",
install_source_map_support = False,
)

exports_files([
"ng_package.bzl",
"rollup.config.js",
"terser_config.default.json",
])

filegroup(
name = "package_assets",
srcs = glob(["*.bzl"]) + ["BUILD.bazel"],
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
"rollup.config.js",
"terser_config.default.json",
],
)