build: remove puppeteer, remaining usages of webdriver-manager and migrate AIO production test to Bazel (#49025)

This commit does three things that all related and required to get
rid of `webdriver-manager`:

* Our puppeteer protractor setup in AIO relies on webdriver-manager
because we install a corresponding chromedriver based on the puppeteer
chromium version. We would like to get rid of this brittle setup.

* We don't use `puppeteer` in many places because we manage chromium and
the driver through Bazel. This commit removes the remaining puppeteer
usage and replaces it with the Bazel-managed canonical browser

* We need to migrate the AIO production URL tests to Bazel. These
weren't part of Aspect's migration. This is needed so that we can drop
puppeteer and use the Bazel browser setup.

* Migrates some at-runtime TS `ts-node` test setup to proper idiomatic
Bazel code. Needed because it depends on code that also had to be
migrated to Bazel given the production e2e test Bazel migration (above
points).

Note: The xregexp dependency had to be added to the root project because
`ts_library` does not support compilation deps from `@aio_npm`. This is
something we will fix anyway when we have a more modern toolchain!

PR Close #49025
This commit is contained in:
Paul Gschwendtner
2023-02-10 15:09:58 +00:00
parent 993a43f87c
commit 42619bd670
23 changed files with 223 additions and 458 deletions
-1
View File
@@ -76,7 +76,6 @@ yarn_install(
data = [
YARN_LABEL,
"//:.yarnrc",
"//:scripts/puppeteer-chromedriver-versions.js",
"//tools:postinstall-patches.js",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-246cebbf2a78566ff1fe9b88fdde2459606568dc.patch",
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.7.1.patch",
+1
View File
@@ -26,6 +26,7 @@
"test-a11y-score-localhost": "bazel test //aio:test-a11y-score-localhost",
"test-pwa-score": "sh -c 'bazel run //aio/scripts:audit-web-app ${0} all:0,pwa:${1}'",
"test-pwa-score-localhost": "bazel test //aio:test-pwa-score-localhost",
"test-production-url": "bazel test //aio/tests/deployment/e2e",
"example-e2e": "node --experimental-import-meta-resolve tools/examples/run-filtered-example-e2es.mjs",
"example-list-overrides": "bazel run //aio/tools/examples:example-boilerplate list-overrides",
"example-lint": "eslint content/examples",
+1 -2
View File
@@ -14,13 +14,12 @@ set +x -eu -o pipefail
# Install dependencies.
echo -e "\nInstalling dependencies in '$aioDir'...\n-----"
yarn install --frozen-lockfile --non-interactive
yarn update-webdriver
# Run checks for target URL.
echo -e "\nChecking '$targetUrl'...\n-----"
# Run basic e2e and deployment config tests.
yarn protractor "$protractorConf" --baseUrl "$targetUrl"
yarn test-production-url --test_env=TARGET_URL="$targetUrl"
# Run PWA-score tests.
yarn test-pwa-score "$targetUrl" "$minPwaScore"
+32
View File
@@ -0,0 +1,32 @@
load("//tools:defaults.bzl", "protractor_web_test_suite", "ts_library")
ts_library(
name = "e2e_lib",
testonly = True,
srcs = glob(["*.ts"]),
deps = ["@npm//protractor"],
)
TEST_TAGS = [
# Test is run manually in `test-production.sh`,
"manual",
# Cannot run remotely because `protractor_web_test_suite` does not support `exec_properties`.
"no-remote-exec",
# This test requires an external host. If running in sandbox, allow network access.
"requires-network",
]
protractor_web_test_suite(
name = "e2e",
data = [
"//aio/tests/deployment/shared",
"@aio_npm//cjson",
],
on_prepare = "on-prepare.js",
tags = TEST_TAGS,
test_suite_tags = TEST_TAGS,
wrapped_test_tags = TEST_TAGS,
deps = [
":e2e_lib",
],
)
+35
View File
@@ -0,0 +1,35 @@
/**
* @license
* Copyright Google LLC 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 = async function () {
const targetUrl = process.env.TARGET_URL;
if (!targetUrl) {
throw new Error('No target URL via `TARGET_URL` environment variable set.');
}
protractor.browser.baseUrl = targetUrl;
const {loadLegacyUrls, loadRemoteSitemapUrls} = await import('../shared/helpers.mjs');
const [sitemapUrls, legacyUrls] = await Promise.all([
loadRemoteSitemapUrls(browser.baseUrl),
loadLegacyUrls(),
]);
console.info('Determined testing URLs', {sitemapUrls, legacyUrls});
if (sitemapUrls.length <= 100) {
throw new Error(`Too few sitemap URLs. (Expected: >100 | Found: ${sitemapUrls.length})`);
} else if (legacyUrls.length <= 100) {
throw new Error(`Too few legacy URLs. (Expected: >100 | Found: ${legacyUrls.length})`);
}
protractor.browser.params = {
sitemapUrls: sitemapUrls,
legacyUrls: legacyUrls,
};
};
@@ -1,65 +0,0 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
suites: {
full: './*.e2e-spec.ts',
smoke: './smoke-tests.e2e-spec.ts',
},
suite: 'full',
capabilities: {
browserName: 'chrome',
chromeOptions: {
binary: require('puppeteer').executablePath(),
// See /integration/README.md#browser-tests for more info on these args
args: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'],
},
},
directConnect: true,
SELENIUM_PROMISE_MANAGER: false,
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
params: {
sitemapUrls: [],
legacyUrls: [],
},
beforeLaunch() {
const {join} = require('path');
const {register} = require('ts-node');
register({project: join(__dirname, './tsconfig.json')});
},
onPrepare() {
const {SpecReporter, StacktraceOption} = require('jasmine-spec-reporter');
const {browser} = require('protractor');
const {loadLegacyUrls, loadRemoteSitemapUrls} = require('../shared/helpers');
return Promise.all([
browser.getProcessedConfig(),
loadRemoteSitemapUrls(browser.baseUrl),
loadLegacyUrls(),
]).then(([config, sitemapUrls, legacyUrls]) => {
if (sitemapUrls.length <= 100) {
throw new Error(`Too few sitemap URLs. (Expected: >100 | Found: ${sitemapUrls.length})`);
} else if (legacyUrls.length <= 100) {
throw new Error(`Too few legacy URLs. (Expected: >100 | Found: ${legacyUrls.length})`);
}
Object.assign(config.params, {sitemapUrls, legacyUrls});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY,
},
}));
});
}
};
+12 -4
View File
@@ -1,10 +1,18 @@
load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//aio/tests/deployment:__subpackages__"])
filegroup(
ts_library(
name = "shared",
srcs = [
testonly = True,
srcs = glob(["*.ts"]),
data = [
"URLS_TO_REDIRECT.txt",
"cjson.d.ts",
"helpers.ts",
"@aio_npm//cjson",
],
deps = [
"//aio/tools/firebase-test-utils",
"//packages/service-worker/config",
"@npm//canonical-path",
],
)
+25 -25
View File
@@ -1,18 +1,21 @@
// tslint:disable-next-line: no-reference
/// <reference path="./cjson.d.ts" />
import { resolve as resolvePath } from 'canonical-path';
import { load as loadJson } from 'cjson';
import { readFileSync } from 'fs';
import { get as httpGet } from 'http';
import { get as httpsGet } from 'https';
import canonicalPath from 'canonical-path';
import {load as loadJson} from 'cjson';
import {readFileSync} from 'fs';
import {get as httpGet} from 'http';
import {get as httpsGet} from 'https';
import {fileURLToPath} from 'url';
import { processNavigationUrls } from '../../../../packages/service-worker/config/src/generator';
import { FirebaseRedirector, FirebaseRedirectConfig } from '../../../tools/firebase-test-utils/FirebaseRedirector';
import {processNavigationUrls} from '../../../../packages/service-worker/config/src/generator';
import {FirebaseRedirectConfig, FirebaseRedirector} from '../../../tools/firebase-test-utils/FirebaseRedirector';
const AIO_DIR = resolvePath('aio');
export const PATH_TO_LEGACY_URLS = resolvePath(__dirname, 'URLS_TO_REDIRECT.txt');
const AIO_DIR = canonicalPath.resolve('aio');
const containingDir = canonicalPath.dirname(fileURLToPath(import.meta.url));
export const PATH_TO_LEGACY_URLS = canonicalPath.resolve(containingDir, 'URLS_TO_REDIRECT.txt');
export function getRedirector() {
return new FirebaseRedirector(loadRedirects());
@@ -22,16 +25,13 @@ export function getSwNavigationUrlChecker() {
const config = loadJson(`${AIO_DIR}/src/generated/ngsw-config.json`);
const navigationUrlSpecs = processNavigationUrls('', config.navigationUrls);
const includePatterns = navigationUrlSpecs
.filter(spec => spec.positive)
.map(spec => new RegExp(spec.regex));
const excludePatterns = navigationUrlSpecs
.filter(spec => !spec.positive)
.map(spec => new RegExp(spec.regex));
const includePatterns =
navigationUrlSpecs.filter(spec => spec.positive).map(spec => new RegExp(spec.regex));
const excludePatterns =
navigationUrlSpecs.filter(spec => !spec.positive).map(spec => new RegExp(spec.regex));
return (url: string) =>
includePatterns.some(regex => regex.test(url))
&& !excludePatterns.some(regex => regex.test(url));
return (url: string) => includePatterns.some(regex => regex.test(url)) &&
!excludePatterns.some(regex => regex.test(url));
}
export function loadRedirects(): FirebaseRedirectConfig[] {
@@ -42,9 +42,9 @@ export function loadRedirects(): FirebaseRedirectConfig[] {
export function loadLegacyUrls() {
const urls = readFileSync(PATH_TO_LEGACY_URLS, 'utf8')
.split('\n')
.filter(line => line.trim() !== '')
.map(line => line.split(/\s*-->\s*/));
.split('\n')
.filter(line => line.trim() !== '')
.map(line => line.split(/\s*-->\s*/));
return urls;
}
@@ -61,10 +61,10 @@ export async function loadRemoteSitemapUrls(host: string) {
const xml = await new Promise<string>((resolve, reject) => {
let responseText = '';
get(urlToSiteMap, res => res
.on('data', chunk => responseText += chunk)
.on('end', () => resolve(responseText))
.on('error', reject));
get(urlToSiteMap,
res => res.on('data', chunk => responseText += chunk)
.on('end', () => resolve(responseText))
.on('error', reject));
});
return extractSitemapUrls(xml);
+14 -19
View File
@@ -1,27 +1,22 @@
load("//tools:defaults.bzl", "nodejs_test")
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
nodejs_test(
package(default_visibility = ["//aio/tests/deployment:__subpackages__"])
ts_library(
name = "unit_lib",
testonly = True,
srcs = glob(["*.ts"]),
deps = [
"//aio/tests/deployment/shared",
],
)
jasmine_node_test(
name = "test",
data = [
"testFirebaseRedirection.spec.ts",
"testServiceWorkerRoutes.spec.ts",
"tsconfig.json",
"//aio:dgeni",
"//aio:firebase.json",
"//aio:tsconfig.json",
"//aio/src/generated:ngsw-config",
"//aio/tests/deployment/shared",
"//aio/tools/firebase-test-utils:sources",
"//packages/service-worker/config:sources",
"@aio_npm//@types/jasmine",
"@aio_npm//canonical-path",
"@aio_npm//cjson",
"@aio_npm//jasmine",
"@aio_npm//ts-node",
"@aio_npm//xregexp",
],
# This test script runs ts-node which seems to bypass rules_nodejs require
# patching and cannot find deps. Enable the linker for this target.
enable_linker = True,
entry_point = "test.js",
deps = [":unit_lib"],
)
-28
View File
@@ -1,28 +0,0 @@
/*
* Use this script to run the tests for redirects.
*
* We cannot use `jasmine-ts`, because it does not support passing a glob pattern any more (see
* https://github.com/svi3c/jasmine-ts/issues/33#issuecomment-511374288) and thus requires a
* `jasmine.json` config file, which does not allow us to set the `projectBaseDir`. This in turn
* means that you have to run the command from a specific directory (so that the spec paths are
* resolved correctly).
*
* Using a file like this gives us full control.
*/
const Jasmine = require('jasmine');
const {join} = require('path');
const {register} = require('ts-node');
const runfilesRoot = process.cwd();
const dirname = join(runfilesRoot, 'aio', 'tests', 'deployment', 'unit');
register({project: join(dirname, 'tsconfig.json')});
const runner = new Jasmine({projectBaseDir: dirname});
runner.loadConfig({spec_files: ['**/*.spec.ts']});
runner.execute().catch((error) => {
// Something broke so non-zero exit to prevent the process from succeeding.
console.error(error);
process.exit(1);
});
@@ -1,4 +1,4 @@
import { getSwNavigationUrlChecker, loadLegacyUrls, loadLocalSitemapUrls } from '../shared/helpers';
import {getSwNavigationUrlChecker, loadLegacyUrls, loadLocalSitemapUrls} from '../shared/helpers';
describe('ServiceWorker navigation URLs', () => {
const isNavigationUrl = getSwNavigationUrlChecker();
-1
View File
@@ -76,7 +76,6 @@
"lite-server": "^2.6.1",
"lodash": "^4.16.2",
"protractor": "~7.0.0",
"puppeteer": "10.2.0",
"rimraf": "^4.0.0",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
+13 -175
View File
@@ -2049,13 +2049,6 @@
dependencies:
"@types/node" "*"
"@types/yauzl@^2.9.1":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599"
integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==
dependencies:
"@types/node" "*"
"@webassemblyjs/ast@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
@@ -2636,7 +2629,7 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
bl@^4.0.3, bl@^4.1.0:
bl@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
@@ -2841,17 +2834,12 @@ btoa@^1.2.1:
resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73"
integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==
buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==
buffer-from@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
buffer@^5.2.1, buffer@^5.5.0:
buffer@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
@@ -3016,11 +3004,6 @@ chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.5.1, cho
optionalDependencies:
fsevents "~2.3.2"
chownr@^1.1.1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
chownr@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
@@ -3486,13 +3469,6 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, d
dependencies:
ms "2.1.2"
debug@4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
ms "2.1.2"
debug@4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
@@ -3617,11 +3593,6 @@ dev-ip@^1.0.1:
resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0"
integrity sha512-LmVkry/oDShEgSZPNgqCIp2/TlqtExeGmymru3uCELnfyjY11IzpAproLYs+1X88fXO6DBoYP3ul2Xo2yz2j6A==
devtools-protocol@0.0.901419:
version "0.0.901419"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.901419.tgz#79b5459c48fe7e1c5563c02bd72f8fec3e0cebcd"
integrity sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==
di@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
@@ -3791,13 +3762,6 @@ encoding@^0.1.13:
dependencies:
iconv-lite "^0.6.2"
end-of-stream@^1.1.0, end-of-stream@^1.4.1:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
dependencies:
once "^1.4.0"
engine.io-client@~6.2.1:
version "6.2.2"
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.2.tgz#c6c5243167f5943dcd9c4abee1bfc634aa2cbdd0"
@@ -4227,17 +4191,6 @@ external-editor@^3.0.3:
iconv-lite "^0.4.24"
tmp "^0.0.33"
extract-zip@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
dependencies:
debug "^4.1.1"
get-stream "^5.1.0"
yauzl "^2.10.0"
optionalDependencies:
"@types/yauzl" "^2.9.1"
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
@@ -4288,13 +4241,6 @@ faye-websocket@^0.11.3:
dependencies:
websocket-driver ">=0.5.1"
fd-slicer@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==
dependencies:
pend "~1.2.0"
figures@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
@@ -4429,11 +4375,6 @@ fresh@0.5.2, fresh@^0.5.2:
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
fs-constants@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
fs-extra@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291"
@@ -4517,13 +4458,6 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
get-stream@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
dependencies:
pump "^3.0.0"
get-stream@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
@@ -4853,14 +4787,6 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
https-proxy-agent@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
dependencies:
agent-base "6"
debug "4"
https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
@@ -6106,11 +6032,6 @@ node-addon-api@^3.0.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
node-fetch@2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
node-forge@^1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
@@ -6339,7 +6260,7 @@ on-headers@~1.0.2:
resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==
once@^1.3.0, once@^1.3.1, once@^1.4.0:
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
@@ -6577,11 +6498,6 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
@@ -6630,7 +6546,7 @@ piscina@3.2.0, piscina@~3.2.0:
optionalDependencies:
nice-napi "^1.0.2"
pkg-dir@4.2.0, pkg-dir@^4.1.0:
pkg-dir@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
@@ -6747,11 +6663,6 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
progress@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31"
integrity sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==
promise-inflight@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
@@ -6794,11 +6705,6 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"
proxy-from-env@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
@@ -6809,37 +6715,11 @@ psl@^1.1.28, psl@^1.1.33:
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
punycode@^2.1.0, punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
puppeteer@10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-10.2.0.tgz#7d8d7fda91e19a7cfd56986e0275448e6351849e"
integrity sha512-OR2CCHRashF+f30+LBOtAjK6sNtz2HEyTr5FqAvhf8lR/qB3uBRoIZOwQKgwoyZnMBsxX7ZdazlyBgGjpnkiMw==
dependencies:
debug "4.3.1"
devtools-protocol "0.0.901419"
extract-zip "2.0.1"
https-proxy-agent "5.0.0"
node-fetch "2.6.1"
pkg-dir "4.2.0"
progress "2.0.1"
proxy-from-env "1.1.0"
rimraf "3.0.2"
tar-fs "2.0.0"
unbzip2-stream "1.3.3"
ws "7.4.6"
q@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
@@ -6942,7 +6822,7 @@ readable-stream@^2.0.1, readable-stream@~2.3.6:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0:
readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@@ -7143,13 +7023,6 @@ rfdc@^1.3.0:
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"
integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==
rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
@@ -7157,6 +7030,13 @@ rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4:
dependencies:
glob "^7.1.3"
rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
rimraf@^4.0.0:
version "4.0.4"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.0.4.tgz#8d0a91709fdc294d40f59c773f63c44e8dc878f1"
@@ -7898,27 +7778,6 @@ tapable@^2.1.1, tapable@^2.2.0:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
tar-fs@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad"
integrity sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==
dependencies:
chownr "^1.1.1"
mkdirp "^0.5.1"
pump "^3.0.0"
tar-stream "^2.0.0"
tar-stream@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
dependencies:
bl "^4.0.3"
end-of-stream "^1.4.1"
fs-constants "^1.0.0"
inherits "^2.0.3"
readable-stream "^3.1.1"
tar@^6.1.11, tar@^6.1.2:
version "6.1.11"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
@@ -8000,7 +7859,7 @@ through2@^2.0.1:
readable-stream "~2.3.6"
xtend "~4.0.1"
through@^2.3.6, through@^2.3.8:
through@^2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==
@@ -8180,14 +8039,6 @@ ua-parser-js@^0.7.30:
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6"
integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==
unbzip2-stream@1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a"
integrity sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==
dependencies:
buffer "^5.2.1"
through "^2.3.8"
unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
@@ -8679,11 +8530,6 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
ws@7.4.6:
version "7.4.6"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
ws@^7.4.6:
version "7.5.8"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a"
@@ -8854,14 +8700,6 @@ yargs@^17.2.1, yargs@^17.3.1:
y18n "^5.0.5"
yargs-parser "^21.0.0"
yauzl@^2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==
dependencies:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
+29 -14
View File
@@ -1,4 +1,29 @@
load("//tools:defaults.bzl", "nodejs_test")
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
package(default_visibility = ["//aio/tests/deployment:__subpackages__"])
ts_library(
name = "firebase-test-utils",
srcs = glob(
["*.ts"],
exclude = ["*.spec.ts"],
),
deps = [
"@npm//@types/xregexp",
"@npm//xregexp",
],
)
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
":firebase-test-utils",
],
)
filegroup(
name = "sources",
@@ -6,19 +31,9 @@ filegroup(
visibility = ["//aio/tests/deployment/unit:__pkg__"],
)
nodejs_test(
jasmine_node_test(
name = "test",
data = [
"tsconfig.json",
":sources",
"//aio:tsconfig.json",
"@aio_npm//@types/jasmine",
"@aio_npm//jasmine",
"@aio_npm//ts-node",
"@aio_npm//xregexp",
deps = [
":test_lib",
],
# This test script runs ts-node which seems to bypass rules_nodejs require
# patching and cannot find deps. Enable the linker for this target.
enable_linker = True,
entry_point = "test.js",
)
@@ -1,6 +1,7 @@
import * as XRegExp from 'xregexp';
import { FirebaseRedirectConfig } from './FirebaseRedirector';
import { FirebaseRedirectSource } from './FirebaseRedirectSource';
import XRegExp from 'xregexp';
import {FirebaseRedirectConfig} from './FirebaseRedirector';
import {FirebaseRedirectSource} from './FirebaseRedirectSource';
export class FirebaseRedirect {
source: FirebaseRedirectSource;
@@ -8,25 +9,27 @@ export class FirebaseRedirect {
constructor(readonly rawConfig: FirebaseRedirectConfig) {
this.source = (rawConfig.regex === undefined) ?
FirebaseRedirectSource.fromGlobPattern(rawConfig.source) :
FirebaseRedirectSource.fromRegexPattern(rawConfig.regex);
FirebaseRedirectSource.fromGlobPattern(rawConfig.source) :
FirebaseRedirectSource.fromRegexPattern(rawConfig.regex);
this.destination = rawConfig.destination;
}
replace(url: string): string | undefined {
replace(url: string): string|undefined {
const match = this.source.match(url);
if (!match) {
return undefined;
}
const namedReplacers = this.source.namedGroups.map<[RegExp, string]>((name) => [
XRegExp(`:${name}`, 'g'),
match[name],
const namedReplacers = this.source.namedGroups.map<[RegExp, string]>(
(name) =>
[XRegExp(`:${name}`, 'g'),
match[name],
]);
const restReplacers = this.source.restNamedGroups.map<[RegExp, string]>((name) => [
XRegExp(`:${name}\\*`, 'g'),
match[name],
const restReplacers = this.source.restNamedGroups.map<[RegExp, string]>(
(name) =>
[XRegExp(`:${name}\\*`, 'g'),
match[name],
]);
return XRegExp.replaceEach(this.destination, [...namedReplacers, ...restReplacers]);
}
@@ -1,4 +1,4 @@
import * as XRegExp from 'xregexp';
import XRegExp from 'xregexp';
// The `XRegExp` typings are not accurate.
interface XRegExp extends RegExp {
@@ -44,7 +44,7 @@ export class FirebaseRedirectSource {
})
.replace(namedParam, '$1(?<$2>[^/]+)')
.replace(doubleStar, '$1.🐷$2') // use the pig to avoid replacing ** in next rule
.replace(star, '[^/]*') // match a single segment
.replace(star, '[^/]*') // match a single segment
.replace(possiblyEmptyInitialSegments, '(?:.*)') // deal with **/ special cases
.replace(possiblyEmptySegments, '(?:/|/.*/)') // deal with /**/ special cases
.replace(willBeStar, '*'); // other ** matches
-28
View File
@@ -1,28 +0,0 @@
/*
* Use this script to run the tests for Firebase test utils.
*
* We cannot use `jasmine-ts`, because it does not support passing a glob pattern any more (see
* https://github.com/svi3c/jasmine-ts/issues/33#issuecomment-511374288) and thus requires a
* `jasmine.json` config file, which does not allow us to set the `projectBaseDir`. This in turn
* means that you have to run the command from a specific directory (so that the spec paths are
* resolved correctly).
*
* Using a file like this gives us full control.
*/
const Jasmine = require('jasmine');
const {join} = require('path');
const {register} = require('ts-node');
const runfilesRoot = process.cwd();
const dirname = join(runfilesRoot, 'aio', 'tools', 'firebase-test-utils');
register({project: join(dirname, 'tsconfig.json')});
const runner = new Jasmine({projectBaseDir: dirname});
runner.loadConfig({spec_files: ['**/*.spec.ts']});
runner.execute().catch((error) => {
// Something broke so non-zero exit to prevent the process from succeeding.
console.error(error);
process.exit(1);
});
+3 -4
View File
@@ -1,9 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
"esModuleInterop": true,
"module": "ES2020"
},
"include": [
"**/*.ts"
]
"include": ["**/*.ts"]
}
+3 -3
View File
@@ -91,7 +91,6 @@
"@types/chrome": "^0.0.208",
"@types/convert-source-map": "^1.5.1",
"@types/diff": "^5.0.0",
"@types/events": "3.0.0",
"@types/filesystem": "^0.0.32",
"@types/hammerjs": "2.0.41",
"@types/jasmine": "^4.0.0",
@@ -148,7 +147,6 @@
"ngx-flamegraph": "0.0.11",
"nodejs-websocket": "^1.7.2",
"protractor": "^7.0.0",
"puppeteer": "18.0.5",
"reflect-metadata": "^0.1.3",
"requirejs": "^2.3.6",
"rollup": "~2.79.0",
@@ -184,6 +182,7 @@
"@octokit/graphql": "^5.0.0",
"@types/cldrjs": "^0.4.22",
"@types/cli-progress": "^3.4.2",
"@types/xregexp": "^4.4.0",
"@yarnpkg/lockfile": "^1.1.0",
"check-side-effects": "0.0.23",
"cldr": "7.3.0",
@@ -208,7 +207,8 @@
"tslint-no-toplevel-property-access": "0.0.2",
"typed-graphqlify": "^3.1.1",
"vlq": "2.0.4",
"vrsource-tslint-rules": "6.0.0"
"vrsource-tslint-rules": "6.0.0",
"xregexp": "^5.1.1"
},
"// 4": "Overwrite graceful-fs to a version that does not rely on the 'natives' package. This fixes gulp for >= 10.13, more information: #28213",
"// 5": "Ensure that transitive dependencies on `https-proxy-agent` are at minimum v5 as older versions patch NodeJS directly, breaking tools like webdriver which is used by the karma-sauce-launcher as an example.",
+1 -4
View File
@@ -15,9 +15,7 @@
"timezone": "America/Tijuana",
"lockFileMaintenance": {"enabled": true},
"labels": ["target: patch", "area: build & ci", "action: review"],
"ignorePaths": [
"aio/content/demos/first-app/package.json"
],
"ignorePaths": ["aio/content/demos/first-app/package.json"],
"ignoreDeps": [
"@angular/animations-12",
"@angular/common-12",
@@ -37,7 +35,6 @@
"angular-mocks-1.6",
"angular-mocks-1.7",
"angular-mocks-1.8",
"puppeteer",
"remark",
"remark-html",
"selenium-webdriver",
@@ -1,18 +0,0 @@
/**
* @license
* Copyright Google LLC 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
*/
// Mapping of puppeteer releases to their default Chrome version
// derived from https://github.com/puppeteer/puppeteer/blob/master/docs/api.md.
// The puppeteer package.json file contains the compatible Chrome revision such as
// "chromium_revision": "722234" but this does not map easily to the Chrome version
// so we use this mapping here instead.
module.exports = {
'18.0.5' : '106.0.5249.21',
'10.2.0' : '93.0.4577.63',
};
-2
View File
@@ -110,7 +110,6 @@ def ts_library(
# Match the types[] in //packages:tsconfig-test.json
deps.append("@npm//@types/jasmine")
deps.append("@npm//@types/node")
deps.append("@npm//@types/events")
if not tsconfig and testonly:
tsconfig = _DEFAULT_TSCONFIG_TEST
@@ -154,7 +153,6 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps
# Match the types[] in //packages:tsconfig-test.json
deps.append("@npm//@types/jasmine")
deps.append("@npm//@types/node")
deps.append("@npm//@types/events")
if not tsconfig and testonly:
tsconfig = _DEFAULT_TSCONFIG_TEST
+36 -50
View File
@@ -236,7 +236,6 @@
"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#f7d26a0b0d6bd2043f2d32c2a99db903539d0c07":
version "0.0.0-07b0f6423e0c5266b3792d8f4af43b8fd3f3d41b"
uid f7d26a0b0d6bd2043f2d32c2a99db903539d0c07
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#f7d26a0b0d6bd2043f2d32c2a99db903539d0c07"
dependencies:
"@angular-devkit/build-angular" "15.2.0-next.3"
@@ -391,7 +390,6 @@
"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#8aa60413b3e14daf2f33a29fe9d09faa3e5bcb75":
version "0.0.0-07b0f6423e0c5266b3792d8f4af43b8fd3f3d41b"
uid "8aa60413b3e14daf2f33a29fe9d09faa3e5bcb75"
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#8aa60413b3e14daf2f33a29fe9d09faa3e5bcb75"
dependencies:
"@yarnpkg/lockfile" "^1.1.0"
@@ -1908,6 +1906,14 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"
"@babel/runtime-corejs3@^7.16.5":
version "7.20.13"
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.20.13.tgz#ad012857db412ab0b5ccf184b67be2cfcc2a1dcf"
integrity sha512-p39/6rmY9uvlzRiLZBIB3G9/EBr66LBMcYm7fIDeSBNdRjF2AGD3rFZucUyAgGHC2N+7DdLvVi33uTjSE44FIw==
dependencies:
core-js-pure "^3.25.1"
regenerator-runtime "^0.13.11"
"@babel/runtime@7.20.13":
version "7.20.13"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b"
@@ -4097,11 +4103,6 @@
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40"
integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==
"@types/events@3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18":
version "4.17.29"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.29.tgz#2a1795ea8e9e9c91b4a4bbe475034b20c1ec711c"
@@ -4445,6 +4446,13 @@
dependencies:
"@types/node" "*"
"@types/xregexp@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@types/xregexp/-/xregexp-4.4.0.tgz#84ce998f45f1a651e0971b942b951ad1e5b7d4fc"
integrity sha512-RJJHNci1sRRq8nZjWxzCbQdLhJVq+JcDHpsdzoTtFAR9qdsMhAWqKQ1NHsNcenKDtLsOwCBe/kfSKM82yXtocg==
dependencies:
xregexp "*"
"@types/yargs-parser@*":
version "21.0.0"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
@@ -6888,6 +6896,11 @@ core-js-compat@^3.25.1:
dependencies:
browserslist "^4.21.4"
core-js-pure@^3.25.1:
version "3.27.2"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.27.2.tgz#47e9cc96c639eefc910da03c3ece26c5067c7553"
integrity sha512-Cf2jqAbXgWH3VVzjyaaFkY1EBazxugUepGymDoeteyYr9ByX51kD2jdHZlsEF/xnJMyN3Prua7mQuzwMg6Zc9A==
core-js@^3.6.5:
version "3.23.4"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.4.tgz#92d640faa7f48b90bbd5da239986602cfc402aa6"
@@ -6971,13 +6984,6 @@ cross-env@^7.0.3:
dependencies:
cross-spawn "^7.0.1"
cross-fetch@3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
dependencies:
node-fetch "2.6.7"
cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@@ -7344,7 +7350,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
dependencies:
ms "2.0.0"
debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -7784,11 +7790,6 @@ dev-ip@^1.0.1:
resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0"
integrity sha512-LmVkry/oDShEgSZPNgqCIp2/TlqtExeGmymru3uCELnfyjY11IzpAproLYs+1X88fXO6DBoYP3ul2Xo2yz2j6A==
devtools-protocol@0.0.1036444:
version "0.0.1036444"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1036444.tgz#a570d3cdde61527c82f9b03919847b8ac7b1c2b9"
integrity sha512-0y4f/T8H9lsESV9kKP1HDUXgHxCdniFeJh6Erq+FbdOEvp/Ydp9t8kcAAM5gOd17pMrTDlFWntoHtzzeTUWKNw==
devtools-protocol@0.0.818844:
version "0.0.818844"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e"
@@ -8614,7 +8615,7 @@ extglob@^2.0.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"
extract-zip@2.0.1, extract-zip@^2.0.0:
extract-zip@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
@@ -12569,7 +12570,7 @@ node-emoji@^1.11.0:
dependencies:
lodash "^4.17.21"
node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7:
node-fetch@^2.6.1, node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
@@ -13739,7 +13740,7 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
progress@2.0.3, progress@^2.0.1, progress@^2.0.3:
progress@^2.0.1, progress@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
@@ -13850,7 +13851,7 @@ proxy-agent@^5.0.0:
proxy-from-env "^1.0.0"
socks-proxy-agent "^5.0.0"
proxy-from-env@1.1.0, proxy-from-env@^1.0.0:
proxy-from-env@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
@@ -13932,23 +13933,6 @@ puppeteer-core@^5.1.0:
unbzip2-stream "^1.3.3"
ws "^7.2.3"
puppeteer@18.0.5:
version "18.0.5"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-18.0.5.tgz#873223b17b92345182c5b5e8cfbd6f3117f1547d"
integrity sha512-s4erjxU0VtKojPvF+KvLKG6OHUPw7gO2YV1dtOsoryyCbhrs444fXb4QZqGWuTv3V/rgSCUzeixxu34g0ZkSMA==
dependencies:
cross-fetch "3.1.5"
debug "4.3.4"
devtools-protocol "0.0.1036444"
extract-zip "2.0.1"
https-proxy-agent "5.0.1"
progress "2.0.3"
proxy-from-env "1.1.0"
rimraf "3.0.2"
tar-fs "2.1.1"
unbzip2-stream "1.4.3"
ws "8.8.1"
q@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
@@ -14558,7 +14542,7 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.3:
dependencies:
glob "^7.1.3"
rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2:
rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
@@ -15816,7 +15800,7 @@ tapable@^2.1.1, tapable@^2.2.0:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
tar-fs@2.1.1, tar-fs@^2.0.0:
tar-fs@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
@@ -16424,7 +16408,7 @@ uglify-js@^3.1.4:
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.2.tgz#0481e1dbeed343ad1c2ddf3c6d42e89b7a6d4def"
integrity sha512-AaQNokTNgExWrkEYA24BTNMSjyqEXPSfhqoS0AxmHkCJ4U+Dyy5AvbGV/sqxuxficEfGGoX3zWw9R7QpLFfEsg==
unbzip2-stream@1.4.3, unbzip2-stream@^1.0.9, unbzip2-stream@^1.3.3:
unbzip2-stream@^1.0.9, unbzip2-stream@^1.3.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7"
integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==
@@ -16946,7 +16930,7 @@ webdriver-js-extender@2.1.0:
"@types/selenium-webdriver" "^3.0.0"
selenium-webdriver "^3.0.1"
webdriver-manager@12.1.8, webdriver-manager@^12.1.7:
webdriver-manager@^12.1.7:
version "12.1.8"
resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.8.tgz#5e70e73eaaf53a0767d5745270addafbc5905fd4"
integrity sha512-qJR36SXG2VwKugPcdwhaqcLQOD7r8P2Xiv9sfNbfZrKBnX243iAkOueX1yAmeNgIKhJ3YAT/F2gq6IiEZzahsg==
@@ -17291,11 +17275,6 @@ write-file-atomic@^3.0.0:
signal-exit "^3.0.2"
typedarray-to-buffer "^3.1.5"
ws@8.8.1:
version "8.8.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0"
integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==
ws@>=8.7.0, ws@^8.4.2:
version "8.8.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769"
@@ -17344,6 +17323,13 @@ xpath@^0.0.32:
resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.32.tgz#1b73d3351af736e17ec078d6da4b8175405c48af"
integrity sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==
xregexp@*, xregexp@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-5.1.1.tgz#6d3fe18819e3143aaf52f9284d34f49a59583ebb"
integrity sha512-fKXeVorD+CzWvFs7VBuKTYIW63YD1e1osxwQ8caZ6o1jg6pDAbABDG54LCIq0j5cy7PjRvGIq6sef9DYPXpncg==
dependencies:
"@babel/runtime-corejs3" "^7.16.5"
xregexp@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943"