Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: replace "concurrently" dependency with a utils/concurrently.js script (#41522)
Dmitry Gozman8e802fa5b0fd
diff --git a/package-lock.json b/package-lock.jsonindex 4b00e1f970..f0a4a1144c 100644--- a/package-lock.json+++ b/package-lock.json@@ -78,7 +78,6 @@"chromium-bidi": "^12.0.0","colors": "1.4.0","commander": "^13.0.0",- "concurrently": "^6.2.1","cross-env": "^7.0.3","debug": "^4.3.4","diff": "^8.0.3",@@ -932,15 +931,6 @@"@babel/core": "^7.0.0-0"}},- "node_modules/@babel/runtime": {- "version": "7.28.3",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.3.tgz",- "integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==",- "dev": true,- "engines": {- "node": ">=6.9.0"- }- },"node_modules/@babel/template": {"version": "7.28.6","resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",@@ -3354,15 +3344,6 @@"node": ">=6"}},- "node_modules/ansi-regex": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",- "dev": true,- "engines": {- "node": ">=8"- }- },"node_modules/ansi-styles": {"version": "4.3.0","resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",@@ -3880,17 +3861,6 @@"url": "https://github.com/sponsors/colinhacks"}},- "node_modules/cliui": {- "version": "7.0.4",- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",- "dev": true,- "dependencies": {- "string-width": "^4.2.0",- "strip-ansi": "^6.0.0",- "wrap-ansi": "^7.0.0"- }- },"node_modules/codemirror": {"version": "5.65.18","resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.18.tgz",@@ -3939,28 +3909,6 @@"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==","dev": true},- "node_modules/concurrently": {- "version": "6.5.1",- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz",- "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==",- "dev": true,- "dependencies": {- "chalk": "^4.1.0",- "date-fns": "^2.16.1",- "lodash": "^4.17.21",- "rxjs": "^6.6.3",- "spawn-command": "^0.0.2-1",- "supports-color": "^8.1.0",- "tree-kill": "^1.2.2",- "yargs": "^16.2.0"- },- "bin": {- "concurrently": "bin/concurrently.js"- },- "engines": {- "node": ">=10.0.0"- }- },"node_modules/content-disposition": {"version": "1.0.1","resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",@@ -4112,22 +4060,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/date-fns": {- "version": "2.30.0",- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",- "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",- "dev": true,- "dependencies": {- "@babel/runtime": "^7.21.0"- },- "engines": {- "node": ">=0.11"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/date-fns"- }- },"node_modules/debug": {"version": "4.4.3","resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",@@ -4328,12 +4260,6 @@"dev": true,"license": "MIT"},- "node_modules/emoji-regex": {- "version": "8.0.0",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",- "dev": true- },"node_modules/encodeurl": {"version": "2.0.0","resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",@@ -5379,15 +5305,6 @@"node": ">=6.9.0"}},- "node_modules/get-caller-file": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",- "dev": true,- "engines": {- "node": "6.* || 8.* || >= 10.*"- }- },"node_modules/get-east-asian-width": {"version": "1.3.0","resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",@@ -6007,15 +5924,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/is-fullwidth-code-point": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",- "dev": true,- "engines": {- "node": ">=8"- }- },"node_modules/is-generator-function": {"version": "1.1.0","resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz",@@ -7626,15 +7534,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/require-directory": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",- "dev": true,- "engines": {- "node": ">=0.10.0"- }- },"node_modules/require-from-string": {"version": "2.0.2","resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",@@ -7745,24 +7644,6 @@"node": ">= 18"}},- "node_modules/rxjs": {- "version": "6.6.7",- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",- "dev": true,- "dependencies": {- "tslib": "^1.9.0"- },- "engines": {- "npm": ">=2.0.0"- }- },- "node_modules/rxjs/node_modules/tslib": {- "version": "1.14.1",- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",- "dev": true- },"node_modules/safe-array-concat": {"version": "1.1.3","resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",@@ -8137,12 +8018,6 @@"source-map": "^0.6.0"}},- "node_modules/spawn-command": {- "version": "0.0.2",- "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",- "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==",- "dev": true- },"node_modules/spdx-compare": {"version": "1.0.0","resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz",@@ -8255,20 +8130,6 @@"node": ">= 0.4"}},- "node_modules/string-width": {- "version": "4.2.3",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",- "dev": true,- "dependencies": {- "emoji-regex": "^8.0.0",- "is-fullwidth-code-point": "^3.0.0",- "strip-ansi": "^6.0.1"- },- "engines": {- "node": ">=8"- }- },"node_modules/string.prototype.matchall": {"version": "4.0.12","resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",@@ -8362,18 +8223,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/strip-ansi": {- "version": "6.0.1",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",- "dev": true,- "dependencies": {- "ansi-regex": "^5.0.1"- },- "engines": {- "node": ">=8"- }- },"node_modules/strip-bom": {"version": "3.0.0","resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",@@ -8408,21 +8257,6 @@"node": ">= 8.0"}},- "node_modules/supports-color": {- "version": "8.1.1",- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",- "dev": true,- "dependencies": {- "has-flag": "^4.0.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/supports-color?sponsor=1"- }- },"node_modules/supports-preserve-symlinks-flag": {"version": "1.0.0","resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",@@ -8477,15 +8311,6 @@"resolved": "packages/trace-viewer","link": true},- "node_modules/tree-kill": {- "version": "1.2.2",- "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",- "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",- "dev": true,- "bin": {- "tree-kill": "cli.js"- }- },"node_modules/treeify": {"version": "1.1.0","resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz",@@ -9007,23 +8832,6 @@"node": ">=0.10.0"}},- "node_modules/wrap-ansi": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",- "dev": true,- "dependencies": {- "ansi-styles": "^4.0.0",- "string-width": "^4.1.0",- "strip-ansi": "^6.0.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"- }- },"node_modules/wrappy": {"version": "1.0.2","resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",@@ -9074,15 +8882,6 @@"node": ">=4.0"}},- "node_modules/y18n": {- "version": "5.0.8",- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",- "dev": true,- "engines": {- "node": ">=10"- }- },"node_modules/yallist": {"version": "3.1.1","resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",@@ -9103,33 +8902,6 @@"url": "https://github.com/sponsors/eemeli"}},- "node_modules/yargs": {- "version": "16.2.0",- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",- "dev": true,- "dependencies": {- "cliui": "^7.0.2",- "escalade": "^3.1.1",- "get-caller-file": "^2.0.5",- "require-directory": "^2.1.1",- "string-width": "^4.2.0",- "y18n": "^5.0.5",- "yargs-parser": "^20.2.2"- },- "engines": {- "node": ">=10"- }- },- "node_modules/yargs-parser": {- "version": "20.2.9",- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",- "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",- "dev": true,- "engines": {- "node": ">=10"- }- },"node_modules/yauzl": {"version": "3.3.2","resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.3.2.tgz",diff --git a/package.json b/package.jsonindex b8545aaa31..84817a15f9 100644--- a/package.json+++ b/package.json@@ -37,11 +37,11 @@"lint": "npm run eslint && npm run tsc && npm run doc && npm run check-deps && node utils/generate_channels.js && node utils/generate_types/ && npm run lint-tests && npm run test-types && npm run lint-packages","lint-packages": "node utils/workspace.js --ensure-consistent","lint-tests": "node utils/lint_tests.js",- "flint": "concurrently \"npm run eslint\" \"npm run tsc\" \"npm run doc\" \"npm run check-deps\" \"node utils/generate_channels.js\" \"npm run lint-tests\" \"npm run test-types\" \"npm run lint-packages\" \"node utils/doclint/linting-code-snippets/cli.js --js-only\"",+ "flint": "node utils/concurrently.js \"npm run eslint\" \"npm run tsc\" \"npm run doc\" \"npm run check-deps\" \"node utils/generate_channels.js\" \"npm run lint-tests\" \"npm run test-types\" \"npm run lint-packages\" \"node utils/doclint/linting-code-snippets/cli.js --js-only\"","clean": "node utils/build/clean.js","build": "node utils/build/build.js","watch": "node utils/build/build.js --watch --lint",- "test-types": "node utils/generate_types/ && concurrently \"tsc -p utils/generate_types/test/tsconfig.json\" \"tsc -p ./tests/\"",+ "test-types": "node utils/generate_types/ && node utils/concurrently.js \"tsc -p utils/generate_types/test/tsconfig.json\" \"tsc -p ./tests/\"","roll": "node utils/roll_browser.js","check-deps": "node utils/check_deps.js","build-android-driver": "./utils/build_android_driver.sh",@@ -120,7 +120,6 @@"chromium-bidi": "^12.0.0","colors": "1.4.0","commander": "^13.0.0",- "concurrently": "^6.2.1","cross-env": "^7.0.3","debug": "^4.3.4","diff": "^8.0.3",diff --git a/utils/concurrently.js b/utils/concurrently.jsnew file mode 100644index 0000000000..4fe1c99591--- /dev/null+++ b/utils/concurrently.js@@ -0,0 +1,57 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * 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.+ */++const { spawn } = require('child_process');++const commands = process.argv.slice(2);+if (!commands.length) {+ console.error('Usage: node utils/concurrently.js "<command>" ["<command>" ...]');+ process.exit(1);+}++for (let index = 0; index < commands.length; index++)+ run(commands[index], `[${index}]`);++function run(command, prefix) {+ const child = spawn(command, { shell: true, stdio: ['ignore', 'pipe', 'pipe'] });+ prefixLines(child.stdout, process.stdout, prefix);+ prefixLines(child.stderr, process.stderr, prefix);+ process.stdout.write(`${prefix} running "${command}"\n`);+ child.on('error', error => {+ process.exitCode = 1;+ process.stderr.write(`${prefix} failed to start: ${error.message}\n`);+ });+ child.on('close', code => {+ if (code)+ process.exitCode = 1;+ process.stdout.write(`${prefix} ${command} exited with code ${code}\n`);+ });+}++function prefixLines(stream, out, prefix) {+ let buffer = '';+ stream.on('data', chunk => {+ buffer += chunk;+ const lines = buffer.split('\n');+ buffer = lines.pop();+ for (const line of lines)+ out.write(`${prefix} ${line}\n`);+ });+ stream.on('end', () => {+ if (buffer)+ out.write(`${prefix} ${buffer}\n`);+ });+}