build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#29063)

* removed /tools/http_server and uses http_server from rules_nodejs
* updated bazel schematics to use angular bundles

PR Close #29063
This commit is contained in:
Greg Magolan 2019-02-20 09:54:42 -08:00 committed by Kara Erickson
parent 2edb87e7f8
commit ea495d958f
222 changed files with 1238 additions and 1300 deletions

View File

@ -10,10 +10,10 @@ filegroup(
name = "web_test_bootstrap_scripts",
# do not sort
srcs = [
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/zone.js:dist/zone-testing.js",
"@ngdeps//node_modules/zone.js:dist/task-tracking.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/zone.js:dist/zone-testing.js",
"@npm//node_modules/zone.js:dist/task-tracking.js",
"//:test-events.js",
],
)
@ -23,32 +23,14 @@ filegroup(
srcs = [
# We also declare the unminfied AngularJS files since these can be used for
# local debugging (e.g. see: packages/upgrade/test/common/test_helpers.ts)
"@ngdeps//node_modules/angular:angular.js",
"@ngdeps//node_modules/angular:angular.min.js",
"@ngdeps//node_modules/angular-1.5:angular.js",
"@ngdeps//node_modules/angular-1.5:angular.min.js",
"@ngdeps//node_modules/angular-1.6:angular.js",
"@ngdeps//node_modules/angular-1.6:angular.min.js",
"@ngdeps//node_modules/angular-mocks:angular-mocks.js",
"@ngdeps//node_modules/angular-mocks-1.5:angular-mocks.js",
"@ngdeps//node_modules/angular-mocks-1.6:angular-mocks.js",
"@npm//node_modules/angular:angular.js",
"@npm//node_modules/angular:angular.min.js",
"@npm//node_modules/angular-1.5:angular.js",
"@npm//node_modules/angular-1.5:angular.min.js",
"@npm//node_modules/angular-1.6:angular.js",
"@npm//node_modules/angular-1.6:angular.min.js",
"@npm//node_modules/angular-mocks:angular-mocks.js",
"@npm//node_modules/angular-mocks-1.5:angular-mocks.js",
"@npm//node_modules/angular-mocks-1.6:angular-mocks.js",
],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
# A nodejs_binary for @angular/bazel/ngc-wrapped to use by default in
# ng_module that depends on @npm//@angular/bazel instead of the
# output of the //packages/bazel/src/ngc-wrapped ts_library rule. This
# default is for downstream users that depend on the @angular/bazel npm
# package. The generated @npm//@angular/bazel/ngc-wrapped target
# does not work because it does not have the node `--expose-gc` flag
# set which is required to support the call to `global.gc()`.
nodejs_binary(
name = "@angular/bazel/ngc-wrapped",
configuration_env_vars = ["compile"],
data = ["@npm//@angular/bazel"],
entry_point = "@angular/bazel/src/ngc-wrapped/index.js",
install_source_map_support = False,
templated_args = ["--node_options=--expose-gc"],
)

View File

@ -15,22 +15,13 @@ 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 = "1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.6/rules_nodejs-0.18.6.tar.gz"],
)
# Use a mock @npm repository while we are building angular from source
# downstream. Angular will get its npm dependencies with in @ngdeps which
# is setup in ng_setup_workspace().
# TODO(gregmagolan): remove @ngdeps once angular is no longer build from source
# downstream and have build use @npm for npm dependencies
local_repository(
name = "npm",
path = "tools/npm_workspace",
sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
)
# Check the bazel version and download npm dependencies
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
load("@build_bazel_rules_nodejs//:package.bzl", "check_rules_nodejs_version")
# Bazel version must be at least v0.21.0 because:
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
@ -46,6 +37,13 @@ Try running `yarn bazel` instead.
minimum_bazel_version = "0.21.0",
)
# The NodeJS rules version must be at least v0.15.3 because:
# - 0.15.2 Re-introduced the prod_only attribute on yarn_install
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
# - 0.16.8 Supports npm installed bazel workspaces
# - 0.26.0 Fix for data files in yarn_install and npm_install
check_rules_nodejs_version("0.26.0")
# Setup the Node.js toolchain
node_repositories(
node_version = "10.9.0",
@ -54,13 +52,28 @@ node_repositories(
yarn_version = "1.12.1",
)
# Setup the angular toolchain which installs npm dependencies into @ngdeps
load("//tools:ng_setup_workspace.bzl", "ng_setup_workspace")
yarn_install(
name = "npm",
data = [
"//:tools/npm/@angular_bazel/index.js",
"//:tools/npm/@angular_bazel/package.json",
"//:tools/postinstall-patches.js",
"//:tools/yarn/check-yarn.js",
],
package_json = "//:package.json",
# Don't install devDependencies, they are large and not used under Bazel
prod_only = True,
yarn_lock = "//:yarn.lock",
)
ng_setup_workspace()
yarn_install(
name = "ts-api-guardian_deps",
package_json = "@angular//tools/ts-api-guardian:package.json",
yarn_lock = "@angular//tools/ts-api-guardian:yarn.lock",
)
# Install all bazel dependencies of the @ngdeps npm packages
load("@ngdeps//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
# Install all bazel dependencies of the @npm npm packages
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()
@ -86,7 +99,7 @@ load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories")
browser_repositories()
# Setup the rules_typescript tooolchain
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()

View File

@ -1,28 +0,0 @@
# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
""" Public API surface is re-exported here.
This API is exported for users building angular from source in downstream
projects. The rules from packages/bazel are re-exported here as well
as the ng_setup_workspace repository rule needed when building angular
from source downstream. Alternately, this API is available from the
@angular/bazel npm package if the npm distribution of angular is
used in a downstream project.
"""
load(
"//packages/bazel:index.bzl",
_ng_module = "ng_module",
_ng_package = "ng_package",
_protractor_web_test = "protractor_web_test",
_protractor_web_test_suite = "protractor_web_test_suite",
)
load("//tools:ng_setup_workspace.bzl", _ng_setup_workspace = "ng_setup_workspace")
ng_module = _ng_module
ng_package = _ng_package
protractor_web_test = _protractor_web_test
protractor_web_test_suite = _protractor_web_test_suite
ng_setup_workspace = _ng_setup_workspace

View File

@ -1,53 +0,0 @@
{
"name": "demo",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "file:../angular/dist/packages-dist/animations",
"@angular/common": "file:../angular/dist/packages-dist/common",
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
"@angular/core": "file:../angular/dist/packages-dist/core",
"@angular/forms": "file:../angular/dist/packages-dist/forms",
"@angular/platform-browser": "file:../angular/dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../angular/dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../angular/dist/packages-dist/router",
"core-js": "^2.5.4",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
"@angular/cli": "~7.2.1",
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../angular/dist/packages-dist/language-service",
"@bazel/bazel": "^0.23.0",
"@bazel/ibazel": "^0.9.0",
"@bazel/karma": "^0.25.1",
"@bazel/typescript": "^0.25.1",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}

View File

@ -1,46 +0,0 @@
// TODO(kyliau): This file should be removed when we use Angular npm distro from
// Bazel projects.
const fs = require('fs');
function replaceAngular(content) {
const regex = /ANGULAR_VERSION.*\nhttp_archive\((.*\n){4}\)/;
if (!regex.test(content)) {
throw new Error("Failed to find http_archive rule for Angular in WORKSPACE");
}
return content.replace(regex, `
local_repository(
name = "angular",
path = "../../..",
)`);
}
function replaceNpm(content) {
const regex = /yarn_install\((.*\n){4}\)/;
if (!regex.test(content)) {
throw new Error("Failed to find yarn_install rule for Angular in WORKSPACE");
}
return content.replace(regex, `
yarn_install(
name = "npm",
# Need a reference to @angular here so that Bazel sets up the
# external repository before calling yarn_install
data = ["@angular//:LICENSE"],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)`);
}
function main(argv) {
argv = argv.slice(2);
if (argv.length !== 1) {
throw new Error('Expect WORKSPACE to be first parameter');
}
const workspace = argv[0];
let content = fs.readFileSync(workspace, 'utf-8');
content = replaceAngular(content);
content = replaceNpm(content);
fs.writeFileSync(workspace, content);
}
main(process.argv)

View File

@ -2,17 +2,32 @@
set -eux -o pipefail
function installLocalPackages() {
# Install Angular packages that are built locally from HEAD.
# This also gets around the bug whereby yarn caches local `file://` urls.
# See https://github.com/yarnpkg/yarn/issues/2165
readonly pwd=$(pwd)
readonly packages=(
animations common compiler core forms platform-browser
platform-browser-dynamic router bazel compiler-cli language-service upgrade
)
local local_packages=()
for package in "${packages[@]}"; do
local_packages+=("@angular/${package}@file:${pwd}/../../../dist/packages-dist/${package}")
done
yarn add "${local_packages[@]}"
}
function testBazel() {
# Set up
bazel version
ng version
rm -rf demo
# Create project
ng new demo --collection=@angular/bazel --defaults --skip-git --style=scss
node replace_angular_repo.js "./demo/WORKSPACE"
ng new demo --collection=@angular/bazel --defaults --skip-git --skip-install --style=scss
cd demo
yarn add @angular/bazel@file:../../../dist/packages-dist/bazel
yarn webdriver-manager update --gecko=false --standalone=false $CI_CHROMEDRIVER_VERSION_ARG
cp ../package.json.replace ./package.json
installLocalPackages
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
ng generate component widget --style=css
ng build
ng test

View File

@ -68,12 +68,12 @@
rxjs "6.3.3"
"@angular/bazel@file:../../dist/packages-dist/bazel":
version "0.0.0"
version "7.2.7"
dependencies:
"@angular-devkit/architect" "^0.10.6"
"@angular-devkit/core" "^7.0.4"
"@angular-devkit/schematics" "^7.3.0-rc.0"
"@microsoft/api-extractor" "^7.0.17"
"@bazel/typescript" "^0.26.0"
"@schematics/angular" "^7.0.4"
"@types/node" "6.0.84"
semver "^5.6.0"
@ -119,50 +119,16 @@
"@bazel/bazel-linux_x64" "0.23.0"
"@bazel/bazel-win32_x64" "0.23.0"
"@microsoft/api-extractor@^7.0.17":
version "7.0.21"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.0.21.tgz#d5ff9bba4ff7283503aac83ad489b16cad293fc7"
integrity sha512-7lFcHNykVz0tvgOz9juXqP+a1j0EmnJ9J080CBE/171IxL4fBrpslPhqN86dNuavuPragRpBLc8Okv/bV7FJPQ==
"@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:
"@microsoft/node-core-library" "3.12.0"
"@microsoft/ts-command-line" "4.2.3"
"@microsoft/tsdoc" "0.12.5"
"@types/node" "8.5.8"
"@types/z-schema" "3.16.31"
colors "~1.2.1"
lodash "~4.17.5"
resolve "1.8.1"
typescript "~3.1.6"
z-schema "~3.18.3"
"@microsoft/node-core-library@3.12.0":
version "3.12.0"
resolved "https://registry.yarnpkg.com/@microsoft/node-core-library/-/node-core-library-3.12.0.tgz#f9c27b8bb6b55d60b91d4e1962f42b03b9f8f47f"
integrity sha512-9T2dEXmmxZqnqcpHuIB8mTAOM/DNSi/QcAwKYDjvZvkd+PGT5lCUXjM9GL7SaR2NPa3UrWDGgFhNoqLqLfEPbw==
dependencies:
"@types/fs-extra" "5.0.4"
"@types/jju" "~1.4.0"
"@types/node" "8.5.8"
"@types/z-schema" "3.16.31"
colors "~1.2.1"
fs-extra "~7.0.1"
jju "~1.4.0"
z-schema "~3.18.3"
"@microsoft/ts-command-line@4.2.3":
version "4.2.3"
resolved "https://registry.yarnpkg.com/@microsoft/ts-command-line/-/ts-command-line-4.2.3.tgz#20d6a1684148b9fc0df25ee7335c3bb227d47d4f"
integrity sha512-SIs4q7RcG7efBbh5Ffrf6V4jVLxWihD4NDRY3+gPiOG8CYawBzE22tTEloZ1yj/FBvBZQkQ0GYwXoPhn6ElYXA==
dependencies:
"@types/argparse" "1.0.33"
"@types/node" "8.5.8"
argparse "~1.0.9"
colors "~1.2.1"
"@microsoft/tsdoc@0.12.5":
version "0.12.5"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.5.tgz#c448a38902ccb5601c1b2ef3b1a105012ef7712c"
integrity sha512-xEAyvLXo4Cter/b0EMCWUZTgXOfLOPJ/Xr52WdjVclPx9eDmNTGFtZl8Pn/nqSnZsQBNcHL0eHk/YyRyyXXpiQ==
jasmine-core "2.8.0"
protobufjs "5.0.3"
semver "5.6.0"
source-map-support "0.5.9"
tsutils "2.27.2"
"@schematics/angular@7.3.0-rc.0":
version "7.3.0-rc.0"
@ -196,43 +162,11 @@
semver "5.6.0"
semver-intersect "1.4.0"
"@types/argparse@1.0.33":
version "1.0.33"
resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.33.tgz#2728669427cdd74a99e53c9f457ca2866a37c52d"
integrity sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ==
"@types/fs-extra@5.0.4":
version "5.0.4"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599"
integrity sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g==
dependencies:
"@types/node" "*"
"@types/jju@~1.4.0":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@types/jju/-/jju-1.4.1.tgz#0a39f5f8e84fec46150a7b9ca985c3f89ad98e9f"
integrity sha512-LFt+YA7Lv2IZROMwokZKiPNORAV5N3huMs3IKnzlE430HWhWYZ8b+78HiwJXJJP1V2IEjinyJURuRJfGoaFSIA==
"@types/node@*":
version "11.10.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.10.0.tgz#08eeb736ae678ccf9ca0922063f3a08795894ede"
integrity sha512-6Mb9+PPq9UzRpQrlPzZAbhEvodWDTnsIakddUAtSDpKYF6eu5zAdW31n8x7UZStvqGnDC7dCJnvU188ylv/Ytw==
"@types/node@6.0.84":
version "6.0.84"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.84.tgz#193ffe5a9f42864d425ffd9739d95b753c6a1eab"
integrity sha512-1SvEazClhUBRNroJM3oB3xf3u2r6xGmHDGbdigqNPHvNKLl8/BtATgO9eC04ZLuovpSh0B20BF1QJxdi+qmTlg==
"@types/node@8.5.8":
version "8.5.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.8.tgz#92509422653f10e9c0ac18d87e0610b39f9821c7"
integrity sha512-8KmlRxwbKZfjUHFIt3q8TF5S2B+/E5BaAoo/3mgc5h6FJzqxXkCK/VMetO+IRDtwtU6HUvovHMBn+XRj7SV9Qg==
"@types/z-schema@3.16.31":
version "3.16.31"
resolved "https://registry.yarnpkg.com/@types/z-schema/-/z-schema-3.16.31.tgz#2eb1d00a5e4ec3fa58c76afde12e182b66dc5c1c"
integrity sha1-LrHQCl5Ow/pYx2r94S4YK2bcXBw=
"@yarnpkg/lockfile@1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
@ -333,13 +267,6 @@ are-we-there-yet@~1.1.2:
delegates "^1.0.0"
readable-stream "^2.0.6"
argparse@~1.0.9:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
dependencies:
sprintf-js "~1.0.2"
arr-diff@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
@ -360,6 +287,14 @@ array-unique@^0.3.2:
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
ascli@~1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc"
integrity sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=
dependencies:
colour "~0.7.1"
optjs "~3.2.2"
assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
@ -442,6 +377,13 @@ builtins@^1.0.3:
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og=
bytebuffer@~5:
version "5.0.1"
resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd"
integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=
dependencies:
long "~3"
cacache@^11.0.1:
version "11.3.1"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f"
@ -497,6 +439,11 @@ cache-base@^1.0.1:
union-value "^1.0.0"
unset-value "^1.0.0"
camelcase@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=
chalk@^2.0.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
@ -558,6 +505,15 @@ cli-width@^2.0.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
cliui@^3.0.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=
dependencies:
string-width "^1.0.1"
strip-ansi "^3.0.1"
wrap-ansi "^2.0.0"
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@ -583,15 +539,10 @@ color-name@1.1.3:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
colors@~1.2.1:
version "1.2.5"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc"
integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==
commander@^2.7.1:
version "2.19.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
colour@~0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778"
integrity sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=
component-emitter@^1.2.1:
version "1.2.1"
@ -666,6 +617,11 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"
decamelize@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
@ -865,15 +821,6 @@ from2@^2.1.0:
inherits "^2.0.1"
readable-stream "^2.0.0"
fs-extra@~7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"
fs-minipass@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
@ -955,7 +902,7 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
@ -1100,6 +1047,11 @@ interpret@^1.0.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=
invert-kv@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY=
ip@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
@ -1264,10 +1216,10 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
jju@~1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a"
integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo=
jasmine-core@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=
json-parse-better-errors@^1.0.0:
version "1.0.2"
@ -1279,13 +1231,6 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
optionalDependencies:
graceful-fs "^4.1.6"
jsonparse@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
@ -1315,26 +1260,28 @@ kind-of@^6.0.0, kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=
dependencies:
invert-kv "^1.0.0"
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
lodash.get@^4.0.0:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
lodash.isequal@^4.0.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
lodash@^4.17.10, lodash@~4.17.5:
lodash@^4.17.10:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
long@~3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=
lru-cache@^4.1.2, lru-cache@^4.1.3:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
@ -1682,11 +1629,23 @@ opn@5.4.0:
dependencies:
is-wsl "^1.1.0"
optjs@~3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee"
integrity sha1-aabOicRCpEQDFBrS+bNwvVu29O4=
os-homedir@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
os-locale@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=
dependencies:
lcid "^1.0.0"
os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
@ -1785,6 +1744,16 @@ promise-retry@^1.1.1:
err-code "^1.0.0"
retry "^0.10.0"
protobufjs@5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17"
integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==
dependencies:
ascli "~1"
bytebuffer "~5"
glob "^7.0.5"
yargs "^3.10.0"
protoduck@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f"
@ -1894,7 +1863,7 @@ resolve-url@^0.2.1:
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
resolve@1.8.1, resolve@^1.1.6:
resolve@^1.1.6:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==
@ -2082,6 +2051,14 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
source-map-support@0.5.9:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
@ -2097,6 +2074,11 @@ source-map@^0.5.6:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
spdx-correct@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
@ -2130,11 +2112,6 @@ split-string@^3.0.1, split-string@^3.0.2:
dependencies:
extend-shallow "^3.0.0"
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
ssri@^6.0.0, ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
@ -2292,17 +2269,24 @@ tsickle@0.34.0:
mkdirp "^0.5.1"
source-map "^0.7.3"
tslib@^1.9.0:
tslib@^1.8.1, tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
tsutils@2.27.2:
version "2.27.2"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.2.tgz#60ba88a23d6f785ec4b89c6e8179cac9b431f1c7"
integrity sha512-qf6rmT84TFMuxAKez2pIfR8UCai49iQsfB7YWVjV1bKpy/d0PWT5rEOSM6La9PiHZ0k1RRZQiwVdVJfQ3BPHgg==
dependencies:
tslib "^1.8.1"
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@3.1.6, typescript@~3.1.6:
typescript@3.1.6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==
@ -2336,11 +2320,6 @@ unique-slug@^2.0.0:
dependencies:
imurmurhash "^0.1.4"
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
unset-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
@ -2391,11 +2370,6 @@ validate-npm-package-name@^3.0.0:
dependencies:
builtins "^1.0.3"
validator@^8.0.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9"
integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA==
which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@ -2410,6 +2384,19 @@ wide-align@^1.1.0:
dependencies:
string-width "^1.0.2 || 2"
window-size@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876"
integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=
dependencies:
string-width "^1.0.1"
strip-ansi "^3.0.1"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
@ -2420,6 +2407,11 @@ xtend@~4.0.1:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
y18n@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
y18n@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
@ -2435,13 +2427,15 @@ yallist@^3.0.0, yallist@^3.0.2:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
z-schema@~3.18.3:
version "3.18.4"
resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2"
integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==
yargs@^3.10.0:
version "3.32.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"
integrity sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=
dependencies:
lodash.get "^4.0.0"
lodash.isequal "^4.0.0"
validator "^8.0.0"
optionalDependencies:
commander "^2.7.1"
camelcase "^2.0.1"
cliui "^3.0.3"
decamelize "^1.1.1"
os-locale "^1.4.0"
string-width "^1.0.1"
window-size "^0.1.4"
y18n "^3.2.0"

View File

@ -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 = "1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.6/rules_nodejs-0.18.6.tar.gz"],
sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
)
# Fetch sass rules for compiling sass files
@ -73,7 +73,7 @@ load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories")
browser_repositories()
# Setup the rules_typescript tooolchain
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()
@ -81,11 +81,3 @@ ts_setup_workspace()
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
sass_repositories()
# Setup the angular toolchain. This integration test no longer builds Angular from source,
# but we still need to set up the "angular" workspace since some Bazel rules depend on
# the "ngdeps" repository. This can be fixed if we switched the Angular repository to the
# "npm" repository for the bazel managed dependencies.
load("@npm_angular_bazel//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()

View File

@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
load("@npm_angular_bazel//:index.bzl", "ng_module")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "rollup_bundle")
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
# Allow targets under sub-packages to reference the tsconfig.json file
exports_files(["tsconfig.json"])

View File

@ -2,8 +2,8 @@ package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
load("@npm_angular_bazel//:index.bzl", "ng_module", "ng_package")
load("@npm_bazel_karma//:defs.bzl", "ts_web_test_suite")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_karma//:index.bzl", "ts_web_test_suite")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
sass_binary(
name = "hello-world-styles",

View File

@ -18,8 +18,8 @@
"@angular/bazel": "packages-dist:bazel",
"@angular/compiler": "packages-dist:compiler",
"@angular/compiler-cli": "packages-dist:compiler-cli",
"@bazel/karma": "0.25.1",
"@bazel/typescript": "0.25.1",
"@bazel/karma": "0.26.0",
"@bazel/typescript": "0.26.0",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",

View File

@ -59,31 +59,32 @@
"@angular-devkit/core" "7.3.3"
rxjs "6.3.3"
"@angular/animations@file:../angular/dist/packages-dist/animations":
version "7.2.6"
"@angular/animations@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/animations":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@angular/bazel@file:../angular/dist/packages-dist/bazel":
version "7.2.6"
"@angular/bazel@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/bazel":
version "8.0.0-beta.6"
dependencies:
"@angular-devkit/architect" "^0.10.6"
"@angular-devkit/core" "^7.0.4"
"@angular-devkit/schematics" "^7.3.0-rc.0"
"@bazel/typescript" "^0.25.1"
"@bazel/typescript" "^0.26.0"
"@microsoft/api-extractor" "^7.0.17"
"@schematics/angular" "^7.0.4"
"@types/node" "6.0.84"
semver "^5.6.0"
shelljs "0.8.2"
tsickle "0.34.0"
"@angular/common@file:../angular/dist/packages-dist/common":
version "7.2.6"
"@angular/common@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/common":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@file:../angular/dist/packages-dist/compiler-cli":
version "7.2.6"
"@angular/compiler-cli@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/compiler-cli":
version "8.0.0-beta.6"
dependencies:
canonical-path "1.0.0"
chokidar "^2.1.1"
@ -97,30 +98,30 @@
tslib "^1.9.0"
yargs "9.0.1"
"@angular/compiler@file:../angular/dist/packages-dist/compiler":
version "7.2.6"
"@angular/compiler@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/compiler":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@angular/core@file:../angular/dist/packages-dist/core":
version "7.2.6"
"@angular/core@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/core":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@angular/platform-browser-dynamic@file:../angular/dist/packages-dist/platform-browser-dynamic":
version "7.2.6"
"@angular/platform-browser-dynamic@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/platform-browser-dynamic":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@file:../angular/dist/packages-dist/platform-browser":
version "7.2.6"
"@angular/platform-browser@file:../../../../../../../Users/greg/google/gregmagolan/angular-2/dist/packages-dist/platform-browser":
version "8.0.0-beta.6"
dependencies:
tslib "^1.9.0"
"@bazel/karma@0.25.1":
version "0.25.1"
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.25.1.tgz#246286299b6e96fa4a91d240d3c3d7386164adaf"
integrity sha512-e5qyZkeHdxEYTIcHg04pmPF1SR8jy8I1mQLgDxX6NJDVx3JT7iIFeISqlS8hjBiykyX/XZ0CsVzkKYU/sG3ilg==
"@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"
@ -134,10 +135,10 @@
semver "5.6.0"
tmp "0.0.33"
"@bazel/typescript@0.25.1", "@bazel/typescript@^0.25.1":
version "0.25.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.25.1.tgz#71564de50ff6976fb37d90f2f7a479e87b158943"
integrity sha512-QFitUUXIWQMfVk5EwI9J9d5iNPfT+kUjPbahiJbJVZz1Fz9zNZ8+CR6FESfnxuUKlZK3Oy0VWFcz7mlHaceL/Q==
"@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"

View File

@ -1,5 +1,5 @@
load("@npm_angular_bazel//:index.bzl", "protractor_web_test_suite")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "e2e",

View File

@ -112,7 +112,7 @@ module.exports = function(config) {
// don't need this entire config file.
proxies: {
'/base/angular/': '/base/',
'/base/ngdeps/': '/base/',
'/base/npm/': '/base/',
},
reporters: ['dots'],

View File

@ -18,7 +18,7 @@ def benchmark_test(name, server, deps, tags = []):
server = server,
tags = tags,
deps = [
"@ngdeps//protractor",
"@ngdeps//yargs",
"@npm//protractor",
"@npm//yargs",
] + deps,
)

View File

@ -9,7 +9,7 @@ ts_library(
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//modules/e2e_util",
"@ngdeps//@types/jasminewd2",
"@ngdeps//protractor",
"@npm//@types/jasminewd2",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -29,12 +29,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
tags = ["fixme-ivy-aot"],
deps = [":ng2"],

View File

@ -14,6 +14,6 @@ ts_library(
srcs = ["largetable_perf.spec.ts"],
deps = [
"//modules/e2e_util",
"@ngdeps//protractor",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -20,7 +20,7 @@ ts_devserver(
index_html = "index.html",
port = 4200,
static_files = [
"@ngdeps//node_modules/incremental-dom:dist/incremental-dom.js",
"@npm//node_modules/incremental-dom:dist/incremental-dom.js",
],
deps = [":incremental_dom"],
)

View File

@ -1,4 +1,4 @@
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -28,12 +28,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":ng2"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -25,12 +25,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":ng2_switch"],
)

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
ng_module(
@ -14,7 +14,7 @@ ng_module(
"//packages:types",
"//packages/common",
"//packages/core",
"@ngdeps//reflect-metadata",
"@npm//reflect-metadata",
],
)
@ -24,7 +24,7 @@ ng_rollup_bundle(
tags = ["ivy-only"],
deps = [
":largetable_lib",
"@ngdeps//rxjs",
"@npm//rxjs",
],
)

View File

@ -14,7 +14,7 @@ ts_library(
srcs = ["tree_perf_test_utils.ts"],
deps = [
"//modules/e2e_util",
"@ngdeps//protractor",
"@npm//protractor",
],
)
@ -24,7 +24,7 @@ ts_library(
srcs = ["tree_perf.spec.ts"],
deps = [
":test_utils_lib",
"@ngdeps//protractor",
"@npm//protractor",
],
)
@ -34,6 +34,6 @@ ts_library(
srcs = ["tree_perf_detect_changes.spec.ts"],
deps = [
":test_utils_lib",
"@ngdeps//protractor",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -11,7 +11,7 @@ ts_library(
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/tree:util_lib",
"@ngdeps//@types/node",
"@npm//@types/node",
],
)
@ -21,7 +21,7 @@ ts_devserver(
index_html = "index.html",
port = 4200,
static_files = [
"@ngdeps//node_modules/incremental-dom:dist/incremental-dom.js",
"@npm//node_modules/incremental-dom:dist/incremental-dom.js",
],
deps = [":incremental_dom"],
)

View File

@ -1,4 +1,4 @@
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -20,7 +20,7 @@ ts_devserver(
index_html = "index.html",
port = 4200,
static_files = [
"@ngdeps//node_modules/angular:angular.js",
"@npm//node_modules/angular:angular.js",
],
deps = [":ng1"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -28,12 +28,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":ng2"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -23,7 +23,7 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
deps = [":ng2_next"],

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":ng2_static"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
@ -25,12 +25,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":ng2_switch"],
)

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
ng_module(
@ -13,7 +13,7 @@ ng_module(
"//packages:types",
"//packages/common",
"//packages/core",
"@ngdeps//reflect-metadata",
"@npm//reflect-metadata",
],
)
@ -23,7 +23,7 @@ ng_rollup_bundle(
tags = ["ivy-only"],
deps = [
":tree_lib",
"@ngdeps//rxjs",
"@npm//rxjs",
],
)

View File

@ -1,4 +1,4 @@
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//tools:defaults.bzl", "ts_library")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
@ -21,7 +21,7 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
deps = [":render3_function_lib"],

View File

@ -9,11 +9,11 @@ ts_library(
deps = [
"//packages:types",
"//packages/benchpress",
"@ngdeps//@types/fs-extra",
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//fs-extra",
"@ngdeps//node-uuid",
"@ngdeps//protractor",
"@ngdeps//selenium-webdriver",
"@npm//@types/fs-extra",
"@npm//@types/selenium-webdriver",
"@npm//fs-extra",
"@npm//node-uuid",
"@npm//protractor",
"@npm//selenium-webdriver",
],
)

View File

@ -10,9 +10,9 @@ def example_test(name, srcs, server, data = [], **kwargs):
deps = [
"//modules/e2e_util",
"//packages/private/testing",
"@ngdeps//@types/jasminewd2",
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//protractor",
"@npm//@types/jasminewd2",
"@npm//@types/selenium-webdriver",
"@npm//protractor",
],
)
@ -23,10 +23,10 @@ def example_test(name, srcs, server, data = [], **kwargs):
server = server,
deps = [
":%s_lib" % name,
"@ngdeps//protractor",
"@ngdeps//selenium-webdriver",
"@ngdeps//yargs",
"@ngdeps//source-map",
"@npm//protractor",
"@npm//selenium-webdriver",
"@npm//yargs",
"@npm//source-map",
],
**kwargs
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,10 +23,10 @@ ts_devserver(
entry_module = "angular/modules/playground/src/animate/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
scripts = ["@npm//node_modules/tslib:tslib.js"],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":animate"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,12 +22,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":async"],
)

View File

@ -1,4 +1,4 @@
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -14,7 +14,7 @@ ng_module(
"//packages/core",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"@ngdeps//@types/hammerjs",
"@npm//@types/hammerjs",
],
)
@ -23,11 +23,11 @@ ts_devserver(
entry_module = "angular/modules/playground/src/gestures/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
scripts = ["@npm//node_modules/tslib:tslib.js"],
static_files = [
"@ngdeps//node_modules/hammerjs:hammer.js",
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/hammerjs:hammer.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":gestures"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,12 +22,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":hello_world"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -14,7 +14,7 @@ ng_module(
"//packages/http",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"@ngdeps//rxjs",
"@npm//rxjs",
],
)
@ -25,12 +25,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":http"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -24,12 +24,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":jsonp"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,12 +22,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":key_events"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":model_driven_forms"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":order_management"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":person_management"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -17,7 +17,7 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
# Needed because the example uses "module.id" in order to load assets relatively.
"@ngdeps//@types/node",
"@npm//@types/node",
],
)
@ -31,12 +31,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":relative_assets"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -15,7 +15,7 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/router",
"@ngdeps//rxjs",
"@npm//rxjs",
],
)
@ -26,15 +26,15 @@ ts_devserver(
# there is only one RxJS UMD bundle that re-exports everything at the root.
"//modules/playground:systemjs-rxjs-operators.js",
"//third_party/fonts.google.com/open-sans",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
] + glob(["**/*.css"]),
port = 4200,
static_files = [
"index.html",
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@ngdeps//node_modules/systemjs:dist/system.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/systemjs:dist/system.js",
"//modules/playground:systemjs-config.js",
"load-app.js",
],

View File

@ -14,9 +14,9 @@
This is because we want to use SystemJS instead of RequireJS and want to support
lazy loading of routes. Read more in the "load-app.js" file.
-->
<script src="ngdeps/node_modules/zone.js/dist/zone.js"></script>
<script src="ngdeps/node_modules/reflect-metadata/Reflect.js"></script>
<script src="ngdeps/node_modules/systemjs/dist/system.js"></script>
<script src="npm/node_modules/zone.js/dist/zone.js"></script>
<script src="npm/node_modules/reflect-metadata/Reflect.js"></script>
<script src="npm/node_modules/systemjs/dist/system.js"></script>
<script src="angular/modules/playground/systemjs-config.js"></script>
<script src="load-app.js"></script>
</html>

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -26,12 +26,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":sourcemap"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,12 +22,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":svg"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":template_driven_forms"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,10 +23,10 @@ ts_devserver(
entry_module = "angular/modules/playground/src/todo/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
scripts = ["@npm//node_modules/tslib:tslib.js"],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":todo"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,13 +22,13 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@ngdeps//node_modules/angular:angular.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/angular:angular.js",
],
deps = [":upgrade"],
)

View File

@ -6,8 +6,8 @@ filegroup(
data = [
"//modules/playground:systemjs-config.js",
"//modules/playground:systemjs-rxjs-operators.js",
"@ngdeps//reflect-metadata",
"@ngdeps//systemjs",
"@ngdeps//zone.js",
"@npm//reflect-metadata",
"@npm//systemjs",
"@npm//zone.js",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -22,13 +22,13 @@ ts_devserver(
data = [
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/animations/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
scripts = ["@npm//node_modules/tslib:tslib.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":animations"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -14,7 +14,7 @@ ng_module(
"//packages/core",
"//packages/platform-webworker",
"//packages/platform-webworker-dynamic",
"@ngdeps//@types/base64-js",
"@npm//@types/base64-js",
],
)
@ -24,20 +24,20 @@ ts_devserver(
additional_root_paths = ["angular"],
data = [
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/base64-js:base64js.min.js",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/base64-js:base64js.min.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
"loader.js",
] + glob(["**/*.css"]),
entry_module = "angular/modules/playground/src/web_workers/images/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
scripts = ["@npm//node_modules/tslib:tslib.js"],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/materialize-css:dist/js/materialize.min.js",
"@ngdeps//node_modules/materialize-css:dist/css/materialize.min.css",
"@ngdeps//node_modules/jquery:dist/jquery.min.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/materialize-css:dist/js/materialize.min.js",
"@npm//node_modules/materialize-css:dist/css/materialize.min.css",
"@npm//node_modules/jquery:dist/jquery.min.js",
"//third_party/github.com/google/material-design-icons",
],
deps = [":images"],

View File

@ -10,7 +10,7 @@ importScripts('angular/modules/playground/src/web_workers/worker-configure.js');
System.config({
map: {
'base64-js': 'ngdeps/node_modules/base64-js/base64js.min.js',
'base64-js': 'npm/node_modules/base64-js/base64js.min.js',
},
packages: {'angular/modules/playground/src/web_workers': {defaultExtension: 'js'}}
});

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -21,16 +21,16 @@ ts_devserver(
data = [
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/input/index",
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":input"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -21,16 +21,16 @@ ts_devserver(
data = [
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/kitchen_sink/index",
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":kitchen_sink"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -21,16 +21,16 @@ ts_devserver(
data = [
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/message_broker/index",
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":message_broker"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -15,7 +15,7 @@ ng_module(
"//packages/platform-webworker",
"//packages/platform-webworker-dynamic",
"//packages/router",
"@ngdeps//rxjs",
"@npm//rxjs",
],
)
@ -24,16 +24,16 @@ ts_devserver(
data = [
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/router/index",
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":router"],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -24,16 +24,16 @@ ts_devserver(
"css/main.css",
"loader.js",
"//modules/playground/src/web_workers:worker-config",
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
entry_module = "angular/modules/playground/src/web_workers/todo/index",
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["@ngdeps//node_modules/zone.js:dist/zone.js"],
static_files = ["@npm//node_modules/zone.js:dist/zone.js"],
deps = [":todo"],
)

View File

@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/
importScripts('ngdeps/node_modules/reflect-metadata/Reflect.js');
importScripts('ngdeps/node_modules/zone.js/dist/zone.js');
importScripts('ngdeps/node_modules/zone.js/dist/long-stack-trace-zone.js');
importScripts('ngdeps/node_modules/systemjs/dist/system.js');
importScripts('npm/node_modules/reflect-metadata/Reflect.js');
importScripts('npm/node_modules/zone.js/dist/zone.js');
importScripts('npm/node_modules/zone.js/dist/long-stack-trace-zone.js');
importScripts('npm/node_modules/systemjs/dist/system.js');
importScripts('angular/modules/playground/systemjs-config.js');

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
package(default_visibility = ["//modules/playground:__subpackages__"])
@ -23,12 +23,12 @@ ts_devserver(
index_html = "index.html",
port = 4200,
scripts = [
"@ngdeps//node_modules/tslib:tslib.js",
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@npm//node_modules/zone.js:dist/zone.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
deps = [":zippy_component"],
)

View File

@ -30,8 +30,8 @@ const angularPackages = [
const packagesConfig = {};
const mapConfig = {
'tslib': 'ngdeps/node_modules/tslib/tslib.js',
'rxjs': 'ngdeps/node_modules/rxjs/bundles/rxjs.umd.js',
'tslib': 'npm/node_modules/tslib/tslib.js',
'rxjs': 'npm/node_modules/rxjs/bundles/rxjs.umd.js',
'rxjs/operators': 'angular/modules/playground/systemjs-rxjs-operators.js',
};

View File

@ -31,12 +31,14 @@
},
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
"@angular/bazel": "file:./tools/npm/@angular_bazel",
"@angular-devkit/architect": "^0.10.6",
"@angular-devkit/build-optimizer": "^0.12.2",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/karma": "0.25.1",
"@bazel/typescript": "0.25.1",
"@bazel/jasmine": "0.26.0",
"@bazel/karma": "0.26.0",
"@bazel/typescript": "0.26.0",
"@schematics/angular": "^7.0.4",
"@types/angular": "^1.6.47",
"@types/base64-js": "1.2.5",

View File

@ -5,15 +5,15 @@ exports_files([
"tsconfig.json",
])
load("@npm_bazel_typescript//:defs.bzl", "ts_config")
load("@npm_bazel_typescript//:index.bzl", "ts_config")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "types",
srcs = glob(["*.ts"]),
deps = [
"@ngdeps//@types/hammerjs",
"@ngdeps//zone.js",
"@npm//@types/hammerjs",
"@npm//zone.js",
],
)

View File

@ -20,8 +20,6 @@ npm_package(
replacements = {
"(#|\/\/)\\s+BEGIN-DEV-ONLY[\\w\W]+?(#|\/\/)\\s+END-DEV-ONLY": "",
"//packages/bazel/": "//",
"@ngdeps//": "@npm//",
"@angular//:@angular/bazel/ngc-wrapped": "@npm//@angular/bazel/bin:ngc-wrapped",
"angular/packages/bazel/": "npm_angular_bazel/",
},
tags = ["release-with-framework"],

View File

@ -5,7 +5,6 @@ skylark_doc(
srcs = [
"//packages/bazel/src:ng_module.bzl",
"//packages/bazel/src:ng_rollup_bundle.bzl",
"//packages/bazel/src:ng_setup_workspace.bzl",
"//packages/bazel/src/ng_package:ng_package.bzl",
"//packages/bazel/src/protractor:protractor_web_test.bzl",
],

View File

@ -8,7 +8,6 @@ Users should not load files under "/src"
"""
load("//packages/bazel/src:ng_module.bzl", _ng_module = "ng_module")
load("//packages/bazel/src:ng_setup_workspace.bzl", _ng_setup_workspace = "ng_setup_workspace")
load("//packages/bazel/src/ng_package:ng_package.bzl", _ng_package = "ng_package")
load(
"//packages/bazel/src/protractor:protractor_web_test.bzl",
@ -20,6 +19,12 @@ ng_module = _ng_module
ng_package = _ng_package
protractor_web_test = _protractor_web_test
protractor_web_test_suite = _protractor_web_test_suite
ng_setup_workspace = _ng_setup_workspace
# DO NOT ADD PUBLIC API without including in the documentation generation
# Run `yarn bazel build //packages/bazel/docs` to verify
def ng_setup_workspace():
print("""DEPRECATION WARNING:
ng_setup_workspace is no longer needed, and will be removed in a future release.
We assume you will fetch rules_nodejs in your WORKSPACE file, and no other dependencies remain here.
Simply remove any calls to this function and the corresponding load statement.
""")

View File

@ -21,7 +21,7 @@
"@angular-devkit/architect": "^0.10.6",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/typescript": "^0.25.1",
"@bazel/typescript": "^0.26.0",
"@schematics/angular": "^7.0.4",
"@types/node": "6.0.84",
"semver": "^5.6.0",

View File

@ -13,13 +13,13 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
nodejs_binary(
name = "rollup_with_build_optimizer",
data = [
"@ngdeps//@angular-devkit/build-optimizer",
"@ngdeps//is-builtin-module",
"@ngdeps//rollup",
"@ngdeps//rollup-plugin-node-resolve",
"@ngdeps//rollup-plugin-sourcemaps",
"@npm//@angular-devkit/build-optimizer",
"@npm//is-builtin-module",
"@npm//rollup",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
],
entry_point = "ngdeps/node_modules/rollup/bin/rollup",
entry_point = "npm/node_modules/rollup/bin/rollup",
install_source_map_support = False,
visibility = ["//visibility:public"],
)

View File

@ -22,9 +22,9 @@ ts_library(
],
module_name = "@angular/bazel/src/builders",
deps = [
"@ngdeps//@angular-devkit/architect",
"@ngdeps//@angular-devkit/core",
"@ngdeps//@types/node",
"@ngdeps//rxjs",
"@npm//@angular-devkit/architect",
"@npm//@angular-devkit/core",
"@npm//@types/node",
"@npm//rxjs",
],
)

View File

@ -28,5 +28,5 @@ compile_ts = _compile_ts
DEPS_ASPECTS = _DEPS_ASPECTS
ts_providers_dict_to_struct = _ts_providers_dict_to_struct
DEFAULT_NG_COMPILER = "@angular//:@angular/bazel/ngc-wrapped"
DEFAULT_NG_COMPILER = "@npm//@angular/bazel/bin:ngc-wrapped"
DEFAULT_NG_XI18N = "@npm//@angular/bazel/bin:xi18n"

View File

@ -3,16 +3,16 @@ package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
# BEGIN-DEV-ONLY
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "lib",
srcs = glob(["*.ts"]),
node_modules = "@ngdeps//typescript:typescript__typings",
node_modules = "@npm//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
deps = [
"@ngdeps//@types/node",
"@ngdeps//@types/shelljs",
"@npm//@types/node",
"@npm//@types/shelljs",
],
)
@ -21,7 +21,7 @@ nodejs_binary(
name = "packager",
data = [
"lib",
"@ngdeps//shelljs",
"@npm//shelljs",
],
entry_point = "angular/packages/bazel/src/ng_package/packager.js",
install_source_map_support = False,

View File

@ -31,7 +31,7 @@ PACKAGES = ["packages/core/src", "packages/common/src", "packages/compiler/src",
PLUGIN_CONFIG = "{sideEffectFreeModules: [\n%s]}" % ",\n".join(
[" '.esm5/{0}'".format(p) for p in PACKAGES],
)
BO_ROLLUP = "ngdeps/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/rollup-plugin.js"
BO_ROLLUP = "npm/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/rollup-plugin.js"
BO_PLUGIN = "require('%s').default(%s)" % (BO_ROLLUP, PLUGIN_CONFIG)
def _use_plain_rollup(ctx):

View File

@ -1,13 +0,0 @@
# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
"Install toolchain dependencies"
def ng_setup_workspace():
"""This repository rule should be called from your WORKSPACE file.
It creates some additional Bazel external repositories that are used internally
by the Angular rules.
"""

View File

@ -1,5 +1,5 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "ngc_lib",
@ -8,7 +8,7 @@ ts_library(
"index.ts",
],
module_name = "@angular/bazel",
node_modules = "@ngdeps//typescript:typescript__typings",
node_modules = "@npm//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
visibility = [
"//packages/bazel:__pkg__",
@ -20,10 +20,10 @@ ts_library(
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
# END-INTERNAL
"@ngdeps//@bazel/typescript",
"@ngdeps//@types/node",
"@ngdeps//tsickle",
"@ngdeps//typescript",
"@npm//@bazel/typescript",
"@npm//@types/node",
"@npm//tsickle",
"@npm//typescript",
],
)
@ -32,8 +32,8 @@ nodejs_binary(
configuration_env_vars = ["compile"],
data = [
":ngc_lib",
"@ngdeps//source-map-support",
"@ngdeps//tslib",
"@npm//source-map-support",
"@npm//tslib",
"@npm_bazel_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js",
@ -44,7 +44,7 @@ nodejs_binary(
name = "xi18n",
data = [
":ngc_lib",
"@ngdeps//source-map-support",
"@npm//source-map-support",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/extract_i18n.js",
visibility = ["//visibility:public"],

View File

@ -1,12 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "utils",
srcs = ["index.ts"],
module_name = "@angular/bazel/protractor-utils",
node_modules = "@ngdeps//typescript:typescript__typings",
node_modules = "@npm//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
deps = ["@ngdeps//@types/node"],
deps = ["@npm//@types/node"],
)

View File

@ -16,6 +16,7 @@ jasmine_node_test(
deps = [
"//packages/bazel/src/schematics/bazel-workspace:test",
"//packages/bazel/src/schematics/ng-new:test",
"//packages/bazel/src/schematics/utility:test",
"//tools/testing:node",
],
)

View File

@ -12,9 +12,9 @@ ts_library(
"schema.json",
],
deps = [
"@ngdeps//@angular-devkit/core",
"@ngdeps//@angular-devkit/schematics",
"@ngdeps//@schematics/angular",
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
],
)
@ -29,6 +29,6 @@ ts_library(
],
deps = [
":bazel-workspace",
"@ngdeps//@angular-devkit/schematics",
"@npm//@angular-devkit/schematics",
],
)

View File

@ -13,26 +13,18 @@ workspace(name = "<%= utils.underscore(name) %>")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_NODEJS_VERSION = "<%= RULES_NODEJS_VERSION %>"
RULES_NODEJS_SHA256 = "<%= RULES_NODEJS_SHA256 %>"
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "%s" % RULES_NODEJS_SHA256,
sha256 = "<%= RULES_NODEJS_SHA256 %>",
url = "https://github.com/bazelbuild/rules_nodejs/releases/download/%s/rules_nodejs-%s.tar.gz" % (RULES_NODEJS_VERSION, RULES_NODEJS_VERSION),
)
# The @angular repo contains rule for building Angular applications
ANGULAR_VERSION = "<%= ANGULAR_VERSION %>"
http_archive(
name = "angular",
url = "https://github.com/angular/angular/archive/%s.zip" % ANGULAR_VERSION,
strip_prefix = "angular-%s" % ANGULAR_VERSION,
)
<% if (sass) { %>
# Rules for compiling sass
RULES_SASS_VERSION = "<%= RULES_SASS_VERSION %>"
http_archive(
name = "io_bazel_rules_sass",
sha256 = "<%= RULES_SASS_SHA256 %>",
url = "https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION,
)
@ -46,6 +38,7 @@ check_bazel_version("0.18.0")
node_repositories()
yarn_install(
name = "npm",
data = ["//:angular-metadata.tsconfig.json"],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
@ -62,11 +55,9 @@ web_test_repositories()
load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories")
browser_repositories()
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()
<% if (sass) { %>
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
sass_repositories()
<% } %>
load("@angular//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()

View File

@ -13,6 +13,16 @@ build --strategy=AngularTemplateCompile=worker
# `bazel-out` directory that is created in the workspace root.
build --symlink_prefix=dist/
# Turn on --incompatible_strict_action_env which was on by default
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
# This flag is needed to so that the bazel cache is not invalidated
# when running bazel via `yarn bazel`.
# See https://github.com/angular/angular/issues/27514.
build --incompatible_strict_action_env
run --incompatible_strict_action_env
test --incompatible_strict_action_env
test --test_output=errors
# Use the Angular 6 compiler

View File

@ -0,0 +1,21 @@
// Workaround for https://github.com/angular/angular/issues/18810
// This file is required because when using the Angular NPM packages and building
// with AOT compilation, NGC needs the "ngsummary.json" files.
{
"compilerOptions": {
"lib": [
"dom",
"es2015"
],
"experimentalDecorators": true,
"types": []
},
"include": [
"node_modules/@angular/**/*"
],
"exclude": [
"node_modules/@angular/bazel/**",
"node_modules/@angular/compiler-cli/**",
"node_modules/@angular/**/testing/**"
]
}

View File

@ -1,5 +1,5 @@
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@angular//:index.bzl", "protractor_web_test_suite")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
load("@npm_angular_bazel//:index.bzl", "protractor_web_test_suite")
ts_library(
name = "e2e_lib",
@ -22,7 +22,7 @@ ts_library(
protractor_web_test_suite(
name = "prodserver_test",
data = [
"@angular//" + "packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":protractor.on-prepare.js",
@ -33,7 +33,7 @@ protractor_web_test_suite(
protractor_web_test_suite(
name = "devserver_test",
data = [
"@angular//" + "packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":protractor.on-prepare.js",

View File

@ -1,31 +1,17 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@npm_bazel_karma//:defs.bzl", "ts_web_test_suite")
load("@npm_angular_bazel//:index.bzl", "ng_module")
load("@npm_bazel_karma//:index.bzl", "ts_web_test_suite")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle", "history_server")
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver", "ts_library")
<% if (sass) { %>load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library")
<% if (sass) { %>load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")
[
sass_binary(
name = "style_" + x,
src = x,
deps = [],
multi_sass_binary(
name = "styles",
srcs = glob(["**/*.scss"]),
)
for x in glob(["**/*.scss"])
]
<% } %>
filegroup(
name = "rxjs_umd_modules",
srcs = [
# do not sort
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
":rxjs_shims.js",
],
)
ng_module(
name = "src",
srcs = glob(
@ -40,11 +26,11 @@ ng_module(
assets = glob([
"**/*.css",
"**/*.html",
])<% if (sass) { %> + [":style_" + x for x in glob(["**/*.scss"])]<% } %>,
])<% if (sass) { %> + [":styles"]<% } %>,
deps = [
"@angular//packages/core",
"@angular//packages/platform-browser",<% if (routing) { %>
"@angular//packages/router",<% } %>
"@npm//@angular/core",
"@npm//@angular/platform-browser",<% if (routing) { %>
"@npm//@angular/router",<% } %>
"@npm//@types",
"@npm//rxjs",
],
@ -67,7 +53,7 @@ web_package(
":bundle.min.js",
],
data = [
":bundle",
"favicon.ico",
],
index_html = "index.html",
)
@ -78,18 +64,34 @@ history_server(
templated_args = ["src/prodapp"],
)
filegroup(
name = "rxjs_umd_modules",
srcs = [
# do not sort
"@npm//node_modules/rxjs:bundles/rxjs.umd.js",
":rxjs_shims.js",
],
)
ts_devserver(
name = "devserver",
port = 4200,
entry_module = "<%= utils.underscore(name) %>/src/main.dev",
serving_path = "/bundle.min.js",
scripts = [
"@npm//node_modules/@angular/common:bundles/common.umd.js",
"@npm//node_modules/@angular/common:bundles/common-http.umd.js",
"@npm//node_modules/@angular/core:bundles/core.umd.js",
"@npm//node_modules/@angular/platform-browser:bundles/platform-browser.umd.js",
"@npm//node_modules/tslib:tslib.js",
":rxjs_umd_modules",
],
static_files = [
"@npm//node_modules/zone.js:dist/zone.min.js",
],
data = [
"favicon.ico",
],
index_html = "index.html",
deps = [":src"],
)
@ -100,7 +102,7 @@ ts_library(
srcs = glob(["**/*.spec.ts"]),
deps = [
":src",
"@angular//packages/core/testing",
"@npm//@angular/core",
"@npm//@types",
],
)
@ -112,15 +114,26 @@ ts_library(
"initialize_testbed.ts",
],
deps = [
"@angular//packages/core/testing",
"@angular//packages/platform-browser-dynamic/testing",
"@npm//@angular/core",
"@npm//@angular/platform-browser-dynamic",
"@npm//@types",
],
)
ts_web_test_suite(
name = "test",
srcs = ["@npm//node_modules/tslib:tslib.js"],
srcs = [
"@npm//node_modules/@angular/common:bundles/common.umd.js",
"@npm//node_modules/@angular/compiler:bundles/compiler.umd.js",
"@npm//node_modules/@angular/compiler:bundles/compiler-testing.umd.js",
"@npm//node_modules/@angular/core:bundles/core.umd.js",
"@npm//node_modules/@angular/core:bundles/core-testing.umd.js",
"@npm//node_modules/@angular/platform-browser:bundles/platform-browser.umd.js",
"@npm//node_modules/@angular/platform-browser:bundles/platform-browser-testing.umd.js",
"@npm//node_modules/@angular/platform-browser-dynamic:bundles/platform-browser-dynamic.umd.js",
"@npm//node_modules/@angular/platform-browser-dynamic:bundles/platform-browser-dynamic-testing.umd.js",
"@npm//node_modules/tslib:tslib.js",
],
runtime_deps = [
":initialize_testbed",
],

View File

@ -9,32 +9,12 @@
*/
import {strings} from '@angular-devkit/core';
import {Rule, SchematicContext, SchematicsException, Tree, apply, applyTemplates, mergeWith, move, url} from '@angular-devkit/schematics';
import {Rule, SchematicContext, Tree, apply, applyTemplates, mergeWith, url} from '@angular-devkit/schematics';
import {getWorkspace} from '@schematics/angular/utility/config';
import {latestVersions} from '@schematics/angular/utility/latest-versions';
import {validateProjectName} from '@schematics/angular/utility/validation';
import {Schema as BazelWorkspaceOptions} from './schema';
/**
* Look for package.json file for package with `packageName` in node_modules and
* extract its version.
*/
function findVersion(packageName: string, host: Tree): string|null {
const candidate = `node_modules/${packageName}/package.json`;
if (host.exists(candidate)) {
try {
const packageJson = JSON.parse(host.read(candidate).toString());
if (packageJson.name === packageName && packageJson.version) {
return packageJson.version;
}
} catch {
}
}
return null;
}
/**
* Clean the version string and return version in the form "1.2.3". Return
* null if version string is invalid. This is similar to semver.clean() but
@ -72,26 +52,15 @@ export default function(options: BazelWorkspaceOptions): Rule {
}
validateProjectName(name);
// If the project already has some deps installed, Bazel should use existing
// versions.
const existingVersions = {
Angular: findVersion('@angular/core', host),
RxJs: findVersion('rxjs', host),
};
Object.keys(existingVersions).forEach((name: 'Angular' | 'RxJs') => {
const version = existingVersions[name] as string;
if (version) {
context.logger.info(`Bazel will reuse existing version for ${name}: ${version}`);
}
});
if (!host.exists('yarn.lock')) {
host.create('yarn.lock', '');
}
const workspaceVersions = {
'RULES_NODEJS_VERSION': '0.18.6',
'RULES_NODEJS_SHA256': '1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6',
'ANGULAR_VERSION': existingVersions.Angular || clean(latestVersions.Angular),
// TODO(kyliau): Consider moving this to latest-versions.ts
'RULES_SASS_VERSION': '1.15.1',
'RULES_NODEJS_VERSION': '0.26.0',
'RULES_NODEJS_SHA256': '5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c',
'RULES_SASS_VERSION': '1.17.2',
'RULES_SASS_SHA256': 'e5316ee8a09d1cbb732d3938b400836bf94dba91a27476e9e27706c4c0edae1f',
};
return mergeWith(apply(url('./files'), [

View File

@ -29,17 +29,19 @@ describe('Bazel-workspace Schematic', () => {
expect(files).toContain('/yarn.lock');
});
it('should find existing Angular version', () => {
let host = new UnitTestTree(new HostTree);
host.create('/node_modules/@angular/core/package.json', JSON.stringify({
name: '@angular/core',
version: '6.6.6',
}));
const options = {...defaultOptions};
host = schematicRunner.runSchematic('bazel-workspace', options, host);
expect(host.files).toContain('/WORKSPACE');
const workspace = host.readContent('/WORKSPACE');
expect(workspace).toMatch('ANGULAR_VERSION = "6.6.6"');
it('should generate empty yarn.lock file', () => {
const host = schematicRunner.runSchematic('bazel-workspace', defaultOptions);
expect(host.files).toContain('/yarn.lock');
expect(host.readContent('/yarn.lock')).toBe('');
});
it('should not replace yarn.lock if it exists', () => {
let host = new UnitTestTree(new HostTree());
host.create('yarn.lock', 'some content');
expect(host.files).toContain('/yarn.lock');
host = schematicRunner.runSchematic('bazel-workspace', defaultOptions, host);
expect(host.files).toContain('/yarn.lock');
expect(host.readContent('/yarn.lock')).toBe('some content');
});
it('should have the correct entry_module for devserver', () => {
@ -59,7 +61,7 @@ describe('Bazel-workspace Schematic', () => {
host = schematicRunner.runSchematic('bazel-workspace', options, host);
expect(host.files).toContain('/src/BUILD.bazel');
const content = host.readContent('/src/BUILD.bazel');
expect(content).toContain('@angular//packages/router');
expect(content).toContain('@npm//@angular/router');
});
describe('WORKSPACE', () => {
@ -98,9 +100,9 @@ describe('Bazel-workspace Schematic', () => {
'load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")');
});
it('should add sass_binary rules in src/BUILD', () => {
it('should add multi_sass_binary rule in src/BUILD', () => {
const content = host.readContent('/src/BUILD.bazel');
expect(content).toContain('load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")');
expect(content).toContain('load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")');
expect(content).toContain('glob(["**/*.scss"])');
});
});

View File

@ -13,10 +13,11 @@ ts_library(
],
deps = [
"//packages/bazel/src/schematics/bazel-workspace",
"@ngdeps//@angular-devkit/core",
"@ngdeps//@angular-devkit/schematics",
"@ngdeps//@schematics/angular",
"@ngdeps//typescript",
"//packages/bazel/src/schematics/utility",
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
"@npm//typescript",
],
)
@ -31,6 +32,6 @@ ts_library(
],
deps = [
":ng-new",
"@ngdeps//@angular-devkit/schematics",
"@npm//@angular-devkit/schematics",
],
)

View File

@ -11,6 +11,7 @@
import {SchematicContext, apply, applyTemplates, chain, externalSchematic, MergeStrategy, mergeWith, move, Rule, schematic, Tree, url, SchematicsException, UpdateRecorder,} from '@angular-devkit/schematics';
import {parseJsonAst, JsonAstObject, strings, JsonValue} from '@angular-devkit/core';
import {findPropertyInAstObject, insertPropertyInAstObjectInOrder} from '@schematics/angular/utility/json-utils';
import {isJsonAstObject, replacePropertyInAstObject} from '../utility/json-utils';
import {validateProjectName} from '@schematics/angular/utility/validation';
import {getWorkspace} from '@schematics/angular/utility/config';
import {Schema} from './schema';
@ -43,8 +44,9 @@ function addDevDependenciesToPackageJson(options: Schema) {
// TODO(kyliau): Consider moving this to latest-versions.ts
'@bazel/bazel': '^0.23.0',
'@bazel/ibazel': '^0.9.0',
'@bazel/karma': '^0.25.1',
'@bazel/typescript': '^0.25.1',
'@bazel/jasmine': '^0.26.0',
'@bazel/karma': '^0.26.0',
'@bazel/typescript': '^0.26.0',
};
const recorder = host.beginUpdate(packageJson);
@ -109,21 +111,6 @@ function overwriteGitignore(options: Schema) {
};
}
function replacePropertyInAstObject(
recorder: UpdateRecorder, node: JsonAstObject, propertyName: string, value: JsonValue,
indent: number) {
const property = findPropertyInAstObject(node, propertyName);
if (property === null) {
throw new Error(`Property ${propertyName} does not exist in JSON object`);
}
const {start, text} = property;
recorder.remove(start.offset, text.length);
const indentStr = '\n' +
' '.repeat(indent);
const content = JSON.stringify(value, null, ' ').replace(/\n/g, indentStr);
recorder.insertLeft(start.offset, content);
}
function updateWorkspaceFileToUseBazelBuilder(options: Schema): Rule {
return (host: Tree, context: SchematicContext) => {
const {name} = options;
@ -196,6 +183,81 @@ function updateWorkspaceFileToUseBazelBuilder(options: Schema): Rule {
};
}
/**
* @angular/bazel requires minimum version of rxjs to be 6.4.0. This function
* upgrades the version of rxjs in package.json if necessary.
*/
function upgradeRxjs(options: Schema) {
return (host: Tree, context: SchematicContext) => {
const packageJson = `${options.name}/package.json`;
if (!host.exists(packageJson)) {
throw new Error(`Could not find ${packageJson}`);
}
const content = host.read(packageJson).toString();
const jsonAst = parseJsonAst(content);
if (!isJsonAstObject(jsonAst)) {
throw new Error(`Failed to parse JSON for ${packageJson}`);
}
const deps = findPropertyInAstObject(jsonAst, 'dependencies');
if (!isJsonAstObject(deps)) {
throw new Error(`Failed to find dependencies in ${packageJson}`);
}
const rxjs = findPropertyInAstObject(deps, 'rxjs');
if (!rxjs) {
throw new Error(`Failed to find rxjs in dependencies of ${packageJson}`);
}
const value = rxjs.value as string; // value can be version or range
const match = value.match(/(\d)+\.(\d)+.(\d)+$/);
if (match) {
const [_, major, minor] = match;
if (major < '6' || (major === '6' && minor < '4')) {
const recorder = host.beginUpdate(packageJson);
replacePropertyInAstObject(recorder, deps, 'rxjs', '~6.4.0');
host.commitUpdate(recorder);
}
} else {
context.logger.info(
'Could not determine version of rxjs. \n' +
'Please make sure that version is at least 6.4.0.');
}
return host;
};
}
/**
* When using Angular NPM packages and building with AOT compilation, ngc
* requires ngsumamry files but they are not shipped. This function adds a
* postinstall step to generate these files.
*/
function addPostinstallToGenerateNgSummaries(options: Schema) {
return (host: Tree, context: SchematicContext) => {
const angularMetadataTsConfig = `${options.name}/angular-metadata.tsconfig.json`;
if (!host.exists(angularMetadataTsConfig)) {
return;
}
const packageJson = `${options.name}/package.json`;
if (!host.exists(packageJson)) {
throw new Error(`Could not find ${packageJson}`);
}
const content = host.read(packageJson).toString();
const jsonAst = parseJsonAst(content) as JsonAstObject;
const scripts = findPropertyInAstObject(jsonAst, 'scripts') as JsonAstObject;
const recorder = host.beginUpdate(packageJson);
if (scripts) {
insertPropertyInAstObjectInOrder(
recorder, scripts, 'postinstall', 'ngc -p ./angular-metadata.tsconfig.json', 4);
} else {
insertPropertyInAstObjectInOrder(
recorder, jsonAst, 'scripts', {
postinstall: 'ngc -p ./angular-metadata.tsconfig.json',
},
2);
}
host.commitUpdate(recorder);
return host;
};
}
export default function(options: Schema): Rule {
return (host: Tree) => {
validateProjectName(options.name);
@ -207,11 +269,13 @@ export default function(options: Schema): Rule {
...options,
}),
addDevDependenciesToPackageJson(options),
upgradeRxjs(options),
addDevAndProdMainForAot(options),
schematic('bazel-workspace', options, {
scope: options.name,
}),
overwriteGitignore(options),
addPostinstallToGenerateNgSummaries(options),
updateWorkspaceFileToUseBazelBuilder(options),
]);
};

View File

@ -0,0 +1,30 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "utility",
srcs = [
"json-utils.ts",
],
module_name = "@angular/bazel/src/schematics/utility",
deps = [
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
"@npm//typescript",
],
)
ts_library(
name = "test",
testonly = True,
srcs = [
"json-utils_spec.ts",
],
deps = [
":utility",
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
],
)

View File

@ -0,0 +1,65 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {JsonAstNode, JsonAstObject, JsonValue} from '@angular-devkit/core';
import {UpdateRecorder} from '@angular-devkit/schematics';
import {findPropertyInAstObject} from '@schematics/angular/utility/json-utils';
/**
* Replace the value of the key-value pair in the 'node' object with a different
* 'value' and record the update using the specified 'recorder'.
*/
export function replacePropertyInAstObject(
recorder: UpdateRecorder, node: JsonAstObject, propertyName: string, value: JsonValue,
indent: number = 0) {
const property = findPropertyInAstObject(node, propertyName);
if (property === null) {
throw new Error(`Property '${propertyName}' does not exist in JSON object`);
}
const {start, text} = property;
recorder.remove(start.offset, text.length);
const indentStr = '\n' +
' '.repeat(indent);
const content = JSON.stringify(value, null, ' ').replace(/\n/g, indentStr);
recorder.insertLeft(start.offset, content);
}
/**
* Remove the key-value pair with the specified 'key' in the specified 'node'
* object and record the update using the specified 'recorder'.
*/
export function removeKeyValueInAstObject(
recorder: UpdateRecorder, content: string, node: JsonAstObject, key: string) {
for (const [i, prop] of node.properties.entries()) {
if (prop.key.value === key) {
const start = prop.start.offset;
const end = prop.end.offset;
let length = end - start;
const match = content.slice(end).match(/[,\s]+/);
if (match) {
length += match.pop() !.length;
}
recorder.remove(start, length);
if (i === node.properties.length - 1) { // last property
let offset = 0;
while (/(,|\s)/.test(content.charAt(start - offset - 1))) {
offset++;
}
recorder.remove(start - offset, offset);
}
return;
}
}
}
/**
* Returns true if the specified 'node' is a JsonAstObject, false otherwise.
*/
export function isJsonAstObject(node: JsonAstNode | null): node is JsonAstObject {
return !!node && node.kind === 'object';
}

View File

@ -0,0 +1,109 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {JsonAstObject, parseJsonAst} from '@angular-devkit/core';
import {HostTree} from '@angular-devkit/schematics';
import {UnitTestTree} from '@angular-devkit/schematics/testing';
import {isJsonAstObject, removeKeyValueInAstObject, replacePropertyInAstObject} from './json-utils';
describe('JsonUtils', () => {
let tree: UnitTestTree;
beforeEach(() => { tree = new UnitTestTree(new HostTree()); });
describe('replacePropertyInAstObject', () => {
it('should replace property', () => {
const content = JSON.stringify({foo: {bar: 'baz'}});
tree.create('tmp', content);
const ast = parseJsonAst(content) as JsonAstObject;
const recorder = tree.beginUpdate('tmp');
replacePropertyInAstObject(recorder, ast, 'foo', [1, 2, 3]);
tree.commitUpdate(recorder);
const value = tree.readContent('tmp');
expect(JSON.parse(value)).toEqual({
foo: [1, 2, 3],
});
expect(value).toBe(`{"foo":[
1,
2,
3
]}`);
});
it('should respect the indent parameter', () => {
const content = JSON.stringify({hello: 'world'}, null, 2);
tree.create('tmp', content);
const ast = parseJsonAst(content) as JsonAstObject;
const recorder = tree.beginUpdate('tmp');
replacePropertyInAstObject(recorder, ast, 'hello', 'world!', 2);
tree.commitUpdate(recorder);
const value = tree.readContent('tmp');
expect(JSON.parse(value)).toEqual({
hello: 'world!',
});
expect(value).toBe(`{
"hello": "world!"
}`);
});
it('should throw error if property is not found', () => {
const content = JSON.stringify({});
tree.create('tmp', content);
const ast = parseJsonAst(content) as JsonAstObject;
const recorder = tree.beginUpdate('tmp');
expect(() => replacePropertyInAstObject(recorder, ast, 'foo', 'bar'))
.toThrowError(`Property 'foo' does not exist in JSON object`);
});
});
describe('removeKeyValueInAstObject', () => {
it('should remove key-value pair', () => {
const content = JSON.stringify({hello: 'world', foo: 'bar'});
tree.create('tmp', content);
const ast = parseJsonAst(content) as JsonAstObject;
let recorder = tree.beginUpdate('tmp');
removeKeyValueInAstObject(recorder, content, ast, 'foo');
tree.commitUpdate(recorder);
const tmp = tree.readContent('tmp');
expect(JSON.parse(tmp)).toEqual({
hello: 'world',
});
expect(tmp).toBe('{"hello":"world"}');
recorder = tree.beginUpdate('tmp');
const newContent = tree.readContent('tmp');
removeKeyValueInAstObject(recorder, newContent, ast, 'hello');
tree.commitUpdate(recorder);
const value = tree.readContent('tmp');
expect(JSON.parse(value)).toEqual({});
expect(value).toBe('{}');
});
it('should be a noop if key is not found', () => {
const content = JSON.stringify({foo: 'bar'});
tree.create('tmp', content);
const ast = parseJsonAst(content) as JsonAstObject;
let recorder = tree.beginUpdate('tmp');
expect(() => removeKeyValueInAstObject(recorder, content, ast, 'hello')).not.toThrow();
tree.commitUpdate(recorder);
const value = tree.readContent('tmp');
expect(JSON.parse(value)).toEqual({foo: 'bar'});
expect(value).toBe('{"foo":"bar"}');
});
});
describe('isJsonAstObject', () => {
it('should return true for an object', () => {
const ast = parseJsonAst(JSON.stringify({}));
expect(isJsonAstObject(ast)).toBe(true);
});
it('should return false for a non-object', () => {
const ast = parseJsonAst(JSON.stringify([]));
expect(isJsonAstObject(ast)).toBe(false);
});
});
});

View File

@ -13,7 +13,7 @@ ts_library(
deps = [
"//packages:types",
"//packages/private/testing",
"@ngdeps//@types/shelljs",
"@npm//@types/shelljs",
],
)
@ -22,8 +22,8 @@ jasmine_node_test(
srcs = [":core_spec_lib"],
data = [
"//packages/core:npm_package",
"@ngdeps//@types/shelljs",
"@ngdeps//shelljs",
"@npm//@types/shelljs",
"@npm//shelljs",
],
)
@ -34,7 +34,7 @@ ts_library(
deps = [
"//packages:types",
"//packages/private/testing",
"@ngdeps//@types/shelljs",
"@npm//@types/shelljs",
],
)
@ -43,7 +43,7 @@ jasmine_node_test(
srcs = [":common_spec_lib"],
data = [
"//packages/common:npm_package",
"@ngdeps//shelljs",
"@npm//shelljs",
],
)
@ -53,7 +53,7 @@ ts_library(
srcs = ["example_package.spec.ts"],
deps = [
"//packages:types",
"@ngdeps//@types/diff",
"@npm//@types/diff",
],
)
@ -68,7 +68,7 @@ jasmine_node_test(
# file is based on non-ivy output and therefore won't work for ngc and Ivy at the same time.
# TODO: We should be able to have another golden for ivy-aot as well.
tags = ["no-ivy-aot"],
deps = ["@ngdeps//diff"],
deps = ["@npm//diff"],
)
nodejs_binary(
@ -78,7 +78,7 @@ nodejs_binary(
"example_package.golden",
":example_spec_lib",
"//packages/bazel/test/ng_package/example:npm_package",
"@ngdeps//diff",
"@npm//diff",
],
entry_point = "angular/packages/bazel/test/ng_package/example_package.spec.js",
templated_args = ["--accept"],

View File

@ -8,7 +8,7 @@ ng_module(
module_name = "example",
deps = [
"//packages/bazel/test/ng_package/example/secondary",
"@ngdeps//@types",
"@npm//@types",
],
)

View File

@ -8,6 +8,6 @@ ng_module(
module_name = "example/secondary",
deps = [
"//packages/core",
"@ngdeps//@types",
"@npm//@types",
],
)

Some files were not shown because too many files have changed in this diff Show More