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: get rid of rimraf package (#27790)
Max Schmitt5f366088bea1
diff --git a/package-lock.json b/package-lock.jsonindex 9ba45b2cac..325ada8095 100644--- a/package-lock.json+++ b/package-lock.json@@ -59,7 +59,6 @@"proxy": "^1.0.2","react": "^18.1.0","react-dom": "^18.1.0",- "rimraf": "^4.4.1","socksv5": "0.0.6","ssim.js": "^3.5.0","typescript": "^5.2.2",@@ -4956,15 +4955,6 @@"dev": true,"license": "MIT"},- "node_modules/minipass": {- "version": "4.2.8",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",- "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",- "dev": true,- "engines": {- "node": ">=8"- }- },"node_modules/mkdirp": {"version": "0.5.5","dev": true,@@ -5345,40 +5335,6 @@"dev": true,"license": "MIT"},- "node_modules/path-scurry": {- "version": "1.10.1",- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",- "dev": true,- "dependencies": {- "lru-cache": "^9.1.1 || ^10.0.0",- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/path-scurry/node_modules/lru-cache": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",- "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",- "dev": true,- "engines": {- "node": "14 || >=16.14"- }- },- "node_modules/path-scurry/node_modules/minipass": {- "version": "7.0.2",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz",- "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==",- "dev": true,- "engines": {- "node": ">=16 || 14 >=14.17"- }- },"node_modules/path-type": {"version": "4.0.0","resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",@@ -5783,66 +5739,6 @@"node": ">=0.10.0"}},- "node_modules/rimraf": {- "version": "4.4.1",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz",- "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==",- "dev": true,- "dependencies": {- "glob": "^9.2.0"- },- "bin": {- "rimraf": "dist/cjs/src/bin.js"- },- "engines": {- "node": ">=14"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/rimraf/node_modules/brace-expansion": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",- "dev": true,- "dependencies": {- "balanced-match": "^1.0.0"- }- },- "node_modules/rimraf/node_modules/glob": {- "version": "9.3.5",- "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",- "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",- "dev": true,- "dependencies": {- "fs.realpath": "^1.0.0",- "minimatch": "^8.0.2",- "minipass": "^4.2.4",- "path-scurry": "^1.6.1"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/rimraf/node_modules/minimatch": {- "version": "8.0.4",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",- "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",- "dev": true,- "dependencies": {- "brace-expansion": "^2.0.1"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/roarr": {"version": "2.15.4","dev": true,@@ -10826,12 +10722,6 @@"version": "1.2.6","dev": true},- "minipass": {- "version": "4.2.8",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",- "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",- "dev": true- },"mkdirp": {"version": "0.5.5","dev": true,@@ -11079,30 +10969,6 @@"version": "1.0.7","dev": true},- "path-scurry": {- "version": "1.10.1",- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",- "dev": true,- "requires": {- "lru-cache": "^9.1.1 || ^10.0.0",- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"- },- "dependencies": {- "lru-cache": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",- "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",- "dev": true- },- "minipass": {- "version": "7.0.2",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz",- "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==",- "dev": true- }- }- },"path-type": {"version": "4.0.0","resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",@@ -11381,47 +11247,6 @@"version": "1.0.4","dev": true},- "rimraf": {- "version": "4.4.1",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz",- "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==",- "dev": true,- "requires": {- "glob": "^9.2.0"- },- "dependencies": {- "brace-expansion": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",- "dev": true,- "requires": {- "balanced-match": "^1.0.0"- }- },- "glob": {- "version": "9.3.5",- "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",- "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",- "dev": true,- "requires": {- "fs.realpath": "^1.0.0",- "minimatch": "^8.0.2",- "minipass": "^4.2.4",- "path-scurry": "^1.6.1"- }- },- "minimatch": {- "version": "8.0.4",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",- "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",- "dev": true,- "requires": {- "brace-expansion": "^2.0.1"- }- }- }- },"roarr": {"version": "2.15.4","dev": true,diff --git a/package.json b/package.jsonindex b968e6d6a0..d489bedaaa 100644--- a/package.json+++ b/package.json@@ -97,7 +97,6 @@"proxy": "^1.0.2","react": "^18.1.0","react-dom": "^18.1.0",- "rimraf": "^4.4.1","socksv5": "0.0.6","ssim.js": "^3.5.0","typescript": "^5.2.2",diff --git a/packages/playwright-core/ThirdPartyNotices.txt b/packages/playwright-core/ThirdPartyNotices.txtindex eb9877ed57..e2c4d1dcac 100644--- a/packages/playwright-core/ThirdPartyNotices.txt+++ b/packages/playwright-core/ThirdPartyNotices.txt@@ -9,7 +9,6 @@ This project incorporates components from the projects listed below. The origina- [email protected] (https://github.com/TooTallNate/node-agent-base)- [email protected] (https://github.com/juliangruber/balanced-match)- [email protected] (https://github.com/juliangruber/brace-expansion)-- [email protected] (https://github.com/juliangruber/brace-expansion)- [email protected] (https://github.com/brianloveswords/buffer-crc32)- [email protected] (https://github.com/codemirror/CodeMirror)- [email protected] (https://github.com/Marak/colors.js)@@ -21,32 +20,24 @@ This project incorporates components from the projects listed below. The origina- [email protected] (https://github.com/sindresorhus/escape-string-regexp)- [email protected] (https://github.com/maxogden/extract-zip)- [email protected] (https://github.com/andrewrk/node-fd-slicer)-- [email protected] (https://github.com/isaacs/fs.realpath)- [email protected] (https://github.com/sindresorhus/get-stream)-- [email protected] (https://github.com/isaacs/node-glob)- [email protected] (https://github.com/isaacs/node-graceful-fs)- [email protected] (https://github.com/TooTallNate/node-https-proxy-agent)- [email protected] (https://github.com/indutny/node-ip)- [email protected] (https://github.com/sindresorhus/is-docker)- [email protected] (https://github.com/sindresorhus/is-wsl)- [email protected] (https://github.com/eugeneware/jpeg-js)-- [email protected] (https://github.com/isaacs/node-lru-cache)- [email protected] (https://github.com/broofa/mime)- [email protected] (https://github.com/isaacs/minimatch)-- [email protected] (https://github.com/isaacs/minimatch)-- [email protected] (https://github.com/isaacs/minipass)-- [email protected] (https://github.com/isaacs/minipass)- [email protected] (https://github.com/zeit/ms)- [email protected] (https://github.com/isaacs/once)- [email protected] (https://github.com/sindresorhus/open)-- [email protected] (https://github.com/isaacs/path-scurry)- [email protected] (https://github.com/andrewrk/node-pend)- [email protected] (https://github.com/lukeapage/pngjs)- [email protected] (https://github.com/visionmedia/node-progress)- [email protected] (https://github.com/Rob--W/proxy-from-env)- [email protected] (https://github.com/mafintosh/pump)- [email protected] (https://github.com/tim-kos/node-retry)-- [email protected] (https://github.com/isaacs/rimraf)- [email protected] (https://github.com/tapjs/signal-exit)- [email protected] (https://github.com/JoshGlazebrook/smart-buffer)- [email protected] (https://github.com/TooTallNate/node-socks-proxy-agent)@@ -311,32 +302,6 @@ SOFTWARE.=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-MIT License--Copyright (c) 2013 Julian Gruber <[email protected]>--Permission is hereby granted, free of charge, to any person obtaining a copy-of this software and associated documentation files (the "Software"), to deal-in the Software without restriction, including without limitation the rights-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-copies of the Software, and to permit persons to whom the Software is-furnished to do so, subject to the following conditions:--The above copyright notice and this permission notice shall be included in all-copies or substantial portions of the Software.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE-SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The MIT License@@ -599,54 +564,6 @@ SOFTWARE.=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) Isaac Z. Schlueter and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.--------This library bundles a version of the `fs.realpath` and `fs.realpathSync`-methods from Node.js v0.10 under the terms of the Node.js MIT license.--Node's license follows, also included at the header of `old.js` which contains-the licensed code:-- Copyright Joyent, Inc. and other Node contributors.-- Permission is hereby granted, free of charge, to any person obtaining a- copy of this software and associated documentation files (the "Software"),- to deal in the Software without restriction, including without limitation- the rights to use, copy, modify, merge, publish, distribute, sublicense,- and/or sell copies of the Software, and to permit persons to whom the- Software is furnished to do so, subject to the following conditions:-- The above copyright notice and this permission notice shall be included in- all copies or substantial portions of the Software.-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER- DEALINGS IN THE SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================MIT License@@ -661,26 +578,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The ISC License@@ -996,26 +893,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The MIT License (MIT)@@ -1062,66 +939,6 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION--%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION--%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The MIT License (MIT)@@ -1182,66 +999,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-# Blue Oak Model License--Version 1.0.0--## Purpose--This license gives everyone as much permission to work with-this software as possible, while protecting contributors-from liability.--## Acceptance--In order to receive this license, you must agree to its-rules. The rules of this license are both obligations-under that agreement and conditions to your license.-You must not do anything with this software that triggers-a rule that you cannot or will not follow.--## Copyright--Each contributor licenses you to do everything with this-software that would otherwise infringe that contributor's-copyright in it.--## Notices--You must ensure that everyone who gets a copy of-any part of this software from you, with or without-changes, also gets the text of this license or a link to-<https://blueoakcouncil.org/license/1.0.0>.--## Excuse--If anyone notifies you in writing that you have not-complied with [Notices](#notices), you can keep your-license by taking all practical steps to comply within 30-days after the notice. If you do not do so, your license-ends immediately.--## Patent--Each contributor licenses you to do everything with this-software that would otherwise infringe any patent claims-they can license or become able to license.--## Reliability--No contributor can revoke this license.--## No Liability--***As far as the law allows, this software comes as is,-without any warranty or condition, and no contributor-will be liable to anyone for any damages related to this-software or this license, under any kind of legal claim.***-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The MIT License (Expat)@@ -1399,26 +1156,6 @@ Felix Geisendörfer ([email protected])=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE-=========================================-The ISC License--Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors--Permission to use, copy, modify, and/or distribute this software for any-purpose with or without fee is hereby granted, provided that the above-copyright notice and this permission notice appear in all copies.--THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-=========================================-END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================The ISC License@@ -1771,6 +1508,6 @@ END OF [email protected] AND INFORMATIONSUMMARY BEGIN HERE=========================================-Total Packages: 52+Total Packages: 43=========================================END OF SUMMARY\ No newline at end of filediff --git a/packages/playwright-core/bundles/utils/package-lock.json b/packages/playwright-core/bundles/utils/package-lock.jsonindex 81483a1e42..db72b4bc09 100644--- a/packages/playwright-core/bundles/utils/package-lock.json+++ b/packages/playwright-core/bundles/utils/package-lock.json@@ -21,7 +21,6 @@"progress": "2.0.3","proxy-from-env": "1.1.0","retry": "0.12.0",- "rimraf": "^4.4.1","signal-exit": "3.0.7","socks-proxy-agent": "6.1.1","stack-utils": "2.0.5",@@ -207,50 +206,6 @@"node": ">=8"}},- "node_modules/fs.realpath": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="- },- "node_modules/glob": {- "version": "9.3.5",- "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",- "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",- "dependencies": {- "fs.realpath": "^1.0.0",- "minimatch": "^8.0.2",- "minipass": "^4.2.4",- "path-scurry": "^1.6.1"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/glob/node_modules/brace-expansion": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",- "dependencies": {- "balanced-match": "^1.0.0"- }- },- "node_modules/glob/node_modules/minimatch": {- "version": "8.0.4",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",- "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",- "dependencies": {- "brace-expansion": "^2.0.1"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/graceful-fs": {"version": "4.2.10","resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",@@ -303,14 +258,6 @@"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz","integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="},- "node_modules/lru-cache": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",- "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",- "engines": {- "node": "14 || >=16.14"- }- },"node_modules/mime": {"version": "3.0.0","resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",@@ -333,14 +280,6 @@"node": "*"}},- "node_modules/minipass": {- "version": "4.2.8",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",- "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",- "engines": {- "node": ">=8"- }- },"node_modules/ms": {"version": "2.1.2","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",@@ -362,29 +301,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/path-scurry": {- "version": "1.10.1",- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",- "dependencies": {- "lru-cache": "^9.1.1 || ^10.0.0",- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "node_modules/path-scurry/node_modules/minipass": {- "version": "7.0.2",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz",- "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==",- "engines": {- "node": ">=16 || 14 >=14.17"- }- },"node_modules/pngjs": {"version": "6.0.0","resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz",@@ -414,23 +330,6 @@"node": ">= 4"}},- "node_modules/rimraf": {- "version": "4.4.1",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz",- "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==",- "dependencies": {- "glob": "^9.2.0"- },- "bin": {- "rimraf": "dist/cjs/src/bin.js"- },- "engines": {- "node": ">=14"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/signal-exit": {"version": "3.0.7","resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",@@ -649,40 +548,6 @@"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz","integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="},- "fs.realpath": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="- },- "glob": {- "version": "9.3.5",- "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",- "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",- "requires": {- "fs.realpath": "^1.0.0",- "minimatch": "^8.0.2",- "minipass": "^4.2.4",- "path-scurry": "^1.6.1"- },- "dependencies": {- "brace-expansion": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",- "requires": {- "balanced-match": "^1.0.0"- }- },- "minimatch": {- "version": "8.0.4",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",- "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",- "requires": {- "brace-expansion": "^2.0.1"- }- }- }- },"graceful-fs": {"version": "4.2.10","resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",@@ -720,11 +585,6 @@"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz","integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="},- "lru-cache": {- "version": "10.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",- "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw=="- },"mime": {"version": "3.0.0","resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",@@ -738,11 +598,6 @@"brace-expansion": "^1.1.7"}},- "minipass": {- "version": "4.2.8",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",- "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="- },"ms": {"version": "2.1.2","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",@@ -758,22 +613,6 @@"is-wsl": "^2.2.0"}},- "path-scurry": {- "version": "1.10.1",- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",- "requires": {- "lru-cache": "^9.1.1 || ^10.0.0",- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"- },- "dependencies": {- "minipass": {- "version": "7.0.2",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz",- "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA=="- }- }- },"pngjs": {"version": "6.0.0","resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz",@@ -794,14 +633,6 @@"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz","integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="},- "rimraf": {- "version": "4.4.1",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz",- "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==",- "requires": {- "glob": "^9.2.0"- }- },"signal-exit": {"version": "3.0.7","resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",diff --git a/packages/playwright-core/bundles/utils/package.json b/packages/playwright-core/bundles/utils/package.jsonindex 4336910f56..786b544a97 100644--- a/packages/playwright-core/bundles/utils/package.json+++ b/packages/playwright-core/bundles/utils/package.json@@ -22,7 +22,6 @@"progress": "2.0.3","proxy-from-env": "1.1.0","retry": "0.12.0",- "rimraf": "^4.4.1","signal-exit": "3.0.7","socks-proxy-agent": "6.1.1","stack-utils": "2.0.5",diff --git a/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.tsindex 91209c8c87..49dc61a05c 100644--- a/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts+++ b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts@@ -46,9 +46,6 @@ export { program } from 'commander';import progressLibrary from 'progress';export const progress = progressLibrary;-import rimrafLibrary from 'rimraf';-export const rimraf = rimrafLibrary;-export { SocksProxyAgent } from 'socks-proxy-agent';import StackUtilsLibrary from 'stack-utils';diff --git a/packages/playwright-core/src/utils/fileUtils.ts b/packages/playwright-core/src/utils/fileUtils.tsindex 6a67649a25..1a9f552f58 100644--- a/packages/playwright-core/src/utils/fileUtils.ts+++ b/packages/playwright-core/src/utils/fileUtils.ts@@ -16,7 +16,6 @@import fs from 'fs';import path from 'path';-import { rimraf } from '../utilsBundle';export const existsAsync = (path: string): Promise<boolean> => new Promise(resolve => fs.stat(path, err => resolve(!err)));@@ -25,12 +24,10 @@ export async function mkdirIfNeeded(filePath: string) {await fs.promises.mkdir(path.dirname(filePath), { recursive: true }).catch(() => {});}-export async function removeFolders(dirs: string[]): Promise<Array<Error|null|undefined>> {- return await Promise.all(dirs.map((dir: string) => {- return new Promise<Error|null|undefined>(fulfill => {- rimraf(dir, { maxRetries: 10 }).then(() => fulfill(undefined)).catch((e: Error) => fulfill(e));- });- }));+export async function removeFolders(dirs: string[]): Promise<Error[]> {+ return await Promise.all(dirs.map((dir: string) =>+ fs.promises.rm(dir, { recursive: true, force: true, maxRetries: 10 })+ )).catch(e => e);}export function canAccessFile(file: string) {diff --git a/packages/playwright-core/src/utils/processLauncher.ts b/packages/playwright-core/src/utils/processLauncher.tsindex 03975c5fb9..62219e286c 100644--- a/packages/playwright-core/src/utils/processLauncher.ts+++ b/packages/playwright-core/src/utils/processLauncher.ts@@ -15,11 +15,11 @@* limitations under the License.*/+import fs from 'fs';import * as childProcess from 'child_process';import * as readline from 'readline';import { isUnderTest } from './';import { removeFolders } from './fileUtils';-import { rimraf } from '../utilsBundle';export type Env = {[key: string]: string | number | boolean | undefined};@@ -245,7 +245,7 @@ export async function launchProcess(options: LaunchProcessOptions): Promise<Launoptions.log(`[pid=${spawnedProcess.pid || 'N/A'}] starting temporary directories cleanup`);for (const dir of options.tempDirectories) {try {- rimraf.sync(dir);+ fs.rmSync(dir, { force: true, recursive: true, maxRetries: 5 });} catch (e) {options.log(`[pid=${spawnedProcess.pid || 'N/A'}] exception while removing ${dir}: ${e}`);}diff --git a/packages/playwright-core/src/utilsBundle.ts b/packages/playwright-core/src/utilsBundle.tsindex 14c620a083..bb037a1ca7 100644--- a/packages/playwright-core/src/utilsBundle.ts+++ b/packages/playwright-core/src/utilsBundle.ts@@ -29,7 +29,6 @@ export const open: typeof import('../bundles/utils/node_modules/open') = requireexport const PNG: typeof import('../bundles/utils/node_modules/@types/pngjs').PNG = require('./utilsBundleImpl').PNG;export const program: typeof import('../bundles/utils/node_modules/commander').program = require('./utilsBundleImpl').program;export const progress: typeof import('../bundles/utils/node_modules/@types/progress') = require('./utilsBundleImpl').progress;-export const rimraf: typeof import('../bundles/utils/node_modules/rimraf').rimraf = require('./utilsBundleImpl').rimraf;export const SocksProxyAgent: typeof import('../bundles/utils/node_modules/socks-proxy-agent').SocksProxyAgent = require('./utilsBundleImpl').SocksProxyAgent;export const ws: typeof import('../bundles/utils/node_modules/@types/ws') = require('./utilsBundleImpl').ws;export const wsServer: typeof import('../bundles/utils/node_modules/@types/ws').WebSocketServer = require('./utilsBundleImpl').wsServer;diff --git a/packages/playwright/src/runner/tasks.ts b/packages/playwright/src/runner/tasks.tsindex 14195201c8..94095eaf61 100644--- a/packages/playwright/src/runner/tasks.ts+++ b/packages/playwright/src/runner/tasks.ts@@ -17,7 +17,8 @@import fs from 'fs';import path from 'path';import { promisify } from 'util';-import { debug, rimraf } from 'playwright-core/lib/utilsBundle';+import { debug } from 'playwright-core/lib/utilsBundle';+import { removeFolders } from 'playwright-core/lib/utils';import { Dispatcher, type EnvByProjectId } from './dispatcher';import type { TestRunnerPluginRegistration } from '../plugins';import type { ReporterV2 } from '../reporters/reporterV2';@@ -172,13 +173,15 @@ function createRemoveOutputDirsTask(): Task<TestRun> {outputDirs.add(p.project.outputDir);}- await Promise.all(Array.from(outputDirs).map(outputDir => rimraf(outputDir).catch(async (error: any) => {+ await Promise.all(Array.from(outputDirs).map(outputDir => removeFolders([outputDir]).then(async ([error]) => {+ if (!error)+ return;if ((error as any).code === 'EBUSY') {// We failed to remove folder, might be due to the whole folder being mounted inside a container:// https://github.com/microsoft/playwright/issues/12106// Do a best-effort to remove all files inside of it instead.const entries = await readDirAsync(outputDir).catch(e => []);- await Promise.all(entries.map(entry => rimraf(path.join(outputDir, entry))));+ await Promise.all(entries.map(entry => removeFolders([path.join(outputDir, entry)])));} else {throw error;}diff --git a/packages/playwright/src/worker/workerMain.ts b/packages/playwright/src/worker/workerMain.tsindex fd6f1f18a7..864677ac5c 100644--- a/packages/playwright/src/worker/workerMain.ts+++ b/packages/playwright/src/worker/workerMain.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { colors, rimraf } from 'playwright-core/lib/utilsBundle';+import { colors } from 'playwright-core/lib/utilsBundle';import { debugTest, formatLocation, relativeFilePath, serializeError } from '../util';import { type TestBeginPayload, type TestEndPayload, type RunPayload, type DonePayload, type WorkerInitParams, type TeardownErrorsPayload, stdioChunkToParams } from '../common/ipc';import { setCurrentTestInfo, setIsWorkerProcess } from '../common/globals';@@ -22,7 +22,7 @@ import { ConfigLoader } from '../common/configLoader';import type { Suite, TestCase } from '../common/test';import type { Annotation, FullConfigInternal, FullProjectInternal } from '../common/config';import { FixtureRunner } from './fixtureRunner';-import { ManualPromise, captureLibraryStackTrace, gracefullyCloseAll } from 'playwright-core/lib/utils';+import { ManualPromise, captureLibraryStackTrace, gracefullyCloseAll, removeFolders } from 'playwright-core/lib/utils';import { TestInfoImpl } from './testInfo';import { TimeoutManager, type TimeSlot } from './timeoutManager';import { ProcessRunner } from '../common/process';@@ -323,7 +323,7 @@ export class WorkerMain extends ProcessRunner {return;}- await rimraf(testInfo.outputDir).catch(() => {});+ await removeFolders([testInfo.outputDir]);let testFunctionParams: object | null = null;await testInfo._runAsStep({ category: 'hook', title: 'Before Hooks' }, async step => {@@ -490,7 +490,7 @@ export class WorkerMain extends ProcessRunner {const preserveOutput = this._config.config.preserveOutput === 'always' ||(this._config.config.preserveOutput === 'failures-only' && testInfo._isFailure());if (!preserveOutput)- await rimraf(testInfo.outputDir).catch(() => {});+ await removeFolders([testInfo.outputDir]);}private async _runModifiersForSuite(suite: Suite, testInfo: TestInfoImpl, scope: 'worker' | 'test', timeSlot: TimeSlot | undefined, extraAnnotations?: Annotation[]) {diff --git a/tests/installation/globalSetup.ts b/tests/installation/globalSetup.tsindex 4ca65d7340..7714f35226 100644--- a/tests/installation/globalSetup.ts+++ b/tests/installation/globalSetup.ts@@ -17,13 +17,13 @@import path from 'path';import fs from 'fs';import { spawnAsync } from '../../packages/playwright-core/lib/utils/spawnAsync';-import { rimraf } from 'playwright-core/lib/utilsBundle';+import { removeFolders } from '../../packages/playwright-core/lib/utils/fileUtils';import { TMP_WORKSPACES } from './npmTest';const PACKAGE_BUILDER_SCRIPT = path.join(__dirname, '..', '..', 'utils', 'pack_package.js');async function globalSetup() {- await rimraf(TMP_WORKSPACES);+ await removeFolders([TMP_WORKSPACES]);console.log(`Temporary workspaces will be created in ${TMP_WORKSPACES}. They will not be removed at the end. Set DEBUG=itest to determine which sub-dir a specific test is using.`);await fs.promises.mkdir(TMP_WORKSPACES, { recursive: true });@@ -32,7 +32,7 @@ async function globalSetup() {} else {console.log('Building packages. Set PWTEST_INSTALLATION_TEST_SKIP_PACKAGE_BUILDS to skip.');const outputDir = path.join(__dirname, 'output');- await rimraf(outputDir);+ await removeFolders([outputDir]);await fs.promises.mkdir(outputDir, { recursive: true });const build = async (buildTarget: string, pkgNameOverride?: string) => {diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.tsindex 2badc4f3fb..b5bc38c631 100644--- a/tests/playwright-test/playwright-test-fixtures.ts+++ b/tests/playwright-test/playwright-test-fixtures.ts@@ -18,7 +18,8 @@ import type { JSONReport, JSONReportSpec, JSONReportSuite, JSONReportTest, JSONRimport * as fs from 'fs';import * as os from 'os';import * as path from 'path';-import { rimraf, PNG } from 'playwright-core/lib/utilsBundle';+import { PNG } from 'playwright-core/lib/utilsBundle';+import { removeFolders } from '../../packages/playwright-core/src/utils/fileUtils';import type { CommonFixtures, CommonWorkerFixtures, TestChildProcess } from '../config/commonFixtures';import { commonFixtures } from '../config/commonFixtures';import type { ServerFixtures, ServerWorkerOptions } from '../config/serverFixtures';@@ -262,7 +263,7 @@ export const test = baseconst baseDir = await writeFiles(testInfo, files, true);return await runPlaywrightTest(childProcess, baseDir, params, { ...env, PWTEST_CACHE_DIR: cacheDir }, options, files, mergeReports, useIntermediateMergeReport);});- await rimraf(cacheDir);+ await removeFolders([cacheDir]);},runListFiles: async ({ childProcess }, use, testInfo: TestInfo) => {@@ -271,7 +272,7 @@ export const test = baseconst baseDir = await writeFiles(testInfo, files, true);return await runPlaywrightListFiles(childProcess, baseDir, { PWTEST_CACHE_DIR: cacheDir });});- await rimraf(cacheDir);+ await removeFolders([cacheDir]);},runWatchTest: async ({ interactWithTestRunner }, use, testInfo: TestInfo) => {@@ -287,7 +288,7 @@ export const test = basereturn testProcess;});await testProcess?.kill();- await rimraf(cacheDir);+ await removeFolders([cacheDir]);},runTSC: async ({ childProcess }, use, testInfo) => {diff --git a/tests/playwright-test/playwright.artifacts.spec.ts b/tests/playwright-test/playwright.artifacts.spec.tsindex 62a2dcf0d2..5a54d8f981 100644--- a/tests/playwright-test/playwright.artifacts.spec.ts+++ b/tests/playwright-test/playwright.artifacts.spec.ts@@ -34,7 +34,6 @@ const testFiles = {import fs from 'fs';import os from 'os';import path from 'path';- import rimraf from 'rimraf';import { test, expect } from '@playwright/test';@@ -107,7 +106,7 @@ const testFiles = {const context = await playwright[browserName].launchPersistentContext(dir);await use(context.pages()[0]);await context.close();- rimraf.sync(dir);+ fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10 });},});diff --git a/tests/playwright-test/playwright.spec.ts b/tests/playwright-test/playwright.spec.tsindex 686607530d..3fa9da5533 100644--- a/tests/playwright-test/playwright.spec.ts+++ b/tests/playwright-test/playwright.spec.ts@@ -187,7 +187,6 @@ test('should respect context options in various contexts', async ({ runInlineTesimport fs from 'fs';import os from 'os';import path from 'path';- import rimraf from 'rimraf';import { test, expect } from '@playwright/test';test.use({ locale: 'fr-FR' });@@ -228,7 +227,7 @@ test('should respect context options in various contexts', async ({ runInlineTesexpect(await page.evaluate(() => navigator.language)).toBe('fr-FR');await context.close();- rimraf.sync(dir);+ fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10 });});test('another browser', async ({ playwright, browserName }) => {@@ -255,7 +254,6 @@ test('should respect headless in launchPersistent', async ({ runInlineTest }) =>import fs from 'fs';import os from 'os';import path from 'path';- import rimraf from 'rimraf';import { test, expect } from '@playwright/test';@@ -265,7 +263,7 @@ test('should respect headless in launchPersistent', async ({ runInlineTest }) =>const page = context.pages()[0];expect(await page.evaluate(() => navigator.userAgent)).not.toContain('Headless');await context.close();- rimraf.sync(dir);+ fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10 });});`,}, { workers: 1 });diff --git a/tests/playwright-test/ui-mode-fixtures.ts b/tests/playwright-test/ui-mode-fixtures.tsindex 43f51722a6..a8c2ede79b 100644--- a/tests/playwright-test/ui-mode-fixtures.ts+++ b/tests/playwright-test/ui-mode-fixtures.ts@@ -18,11 +18,11 @@ import * as fs from 'fs';import * as os from 'os';import * as path from 'path';import type { TestChildProcess } from '../config/commonFixtures';-import { rimraf } from '../../packages/playwright-core/lib/utilsBundle';import { cleanEnv, cliEntrypoint, test as base, writeFiles } from './playwright-test-fixtures';import type { Files, RunOptions } from './playwright-test-fixtures';import type { Browser, BrowserType, Page, TestInfo } from './stable-test-runner';import { createGuid } from '../../packages/playwright-core/src/utils/crypto';+import { removeFolders } from '../../packages/playwright-core/src/utils/fileUtils';type Latch = {blockingCode: string;@@ -128,7 +128,7 @@ export const test = base});await browser?.close();await testProcess?.kill('SIGINT');- await rimraf(cacheDir);+ await removeFolders([cacheDir]);},createLatch: async ({}, use, testInfo) => {await use(() => {diff --git a/utils/build/clean.js b/utils/build/clean.jsindex 7d2360061e..b0ad6f2278 100644--- a/utils/build/clean.js+++ b/utils/build/clean.js@@ -1,15 +1,17 @@+// @ts-checkconst { workspace } = require('../workspace');const fs = require('fs');const path = require('path');-const rimraf = require('rimraf');++const rmSync = (dir) => fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10 });for (const pkg of workspace.packages()) {- rimraf.sync(path.join(pkg.path, 'node_modules'));- rimraf.sync(path.join(pkg.path, 'lib'));- rimraf.sync(path.join(pkg.path, 'src', 'generated'));+ rmSync(path.join(pkg.path, 'node_modules'));+ rmSync(path.join(pkg.path, 'lib'));+ rmSync(path.join(pkg.path, 'src', 'generated'));const bundles = path.join(pkg.path, 'bundles');if (fs.existsSync(bundles) && fs.statSync(bundles).isDirectory()) {for (const bundle of fs.readdirSync(bundles))- rimraf.sync(path.join(bundles, bundle, 'node_modules'));+ rmSync(path.join(bundles, bundle, 'node_modules'));}}