refactor(dev-infra): small changes and fixes (#36800)

Rename bazel workspace from npm_dev_infra to npm_angular_dev_infra_private to make it clear that this package is private to angular.
Change driver-utilities module_name to match the new bazel workspace name.
Correct a comment by rewording it from "deployed version" to "published version".
Fix merge conflicts in tmpl-package.json
Make "//packages/bazel/src:esm5.bzl" replacement more generalized so that importing from "//packages/bazel" works.
Deleted "dev_infra/*" path from modules/benchmarks tsconfig.
Moved //dev-infra/benchmark/browsers to //dev-infra/browsers.

PR Close #36800
This commit is contained in:
Wagner Maciel
2020-05-08 12:56:39 -07:00
committed by atscott
parent 6755d00601
commit 084b627f2e
13 changed files with 19 additions and 21 deletions

View File

@ -43,10 +43,10 @@ pkg_npm(
],
substitutions = {
# angular/angular should not consume it's own packages, so we use
# substitutions to replace these in the deployed version of dev-infra.
"//dev-infra/": "@npm_dev_infra//",
# substitutions to replace these in the published version of dev-infra.
"//dev-infra/": "@npm_angular_dev_infra_private//",
"//packages/benchpress": "@npm//@angular/benchpress",
"//packages/bazel/src:esm5.bzl": "@npm_angular_bazel//src:esm5.bzl",
"//packages/bazel/": "@npm_angular_bazel//",
"//packages/zone.js/dist:zone.js": "@npm//:node_modules/zone.js/dist/zone.js",
"//packages/core": "@npm//@angular/core",
"//packages/platform-browser": "@npm//@angular/platform-browser",

View File

@ -5,7 +5,7 @@ filegroup(
name = "files",
srcs = glob(["*"]) + [
"//dev-infra/benchmark/brotli-cli:files",
"//dev-infra/benchmark/browsers:files",
"//dev-infra/browsers:files",
"//dev-infra/benchmark/component_benchmark:files",
"//dev-infra/benchmark/ng_rollup_bundle:files",
],

View File

@ -10,7 +10,7 @@ load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
def benchmark_test(name, server, tags = [], **kwargs):
protractor_web_test_suite(
name = name,
browsers = ["//dev-infra/benchmark/browsers:chromium"],
browsers = ["//dev-infra/browsers:chromium"],
configuration = "//dev-infra/benchmark/component_benchmark:protractor-perf.conf.js",
on_prepare = "//dev-infra/benchmark/component_benchmark:start-server.js",
server = server,

View File

@ -5,10 +5,10 @@ load(":benchmark_test.bzl", "benchmark_test")
def copy_default_file(origin, destination):
"""
Copies a file from /defaults to the destination.
Copies a file from ./defaults to the destination.
Args:
origin: The name of a file in benchpress/defaults to be copied.
origin: The name of a file in ./defaults to be copied.
destination: Where the original file will be clopied to.
"""
native.genrule(

View File

@ -5,7 +5,7 @@ load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "driver-utilities",
srcs = glob(["*.ts"]),
module_name = "@angular/dev-infra/benchmark/driver-utilities",
module_name = "@angular/dev-infra-private/benchmark/driver-utilities",
tsconfig = "//dev-infra/benchmark/component_benchmark:tsconfig-e2e.json",
deps = [
"//packages/benchpress",

View File

@ -33,7 +33,7 @@ web_test_archive(
"@io_bazel_rules_webtesting//common/conditions:mac": {"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium"},
"@io_bazel_rules_webtesting//common/conditions:windows": {"CHROMIUM": "chrome-win/chrome.exe"},
}),
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
visibility = ["//dev-infra/browsers:__subpackages__"],
)
# Override of chromedriver web_test_archive so that the archive is selected based on platform
@ -57,7 +57,7 @@ web_test_archive(
"CHROMEDRIVER": "chromedriver_win32/chromedriver.exe",
},
}),
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
visibility = ["//dev-infra/browsers:__subpackages__"],
)
browser(

View File

@ -12,7 +12,6 @@
"@octokit/graphql": "<from-root>",
"chalk": "<from-root>",
"cli-progress": "<from-root>",
"fs-extra": "<from-root>",
"glob": "<from-root>",
"inquirer": "<from-root>",
"minimatch": "<from-root>",
@ -36,8 +35,8 @@
"@bazel/typescript": "<from-root>",
"brotli": "<from-root>",
"clang-format": "<from-root>",
"cli-progress": "<from-root>",
"json5": "<from-root>",
"fs-extra": "<from-root>",
"json5": "^1.0.1",
"protractor": "<from-root>",
"rollup": "<from-root>",
"rollup-plugin-commonjs": "<from-root>",
@ -55,7 +54,7 @@
}
},
"bazelWorkspaces": {
"npm_dev_infra": {
"npm_angular_dev_infra_private": {
"version": "0.0.0-PLACEHOLDER",
"rootPath": "."
}