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:
parent
a08d18a1fe
commit
40f3bb5638
|
@ -64,7 +64,7 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
|
|||
|
||||
web_test_repositories()
|
||||
|
||||
load("//dev-infra/benchmark/browsers:browser_repositories.bzl", "browser_repositories")
|
||||
load("//dev-infra/browsers:browser_repositories.bzl", "browser_repositories")
|
||||
|
||||
browser_repositories()
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
],
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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(
|
|
@ -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": "."
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
"selenium-webdriver": ["../../node_modules/@types/selenium-webdriver/index.d.ts"],
|
||||
"rxjs/*": ["../../node_modules/rxjs/*"],
|
||||
"@angular/*": ["../../packages/*"],
|
||||
"zone.js/*": ["../../packages/zone.js/*"],
|
||||
"dev_infra/*": ["../../dev-infra/*"]
|
||||
"zone.js/*": ["../../packages/zone.js/*"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"inlineSourceMap": true,
|
||||
|
|
|
@ -70,7 +70,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
|
|||
":" + name + "_env_rollup.umd",
|
||||
] + bootstrap +
|
||||
_karma_test_required_dist_files,
|
||||
browsers = ["//dev-infra/benchmark/browsers:chromium"],
|
||||
browsers = ["//dev-infra/browsers:chromium"],
|
||||
static_files = [
|
||||
":assets/sample.json",
|
||||
":assets/worker.js",
|
||||
|
@ -93,7 +93,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
|
|||
":" + name + "_env_rollup.umd",
|
||||
"//packages/zone.js/dist:zone-testing-bundle.min.js",
|
||||
] + _karma_test_required_dist_files,
|
||||
browsers = ["//dev-infra/benchmark/browsers:chromium"],
|
||||
browsers = ["//dev-infra/browsers:chromium"],
|
||||
config_file = "//:karma-js.conf.js",
|
||||
configuration_env_vars = ["KARMA_WEB_TEST_MODE"],
|
||||
data = [
|
||||
|
|
|
@ -245,7 +245,7 @@ def karma_web_test_suite(name, **kwargs):
|
|||
runtime_deps = runtime_deps,
|
||||
bootstrap = bootstrap,
|
||||
deps = deps,
|
||||
browsers = ["//dev-infra/benchmark/browsers:chromium"],
|
||||
browsers = ["//dev-infra/browsers:chromium"],
|
||||
data = data,
|
||||
tags = tags,
|
||||
**kwargs
|
||||
|
@ -282,7 +282,7 @@ def protractor_web_test_suite(**kwargs):
|
|||
"""Default values for protractor_web_test_suite"""
|
||||
|
||||
_protractor_web_test_suite(
|
||||
browsers = ["//dev-infra/benchmark/browsers:chromium"],
|
||||
browsers = ["//dev-infra/browsers:chromium"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue