Compare commits

...

6 Commits

Author SHA1 Message Date
Greg Magolan
652ac79d63 build: idiomatic install of @angular/bazel npm package (#26258) 2018-10-16 13:20:00 -07:00
Alex Eagle
31632b27c7
build: update ngcontainer to bazel 0.18.0 (#26465)
* build: update ngcontainer to bazel 0.18.0

* build: update skylint to bazel 0.18

use .bazelignore file to ignore node_modules directory
2018-10-15 16:51:26 -07:00
Greg Magolan
08e4489cf5 build(bazel): update to rules_typescript 0.20.2 (#26279) 2018-10-05 17:57:18 -07:00
Greg Magolan
0e1ca096da build: update to rules_typescript 0.20.1 and rules_nodejs 0.15.0 (#26260) 2018-10-05 07:16:47 -07:00
Greg Magolan
2546c66376 build(bazel): use fine-grained npm deps (#26111) 2018-10-04 13:14:14 -07:00
Alex Eagle
81f5656be0 build: introduce a package.bzl
This lets Angular Bazel users install our transitive deps, rather than have to list them in their WORKSPACE file.
If they want a different version of one of these deps, they just need to install it before calling rules_angular_dependencies.
2018-10-02 06:46:07 -07:00
123 changed files with 8344 additions and 1554 deletions

2
.bazelignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
dist

View File

@ -12,8 +12,8 @@
## IMPORTANT
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
var_1: &docker_image angular/ngcontainer:0.6.0
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
var_1: &docker_image angular/ngcontainer:0.7.0
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0
# Define common ENV vars
var_3: &define_env_vars
@ -113,6 +113,7 @@ jobs:
paths:
- "node_modules"
- "~/bazel_repository_cache"
# Temporary job to test what will happen when we flip the Ivy flag to true
test_ivy_jit:
<<: *job_defaults

1
.gitignore vendored
View File

@ -14,7 +14,6 @@ pubspec.lock
.settings/
*.swo
modules/.settings
.bazelrc
.vscode
modules/.vscode

View File

@ -87,10 +87,10 @@ groups:
files:
include:
- "WORKSPACE"
- ".bazel*"
- "*.bazel"
- "*.bzl"
- "packages/bazel/*"
- "tools/bazel.rc"
- "/docs/BAZEL.md"
users:
- alexeagle #primary
@ -108,7 +108,6 @@ groups:
- "*.lock"
- "tools/*"
exclude:
- "tools/bazel.rc"
- "tools/public_api_guard/*"
- "aio/*"
users:

View File

@ -15,19 +15,14 @@ alias(
actual = "@nodejs//:yarn",
)
alias(
name = "node_modules",
actual = "@angular_deps//:node_modules",
)
filegroup(
name = "web_test_bootstrap_scripts",
# do not sort
srcs = [
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
"@angular_deps//:node_modules/zone.js/dist/zone.js",
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
"@angular_deps//:node_modules/zone.js/dist/task-tracking.js",
"@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",
"//:test-events.js",
],
)
@ -35,11 +30,28 @@ filegroup(
filegroup(
name = "angularjs_scripts",
srcs = [
"@angular_deps//:node_modules/angular-1.5/angular.js",
"@angular_deps//:node_modules/angular-1.6/angular.js",
"@angular_deps//:node_modules/angular-mocks-1.5/angular-mocks.js",
"@angular_deps//:node_modules/angular-mocks-1.6/angular-mocks.js",
"@angular_deps//:node_modules/angular-mocks/angular-mocks.js",
"@angular_deps//:node_modules/angular/angular.js",
"@ngdeps//node_modules/angular:angular.js",
"@ngdeps//node_modules/angular-1.5:angular.js",
"@ngdeps//node_modules/angular-1.6:angular.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",
],
)
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",
data = ["@npm//@angular/bazel"],
entry_point = "@angular/bazel/src/ngc-wrapped/index.js",
install_source_map_support = False,
templated_args = ["--node_options=--expose-gc"],
)

113
WORKSPACE
View File

@ -1,91 +1,24 @@
workspace(name = "angular")
#
# Download Bazel toolchain dependencies as needed by build actions
#
http_archive(
name = "build_bazel_rules_typescript",
sha256 = "1626ee2cc9770af6950bfc77dffa027f9aedf330fe2ea2ee7e504428927bd95d",
strip_prefix = "rules_typescript-0.17.0",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.17.0.zip",
load(
"//packages/bazel:package.bzl",
"rules_angular_dependencies",
"rules_angular_dev_dependencies",
)
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()
http_archive(
name = "bazel_toolchains",
sha256 = "c3b08805602cd1d2b67ebe96407c1e8c6ed3d4ce55236ae2efe2f1948f38168d",
strip_prefix = "bazel-toolchains-5124557861ebf4c0b67f98180bff1f8551e0b421",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
],
)
http_archive(
name = "io_bazel_rules_sass",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
strip_prefix = "rules_sass-1.11.0",
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
)
# This commit matches the version of buildifier in angular/ngcontainer
# If you change this, also check if it matches the version in the angular/ngcontainer
# version in /.circleci/config.yml
BAZEL_BUILDTOOLS_VERSION = "49a6c199e3fbf5d94534b2771868677d3f9c6de9"
http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "edf39af5fc257521e4af4c40829fffe8fba6d0ebff9f4dd69a6f8f1223ae047b",
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
)
# Fetching the Bazel source code allows us to compile the Skylark linter
http_archive(
name = "io_bazel",
sha256 = "ace8cced3b21e64a8fdad68508e9b0644201ec848ad583651719841d567fc66d",
strip_prefix = "bazel-0.17.1",
url = "https://github.com/bazelbuild/bazel/archive/0.17.1.zip",
)
http_archive(
name = "io_bazel_skydoc",
sha256 = "7bfb5545f59792a2745f2523b9eef363f9c3e7274791c030885e7069f8116016",
strip_prefix = "skydoc-fe2e9f888d28e567fef62ec9d4a93c425526d701",
# TODO: switch to upstream when https://github.com/bazelbuild/skydoc/pull/103 is merged
url = "https://github.com/alexeagle/skydoc/archive/fe2e9f888d28e567fef62ec9d4a93c425526d701.zip",
)
# We have a source dependency on the Devkit repository, because it's built with
# Bazel.
# This allows us to edit sources and have the effect appear immediately without
# re-packaging or "npm link"ing.
# Even better, things like aspects will visit the entire graph including
# ts_library rules in the devkit repository.
http_archive(
name = "angular_cli",
sha256 = "8cf320ea58c321e103f39087376feea502f20eaf79c61a4fdb05c7286c8684fd",
strip_prefix = "angular-cli-6.1.0-rc.0",
url = "https://github.com/angular/angular-cli/archive/v6.1.0-rc.0.zip",
)
http_archive(
name = "org_brotli",
sha256 = "774b893a0700b0692a76e2e5b7e7610dbbe330ffbe3fe864b4b52ca718061d5a",
strip_prefix = "brotli-1.0.5",
url = "https://github.com/google/brotli/archive/v1.0.5.zip",
)
# Angular Bazel users will call this function
rules_angular_dependencies()
# These are the dependencies only for us
rules_angular_dev_dependencies()
#
# Point Bazel to WORKSPACEs that live in subdirectories
#
local_repository(
http_archive(
name = "rxjs",
path = "node_modules/rxjs/src",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
)
# Point to the integration test workspace just so that Bazel doesn't descend into it
@ -98,10 +31,9 @@ local_repository(
#
# Load and install our dependencies downloaded above.
#
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
check_bazel_version("0.17.0", """
check_bazel_version("0.18.0", """
If you are on a Mac and using Homebrew, there is a breaking change to the installation in Bazel 0.16
See https://blog.bazel.build/2018/08/22/bazel-homebrew.html
@ -114,6 +46,12 @@ node_repositories(
yarn_version = "1.9.2",
)
yarn_install(
name = "npm",
package_json = "//tools:npm/package.json",
yarn_lock = "//tools:npm/yarn.lock",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
@ -147,14 +85,3 @@ sass_repositories()
load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")
skydoc_repositories()
##################################
# Prevent Bazel from trying to build rxjs under angular devkit
local_repository(
name = "rxjs_ignore_nested_1",
path = "node_modules/@angular-devkit/core/node_modules/rxjs/src",
)
local_repository(
name = "rxjs_ignore_nested_2",
path = "node_modules/@angular-devkit/schematics/node_modules/rxjs/src",
)

View File

@ -72,7 +72,7 @@ keeps the outputs up-to-date as you save sources.
If you're experiencing problems with seemingly unrelated tests failing, it may be because you're not using the proper flags with your Bazel test runs in Angular.
See also: [`//tools/bazel.rc`](https://github.com/angular/angular/blob/master/tools/bazel.rc) where `--define=ivy=false` is defined as default.
See also: [`//.bazelrc`](https://github.com/angular/angular/blob/master/.bazelrc) where `--define=ivy=false` is defined as default.
- `--config=debug`: build and launch in debug mode (see [debugging](#debugging) instructions below)
- `--test_arg=--node_options=--inspect=9228`: change the inspector port.
@ -165,7 +165,7 @@ You can see an overview at https://www.kchodorow.com/blog/2017/03/27/stamping-yo
In our repo, here is how it's configured:
1) In `tools/bazel_stamp_vars.sh` we run the `git` commands to generate our versioning info.
1) In `tools/bazel.rc` we register this script as the value for the `workspace_status_command` flag. Bazel will run the script when it needs to stamp a binary.
1) In `.bazelrc` we register this script as the value for the `workspace_status_command` flag. Bazel will run the script when it needs to stamp a binary.
Note that Bazel has a `--stamp` argument to `bazel build`, but this has no effect since our stamping takes place in Skylark rules. See https://github.com/bazelbuild/bazel/issues/1054

View File

@ -11,26 +11,3 @@ alias(
name = "tsconfig.json",
actual = "//src:tsconfig.json",
)
filegroup(
name = "node_modules",
srcs = glob(
[
# Include only .js, .json & .d.ts files to reduce the number of
# files in the //:node_modules filegroup
"node_modules/**/*.js",
"node_modules/**/*.json",
"node_modules/**/*.d.ts",
# All the files in the http-server package are necesssary
"node_modules/http-server/**",
# All the files in the protractor package are necesssary
"node_modules/protractor/**",
# Also include all files in node_modules/.bin
"node_modules/.bin/*",
],
exclude = [
# Exclude files with spaces which are illegal bazel labels
"node_modules/**/* *",
],
),
)

View File

@ -3,47 +3,41 @@ workspace(name = "bazel_integration_test")
#
# Download Bazel toolchain dependencies as needed by build actions
#
local_repository(
name = "build_bazel_rules_typescript",
path = "node_modules/@bazel/typescript",
)
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()
http_archive(
name = "io_bazel_rules_sass",
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
strip_prefix = "rules_sass-1.11.0",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
)
#
# Point Bazel to WORKSPACEs that live in subdirectories
#
local_repository(
name = "angular",
path = "../..",
)
local_repository(
http_archive(
name = "rxjs",
path = "node_modules/rxjs/src",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
)
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
rules_angular_dependencies()
#
# Load and install our dependencies downloaded above.
# Setup dependencies loaded above
#
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")
check_bazel_version("0.17.0")
node_repositories(
package_json = ["//:package.json"],
node_version = "10.9.0",
yarn_version = "1.9.2",
)
yarn_install(
name = "npm",
package_json = "//src:package.json",
yarn_lock = "//src:yarn.lock",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()

View File

@ -4,20 +4,9 @@
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"reflect-metadata": "file:../../node_modules/reflect-metadata",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../node_modules/zone.js"
},
"devDependencies": {
"@bazel/typescript": "0.17.0",
"@types/jasmine": "file:../../node_modules/@types/jasmine",
"@types/source-map": "0.5.1",
"protractor": "file:../../node_modules/protractor",
"tsickle": "file:../../node_modules/tsickle",
"typescript": "file:../../node_modules/typescript"
},
"scripts": {
"//": "deps are listed in src/package.json which is used by yarn_install",
"test": "bazel build ... --noshow_progress && bazel test ..."
}
}

View File

@ -13,6 +13,7 @@ ng_module(
"@angular//packages/common/http",
"@angular//packages/core",
"@angular//packages/platform-browser",
"@npm//@types",
],
)
@ -21,14 +22,14 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
ts_devserver(
name = "devserver",
additional_root_paths = [
"bazel_integration_test/node_modules/tslib",
"bazel_integration_test/node_modules/zone.js/dist",
"npm/node_modules/tslib",
"npm/node_modules/zone.js/dist",
],
entry_module = "bazel_integration_test/src/main",
serving_path = "/bundle.min.js",
static_files = [
"//:node_modules/tslib/tslib.js",
"//:node_modules/zone.js/dist/zone.min.js",
"@npm//node_modules/tslib:tslib.js",
"@npm//node_modules/zone.js:dist/zone.min.js",
"index.html",
],
deps = ["//src"],
@ -39,7 +40,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
rollup_bundle(
name = "bundle",
entry_point = "src/main",
node_modules = "//:node_modules",
deps = ["//src"],
)
@ -47,7 +47,7 @@ rollup_bundle(
# package.
genrule(
name = "zone.js",
srcs = ["//:node_modules/zone.js/dist/zone.min.js"],
srcs = ["@npm//node_modules/zone.js:dist/zone.min.js"],
outs = ["zone.min.js"],
cmd = "cp $< $@",
)

View File

@ -18,13 +18,13 @@ ng_module(
assets = [":hello-world-styles"],
deps = [
"@angular//packages/core",
"@npm//@types",
],
)
ng_package(
name = "npm_package",
entry_point = "src/hello-world/index.js",
node_modules = "//:node_modules",
deps = [":hello-world"],
)
@ -38,19 +38,23 @@ ts_library(
"@angular//packages/core/testing",
"@angular//packages/platform-browser",
"@angular//packages/platform-browser-dynamic/testing",
"@npm//@types",
"@npm//jasmine",
],
)
ts_web_test_suite(
name = "test",
srcs = ["//:node_modules/tslib/tslib.js"],
srcs = ["@npm//node_modules/tslib:tslib.js"],
bootstrap = [
"//:node_modules/zone.js/dist/zone-testing-bundle.js",
"//:node_modules/reflect-metadata/Reflect.js",
"@npm//node_modules/zone.js:dist/zone-testing-bundle.js",
"@npm//node_modules/reflect-metadata:Reflect.js",
],
browsers = [
"@io_bazel_rules_webtesting//browsers:chromium-local",
"@io_bazel_rules_webtesting//browsers:firefox-local",
# TODO(gregmagolan): re-enable firefox testing once fixed
# See https://github.com/bazelbuild/rules_typescript/issues/296
# "@io_bazel_rules_webtesting//browsers:firefox-local",
],
deps = [
":test_lib",

View File

@ -0,0 +1,27 @@
{
"name": "angular-bazel",
"description": "example and integration test for building Angular apps with Bazel",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"reflect-metadata": "0.1.12",
"rxjs": "6.3.3",
"tslib": "1.9.3",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",
"tsickle": "0.32.0",
"typescript": "3.1.1"
},
"scripts": {
"//": "TODO(gregmagolan): figure out how to keep dependencies here up to date with the root package.json"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,10 @@ ts_library(
testonly = 1,
srcs = ["app.spec.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@npm//@types",
"@npm//protractor",
],
)
ts_library(
@ -13,13 +17,20 @@ ts_library(
testonly = 1,
srcs = ["on-prepare.ts"],
tsconfig = ":tsconfig.json",
deps = ["@angular//packages/bazel/src/protractor/utils"],
deps = [
"@npm//@angular/bazel",
"@npm//@types",
"@npm//protractor",
],
)
protractor_web_test_suite(
name = "devserver_test",
configuration = "//:protractor.conf.js",
data = ["@angular//packages/bazel/src/protractor/utils"],
data = [
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":ts_on_prepare",
server = "//src:devserver",
deps = [":e2e"],
@ -28,7 +39,10 @@ protractor_web_test_suite(
protractor_web_test_suite(
name = "prodserver_test",
configuration = "//:protractor.conf.js",
data = ["@angular//packages/bazel/src/protractor/utils"],
data = [
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":ts_on_prepare",
server = "//src:prodserver",
deps = [":e2e"],

View File

@ -2,907 +2,3 @@
# yarn lockfile v1
"@bazel/typescript@github:bazelbuild/rules_typescript#87d892be147b66e5668ba14f89ef5df8259de102":
version "0.16.2"
resolved "https://codeload.github.com/bazelbuild/rules_typescript/tar.gz/87d892be147b66e5668ba14f89ef5df8259de102"
dependencies:
protobufjs "5.0.0"
tsutils "2.20.0"
"@types/jasmine@file:../../node_modules/@types/jasmine":
version "2.8.8"
"@types/node@^6.0.46":
version "6.0.116"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.116.tgz#2f9cd62b4ecc4927e3942e2655c182eecf5b45f1"
"@types/q@^0.0.32":
version "0.0.32"
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5"
"@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39":
version "2.53.43"
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz#2de3d718819bc20165754c4a59afb7e9833f6707"
"@types/source-map@0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@types/source-map/-/source-map-0.5.1.tgz#7e74db5d06ab373a712356eebfaea2fad0ea2367"
adm-zip@0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736"
adm-zip@^0.4.7, adm-zip@^0.4.9:
version "0.4.11"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.11.tgz#2aa54c84c4b01a9d0fb89bb11982a51f13e3d62a"
agent-base@2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7"
dependencies:
extend "~3.0.0"
semver "~5.0.1"
ajv@^5.3.0:
version "5.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
dependencies:
co "^4.6.0"
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
dependencies:
array-uniq "^1.0.1"
array-uniq@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
arrify@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
ascli@~1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc"
dependencies:
colour "~0.7.1"
optjs "~3.2.2"
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
dependencies:
safer-buffer "~2.1.0"
assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
aws4@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
bcrypt-pbkdf@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
dependencies:
tweetnacl "^0.14.3"
blocking-proxy@0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.5.tgz#462905e0dcfbea970f41aa37223dda9c07b1912b"
dependencies:
minimist "^1.2.0"
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
bytebuffer@~5:
version "5.0.1"
resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd"
dependencies:
long "~3"
camelcase@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
cliui@^3.0.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
dependencies:
string-width "^1.0.1"
strip-ansi "^3.0.1"
wrap-ansi "^2.0.0"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
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"
colour@~0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778"
combined-stream@1.0.6, combined-stream@~1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
dependencies:
delayed-stream "~1.0.0"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
core-util-is@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
dependencies:
assert-plus "^1.0.0"
debug@2:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
ms "2.0.0"
decamelize@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
del@^2.2.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
dependencies:
globby "^5.0.0"
is-path-cwd "^1.0.0"
is-path-in-cwd "^1.0.0"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"
rimraf "^2.2.8"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
diff@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
dependencies:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
extend@3, extend@~3.0.0, extend@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
dependencies:
asynckit "^0.4.0"
combined-stream "1.0.6"
mime-types "^2.1.12"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
getpass@^0.1.1:
version "0.1.7"
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
dependencies:
assert-plus "^1.0.0"
glob@^5.0.10:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
globby@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
dependencies:
array-union "^1.0.1"
arrify "^1.0.0"
glob "^7.0.3"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
har-validator@~5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29"
dependencies:
ajv "^5.3.0"
har-schema "^2.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
dependencies:
assert-plus "^1.0.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
https-proxy-agent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6"
dependencies:
agent-base "2"
debug "2"
extend "3"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
ini@^1.3.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
invert-kv@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
is-fullwidth-code-point@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
dependencies:
number-is-nan "^1.0.0"
is-path-cwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
is-path-in-cwd@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
dependencies:
is-path-inside "^1.0.0"
is-path-inside@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
dependencies:
path-is-inside "^1.0.1"
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
jasmine-core@~2.99.0:
version "2.99.1"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15"
jasmine-diff@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/jasmine-diff/-/jasmine-diff-0.1.3.tgz#93ccc2dcc41028c5ddd4606558074839f2deeaa8"
dependencies:
diff "^3.2.0"
jasmine@^2.5.3:
version "2.99.0"
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7"
dependencies:
exit "^0.1.2"
glob "^7.0.6"
jasmine-core "~2.99.0"
jasminewd2@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e"
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
json-schema "0.2.3"
verror "1.10.0"
lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
dependencies:
invert-kv "^1.0.0"
long@~3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
mime-db@~1.35.0:
version "1.35.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"
mime-types@^2.1.12, mime-types@~2.1.19:
version "2.1.19"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0"
dependencies:
mime-db "~1.35.0"
"minimatch@2 || 3", minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
minimist@~0.0.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
mkdirp@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
minimist "0.0.8"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
object-assign@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
optimist@~0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
dependencies:
minimist "~0.0.1"
wordwrap "~0.0.2"
options@>=0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f"
optjs@~3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee"
os-locale@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
dependencies:
lcid "^1.0.0"
os-tmpdir@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
path-is-inside@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
dependencies:
pinkie "^2.0.0"
pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
protobufjs@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.0.tgz#4223063233ea96ac063ca2b554035204db524fa1"
dependencies:
ascli "~1"
bytebuffer "~5"
glob "^5.0.10"
yargs "^3.10.0"
"protractor@file:../../node_modules/protractor":
version "5.1.2"
dependencies:
"@types/node" "^6.0.46"
"@types/q" "^0.0.32"
"@types/selenium-webdriver" "~2.53.39"
blocking-proxy "0.0.5"
chalk "^1.1.3"
glob "^7.0.3"
jasmine "^2.5.3"
jasminewd2 "^2.1.0"
optimist "~0.6.0"
q "1.4.1"
saucelabs "~1.3.0"
selenium-webdriver "3.0.1"
source-map-support "~0.4.0"
webdriver-js-extender "^1.0.0"
webdriver-manager "^12.0.6"
psl@^1.1.24:
version "1.1.29"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
q@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
q@^1.4.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
"reflect-metadata@file:../../node_modules/reflect-metadata":
version "0.1.12"
request@^2.87.0:
version "2.88.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
caseless "~0.12.0"
combined-stream "~1.0.6"
extend "~3.0.2"
forever-agent "~0.6.1"
form-data "~2.3.2"
har-validator "~5.1.0"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.4.3"
tunnel-agent "^0.6.0"
uuid "^3.3.2"
rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies:
glob "^7.0.5"
"rxjs@file:../../node_modules/rxjs":
version "6.0.0"
dependencies:
tslib "^1.9.0"
safe-buffer@^5.0.1, safe-buffer@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
saucelabs@~1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee"
dependencies:
https-proxy-agent "^1.0.0"
sax@0.6.x:
version "0.6.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9"
sax@>=0.6.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
selenium-webdriver@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7"
dependencies:
adm-zip "^0.4.7"
rimraf "^2.5.4"
tmp "0.0.30"
xml2js "^0.4.17"
selenium-webdriver@^2.53.2:
version "2.53.3"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085"
dependencies:
adm-zip "0.4.4"
rimraf "^2.2.8"
tmp "0.0.24"
ws "^1.0.1"
xml2js "0.4.4"
semver@^5.3.0:
version "5.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
semver@~5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
source-map-support@^0.5.0:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@~0.4.0:
version "0.4.18"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
dependencies:
source-map "^0.5.6"
source-map@^0.5.6:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
sshpk@^1.7.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
dashdash "^1.12.0"
getpass "^0.1.1"
safer-buffer "^2.0.2"
optionalDependencies:
bcrypt-pbkdf "^1.0.0"
ecc-jsbn "~0.1.1"
jsbn "~0.1.0"
tweetnacl "~0.14.0"
string-width@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
dependencies:
code-point-at "^1.0.0"
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
tmp@0.0.24:
version "0.0.24"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12"
tmp@0.0.30:
version "0.0.30"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed"
dependencies:
os-tmpdir "~1.0.1"
tough-cookie@~2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
dependencies:
psl "^1.1.24"
punycode "^1.4.1"
"tsickle@file:../../node_modules/tsickle":
version "0.32.0"
dependencies:
jasmine-diff "^0.1.3"
minimist "^1.2.0"
mkdirp "^0.5.1"
source-map "^0.6.0"
source-map-support "^0.5.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"
"tslib@file:../../node_modules/tslib":
version "1.9.3"
tsutils@2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.20.0.tgz#303394064bc80be8ee04e10b8609ae852e9312d3"
dependencies:
tslib "^1.8.1"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
dependencies:
safe-buffer "^5.0.1"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
"typescript@file:../../node_modules/typescript":
version "3.0.1"
ultron@1.0.x:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"
uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
webdriver-js-extender@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515"
dependencies:
"@types/selenium-webdriver" "^2.53.35"
selenium-webdriver "^2.53.2"
webdriver-manager@^12.0.6:
version "12.1.0"
resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.0.tgz#f6601e52de5f0c97fc7024c889eeb2416f2f1d9d"
dependencies:
adm-zip "^0.4.9"
chalk "^1.1.1"
del "^2.2.0"
glob "^7.0.3"
ini "^1.3.4"
minimist "^1.2.0"
q "^1.4.1"
request "^2.87.0"
rimraf "^2.5.2"
semver "^5.3.0"
xml2js "^0.4.17"
window-size@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
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"
ws@^1.0.1:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51"
dependencies:
options ">=0.0.5"
ultron "1.0.x"
xml2js@0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d"
dependencies:
sax "0.6.x"
xmlbuilder ">=1.0.0"
xml2js@^0.4.17:
version "0.4.19"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7"
dependencies:
sax ">=0.6.0"
xmlbuilder "~9.0.1"
xmlbuilder@>=1.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.0.0.tgz#c64e52f8ae097fe5fd46d1c38adaade071ee1b55"
xmlbuilder@~9.0.1:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
y18n@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
yargs@^3.10.0:
version "3.32.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"
dependencies:
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"
"zone.js@file:../../node_modules/zone.js":
version "0.8.26"

View File

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

View File

@ -23,5 +23,6 @@ ts_library(
deps = [
"//modules/e2e_util:lib",
"//packages:types",
"@ngdeps//protractor",
],
)

View File

@ -52,6 +52,10 @@ protractor_web_test(
data = [
"//packages/bazel/src/protractor/utils",
"//packages/benchpress",
"@ngdeps//node-uuid",
"@ngdeps//protractor",
"@ngdeps//reflect-metadata",
"@ngdeps//yargs",
],
on_prepare = ":protractor.on-prepare.js",
server = ":devserver",

View File

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

View File

@ -41,6 +41,8 @@
},
"devDependencies": {
"@bazel/ibazel": "^0.1.1",
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@types/angular": "^1.6.47",
"@types/base64-js": "1.2.5",
"@types/chai": "^4.1.2",
@ -70,6 +72,7 @@
"bower": "1.8.2",
"browserstacktunnel-wrapper": "2.0.1",
"canonical-path": "0.0.2",
"chai": "4.2.0",
"chokidar": "1.7.0",
"clang-format": "1.0.41",
"cldr": "4.10.0",
@ -110,7 +113,6 @@
"mock-fs": "^4.5.0",
"mutation-observer": "^1.0.3",
"node-uuid": "1.4.8",
"protobufjs": "5.0.0",
"protractor": "5.1.2",
"rewire": "2.5.2",
"rollup": "0.47.4",
@ -126,7 +128,7 @@
"tsickle": "0.32",
"tslint": "5.7.0",
"tslint-eslint-rules": "4.1.1",
"tsutils": "2.20.0",
"tsutils": "2.27.2",
"typescript": "~3.1.1",
"uglify-es": "^3.3.9",
"universal-analytics": "0.4.15",

View File

@ -11,6 +11,10 @@ load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "types",
srcs = glob(["*.ts"]),
deps = [
"@ngdeps//@types/hammerjs",
"@ngdeps//zone.js",
],
)
exports_files([

View File

@ -1,25 +1,20 @@
load("//tools:defaults.bzl", "npm_package")
genrule(
name = "workspace",
outs = ["WORKSPACE"],
cmd = "echo 'workspace(name=\"angular\")' > $@",
)
npm_package(
name = "npm_package",
srcs = [
"BUILD.bazel",
"index.bzl",
"check_version.js",
"package.json",
"protractor-utils.js",
"//packages/bazel/src:package_assets",
],
packages = ["//packages/bazel/docs"],
# Re-host //packages/bazel/ which is just // in the public distro
replacements = {
"//packages/bazel/": "//",
"angular/packages/bazel/": "angular/",
},
packages = [
"//packages/bazel/docs",
],
tags = ["release-with-framework"],
deps = [":workspace"],
deps = [
"//packages/bazel/src/ng_package:lib",
"//packages/bazel/src/ngc-wrapped:ngc_lib",
"//packages/bazel/src/protractor/utils",
],
)

View File

@ -0,0 +1,74 @@
/**
* @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
*/
/**
* @fileoverview This script runs as a postinstall in the published npm packages
* and checks that the version of the build_bazel_rules_typescript external
* repository matches that of the published npm package.
*
* Note, this check is only performed with bazel managed deps when the yarn or
* npm install is from a yarn_install or npm_install repository rule. For self
* managed bazel deps this check is not performed and it is the responsibility
* of the user to ensure that the versions match.
*/
'use strict';
const path = require('path');
const fs = require('fs');
// Version in package.bzl should match the npm package version
// but this should be tolerant of development stamped versions such as
// "0.17.0-7-g76dc057"
const npmPackageVersion = process.env.npm_package_version.split('-')[0];
// If this is a bazel managed deps yarn_install or npm_install then the
// cwd is $(bazel info
// output_base)/external/<wksp>/node_modules/@angular/bazel and there should
// be $(bazel info output_base)/external/<wksp>/internal/generate_build_file.js
// folder
function isBazelManagedDeps() {
try {
fs.statSync('../../../generate_build_file.js');
return true;
} catch (e) {
return false;
}
}
if (isBazelManagedDeps()) {
let contents;
try {
// If this is a yarn_install or npm_install then the cwd is $(bazel info
// output_base)/external/<wksp>/node_modules/@angular/bazel so we can look for
// the package.json file under $(bazel info
// output_base)/external/angular/package.json
const packagePath = path.resolve(process.cwd(), '../../../../angular/package.json');
contents = require(packagePath);
} catch (e) {
throw new Error('The angular repository is not installed in your Bazel WORKSPACE file');
}
if (contents.name !== 'angular-srcs') {
throw new Error('Invalid package.json in angular repository');
}
// Be tolerant of versions such as "0.17.0-7-g76dc057"
const angularPackageVersion = contents.version.split('-')[0];
if (npmPackageVersion !== angularPackageVersion) {
// TODO: we might need to support a range here.
// For example, if you end up with @angular/bazel@6.1.8 and
// @angular/bazel@6.1.9 both installed one of the postinstalls is
// guaranteed to fail since there's only one version of
// angular
throw new Error(`Expected angular repository to be version ${
npmPackageVersion} but found ${angularPackageVersion}`);
}
} else {
// No version check
console.warn(`WARNING: With self managed deps you must ensure the @angular/bazel
npm package version matches the angular repository version.
Use yarn_install or npm_install for this version to be checked automatically.
`);
}

116
packages/bazel/package.bzl Normal file
View File

@ -0,0 +1,116 @@
# 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
"""Package file which defines dependencies of Angular rules in skylark
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(":rules_nodejs_package.bzl", "rules_nodejs_dependencies")
load(":rules_typescript_package.bzl", "rules_typescript_dependencies")
def rules_angular_dependencies():
"""
Fetch our transitive dependencies.
If the user wants to get a different version of these, they can just fetch it
from their WORKSPACE before calling this function, or not call this function at all.
"""
#
# Download Bazel toolchain dependencies as needed by build actions
#
_maybe(
http_archive,
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.2.zip",
strip_prefix = "rules_typescript-0.20.2",
)
# Needed for Remote Execution
_maybe(
http_archive,
name = "bazel_toolchains",
sha256 = "c3b08805602cd1d2b67ebe96407c1e8c6ed3d4ce55236ae2efe2f1948f38168d",
strip_prefix = "bazel-toolchains-5124557861ebf4c0b67f98180bff1f8551e0b421",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
],
)
# Angular apps don't necessarily depend on Sass, but it's common enough
_maybe(
http_archive,
name = "io_bazel_rules_sass",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
strip_prefix = "rules_sass-1.11.0",
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
)
rules_typescript_dependencies()
rules_nodejs_dependencies()
def rules_angular_dev_dependencies():
"""
Fetch dependencies needed for local development, but not needed by users.
These are in this file to keep version information in one place, and make the WORKSPACE
shorter.
"""
# We have a source dependency on the Devkit repository, because it's built with
# Bazel.
# This allows us to edit sources and have the effect appear immediately without
# re-packaging or "npm link"ing.
# Even better, things like aspects will visit the entire graph including
# ts_library rules in the devkit repository.
http_archive(
name = "angular_cli",
sha256 = "8cf320ea58c321e103f39087376feea502f20eaf79c61a4fdb05c7286c8684fd",
strip_prefix = "angular-cli-6.1.0-rc.0",
url = "https://github.com/angular/angular-cli/archive/v6.1.0-rc.0.zip",
)
http_archive(
name = "org_brotli",
sha256 = "774b893a0700b0692a76e2e5b7e7610dbbe330ffbe3fe864b4b52ca718061d5a",
strip_prefix = "brotli-1.0.5",
url = "https://github.com/google/brotli/archive/v1.0.5.zip",
)
# Fetching the Bazel source code allows us to compile the Skylark linter
http_archive(
name = "io_bazel",
sha256 = "978f7e0440dd82182563877e2e0b7c013b26b3368888b57837e9a0ae206fd396",
strip_prefix = "bazel-0.18.0",
url = "https://github.com/bazelbuild/bazel/archive/0.18.0.zip",
)
# This commit matches the version of buildifier in angular/ngcontainer
# If you change this, also check if it matches the version in the angular/ngcontainer
# version in /.circleci/config.yml
BAZEL_BUILDTOOLS_VERSION = "49a6c199e3fbf5d94534b2771868677d3f9c6de9"
http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "edf39af5fc257521e4af4c40829fffe8fba6d0ebff9f4dd69a6f8f1223ae047b",
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
)
#############################################
# Dependencies for generating documentation #
#############################################
http_archive(
name = "io_bazel_skydoc",
sha256 = "7bfb5545f59792a2745f2523b9eef363f9c3e7274791c030885e7069f8116016",
strip_prefix = "skydoc-fe2e9f888d28e567fef62ec9d4a93c425526d701",
# TODO: switch to upstream when https://github.com/bazelbuild/skydoc/pull/103 is merged
url = "https://github.com/alexeagle/skydoc/archive/fe2e9f888d28e567fef62ec9d4a93c425526d701.zip",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)

View File

@ -4,10 +4,17 @@
"description": "Angular - bazel build rules",
"author": "angular",
"license": "MIT",
"bin": {
"ngc-wrapped": "./src/ngc-wrapped/index.js",
"packager": "./src/ng_package/packager.js",
"xi18n": "./src/ngc-wrapped/extract_i18n.js",
"modify_tsconfig": "./src/modify_tsconfig.js"
},
"typings": "./src/ngc-wrapped/index.d.ts",
"dependencies": {
"@bazel/typescript": "^0.15.0",
"@bazel/typescript": "^0.19.1",
"@types/node": "6.0.84",
"protobufjs": "5.0.0"
"tsickle": "0.28.0"
},
"peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
@ -19,5 +26,8 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
},
"scripts": {
"postinstall": "node ./check_version.js"
}
}

View File

@ -0,0 +1,9 @@
/**
* @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
*/
module.exports = require('./src/protractor/utils');

View File

@ -0,0 +1,56 @@
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Dependency-related rules defining our version and dependency versions.
Fulfills similar role as the package.json file.
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/0.15.0/package.bzl
VERSION = "0.15.0"
def rules_nodejs_dependencies():
"""
Fetch our transitive dependencies.
If the user wants to get a different version of these, they can just fetch it
from their WORKSPACE before calling this function, or not call this function at all.
"""
_maybe(
http_archive,
name = "bazel_skylib",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.3.1.zip",
strip_prefix = "bazel-skylib-0.3.1",
sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1",
)
# Needed for Remote Build Execution
# See https://releases.bazel.build/bazel-toolchains.html
# Not strictly a dependency for all users, but it is convenient for them to have this repository
# defined to reduce the effort required to on-board to remote execution.
http_archive(
name = "bazel_toolchains",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
],
strip_prefix = "bazel-toolchains-cdea5b8675914d0a354d89f108de5d28e54e0edc",
sha256 = "cefb6ccf86ca592baaa029bcef04148593c0efe8f734542f10293ea58f170715",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)

View File

@ -0,0 +1,94 @@
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Package file which defines build_bazel_rules_typescript version in skylark
check_rules_typescript_version can be used in downstream WORKSPACES to check
against a minimum dependent build_bazel_rules_typescript version.
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_typescript/0.20.2/package.bzl
VERSION = "0.20.2"
def rules_typescript_dependencies():
"""
Fetch our transitive dependencies.
If the user wants to get a different version of these, they can just fetch it
from their WORKSPACE before calling this function, or not call this function at all.
"""
# TypeScript compiler runs on node.js runtime
_maybe(
http_archive,
name = "build_bazel_rules_nodejs",
urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.15.0.zip"],
strip_prefix = "rules_nodejs-0.15.0",
)
# ts_web_test depends on the web testing rules to provision browsers.
_maybe(
http_archive,
name = "io_bazel_rules_webtesting",
urls = ["https://github.com/bazelbuild/rules_webtesting/archive/111d792b9a5b17f87b6e177e274dbbee46094791.zip"],
strip_prefix = "rules_webtesting-111d792b9a5b17f87b6e177e274dbbee46094791",
sha256 = "a13af63e928c34eff428d47d31bafeec4e38ee9b6940e70bf2c9cd47184c5c16",
)
# ts_devserver depends on the Go rules.
# See https://github.com/bazelbuild/rules_go#setup for the latest version.
_maybe(
http_archive,
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/archive/cbc1e32fba771845305f15e341fa26595d4a136d.zip"],
strip_prefix = "rules_go-cbc1e32fba771845305f15e341fa26595d4a136d",
sha256 = "d02b1d8d11fb67fb1e451645256e58a1542170eedd6e2ba160c8540c96f659da",
)
# go_repository is defined in bazel_gazelle
_maybe(
http_archive,
name = "bazel_gazelle",
urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/109bcfd6880aac2517a1a2d48987226da6337e11.zip"],
strip_prefix = "bazel-gazelle-109bcfd6880aac2517a1a2d48987226da6337e11",
sha256 = "8f80ce0f7a6f8a3fee1fb863c9a23e1de99d678c1cf3c6f0a128f3b883168208",
)
# ts_auto_deps depends on com_github_bazelbuild_buildtools
_maybe(
http_archive,
name = "com_github_bazelbuild_buildtools",
url = "https://github.com/bazelbuild/buildtools/archive/0.12.0.zip",
strip_prefix = "buildtools-0.12.0",
sha256 = "ec495cbd19238c9dc488fd65ca1fee56dcb1a8d6d56ee69a49f2ebe69826c261",
)
###############################################
# Repeat the dependencies of rules_nodejs here!
# We can't load() from rules_nodejs yet, because we've only just fetched it.
# But we also don't want to make users load and call the rules_nodejs_dependencies
# function because we can do that for them, mostly hiding the transitive dependency.
_maybe(
http_archive,
name = "bazel_skylib",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.5.0.zip",
strip_prefix = "bazel-skylib-0.5.0",
sha256 = "ca4e3b8e4da9266c3a9101c8f4704fe2e20eb5625b2a6a7d2d7d45e3dd4efffd",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)

View File

@ -2,14 +2,13 @@ package(default_visibility = ["//visibility:public"])
filegroup(
name = "package_assets",
srcs = glob(["*"]) + [
"//packages/bazel/src/ng_package:package_assets",
"//packages/bazel/src/ngc-wrapped:package_assets",
"//packages/bazel/src/protractor:package_assets",
],
srcs = ["modify_tsconfig.js"],
visibility = ["//packages/bazel:__subpackages__"],
)
# For generating skydoc
exports_files(glob(["*.bzl"]))
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
nodejs_binary(

View File

@ -80,12 +80,20 @@ def _esm5_outputs_aspect(target, ctx):
],
)
replay_compiler = target.typescript.replay_params.compiler.path.split("/")[-1]
if replay_compiler == "tsc_wrapped":
compiler = ctx.executable._tsc_wrapped
elif replay_compiler == "ngc-wrapped":
compiler = ctx.executable._ngc_wrapped
else:
fail("Unknown replay compiler", target.typescript.replay_params.compiler.path)
ctx.actions.run(
progress_message = "Compiling TypeScript (ES5 with ES Modules) %s" % target.label,
inputs = target.typescript.replay_params.inputs + [tsconfig],
outputs = outputs,
arguments = [tsconfig.path],
executable = target.typescript.replay_params.compiler,
executable = compiler,
execution_requirements = {
# TODO(alexeagle): enable worker mode for these compilations
"supports-workers": "0",
@ -122,15 +130,11 @@ esm5_outputs_aspect = aspect(
executable = True,
cfg = "host",
),
# We must list tsc_wrapped here to ensure it's built before the action runs
# For some reason, having the compiler output as an input to the action above
# is not sufficient.
"_tsc_wrapped": attr.label(
default = Label("@build_bazel_rules_typescript//internal:tsc_wrapped_bin"),
default = Label("@build_bazel_rules_typescript//:@bazel/typescript/tsc_wrapped"),
executable = True,
cfg = "host",
),
# Same comment as for tsc_wrapped above.
"_ngc_wrapped": attr.label(
default = Label("//packages/bazel/src/ngc-wrapped"),
executable = True,

View File

@ -14,6 +14,10 @@ load(
"ts_providers_dict_to_struct",
"tsc_wrapped_tsconfig",
)
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo", "collect_node_modules_aspect")
_DEFAULT_COMPILER = "@angular//:@angular/bazel/ngc-wrapped"
_DEFAULT_NG_XI18N = "@npm//@angular/bazel/bin:xi18n"
def compile_strategy(ctx):
"""Detect which strategy should be used to implement ng_module.
@ -357,7 +361,7 @@ def ngc_compile_action(
ctx.actions.run(
inputs = list(inputs),
outputs = messages_out,
executable = ctx.executable._ng_xi18n,
executable = ctx.executable.ng_xi18n,
arguments = (_EXTRA_NODE_OPTIONS_FLAGS +
[tsconfig_file.path] +
# The base path is bin_dir because of the way the ngc
@ -379,23 +383,31 @@ def ngc_compile_action(
return None
def _filter_ts_inputs(all_inputs):
# The compiler only needs to see TypeScript sources from the npm dependencies,
# but may need to look at package.json and ngsummary.json files as well.
return [
f
for f in all_inputs
if f.path.endswith(".js") or f.path.endswith(".ts") or f.path.endswith(".json")
]
def _compile_action(ctx, inputs, outputs, messages_out, tsconfig_file, node_opts):
# Give the Angular compiler all the user-listed assets
file_inputs = list(ctx.files.assets)
# The compiler only needs to see TypeScript sources from the npm dependencies,
# but may need to look at package.json and ngsummary.json files as well.
if hasattr(ctx.attr, "node_modules"):
file_inputs += [
f
for f in ctx.files.node_modules
if f.path.endswith(".ts") or f.path.endswith(".json")
]
file_inputs.extend(_filter_ts_inputs(ctx.files.node_modules))
# If the user supplies a tsconfig.json file, the Angular compiler needs to read it
if hasattr(ctx.attr, "tsconfig") and ctx.file.tsconfig:
file_inputs.append(ctx.file.tsconfig)
# Also include files from npm fine grained deps as action_inputs.
# These deps are identified by the NodeModuleInfo provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
file_inputs.extend(_filter_ts_inputs(d.files))
# Collect the inputs and summary files from our deps
action_inputs = depset(
file_inputs,
@ -443,6 +455,13 @@ def ng_module_impl(ctx, ts_compile_actions):
providers = ts_compile_actions(
ctx,
is_library = True,
# Filter out the node_modules from deps passed to TypeScript compiler
# since they don't have the required providers.
# They were added to the action inputs for tsc_wrapped already.
# strict_deps checking currently skips node_modules.
# TODO(alexeagle): turn on strict deps checking when we have a real
# provider for JS/DTS inputs to ts_library.
deps = [d for d in ctx.attr.deps if not NodeModuleInfo in d],
compile_action = _prodmode_compile_action,
devmode_compile_action = _devmode_compile_action,
tsc_wrapped_tsconfig = _ngc_tsconfig,
@ -474,6 +493,11 @@ def ng_module_impl(ctx, ts_compile_actions):
def _ng_module_impl(ctx):
return ts_providers_dict_to_struct(ng_module_impl(ctx, compile_ts))
local_deps_aspects = [collect_node_modules_aspect, _collect_summaries_aspect]
# Workaround skydoc bug which assumes DEPS_ASPECTS is a str type
[local_deps_aspects.append(a) for a in DEPS_ASPECTS]
NG_MODULE_ATTRIBUTES = {
"srcs": attr.label_list(allow_files = [".ts"]),
@ -481,7 +505,7 @@ NG_MODULE_ATTRIBUTES = {
# https://github.com/bazelbuild/skydoc/issues/21
"deps": attr.label_list(
doc = "Targets that are imported by this target",
aspects = list(DEPS_ASPECTS) + [_collect_summaries_aspect],
aspects = local_deps_aspects,
),
"assets": attr.label_list(
doc = ".html and .css files needed by the Angular compiler",
@ -500,12 +524,21 @@ NG_MODULE_ATTRIBUTES = {
"inline_resources": attr.bool(default = True),
"no_i18n": attr.bool(default = False),
"compiler": attr.label(
default = Label("//packages/bazel/src/ngc-wrapped"),
doc = """Sets a different ngc compiler binary to use for this library.
The default ngc compiler depends on the `@npm//@angular/bazel`
target which is setup for projects that use bazel managed npm deps that
fetch the @angular/bazel npm package. It is recommended that you use
the workspace name `@npm` for bazel managed deps so the default
compiler works out of the box. Otherwise, you'll have to override
the compiler attribute manually.
""",
default = Label(_DEFAULT_COMPILER),
executable = True,
cfg = "host",
),
"_ng_xi18n": attr.label(
default = Label("//packages/bazel/src/ngc-wrapped:xi18n"),
"ng_xi18n": attr.label(
default = Label(_DEFAULT_NG_XI18N),
executable = True,
cfg = "host",
),
@ -514,12 +547,68 @@ NG_MODULE_ATTRIBUTES = {
NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{
"tsconfig": attr.label(allow_files = True, single_file = True),
# @// is special syntax for the "main" repository
# The default assumes the user specified a target "node_modules" in their
# root BUILD file.
"node_modules": attr.label(
default = Label("@//:node_modules"),
doc = """The npm packages which should be available during the compile.
The default value is `@npm//typescript:typescript__typings` is setup
for projects that use bazel managed npm deps that. It is recommended
that you use the workspace name `@npm` for bazel managed deps so the
default node_modules works out of the box. Otherwise, you'll have to
override the node_modules attribute manually. This default is in place
since ng_module will always depend on at least the typescript
default libs which are provided by `@npm//typescript:typescript__typings`.
This attribute is DEPRECATED. As of version 0.18.0 the recommended
approach to npm dependencies is to use fine grained npm dependencies
which are setup with the `yarn_install` or `npm_install` rules.
For example, in targets that used a `//:node_modules` filegroup,
```
ng_module(
name = "my_lib",
...
node_modules = "@npm//node_modules",
)
```
which specifies all files within the `//:node_modules` filegroup
to be inputs to the `my_lib`. Using fine grained npm dependencies,
`my_lib` is defined with only the npm dependencies that are
needed:
```
ng_module(
name = "my_lib",
...
deps = [
"@npm//@types/foo",
"@npm//@types/bar",
"@npm//foo",
"@npm//bar",
...
],
)
```
In this case, only the listed npm packages and their
transitive deps are includes as inputs to the `my_lib` target
which reduces the time required to setup the runfiles for this
target (see https://github.com/bazelbuild/bazel/issues/5153).
The default typescript libs are also available via the node_modules
default in this case.
The @npm external repository and the fine grained npm package
targets are setup using the `yarn_install` or `npm_install` rule
in your WORKSPACE file:
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
""",
default = Label("@npm//typescript:typescript__typings"),
),
"entry_point": attr.string(),

View File

@ -1,15 +1,12 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "package_assets",
srcs = glob(["*"]),
visibility = ["//packages/bazel:__subpackages__"],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
exports_files(["rollup.config.js"])
exports_files([
"rollup.config.js",
"ng_package.bzl",
])
ts_library(
name = "lib",

View File

@ -17,7 +17,7 @@ load("@build_bazel_rules_nodejs//:internal/collect_es6_sources.bzl", "collect_es
load(
"@build_bazel_rules_nodejs//:internal/rollup/rollup_bundle.bzl",
"ROLLUP_ATTRS",
"rollup_module_mappings_aspect",
"ROLLUP_DEPS_ASPECTS",
"run_uglify",
"write_rollup_config",
)
@ -28,8 +28,11 @@ load(
"create_package",
)
load("@build_bazel_rules_nodejs//:internal/node.bzl", "sources_aspect")
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo")
load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5")
_DEFAULT_NG_PACKAGER = "@npm//@angular/bazel/bin:packager"
# Convert from some-dash-case to someCamelCase
def _convert_dash_case_to_camel_case(s):
parts = s.split("-")
@ -160,6 +163,13 @@ def _filter_out_generated_files(files):
def _esm2015_root_dir(ctx):
return ctx.label.name + ".es6"
def _filter_js_inputs(all_inputs):
return [
f
for f in all_inputs
if f.path.endswith(".js") or f.path.endswith(".json")
]
# ng_package produces package that is npm-ready.
def _ng_package_impl(ctx):
npm_package_directory = ctx.actions.declare_directory("%s.ng_pkg" % ctx.label.name)
@ -235,11 +245,19 @@ def _ng_package_impl(ctx):
umd_output = ctx.outputs.umd
min_output = ctx.outputs.umd_min
node_modules_files = _filter_js_inputs(ctx.files.node_modules)
# Also include files from npm fine grained deps as inputs.
# These deps are identified by the NodeModuleInfo provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
node_modules_files += _filter_js_inputs(d.files)
esm2015_config = write_rollup_config(ctx, [], "/".join([ctx.bin_dir.path, ctx.label.package, _esm2015_root_dir(ctx)]), filename = "_%s.rollup_esm2015.conf.js")
esm5_config = write_rollup_config(ctx, [], "/".join([ctx.bin_dir.path, ctx.label.package, esm5_root_dir(ctx)]), filename = "_%s.rollup_esm5.conf.js")
fesm2015.append(_rollup(ctx, "fesm2015", esm2015_config, es2015_entry_point, esm_2015_files + ctx.files.node_modules, fesm2015_output))
fesm5.append(_rollup(ctx, "fesm5", esm5_config, es5_entry_point, esm5_sources + ctx.files.node_modules, fesm5_output))
fesm2015.append(_rollup(ctx, "fesm2015", esm2015_config, es2015_entry_point, esm_2015_files + node_modules_files, fesm2015_output))
fesm5.append(_rollup(ctx, "fesm5", esm5_config, es5_entry_point, esm5_sources + node_modules_files, fesm5_output))
bundles.append(
_rollup(
@ -247,7 +265,7 @@ def _ng_package_impl(ctx):
"umd",
esm5_config,
es5_entry_point,
esm5_sources + ctx.files.node_modules,
esm5_sources + node_modules_files,
umd_output,
format = "umd",
package_name = package_name,
@ -325,14 +343,15 @@ def _ng_package_impl(ctx):
mnemonic = "AngularPackage",
inputs = packager_inputs,
outputs = [npm_package_directory],
executable = ctx.executable._ng_packager,
executable = ctx.executable.ng_packager,
arguments = [packager_args],
)
devfiles = depset()
if ctx.attr.include_devmode_srcs:
for d in ctx.attr.deps:
devfiles = depset(transitive = [devfiles, d.files, d.node_sources])
if not NodeModuleInfo in d:
devfiles = depset(transitive = [devfiles, d.files, d.node_sources])
# Re-use the create_package function from the nodejs npm_package rule.
package_dir = create_package(
@ -344,13 +363,14 @@ def _ng_package_impl(ctx):
files = depset([package_dir]),
)]
DEPS_ASPECTS = [esm5_outputs_aspect, sources_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{
"srcs": attr.label_list(allow_files = True),
"deps": attr.label_list(aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
sources_aspect,
]),
"deps": attr.label_list(aspects = DEPS_ASPECTS),
"data": attr.label_list(
doc = "Additional, non-Angular files to be added to the package, e.g. global CSS assets.",
allow_files = True,
@ -361,8 +381,8 @@ NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{
"entry_point_name": attr.string(
doc = "Name to use when generating bundle files for the primary entry-point.",
),
"_ng_packager": attr.label(
default = Label("//packages/bazel/src/ng_package:packager"),
"ng_packager": attr.label(
default = Label(_DEFAULT_NG_PACKAGER),
executable = True,
cfg = "host",
),

View File

@ -17,8 +17,8 @@
load(
"@build_bazel_rules_nodejs//internal/rollup:rollup_bundle.bzl",
"ROLLUP_ATTRS",
"ROLLUP_DEPS_ASPECTS",
"ROLLUP_OUTPUTS",
"rollup_module_mappings_aspect",
"run_rollup",
"run_sourcemapexplorer",
"run_uglify",
@ -141,16 +141,18 @@ def _ng_rollup_bundle(ctx):
return DefaultInfo(files = depset([ctx.outputs.build_es5_min, sourcemap]))
DEPS_ASPECTS = [esm5_outputs_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
ng_rollup_bundle = rule(
implementation = _ng_rollup_bundle,
attrs = dict(ROLLUP_ATTRS, **{
"deps": attr.label_list(
doc = """Other targets that provide JavaScript files.
Typically this will be `ts_library` or `ng_module` targets.""",
aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
],
aspects = DEPS_ASPECTS,
),
"_rollup": attr.label(
executable = True,

View File

@ -22,4 +22,6 @@ def ng_setup_workspace():
# 0.16.0: minimal version required to work with ng_module
# 0.16.2: bazel type resolution for zone.js types
check_rules_typescript_version("0.16.2")
# 0.20.1: fine grained deps
# 0.20.2: version check fix
check_rules_typescript_version("0.20.2")

View File

@ -1,12 +1,6 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
filegroup(
name = "package_assets",
srcs = glob(["*"]),
visibility = ["//packages/bazel:__subpackages__"],
)
ts_library(
name = "ngc_lib",
srcs = [
@ -14,15 +8,22 @@ ts_library(
"index.ts",
],
module_name = "@angular/bazel",
node_modules = "@ngdeps//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
visibility = ["//packages/bazel/test/ngc-wrapped:__subpackages__"],
visibility = [
"//packages/bazel:__pkg__",
"//packages/bazel/test/ngc-wrapped:__subpackages__",
],
deps = [
# BEGIN-INTERNAL
# Only needed when compiling within the Angular repo.
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
# END-INTERNAL
"@build_bazel_rules_typescript//internal:tsc_wrapped",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types/node",
"@ngdeps//tsickle",
"@ngdeps//typescript",
],
)
@ -31,9 +32,9 @@ nodejs_binary(
data = [
":ngc_lib",
"@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
"@ngdeps//tslib",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js",
node_modules = "@//:node_modules",
visibility = ["//visibility:public"],
)
@ -42,7 +43,6 @@ nodejs_binary(
data = [
":ngc_lib",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js/extract_i18n.js",
node_modules = "@//:node_modules",
entry_point = "angular/packages/bazel/src/ngc-wrapped/extract_i18n.js",
visibility = ["//visibility:public"],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es5", "es2015.collection", "es2015.core"]
"lib": ["es5", "es2015.collection", "es2015.core"],
"types": ["node"]
}
}

View File

@ -1,13 +1,6 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "package_assets",
srcs = glob(["*"]) + [
"//packages/bazel/src/protractor/utils:package_assets",
],
visibility = ["//packages/bazel:__subpackages__"],
)
exports_files([
"protractor.conf.js",
"protractor_web_test.bzl",
])

View File

@ -202,7 +202,6 @@ def protractor_web_test(
name = protractor_bin_name,
entry_point = "protractor/bin/protractor",
data = srcs + deps + data,
node_modules = "@//:node_modules",
testonly = 1,
visibility = ["//visibility:private"],
)
@ -303,7 +302,6 @@ def protractor_web_test_suite(
name = protractor_bin_name,
entry_point = "protractor/bin/protractor",
data = srcs + deps + data,
node_modules = "@//:node_modules",
testonly = 1,
visibility = ["//visibility:private"],
)

View File

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

View File

@ -1,6 +1,7 @@
{
"compilerOptions": {
"noImplicitAny": true,
"lib": ["es2015"]
"lib": ["es2015"],
"types": ["node"]
}
}

View File

@ -10,7 +10,10 @@ ts_library(
name = "core_spec_lib",
testonly = True,
srcs = ["core_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
@ -18,6 +21,8 @@ jasmine_node_test(
srcs = [":core_spec_lib"],
data = [
"//packages/core:npm_package",
"@ngdeps//@types/shelljs",
"@ngdeps//shelljs",
],
)
@ -25,20 +30,29 @@ ts_library(
name = "common_spec_lib",
testonly = True,
srcs = ["common_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
name = "common_package",
srcs = [":common_spec_lib"],
data = ["//packages/common:npm_package"],
data = [
"//packages/common:npm_package",
"@ngdeps//shelljs",
],
)
ts_library(
name = "example_spec_lib",
testonly = True,
srcs = ["example_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/diff",
],
)
jasmine_node_test(

View File

@ -1,13 +1,15 @@
package(default_visibility = ["//packages/bazel/test:__subpackages__"])
load("//packages/bazel:index.bzl", "ng_module", "ng_package")
load("//tools:defaults.bzl", "npm_package")
load("//tools:defaults.bzl", "ng_module", "ng_package", "npm_package")
ng_module(
name = "example",
srcs = glob(["*.ts"]),
module_name = "example",
deps = ["//packages/bazel/test/ng_package/example/secondary"],
deps = [
"//packages/bazel/test/ng_package/example/secondary",
"@ngdeps//@types",
],
)
ng_package(

View File

@ -1,10 +1,13 @@
package(default_visibility = ["//packages/bazel/test:__subpackages__"])
load("//packages/bazel:index.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module")
ng_module(
name = "secondary",
srcs = glob(["*.ts"]),
module_name = "example/secondary",
deps = ["//packages/core"],
deps = [
"//packages/core",
"@ngdeps//@types",
],
)

View File

@ -2,6 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "ngc_test_lib",
testonly = True,
srcs = [
"index_test.ts",
"test_support.ts",
@ -11,6 +12,7 @@ ts_library(
deps = [
"//packages/bazel/src/ngc-wrapped:ngc_lib",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)

View File

@ -6,5 +6,8 @@ ng_module(
name = "empty",
srcs = ["empty.ts"],
tsconfig = ":tsconfig.json",
deps = ["//packages/core"],
deps = [
"//packages/core",
"@ngdeps//@types",
],
)

View File

@ -70,7 +70,7 @@ export function createTsConfig(options: TsConfigOptions) {
'tsickleExternsPath': '',
// we don't copy the node_modules into our tmp dir, so we should look in
// the original workspace directory for it
'nodeModulesPrefix': '../angular/external/angular_deps/node_modules',
'nodeModulesPrefix': '../angular/external/ngdeps/node_modules',
},
'files': options.files,
'angularCompilerOptions': {

View File

@ -1,12 +1,15 @@
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
load("//tools:defaults.bzl", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")
ts_library(
name = "app",
srcs = ["app.ts"],
tsconfig = ":tsconfig.json",
# FIXME: should not be needed here!
deps = ["@ngdeps//@types/jasmine"],
)
ts_devserver(
@ -19,7 +22,6 @@ ts_devserver(
rollup_bundle(
name = "bundle",
entry_point = "packages/bazel/test/protractor-2/app",
node_modules = "//:node_modules",
deps = [":app"],
)
@ -36,6 +38,10 @@ ts_library(
testonly = True,
srcs = ["test.spec.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
@ -44,7 +50,10 @@ protractor_web_test_suite(
data = ["//packages/bazel/src/protractor/utils"],
on_prepare = ":on-prepare.js",
server = ":prodserver",
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
@ -53,5 +62,8 @@ protractor_web_test_suite(
data = ["//packages/bazel/src/protractor/utils"],
on_prepare = ":on-prepare.js",
server = ":devserver",
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["dom", "es2015"]
"lib": ["dom", "es2015"],
"types": ["jasmine"]
}
}

View File

@ -1,11 +1,15 @@
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "ts_spec",
testonly = True,
srcs = ["test.spec.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//protractor",
],
)
ts_library(
@ -13,12 +17,18 @@ ts_library(
testonly = True,
srcs = ["conf.ts"],
tsconfig = ":tsconfig.json",
deps = ["//packages/bazel/src/protractor/utils"],
deps = [
"//packages/bazel/src/protractor/utils",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
name = "test",
configuration = ":ts_conf",
data = ["//packages/bazel/src/protractor/utils"],
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es2015"]
"lib": ["es2015"],
"types": ["jasmine"]
}
}

View File

@ -14,5 +14,6 @@ ts_library(
deps = [
"//packages:types",
"//packages/core",
"@ngdeps//@types/node",
],
)

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "npm_package")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config", "ts_library")
load("//tools:defaults.bzl", "npm_package", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config")
ts_config(
name = "tsconfig",
@ -21,7 +21,6 @@ ts_library(
],
),
module_name = "@angular/compiler-cli",
node_modules = "@angular_deps//:node_modules",
tsconfig = ":tsconfig",
deps = [
"//packages/compiler",
@ -30,6 +29,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/factories",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types",
"@ngdeps//tsickle",
"@ngdeps//typescript",
],
)

View File

@ -16,6 +16,7 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-server",
"//packages/router",
"@ngdeps//reflect-metadata",
"@rxjs",
],
)

View File

@ -3,10 +3,16 @@ load("//packages/bazel:index.bzl", "ng_module")
ng_module(
name = "test_module",
srcs = glob(["*.ts"]),
compiler = "//packages/bazel/src/ngc-wrapped",
entry_point = "index.ts",
flat_module_out_file = "flat_module_filename",
module_name = "some_npm_module",
deps = ["//packages/core"],
ng_xi18n = "//packages/bazel/src/ngc-wrapped:xi18n",
node_modules = "@ngdeps//typescript:typescript__typings",
deps = [
"//packages/core",
"@ngdeps//@types",
],
)
load(":extract_flat_module_index.bzl", "extract_flat_module_index")

View File

@ -16,5 +16,14 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/node",
"@ngdeps//@types/shelljs",
"@ngdeps//@types/source-map",
"@ngdeps//@types/yargs",
"@ngdeps//dependency-graph",
"@ngdeps//magic-string",
"@ngdeps//source-map",
"@ngdeps//typescript",
],
)

View File

@ -13,6 +13,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/mock-fs",
"@ngdeps//magic-string",
"@ngdeps//typescript",
],
)
@ -22,5 +26,7 @@ jasmine_node_test(
deps = [
":test_lib",
"//tools/testing:node_no_angular",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
],
)

View File

@ -15,5 +15,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -15,6 +15,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)

View File

@ -11,5 +11,6 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/diagnostics",
deps = [
"//packages/compiler",
"@ngdeps//typescript",
],
)

View File

@ -14,5 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -9,4 +9,5 @@ ts_library(
"src/**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/host",
deps = ["@ngdeps//typescript"],
)

View File

@ -14,5 +14,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -14,6 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)

View File

@ -10,5 +10,6 @@ ts_library(
]),
deps = [
"//packages:types",
"@ngdeps//typescript",
],
)

View File

@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
///<reference types="jasmine"/>
import * as path from 'path';
import * as ts from 'typescript';

View File

@ -15,5 +15,6 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)

View File

@ -11,5 +11,7 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/util",
deps = [
"//packages:types",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -12,6 +12,7 @@ ts_library(
"//packages:types",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)

View File

@ -17,6 +17,7 @@ ts_library(
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -31,6 +32,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -45,6 +47,7 @@ jasmine_node_test(
"//packages/common:npm_package",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
],
)
@ -59,6 +62,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -76,6 +80,8 @@ jasmine_node_test(
":ngc_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
"@ngdeps//tsickle",
],
)
@ -90,6 +96,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -118,6 +125,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)

View File

@ -11,6 +11,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler/test:test_utils",
"@ngdeps//typescript",
],
)

View File

@ -12,6 +12,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)
@ -24,6 +25,7 @@ ts_library(
":mocks",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@ -53,6 +55,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)
@ -83,6 +86,7 @@ ts_library(
"//packages/compiler-cli/test:test_utils",
"//packages/compiler/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)

View File

@ -10,6 +10,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)

View File

@ -10,6 +10,7 @@ ts_library(
deps = [
"//packages/compiler-cli/src/ngcc",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//@types/mock-fs",
],
)
@ -23,5 +24,10 @@ jasmine_node_test(
deps = [
":ngcc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//@types/mock-fs",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
"@ngdeps//shelljs",
"@ngdeps//yargs",
],
)

View File

@ -10,6 +10,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@ -22,5 +23,6 @@ jasmine_node_test(
deps = [
":ngtsc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//minimist",
],
)

View File

@ -136,8 +136,7 @@ export function setupBazelTo(basePath: string) {
}
// Link typescript
const typescriptSource =
path.join(sources, 'angular/external/angular_deps/node_modules/typescript');
const typescriptSource = path.join(sources, 'angular/external/ngdeps/node_modules/typescript');
const typescriptDest = path.join(nodeModulesPath, 'typescript');
if (fs.existsSync(typescriptSource)) {
fs.symlinkSync(typescriptSource, typescriptDest);

View File

@ -12,6 +12,7 @@ ts_library(
"//packages/compiler/test:test_utils",
"//packages/core",
"//packages/platform-browser",
"@ngdeps//typescript",
],
)
@ -28,5 +29,6 @@ jasmine_node_test(
":test_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//source-map",
],
)

View File

@ -22,6 +22,7 @@ ts_library(
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -61,6 +62,7 @@ ts_library(
"//packages/compiler/test/expression_parser/utils",
"//packages/compiler/testing",
"//packages/core",
"@ngdeps//typescript",
],
)
@ -77,6 +79,8 @@ jasmine_node_test(
":test_node_only_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//base64-js",
"@ngdeps//source-map",
],
)

View File

@ -15,5 +15,6 @@ ng_module(
"//packages:types",
"//packages/compiler",
"//packages/core",
"@ngdeps//@types/node",
],
)

View File

@ -21,6 +21,7 @@ ng_module(
deps = [
"//packages:types",
"//packages/compiler",
"@ngdeps//zone.js",
"@rxjs",
"@rxjs//operators",
],
@ -57,7 +58,7 @@ ng_package(
##
## NOTE: `--define=compile=jit` works with any `bazel` command or target across the repo.
##
## See: `//tools/bazel.rc` where `--define=ivy=false` is defined as default.
## See: `//.bazelrc` where `--define=ivy=false` is defined as default.
## See: `./src/ivy_switch/compiler/index.ts` for more details.
genrule(
name = "ivy_switch_compiler",

View File

@ -29,6 +29,7 @@ ts_library(
"//packages/private/testing",
"//packages/router",
"//packages/router/testing",
"@ngdeps//zone.js",
"@rxjs",
"@rxjs//operators",
],
@ -67,6 +68,9 @@ jasmine_node_test(
"//packages/platform-server",
"//packages/platform-server/testing",
"//tools/testing:node",
"@ngdeps//base64-js",
"@ngdeps//source-map",
"@ngdeps//zone.js",
],
)

View File

@ -34,6 +34,9 @@ ng_rollup_bundle(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",

View File

@ -59,6 +59,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",

View File

@ -54,6 +54,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
)

View File

@ -11,6 +11,7 @@ ts_library(
],
deps = [
"//packages/core",
"@ngdeps//typescript",
],
)
@ -49,5 +50,8 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
)

View File

@ -31,6 +31,7 @@ ng_rollup_bundle(
"//packages/common",
"//packages/core",
"//packages/core/test/bundling/util:reflect_metadata",
"@ngdeps//reflect-metadata",
],
)
@ -65,6 +66,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",
@ -75,7 +79,7 @@ js_expected_symbol_test(
genrule(
name = "tslib",
srcs = [
"@angular_deps//:node_modules/tslib/tslib.js",
"@ngdeps//node_modules/tslib:tslib.js",
],
outs = [
"tslib.js",

View File

@ -35,6 +35,7 @@ ng_rollup_bundle(
"//packages/core/test/bundling/util:reflect_metadata",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"@ngdeps//reflect-metadata",
],
)
@ -71,6 +72,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",
@ -81,7 +85,7 @@ js_expected_symbol_test(
genrule(
name = "tslib",
srcs = [
"@angular_deps//:node_modules/tslib/tslib.js",
"@ngdeps//node_modules/tslib:tslib.js",
],
outs = [
"tslib.js",

View File

@ -40,6 +40,7 @@ ts_library(
deps = [
"//packages/platform-browser",
"//packages/platform-server",
"@ngdeps//zone.js",
],
)
@ -60,6 +61,7 @@ jasmine_node_test(
],
deps = [
":render3_node_lib",
"@ngdeps//zone.js",
],
)

View File

@ -12,16 +12,6 @@ ts_library(
],
)
ts_library(
name = "ivy_node_lib",
testonly = 1,
srcs = [],
deps = [
":ivy_lib",
"//packages/core/test/render3:domino",
],
)
jasmine_node_test(
name = "ivy",
bootstrap = [
@ -31,6 +21,7 @@ jasmine_node_test(
"ivy-jit",
],
deps = [
":ivy_node_lib",
":ivy_lib",
"//packages/core/test/render3:domino",
],
)

View File

@ -13,5 +13,7 @@ ng_module(
deps = [
"//packages:types",
"//packages/core",
"@ngdeps//@types/jasmine",
"@ngdeps//zone.js",
],
)

View File

@ -13,6 +13,7 @@ ts_library(
deps = [
"//packages/common",
"//packages/core",
"@ngdeps//@angular-devkit/schematics",
"@rxjs",
],
)
@ -29,6 +30,7 @@ ts_library(
":ng-add",
"//packages/common",
"//packages/core",
"@ngdeps//@angular-devkit/schematics",
"@rxjs",
"@rxjs//operators",
],
@ -39,5 +41,6 @@ jasmine_node_test(
deps = [
":test_lib",
"//packages/elements/schematics:collection",
"@ngdeps//@schematics/angular",
],
)

View File

@ -1,5 +1,4 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test_suite")
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_suite")
ts_library(
name = "test_lib",
@ -23,10 +22,10 @@ filegroup(
name = "elements_test_bootstrap_scripts",
# do not sort
srcs = [
"@angular_deps//:node_modules/@webcomponents/custom-elements/src/native-shim.js",
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
"@angular_deps//:node_modules/zone.js/dist/zone.js",
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
"@ngdeps//node_modules/@webcomponents/custom-elements:src/native-shim.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/zone.js:dist/zone-testing.js",
],
)
@ -37,8 +36,6 @@ ts_web_test_suite(
],
# do not sort
deps = [
"@angular_deps//:node_modules/tslib/tslib.js",
"//tools/testing:browser",
":test_lib",
],
)

View File

@ -28,5 +28,6 @@ ts_web_test_suite(
name = "test_web",
deps = [
":test_lib",
"@ngdeps//karma",
],
)

View File

@ -16,6 +16,8 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/core",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -9,7 +9,9 @@ ls_rollup_bundle(
"fs": "fs",
},
license_banner = "banner.js.txt",
node_modules = "//:node_modules",
visibility = ["//packages/language-service:__pkg__"],
deps = ["//packages/language-service"],
deps = [
"//packages/language-service",
"@ngdeps//tslib",
],
)

View File

@ -12,7 +12,7 @@ without having to provide all of the angular specific peer dependencies.
load(
"@build_bazel_rules_nodejs//internal/rollup:rollup_bundle.bzl",
"ROLLUP_ATTRS",
"rollup_module_mappings_aspect",
"ROLLUP_DEPS_ASPECTS",
"run_rollup",
"run_uglify",
"write_rollup_config",
@ -28,6 +28,11 @@ _ROLLUP_OUTPUTS = {
"build_umd_min": "%{name}.umd.min.js",
}
DEPS_ASPECTS = [esm5_outputs_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
def _ls_rollup_bundle(ctx):
esm5_sources = flatten_esm5(ctx)
rollup_config = write_rollup_config(
@ -42,10 +47,11 @@ def _ls_rollup_bundle(ctx):
ls_rollup_bundle = rule(
implementation = _ls_rollup_bundle,
attrs = dict(ROLLUP_ATTRS, **{
"deps": attr.label_list(aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
]),
"deps": attr.label_list(
doc = """Other targets that provide JavaScript files.
Typically this will be `ts_library` or `ng_module` targets.""",
aspects = DEPS_ASPECTS,
),
}),
outputs = _ROLLUP_OUTPUTS,
)

View File

@ -9,6 +9,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)

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