diff --git a/package-lock.json b/package-lock.json index 614dd9d0ac..082f236122 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,10 +21,6 @@ "@babel/plugin-transform-modules-commonjs": "^7.17.9", "@babel/plugin-transform-typescript": "^7.16.8", "@babel/preset-react": "^7.16.7", - "@types/babel__code-frame": "^7.0.3", - "@types/babel__core": "^7.1.18", - "@types/babel__helper-plugin-utils": "^7.10.0", - "@types/debug": "^4.1.7", "@types/formidable": "^2.0.4", "@types/mime": "^2.0.3", "@types/minimatch": "^3.0.5", @@ -32,24 +28,20 @@ "@types/node": "=14.17.15", "@types/pngjs": "^6.0.1", "@types/progress": "^2.0.5", - "@types/proper-lockfile": "^4.1.2", - "@types/proxy-from-env": "^1.0.1", "@types/react": "^17.0.38", "@types/react-dom": "^17.0.11", "@types/resize-observer-browser": "^0.1.6", - "@types/rimraf": "^3.0.2", "@types/source-map-support": "^0.5.4", "@types/stack-utils": "^2.0.1", "@types/ws": "8.2.2", "@types/xml2js": "^0.4.9", - "@types/yauzl": "^2.10.0", - "@types/yazl": "^2.4.2", "@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/parser": "^5.10.2", "@vitejs/plugin-react": "^1.0.7", "@zip.js/zip.js": "^2.4.2", "ansi-to-html": "^0.7.2", "chokidar": "^3.5.3", + "colors": "^1.4.0", "commonmark": "^0.30.0", "concurrently": "^6.2.1", "cross-env": "^7.0.3", @@ -981,71 +973,6 @@ "node": ">=6" } }, - "node_modules/@types/babel__code-frame": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", - "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==", - "dev": true - }, - "node_modules/@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__helper-plugin-utils": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz", - "integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==", - "dev": true, - "dependencies": { - "@types/babel__core": "*" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", - "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", - "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.3.0" - } - }, - "node_modules/@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", - "dev": true, - "dependencies": { - "@types/ms": "*" - } - }, "node_modules/@types/formidable": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.4.tgz", @@ -1055,16 +982,6 @@ "@types/node": "*" } }, - "node_modules/@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "dev": true, - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, "node_modules/@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", @@ -1125,24 +1042,6 @@ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==", "dev": true }, - "node_modules/@types/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==", - "dev": true, - "dependencies": { - "@types/retry": "*" - } - }, - "node_modules/@types/proxy-from-env": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz", - "integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/react": { "version": "17.0.38", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.38.tgz", @@ -1169,22 +1068,6 @@ "integrity": "sha512-61IfTac0s9jvNtBCpyo86QeaN8qqpMGHdK0uGKCCIy2dt5/Yk84VduHIdWAcmkC5QvdkPL0p5eWYgUZtHKKUVg==", "dev": true }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "node_modules/@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", - "dev": true, - "dependencies": { - "@types/glob": "*", - "@types/node": "*" - } - }, "node_modules/@types/scheduler": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz", @@ -1233,24 +1116,6 @@ "@types/node": "*" } }, - "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yazl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz", - "integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -1517,17 +1382,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1715,6 +1569,7 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, "engines": { "node": "*" } @@ -1942,6 +1797,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, "engines": { "node": ">=0.1.90" } @@ -2209,6 +2065,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -3341,7 +3198,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=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", @@ -3420,6 +3278,7 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3589,7 +3448,8 @@ "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true }, "node_modules/has": { "version": "1.0.3", @@ -3649,18 +3509,6 @@ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/ignore": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", @@ -3699,6 +3547,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3707,7 +3556,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "1.3.8", @@ -3716,11 +3566,6 @@ "dev": true, "optional": true }, - "node_modules/ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -4160,7 +4005,8 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/nanoid": { "version": "3.3.1", @@ -4330,6 +4176,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "dependencies": { "wrappy": "1" } @@ -4449,6 +4296,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4603,16 +4451,6 @@ "node": ">=0.4.0" } }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -4634,11 +4472,6 @@ "proxy": "bin/proxy.js" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -4878,14 +4711,6 @@ "lowercase-keys": "^1.0.0" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "engines": { - "node": ">= 4" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4900,6 +4725,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -5079,11 +4905,6 @@ "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, "node_modules/slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -5102,41 +4923,6 @@ "node": "*" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", - "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.1.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", - "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/socksv5": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/socksv5/-/socksv5-0.0.6.tgz", @@ -5270,25 +5056,6 @@ "node": "*" } }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "engines": { - "node": ">=8" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -5706,7 +5473,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/ws": { "version": "8.4.2", @@ -5811,14 +5579,6 @@ "fd-slicer": "~1.1.0" } }, - "node_modules/yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - }, "packages/babel-bundle": { "version": "0.0.1", "extraneous": true, @@ -5910,18 +5670,10 @@ "version": "1.22.0-next", "license": "Apache-2.0", "dependencies": { - "colors": "1.4.0", - "commander": "8.3.0", - "debug": "4.3.3", - "https-proxy-agent": "5.0.0", "jpeg-js": "0.4.3", "mime": "3.0.0", "pngjs": "6.0.0", "progress": "2.0.3", - "proper-lockfile": "4.1.2", - "proxy-from-env": "1.1.0", - "socks-proxy-agent": "6.1.1", - "stack-utils": "2.0.5", "ws": "8.4.2" }, "bin": { @@ -5931,14 +5683,6 @@ "node": ">=12" } }, - "packages/playwright-core/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "engines": { - "node": ">= 12" - } - }, "packages/playwright-ct-react": { "name": "@playwright/experimental-ct-react", "version": "0.0.3", @@ -5991,9 +5735,6 @@ "version": "1.22.0-next", "license": "Apache-2.0", "dependencies": { - "colors": "1.4.0", - "commander": "8.3.0", - "debug": "4.3.3", "json5": "2.2.1", "mime": "3.0.0", "minimatch": "3.0.4", @@ -6001,10 +5742,7 @@ "open": "8.4.0", "pirates": "4.0.4", "playwright-core": "1.22.0-next", - "rimraf": "3.0.2", - "source-map-support": "0.4.18", - "stack-utils": "2.0.5", - "yazl": "2.5.1" + "source-map-support": "0.4.18" }, "bin": { "playwright": "cli.js" @@ -6013,14 +5751,6 @@ "node": ">=12" } }, - "packages/playwright-test/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "engines": { - "node": ">= 12" - } - }, "packages/playwright-test/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6700,9 +6430,6 @@ "@playwright/test": { "version": "file:packages/playwright-test", "requires": { - "colors": "1.4.0", - "commander": "8.3.0", - "debug": "4.3.3", "json5": "2.2.1", "mime": "3.0.0", "minimatch": "3.0.4", @@ -6710,17 +6437,9 @@ "open": "8.4.0", "pirates": "4.0.4", "playwright-core": "1.22.0-next", - "rimraf": "3.0.2", - "source-map-support": "0.4.18", - "stack-utils": "2.0.5", - "yazl": "2.5.1" + "source-map-support": "0.4.18" }, "dependencies": { - "commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6766,71 +6485,6 @@ "defer-to-connect": "^1.0.1" } }, - "@types/babel__code-frame": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", - "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==", - "dev": true - }, - "@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__helper-plugin-utils": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz", - "integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==", - "dev": true, - "requires": { - "@types/babel__core": "*" - } - }, - "@types/babel__template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", - "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", - "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", - "dev": true, - "requires": { - "@types/ms": "*" - } - }, "@types/formidable": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.4.tgz", @@ -6840,16 +6494,6 @@ "@types/node": "*" } }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", @@ -6910,24 +6554,6 @@ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==", "dev": true }, - "@types/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==", - "dev": true, - "requires": { - "@types/retry": "*" - } - }, - "@types/proxy-from-env": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz", - "integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/react": { "version": "17.0.38", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.38.tgz", @@ -6954,22 +6580,6 @@ "integrity": "sha512-61IfTac0s9jvNtBCpyo86QeaN8qqpMGHdK0uGKCCIy2dt5/Yk84VduHIdWAcmkC5QvdkPL0p5eWYgUZtHKKUVg==", "dev": true }, - "@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, "@types/scheduler": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz", @@ -7017,24 +6627,6 @@ "@types/node": "*" } }, - "@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/yazl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz", - "integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -7193,14 +6785,6 @@ "dev": true, "requires": {} }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -7346,7 +6930,8 @@ "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true }, "buffer-from": { "version": "1.1.1", @@ -7525,7 +7110,8 @@ "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true }, "commander": { "version": "4.1.1", @@ -7724,6 +7310,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -8494,7 +8081,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "2.3.2", @@ -8551,6 +8139,7 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8681,7 +8270,8 @@ "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true }, "has": { "version": "1.0.3", @@ -8725,15 +8315,6 @@ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, "ignore": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", @@ -8760,6 +8341,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -8768,7 +8350,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ini": { "version": "1.3.8", @@ -8777,11 +8360,6 @@ "dev": true, "optional": true }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -9128,7 +8706,8 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "nanoid": { "version": "3.3.1", @@ -9256,6 +8835,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -9346,7 +8926,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "3.1.1", @@ -9411,26 +8992,11 @@ "playwright-core": { "version": "file:packages/playwright-core", "requires": { - "colors": "1.4.0", - "commander": "8.3.0", - "debug": "4.3.3", - "https-proxy-agent": "5.0.0", "jpeg-js": "0.4.3", "mime": "3.0.0", "pngjs": "6.0.0", "progress": "2.0.3", - "proper-lockfile": "4.1.2", - "proxy-from-env": "1.1.0", - "socks-proxy-agent": "6.1.1", - "stack-utils": "2.0.5", "ws": "8.4.2" - }, - "dependencies": { - "commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" - } } }, "playwright-firefox": { @@ -9484,16 +9050,6 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, - "proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "requires": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, "proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -9512,11 +9068,6 @@ "debug": "^4.1.1" } }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -9696,11 +9247,6 @@ "lowercase-keys": "^1.0.0" } }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -9711,6 +9257,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -9843,11 +9390,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -9860,30 +9402,6 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" - }, - "socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.1.0" - } - }, - "socks-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", - "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", - "requires": { - "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" - } - }, "socksv5": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/socksv5/-/socksv5-0.0.6.tgz", @@ -9995,21 +9513,6 @@ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", "dev": true }, - "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "requires": { - "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" - } - } - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -10311,7 +9814,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "ws": { "version": "8.4.2", @@ -10385,14 +9889,6 @@ "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } - }, - "yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "requires": { - "buffer-crc32": "~0.2.3" - } } } } diff --git a/package.json b/package.json index ee4abdcf2a..cb76b06b00 100644 --- a/package.json +++ b/package.json @@ -53,10 +53,6 @@ "@babel/plugin-transform-modules-commonjs": "^7.17.9", "@babel/plugin-transform-typescript": "^7.16.8", "@babel/preset-react": "^7.16.7", - "@types/babel__code-frame": "^7.0.3", - "@types/babel__core": "^7.1.18", - "@types/babel__helper-plugin-utils": "^7.10.0", - "@types/debug": "^4.1.7", "@types/formidable": "^2.0.4", "@types/mime": "^2.0.3", "@types/minimatch": "^3.0.5", @@ -64,24 +60,20 @@ "@types/node": "=14.17.15", "@types/pngjs": "^6.0.1", "@types/progress": "^2.0.5", - "@types/proper-lockfile": "^4.1.2", - "@types/proxy-from-env": "^1.0.1", "@types/react": "^17.0.38", "@types/react-dom": "^17.0.11", "@types/resize-observer-browser": "^0.1.6", - "@types/rimraf": "^3.0.2", "@types/source-map-support": "^0.5.4", "@types/stack-utils": "^2.0.1", "@types/ws": "8.2.2", "@types/xml2js": "^0.4.9", - "@types/yauzl": "^2.10.0", - "@types/yazl": "^2.4.2", "@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/parser": "^5.10.2", "@vitejs/plugin-react": "^1.0.7", "@zip.js/zip.js": "^2.4.2", "ansi-to-html": "^0.7.2", "chokidar": "^3.5.3", + "colors": "^1.4.0", "commonmark": "^0.30.0", "concurrently": "^6.2.1", "cross-env": "^7.0.3", diff --git a/packages/playwright-core/ThirdPartyNotices.txt b/packages/playwright-core/ThirdPartyNotices.txt index 1ac615dae6..59b01ec900 100644 --- a/packages/playwright-core/ThirdPartyNotices.txt +++ b/packages/playwright-core/ThirdPartyNotices.txt @@ -7,41 +7,44 @@ This project incorporates components from the projects listed below. The origina 1. agent-base@6.0.2 (https://github.com/TooTallNate/node-agent-base) 2. balanced-match@1.0.2 (https://github.com/juliangruber/balanced-match) 3. brace-expansion@1.1.11 (https://github.com/juliangruber/brace-expansion) -4. concat-map@0.0.1 (https://github.com/substack/node-concat-map) -5. debug@4.3.4 (https://github.com/debug-js/debug) -6. escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp) -7. fs.realpath@1.0.0 (https://github.com/isaacs/fs.realpath) -8. glob@7.2.0 (https://github.com/isaacs/node-glob) -9. graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs) -10. https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent) -11. inflight@1.0.6 (https://github.com/npm/inflight) -12. inherits@2.0.4 (https://github.com/isaacs/inherits) -13. ip@1.1.5 (https://github.com/indutny/node-ip) -14. minimatch@3.1.2 (https://github.com/isaacs/minimatch) -15. ms@2.1.2 (https://github.com/zeit/ms) -16. once@1.4.0 (https://github.com/isaacs/once) -17. path-is-absolute@1.0.1 (https://github.com/sindresorhus/path-is-absolute) -18. proper-lockfile@4.1.2 (https://github.com/moxystudio/node-proper-lockfile) -19. proxy-from-env@1.1.0 (https://github.com/Rob--W/proxy-from-env) -20. retry@0.12.0 (https://github.com/tim-kos/node-retry) -21. rimraf@3.0.2 (https://github.com/isaacs/rimraf) -22. signal-exit@3.0.7 (https://github.com/tapjs/signal-exit) -23. smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer) -24. socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent) -25. socks@2.6.2 (https://github.com/JoshGlazebrook/socks) -26. stack-utils@2.0.5 (https://github.com/tapjs/stack-utils) -27. wrappy@1.0.2 (https://github.com/npm/wrappy) -28. @types/node@17.0.24 (https://github.com/DefinitelyTyped/DefinitelyTyped) -29. @types/yauzl@2.10.0 (https://github.com/DefinitelyTyped/DefinitelyTyped) -30. buffer-crc32@0.2.13 (https://github.com/brianloveswords/buffer-crc32) -31. end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream) -32. extract-zip@2.0.1 (https://github.com/maxogden/extract-zip) -33. fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer) -34. get-stream@5.2.0 (https://github.com/sindresorhus/get-stream) -35. pend@1.2.0 (https://github.com/andrewrk/node-pend) -36. pump@3.0.0 (https://github.com/mafintosh/pump) -37. yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl) -38. yazl@2.5.1 (https://github.com/thejoshwolfe/yazl) +4. colors@1.4.0 (https://github.com/Marak/colors.js) +5. commander@8.3.0 (https://github.com/tj/commander.js) +6. concat-map@0.0.1 (https://github.com/substack/node-concat-map) +7. debug@4.3.3 (https://github.com/debug-js/debug) +8. escape-string-regexp@2.0.0 (https://github.com/sindresorhus/escape-string-regexp) +9. fs.realpath@1.0.0 (https://github.com/isaacs/fs.realpath) +10. glob@7.2.0 (https://github.com/isaacs/node-glob) +11. graceful-fs@4.2.10 (https://github.com/isaacs/node-graceful-fs) +12. https-proxy-agent@5.0.0 (https://github.com/TooTallNate/node-https-proxy-agent) +13. inflight@1.0.6 (https://github.com/npm/inflight) +14. inherits@2.0.4 (https://github.com/isaacs/inherits) +15. ip@1.1.5 (https://github.com/indutny/node-ip) +16. minimatch@3.1.2 (https://github.com/isaacs/minimatch) +17. ms@2.1.2 (https://github.com/zeit/ms) +18. once@1.4.0 (https://github.com/isaacs/once) +19. path-is-absolute@1.0.1 (https://github.com/sindresorhus/path-is-absolute) +20. proper-lockfile@4.1.2 (https://github.com/moxystudio/node-proper-lockfile) +21. proxy-from-env@1.1.0 (https://github.com/Rob--W/proxy-from-env) +22. retry@0.12.0 (https://github.com/tim-kos/node-retry) +23. rimraf@3.0.2 (https://github.com/isaacs/rimraf) +24. signal-exit@3.0.7 (https://github.com/tapjs/signal-exit) +25. smart-buffer@4.2.0 (https://github.com/JoshGlazebrook/smart-buffer) +26. socks-proxy-agent@6.1.1 (https://github.com/TooTallNate/node-socks-proxy-agent) +27. socks@2.6.2 (https://github.com/JoshGlazebrook/socks) +28. stack-utils@2.0.5 (https://github.com/tapjs/stack-utils) +29. wrappy@1.0.2 (https://github.com/npm/wrappy) +30. @types/node@17.0.24 (https://github.com/DefinitelyTyped/DefinitelyTyped) +31. @types/yauzl@2.10.0 (https://github.com/DefinitelyTyped/DefinitelyTyped) +32. buffer-crc32@0.2.13 (https://github.com/brianloveswords/buffer-crc32) +33. debug@4.3.4 (https://github.com/debug-js/debug) +34. end-of-stream@1.4.4 (https://github.com/mafintosh/end-of-stream) +35. extract-zip@2.0.1 (https://github.com/maxogden/extract-zip) +36. fd-slicer@1.1.0 (https://github.com/andrewrk/node-fd-slicer) +37. get-stream@5.2.0 (https://github.com/sindresorhus/get-stream) +38. pend@1.2.0 (https://github.com/andrewrk/node-pend) +39. pump@3.0.0 (https://github.com/mafintosh/pump) +40. yauzl@2.10.0 (https://github.com/thejoshwolfe/yauzl) +41. yazl@2.5.1 (https://github.com/thejoshwolfe/yazl) %% agent-base@6.0.2 NOTICES AND INFORMATION BEGIN HERE ========================================= @@ -245,6 +248,63 @@ SOFTWARE. ========================================= END OF brace-expansion@1.1.11 AND INFORMATION +%% colors@1.4.0 NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Original Library + - Copyright (c) Marak Squires + +Additional Functionality + - Copyright (c) Sindre Sorhus (sindresorhus.com) + +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 colors@1.4.0 AND INFORMATION + +%% commander@8.3.0 NOTICES AND INFORMATION BEGIN HERE +========================================= +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk + +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 commander@8.3.0 AND INFORMATION + %% concat-map@0.0.1 NOTICES AND INFORMATION BEGIN HERE ========================================= This software is released under the MIT license: @@ -268,7 +328,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================= END OF concat-map@0.0.1 AND INFORMATION -%% debug@4.3.4 NOTICES AND INFORMATION BEGIN HERE +%% debug@4.3.3 NOTICES AND INFORMATION BEGIN HERE ========================================= (The MIT License) @@ -290,7 +350,7 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMA 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 debug@4.3.4 AND INFORMATION +END OF debug@4.3.3 AND INFORMATION %% escape-string-regexp@2.0.0 NOTICES AND INFORMATION BEGIN HERE ========================================= @@ -1216,6 +1276,30 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL ========================================= END OF buffer-crc32@0.2.13 AND INFORMATION +%% debug@4.3.4 NOTICES AND INFORMATION BEGIN HERE +========================================= +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +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 debug@4.3.4 AND INFORMATION + %% end-of-stream@1.4.4 NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) diff --git a/packages/playwright-core/bundles/utils/package-lock.json b/packages/playwright-core/bundles/utils/package-lock.json index c5cf69af6c..08017afacc 100644 --- a/packages/playwright-core/bundles/utils/package-lock.json +++ b/packages/playwright-core/bundles/utils/package-lock.json @@ -8,14 +8,101 @@ "name": "utils-bundle", "version": "0.0.1", "dependencies": { + "colors": "1.4.0", + "commander": "8.3.0", + "debug": "4.3.3", "https-proxy-agent": "5.0.0", "proper-lockfile": "4.1.2", "proxy-from-env": "1.1.0", "rimraf": "3.0.2", "socks-proxy-agent": "6.1.1", "stack-utils": "2.0.5" + }, + "devDependencies": { + "@types/debug": "^4.1.7", + "@types/proper-lockfile": "^4.1.2", + "@types/proxy-from-env": "^1.0.1", + "@types/rimraf": "^3.0.2", + "@types/stack-utils": "^2.0.1" } }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dev": true, + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "17.0.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", + "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==", + "dev": true + }, + "node_modules/@types/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==", + "dev": true, + "dependencies": { + "@types/retry": "*" + } + }, + "node_modules/@types/proxy-from-env": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz", + "integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/retry": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", + "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", + "dev": true + }, + "node_modules/@types/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "dev": true, + "dependencies": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -41,15 +128,31 @@ "concat-map": "0.0.1" } }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dependencies": { "ms": "2.1.2" }, @@ -257,6 +360,83 @@ } }, "dependencies": { + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dev": true, + "requires": { + "@types/ms": "*" + } + }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "@types/node": { + "version": "17.0.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", + "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==", + "dev": true + }, + "@types/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-kd4LMvcnpYkspDcp7rmXKedn8iJSCoa331zRRamUp5oanKt/CefbEGPQP7G89enz7sKD4bvsr8mHSsC8j5WOvA==", + "dev": true, + "requires": { + "@types/retry": "*" + } + }, + "@types/proxy-from-env": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/proxy-from-env/-/proxy-from-env-1.0.1.tgz", + "integrity": "sha512-luG++TFHyS61eKcfkR1CVV6a1GMNXDjtqEQIIfaSHax75xp0HU3SlezjOi1yqubJwrG8e9DeW59n6wTblIDwFg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/retry": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", + "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", + "dev": true + }, + "@types/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "dev": true, + "requires": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -279,15 +459,25 @@ "concat-map": "0.0.1" } }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "requires": { "ms": "2.1.2" } diff --git a/packages/playwright-core/bundles/utils/package.json b/packages/playwright-core/bundles/utils/package.json index ff59443944..5768a0a748 100644 --- a/packages/playwright-core/bundles/utils/package.json +++ b/packages/playwright-core/bundles/utils/package.json @@ -3,17 +3,27 @@ "version": "0.0.1", "private": true, "scripts": { - "esbuild": "esbuild ./src/utilsBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", + "esbuild": "esbuild ./src/utilsBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", "build": "npm ci && npm run esbuild -- --minify", "watch": "npm ci && npm run esbuild -- --watch --sourcemap", "generate-license": "node ../../../../utils/generate_third_party_notice.js" }, "dependencies": { + "colors": "1.4.0", + "commander": "8.3.0", + "debug": "4.3.3", "https-proxy-agent": "5.0.0", "proper-lockfile": "4.1.2", "proxy-from-env": "1.1.0", "socks-proxy-agent": "6.1.1", "stack-utils": "2.0.5", "rimraf": "3.0.2" + }, + "devDependencies": { + "@types/debug": "^4.1.7", + "@types/proper-lockfile": "^4.1.2", + "@types/proxy-from-env": "^1.0.1", + "@types/rimraf": "^3.0.2", + "@types/stack-utils": "^2.0.1" } } diff --git a/packages/playwright-core/bundles/utils/src/utilsBundle.ts b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts similarity index 84% rename from packages/playwright-core/bundles/utils/src/utilsBundle.ts rename to packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts index 39d955d05b..9c5080e7ac 100644 --- a/packages/playwright-core/bundles/utils/src/utilsBundle.ts +++ b/packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts @@ -14,15 +14,25 @@ * limitations under the License. */ -import rimrafLibrary from 'rimraf'; -export const rimraf = rimrafLibrary; +import colorsLibrary from 'colors/safe'; +export const colors = colorsLibrary; + +import debugLibrary from 'debug'; +export const debug = debugLibrary; + +export { getProxyForUrl } from 'proxy-from-env'; + +export { HttpsProxyAgent } from 'https-proxy-agent'; import lockfileLibrary from 'proper-lockfile'; export const lockfile = lockfileLibrary; +export { program } from 'commander'; + +import rimrafLibrary from 'rimraf'; +export const rimraf = rimrafLibrary; + +export { SocksProxyAgent } from 'socks-proxy-agent'; + import StackUtilsLibrary from 'stack-utils'; export const StackUtils = StackUtilsLibrary; - -export { HttpsProxyAgent } from 'https-proxy-agent'; -export { SocksProxyAgent } from 'socks-proxy-agent'; -export { getProxyForUrl } from 'proxy-from-env'; diff --git a/packages/playwright-core/bundles/zip/package-lock.json b/packages/playwright-core/bundles/zip/package-lock.json index 1e88c6f59b..8476d11c19 100644 --- a/packages/playwright-core/bundles/zip/package-lock.json +++ b/packages/playwright-core/bundles/zip/package-lock.json @@ -11,19 +11,32 @@ "extract-zip": "2.0.1", "yauzl": "2.10.0", "yazl": "2.5.1" + }, + "devDependencies": { + "@types/yauzl": "^2.10.0", + "@types/yazl": "^2.4.2" } }, "node_modules/@types/node": { "version": "17.0.24", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", "integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==", - "optional": true + "devOptional": true }, "node_modules/@types/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "optional": true, + "devOptional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yazl": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz", + "integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -156,13 +169,22 @@ "version": "17.0.24", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", "integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==", - "optional": true + "devOptional": true }, "@types/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "optional": true, + "devOptional": true, + "requires": { + "@types/node": "*" + } + }, + "@types/yazl": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz", + "integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==", + "dev": true, "requires": { "@types/node": "*" } diff --git a/packages/playwright-core/bundles/zip/package.json b/packages/playwright-core/bundles/zip/package.json index a1ad760597..677c327c44 100644 --- a/packages/playwright-core/bundles/zip/package.json +++ b/packages/playwright-core/bundles/zip/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "esbuild": "esbuild ./src/zipBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", + "esbuild": "esbuild ./src/zipBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", "build": "npm ci && npm run esbuild -- --minify", "watch": "npm ci && npm run esbuild -- --watch --sourcemap", "generate-license": "node ../../../../utils/generate_third_party_notice.js" @@ -12,5 +12,9 @@ "extract-zip": "2.0.1", "yauzl": "2.10.0", "yazl": "2.5.1" + }, + "devDependencies": { + "@types/yauzl": "^2.10.0", + "@types/yazl": "^2.4.2" } } diff --git a/packages/playwright-core/bundles/zip/src/zipBundle.ts b/packages/playwright-core/bundles/zip/src/zipBundleImpl.ts similarity index 100% rename from packages/playwright-core/bundles/zip/src/zipBundle.ts rename to packages/playwright-core/bundles/zip/src/zipBundleImpl.ts diff --git a/packages/playwright-core/package.json b/packages/playwright-core/package.json index e9512e88d7..6b4f3e7a7a 100644 --- a/packages/playwright-core/package.json +++ b/packages/playwright-core/package.json @@ -44,9 +44,6 @@ "playwright": "./cli.js" }, "dependencies": { - "commander": "8.3.0", - "colors": "1.4.0", - "debug": "4.3.3", "jpeg-js": "0.4.3", "mime": "3.0.0", "pngjs": "6.0.0", diff --git a/packages/playwright-core/src/cli/DEPS.list b/packages/playwright-core/src/cli/DEPS.list index 767b4e8061..872049bbe0 100644 --- a/packages/playwright-core/src/cli/DEPS.list +++ b/packages/playwright-core/src/cli/DEPS.list @@ -8,6 +8,7 @@ ../server/injected/ ../server/trace ../utils +../utilsBundle.ts [cli.ts] ../server/trace/viewer/traceViewer.ts diff --git a/packages/playwright-core/src/cli/cli.ts b/packages/playwright-core/src/cli/cli.ts index 649dfb4dda..ec89e1835e 100755 --- a/packages/playwright-core/src/cli/cli.ts +++ b/packages/playwright-core/src/cli/cli.ts @@ -21,8 +21,8 @@ import fs from 'fs'; import os from 'os'; import path from 'path'; -import type { Command } from 'commander'; -import { program } from 'commander'; +import type { Command } from '../utilsBundle'; +import { program } from '../utilsBundle'; import { runDriver, runServer, printApiJson, launchBrowserServer } from './driver'; import { showTraceViewer } from '../server/trace/viewer/traceViewer'; import * as playwright from '../..'; @@ -597,6 +597,7 @@ function lookupBrowserType(options: Options): BrowserType { if (browserType) return browserType; program.help(); + process.exit(1); } function validateOptions(options: Options) { diff --git a/packages/playwright-core/src/client/DEPS.list b/packages/playwright-core/src/client/DEPS.list index cd30be6967..4be2917927 100644 --- a/packages/playwright-core/src/client/DEPS.list +++ b/packages/playwright-core/src/client/DEPS.list @@ -2,3 +2,4 @@ ../common/ ../protocol/ ../utils/** +../utilsBundle.ts diff --git a/packages/playwright-core/src/common/DEPS.list b/packages/playwright-core/src/common/DEPS.list index 53c5b6c35e..60df36081b 100644 --- a/packages/playwright-core/src/common/DEPS.list +++ b/packages/playwright-core/src/common/DEPS.list @@ -1,2 +1,3 @@ [*] -../utils/ \ No newline at end of file +../utils/ +../utilsBundle.ts \ No newline at end of file diff --git a/packages/playwright-core/src/common/debugLogger.ts b/packages/playwright-core/src/common/debugLogger.ts index 6302fb3b30..d0b3763268 100644 --- a/packages/playwright-core/src/common/debugLogger.ts +++ b/packages/playwright-core/src/common/debugLogger.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../utilsBundle'; import fs from 'fs'; const debugLoggerColorMap = { diff --git a/packages/playwright-core/src/common/netUtils.ts b/packages/playwright-core/src/common/netUtils.ts index aba40d0333..53c999bb1a 100644 --- a/packages/playwright-core/src/common/netUtils.ts +++ b/packages/playwright-core/src/common/netUtils.ts @@ -17,11 +17,10 @@ import http from 'http'; import https from 'https'; import net from 'net'; +import { getProxyForUrl } from '../utilsBundle'; +import { HttpsProxyAgent } from '../utilsBundle'; import * as URL from 'url'; -const { HttpsProxyAgent }: typeof import('../../bundles/utils/node_modules/https-proxy-agent') = require('../utilsBundle'); -const { getProxyForUrl }: typeof import('proxy-from-env') = require('../utilsBundle'); - export async function createSocket(host: string, port: number): Promise { return new Promise((resolve, reject) => { const socket = net.createConnection({ host, port }); diff --git a/packages/playwright-core/src/grid/DEPS.list b/packages/playwright-core/src/grid/DEPS.list index 9af6177885..15a24dc316 100644 --- a/packages/playwright-core/src/grid/DEPS.list +++ b/packages/playwright-core/src/grid/DEPS.list @@ -5,3 +5,4 @@ ../remote/ ../server/ ../utils/ +../utilsBundle.ts diff --git a/packages/playwright-core/src/grid/githubGridFactory.ts b/packages/playwright-core/src/grid/githubGridFactory.ts index 21ea3bb81b..cf0e45c3d9 100644 --- a/packages/playwright-core/src/grid/githubGridFactory.ts +++ b/packages/playwright-core/src/grid/githubGridFactory.ts @@ -16,7 +16,7 @@ import type { GridAgentLaunchOptions, GridFactory } from './gridServer'; import https from 'https'; -import debug from 'debug'; +import { debug } from '../utilsBundle'; const repoName = process.env.GITHUB_AGENT_REPO; if (!repoName) diff --git a/packages/playwright-core/src/grid/gridAgent.ts b/packages/playwright-core/src/grid/gridAgent.ts index 3cc8c06534..729c06eaf6 100644 --- a/packages/playwright-core/src/grid/gridAgent.ts +++ b/packages/playwright-core/src/grid/gridAgent.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../utilsBundle'; import WebSocket from 'ws'; import { fork } from 'child_process'; import { getPlaywrightVersion } from '../common/userAgent'; diff --git a/packages/playwright-core/src/grid/gridBrowserWorker.ts b/packages/playwright-core/src/grid/gridBrowserWorker.ts index 3c008bbb00..56187602b0 100644 --- a/packages/playwright-core/src/grid/gridBrowserWorker.ts +++ b/packages/playwright-core/src/grid/gridBrowserWorker.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../utilsBundle'; import WebSocket from 'ws'; import { PlaywrightConnection } from '../remote/playwrightConnection'; import { gracefullyCloseAll } from '../utils/processLauncher'; diff --git a/packages/playwright-core/src/grid/gridServer.ts b/packages/playwright-core/src/grid/gridServer.ts index 2be67d84fd..a0c9943866 100644 --- a/packages/playwright-core/src/grid/gridServer.ts +++ b/packages/playwright-core/src/grid/gridServer.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../utilsBundle'; import { EventEmitter } from 'events'; import { URL } from 'url'; import type { Server as WebSocketServer } from 'ws'; diff --git a/packages/playwright-core/src/remote/DEPS.list b/packages/playwright-core/src/remote/DEPS.list index fc3ae7c209..db2dd7289b 100644 --- a/packages/playwright-core/src/remote/DEPS.list +++ b/packages/playwright-core/src/remote/DEPS.list @@ -4,3 +4,4 @@ ../dispatchers/ ../server/ ../utils/ +../utilsBundle.ts diff --git a/packages/playwright-core/src/remote/playwrightServer.ts b/packages/playwright-core/src/remote/playwrightServer.ts index 3a7059dcfc..3f3462bf39 100644 --- a/packages/playwright-core/src/remote/playwrightServer.ts +++ b/packages/playwright-core/src/remote/playwrightServer.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../utilsBundle'; import * as http from 'http'; import WebSocket from 'ws'; import type { Browser } from '../server/browser'; diff --git a/packages/playwright-core/src/server/DEPS.list b/packages/playwright-core/src/server/DEPS.list index e44aacaf64..4415348429 100644 --- a/packages/playwright-core/src/server/DEPS.list +++ b/packages/playwright-core/src/server/DEPS.list @@ -3,6 +3,8 @@ ../generated/ ../protocol/ ../utils/ +../utilsBundle.ts +../zipBundle.ts ./ ./injected/ ./isomorphic/ diff --git a/packages/playwright-core/src/server/android/DEPS.list b/packages/playwright-core/src/server/android/DEPS.list index 3bd6e65247..faf582bf1e 100644 --- a/packages/playwright-core/src/server/android/DEPS.list +++ b/packages/playwright-core/src/server/android/DEPS.list @@ -3,4 +3,5 @@ ../../common/ ../../protocol/ ../../utils/ +../../utilsBundle.ts ../chromium/ diff --git a/packages/playwright-core/src/server/android/android.ts b/packages/playwright-core/src/server/android/android.ts index ae3a2ee569..ee2d78cf17 100644 --- a/packages/playwright-core/src/server/android/android.ts +++ b/packages/playwright-core/src/server/android/android.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../../utilsBundle'; import type * as types from '../types'; import { EventEmitter } from 'events'; import fs from 'fs'; diff --git a/packages/playwright-core/src/server/android/backendAdb.ts b/packages/playwright-core/src/server/android/backendAdb.ts index 32e98f6a44..86cfc027d8 100644 --- a/packages/playwright-core/src/server/android/backendAdb.ts +++ b/packages/playwright-core/src/server/android/backendAdb.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import debug from 'debug'; +import { debug } from '../../utilsBundle'; import type * as types from '../types'; import * as net from 'net'; import { EventEmitter } from 'events'; diff --git a/packages/playwright-core/src/server/dispatchers/DEPS.list b/packages/playwright-core/src/server/dispatchers/DEPS.list index 932624b854..4a9ce35a5a 100644 --- a/packages/playwright-core/src/server/dispatchers/DEPS.list +++ b/packages/playwright-core/src/server/dispatchers/DEPS.list @@ -2,4 +2,5 @@ ../../common/ ../../protocol/ ../../utils/ +../../zipBundle.ts ../** diff --git a/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts b/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts index 57faefdd59..45ec7966d5 100644 --- a/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts +++ b/packages/playwright-core/src/server/dispatchers/localUtilsDispatcher.ts @@ -22,9 +22,7 @@ import { ManualPromise } from '../../utils/manualPromise'; import { assert, createGuid } from '../../utils'; import type { DispatcherScope } from './dispatcher'; import { Dispatcher } from './dispatcher'; - -const yazl: typeof import('yazl') = require('../../zipBundle').yazl; -const yauzl: typeof import('yauzl') = require('../../zipBundle').yauzl; +import { yazl, yauzl } from '../../zipBundle'; export class LocalUtilsDispatcher extends Dispatcher<{ guid: string }, channels.LocalUtilsChannel> implements channels.LocalUtilsChannel { _type_LocalUtils: boolean; diff --git a/packages/playwright-core/src/server/fetch.ts b/packages/playwright-core/src/server/fetch.ts index 2e4719a91c..f2fbef7a71 100644 --- a/packages/playwright-core/src/server/fetch.ts +++ b/packages/playwright-core/src/server/fetch.ts @@ -36,9 +36,7 @@ import { ProgressController } from './progress'; import { Tracing } from './trace/recorder/tracing'; import type * as types from './types'; import type { HeadersArray, ProxySettings } from './types'; - -const { HttpsProxyAgent }: typeof import('../../bundles/utils/node_modules/https-proxy-agent') = require('../utilsBundle'); -const { SocksProxyAgent }: typeof import('../../bundles/utils/node_modules/socks-proxy-agent') = require('../utilsBundle'); +import { HttpsProxyAgent, SocksProxyAgent } from '../utilsBundle'; type FetchRequestOptions = { userAgent: string; diff --git a/packages/playwright-core/src/server/recorder/DEPS.list b/packages/playwright-core/src/server/recorder/DEPS.list index d047729d7b..e94a071ef4 100644 --- a/packages/playwright-core/src/server/recorder/DEPS.list +++ b/packages/playwright-core/src/server/recorder/DEPS.list @@ -4,6 +4,7 @@ ../../common/ ../../protocol/ ../../utils/** +../../zipBundle.ts [recorderApp.ts] ../chromium/crApp.ts diff --git a/packages/playwright-core/src/server/registry/browserFetcher.ts b/packages/playwright-core/src/server/registry/browserFetcher.ts index 54d8b08992..8f0ed35801 100644 --- a/packages/playwright-core/src/server/registry/browserFetcher.ts +++ b/packages/playwright-core/src/server/registry/browserFetcher.ts @@ -22,8 +22,7 @@ import { getUserAgent } from '../../common/userAgent'; import { existsAsync } from '../../utils/fileUtils'; import { debugLogger } from '../../common/debugLogger'; import { download } from './download'; - -const extract: typeof import('../../../bundles/zip/node_modules/extract-zip') = require('../../zipBundle').extract; +import { extract } from '../../zipBundle'; export async function downloadBrowserWithProgressBar(title: string, browserDirectory: string, executablePath: string, downloadURL: string, downloadFileName: string): Promise { const progressBarName = `Playwright build of ${title}`; diff --git a/packages/playwright-core/src/server/registry/index.ts b/packages/playwright-core/src/server/registry/index.ts index 525d62fe57..eb9b586335 100644 --- a/packages/playwright-core/src/server/registry/index.ts +++ b/packages/playwright-core/src/server/registry/index.ts @@ -19,6 +19,7 @@ import * as os from 'os'; import path from 'path'; import * as util from 'util'; import * as fs from 'fs'; +import { lockfile } from '../../utilsBundle'; import { getUbuntuVersion } from '../../utils/ubuntuVersion'; import { fetchData } from '../../common/netUtils'; import { getClientLanguage } from '../../common/userAgent'; @@ -32,8 +33,6 @@ import { installDependenciesLinux, installDependenciesWindows, validateDependenc import { downloadBrowserWithProgressBar, logPolitely } from './browserFetcher'; export { writeDockerVersion } from './dependencies'; -const lockfile: typeof import('proper-lockfile') = require('../../utilsBundle').lockfile; - const PACKAGE_PATH = path.join(__dirname, '..', '..', '..'); const BIN_PATH = path.join(__dirname, '..', '..', '..', 'bin'); diff --git a/packages/playwright-core/src/server/trace/recorder/DEPS.list b/packages/playwright-core/src/server/trace/recorder/DEPS.list index 36d482f6ff..ac1d81edd8 100644 --- a/packages/playwright-core/src/server/trace/recorder/DEPS.list +++ b/packages/playwright-core/src/server/trace/recorder/DEPS.list @@ -4,4 +4,5 @@ ../../../common/ ../../../protocol/ ../../../utils/ +../../../zipBundle.ts ../common/ diff --git a/packages/playwright-core/src/server/trace/recorder/tracing.ts b/packages/playwright-core/src/server/trace/recorder/tracing.ts index ceaf1b0950..dc7effa5dc 100644 --- a/packages/playwright-core/src/server/trace/recorder/tracing.ts +++ b/packages/playwright-core/src/server/trace/recorder/tracing.ts @@ -41,8 +41,7 @@ import type * as trace from '../common/traceEvents'; import { VERSION } from '../common/traceEvents'; import type { SnapshotterBlob, SnapshotterDelegate } from './snapshotter'; import { Snapshotter } from './snapshotter'; - -const yazl: typeof import('yazl') = require('../../../zipBundle').yazl; +import { yazl } from '../../../zipBundle'; export type TracerOptions = { name?: string; diff --git a/packages/playwright-core/src/utils/DEPS.list b/packages/playwright-core/src/utils/DEPS.list index a6ed4de4ac..25592671eb 100644 --- a/packages/playwright-core/src/utils/DEPS.list +++ b/packages/playwright-core/src/utils/DEPS.list @@ -2,3 +2,4 @@ ./ ../third_party/diff_match_patch ../third_party/pixelmatch +../utilsBundle.ts diff --git a/packages/playwright-core/src/utils/comparators.ts b/packages/playwright-core/src/utils/comparators.ts index f0ed60be01..af4e0d21f6 100644 --- a/packages/playwright-core/src/utils/comparators.ts +++ b/packages/playwright-core/src/utils/comparators.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from '../utilsBundle'; import jpeg from 'jpeg-js'; import pixelmatch from '../third_party/pixelmatch'; import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from '../third_party/diff_match_patch'; diff --git a/packages/playwright-core/src/utils/fileUtils.ts b/packages/playwright-core/src/utils/fileUtils.ts index 88be6114b0..77ce1bf042 100644 --- a/packages/playwright-core/src/utils/fileUtils.ts +++ b/packages/playwright-core/src/utils/fileUtils.ts @@ -16,7 +16,7 @@ import fs from 'fs'; import path from 'path'; -const rimraf: typeof import('rimraf') = require('../utilsBundle').rimraf; +import { rimraf } from '../utilsBundle'; export const existsAsync = (path: string): Promise => new Promise(resolve => fs.stat(path, err => resolve(!err))); diff --git a/packages/playwright-core/src/utils/processLauncher.ts b/packages/playwright-core/src/utils/processLauncher.ts index c321f89e9d..6d06a1be55 100644 --- a/packages/playwright-core/src/utils/processLauncher.ts +++ b/packages/playwright-core/src/utils/processLauncher.ts @@ -20,8 +20,7 @@ import * as readline from 'readline'; import { eventsHelper } from './eventsHelper'; import { isUnderTest } from './'; import { removeFolders } from './fileUtils'; - -const rimraf: typeof import('rimraf') = require('../utilsBundle').rimraf; +import { rimraf } from '../utilsBundle'; export type Env = {[key: string]: string | number | boolean | undefined}; diff --git a/packages/playwright-core/src/utils/stackTrace.ts b/packages/playwright-core/src/utils/stackTrace.ts index 918db22c21..a5a7070565 100644 --- a/packages/playwright-core/src/utils/stackTrace.ts +++ b/packages/playwright-core/src/utils/stackTrace.ts @@ -15,10 +15,9 @@ */ import path from 'path'; +import { StackUtils } from '../utilsBundle'; import { isUnderTest } from './'; -const StackUtils: typeof import('stack-utils') = require('../utilsBundle').StackUtils; - const stackUtils = new StackUtils(); export function rewriteErrorMessage(e: E, newMessage: string): E { diff --git a/packages/playwright-core/src/utilsBundle.ts b/packages/playwright-core/src/utilsBundle.ts new file mode 100644 index 0000000000..fa7f789a6d --- /dev/null +++ b/packages/playwright-core/src/utilsBundle.ts @@ -0,0 +1,26 @@ +/** + * 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. + */ + +export const colors: typeof import('../bundles/utils/node_modules/colors/safe') = require('./utilsBundleImpl').colors; +export const debug: typeof import('../bundles/utils/node_modules/@types/debug') = require('./utilsBundleImpl').debug; +export const getProxyForUrl: typeof import('../bundles/utils/node_modules/@types/proxy-from-env').getProxyForUrl = require('./utilsBundleImpl').getProxyForUrl; +export const HttpsProxyAgent: typeof import('../bundles/utils/node_modules/https-proxy-agent').HttpsProxyAgent = require('./utilsBundleImpl').HttpsProxyAgent; +export const lockfile: typeof import('../bundles/utils/node_modules/@types/proper-lockfile') = require('./utilsBundleImpl').lockfile; +export const program: typeof import('../bundles/utils/node_modules/commander').program = require('./utilsBundleImpl').program; +export const rimraf: typeof import('../bundles/utils/node_modules/@types/rimraf') = require('./utilsBundleImpl').rimraf; +export const SocksProxyAgent: typeof import('../bundles/utils/node_modules/socks-proxy-agent').SocksProxyAgent = require('./utilsBundleImpl').SocksProxyAgent; +export const StackUtils: typeof import('../bundles/utils/node_modules/@types/stack-utils') = require('./utilsBundleImpl').StackUtils; +export type { Command } from '../bundles/utils/node_modules/commander'; diff --git a/packages/playwright-core/src/zipBundle.ts b/packages/playwright-core/src/zipBundle.ts new file mode 100644 index 0000000000..b396c7fca8 --- /dev/null +++ b/packages/playwright-core/src/zipBundle.ts @@ -0,0 +1,20 @@ +/** + * 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. + */ + +export const yazl: typeof import('../bundles/zip/node_modules/@types/yazl') = require('./zipBundleImpl').yazl; +export type { ZipFile } from '../bundles/zip/node_modules/@types/yazl'; +export const yauzl: typeof import('../bundles/zip/node_modules/@types/yauzl') = require('./zipBundleImpl').yauzl; +export const extract: typeof import('../bundles/zip/node_modules/extract-zip') = require('./zipBundleImpl').extract; diff --git a/packages/playwright-test/bundles/babel/package-lock.json b/packages/playwright-test/bundles/babel/package-lock.json index f85980a54b..119a6c4767 100644 --- a/packages/playwright-test/bundles/babel/package-lock.json +++ b/packages/playwright-test/bundles/babel/package-lock.json @@ -26,6 +26,11 @@ "@babel/plugin-syntax-optional-catch-binding": "7.8.3", "@babel/plugin-transform-modules-commonjs": "7.16.8", "@babel/preset-typescript": "7.16.7" + }, + "devDependencies": { + "@types/babel__code-frame": "^7.0.3", + "@types/babel__core": "^7.1.18", + "@types/babel__helper-plugin-utils": "^7.10.0" } }, "node_modules/@babel/code-frame": { @@ -701,6 +706,62 @@ "node": ">=6.9.0" } }, + "node_modules/@types/babel__code-frame": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", + "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==", + "dev": true + }, + "node_modules/@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__helper-plugin-utils": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz", + "integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==", + "dev": true, + "dependencies": { + "@types/babel__core": "*" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.0.tgz", + "integrity": "sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.3.0" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1510,6 +1571,62 @@ "to-fast-properties": "^2.0.0" } }, + "@types/babel__code-frame": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz", + "integrity": "sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw==", + "dev": true + }, + "@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__helper-plugin-utils": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz", + "integrity": "sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA==", + "dev": true, + "requires": { + "@types/babel__core": "*" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.0.tgz", + "integrity": "sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", diff --git a/packages/playwright-test/bundles/babel/package.json b/packages/playwright-test/bundles/babel/package.json index 7d8a77c833..254bed4810 100644 --- a/packages/playwright-test/bundles/babel/package.json +++ b/packages/playwright-test/bundles/babel/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "esbuild": "esbuild ./src/babelBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", + "esbuild": "esbuild ./src/babelBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", "build": "npm ci && npm run esbuild -- --minify", "watch": "npm ci && npm run esbuild -- --watch --sourcemap", "generate-license": "node ../../../../utils/generate_third_party_notice.js" @@ -27,5 +27,10 @@ "@babel/plugin-syntax-optional-catch-binding": "7.8.3", "@babel/plugin-transform-modules-commonjs": "7.16.8", "@babel/preset-typescript": "7.16.7" + }, + "devDependencies": { + "@types/babel__code-frame": "^7.0.3", + "@types/babel__core": "^7.1.18", + "@types/babel__helper-plugin-utils": "^7.10.0" } } diff --git a/packages/playwright-test/bundles/babel/src/babelBundle.ts b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts similarity index 100% rename from packages/playwright-test/bundles/babel/src/babelBundle.ts rename to packages/playwright-test/bundles/babel/src/babelBundleImpl.ts diff --git a/packages/playwright-test/bundles/expect/package.json b/packages/playwright-test/bundles/expect/package.json index e9e1592033..e966bd66fa 100644 --- a/packages/playwright-test/bundles/expect/package.json +++ b/packages/playwright-test/bundles/expect/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "esbuild": "esbuild ./src/expectBundle.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", + "esbuild": "esbuild ./src/expectBundleImpl.ts --bundle --outdir=../../lib --format=cjs --platform=node --target=ES2019", "build": "npm ci && npm run esbuild -- --minify", "watch": "npm ci && npm run esbuild -- --watch --sourcemap", "generate-license": "node ../../../../utils/generate_third_party_notice.js" diff --git a/packages/playwright-test/bundles/expect/src/expectBundle.ts b/packages/playwright-test/bundles/expect/src/expectBundleImpl.ts similarity index 90% rename from packages/playwright-test/bundles/expect/src/expectBundle.ts rename to packages/playwright-test/bundles/expect/src/expectBundleImpl.ts index 5c77561e09..3eddff1323 100644 --- a/packages/playwright-test/bundles/expect/src/expectBundle.ts +++ b/packages/playwright-test/bundles/expect/src/expectBundleImpl.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import expect from 'expect'; -export const expectLibrary = expect; +import expectLibrary from 'expect'; +export const expect = expectLibrary; export { INVERTED_COLOR, diff --git a/packages/playwright-test/package.json b/packages/playwright-test/package.json index 2c9b21bd9f..af3d856ff0 100644 --- a/packages/playwright-test/package.json +++ b/packages/playwright-test/package.json @@ -29,9 +29,6 @@ }, "license": "Apache-2.0", "dependencies": { - "colors": "1.4.0", - "commander": "8.3.0", - "debug": "4.3.3", "json5": "2.2.1", "mime": "3.0.0", "minimatch": "3.0.4", diff --git a/packages/playwright-test/src/babelBundle.ts b/packages/playwright-test/src/babelBundle.ts new file mode 100644 index 0000000000..98efef336c --- /dev/null +++ b/packages/playwright-test/src/babelBundle.ts @@ -0,0 +1,24 @@ +/** + * 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. + */ + +import type { BabelFileResult } from '../bundles/babel/node_modules/@types/babel__core'; +export const codeFrameColumns: typeof import('../bundles/babel/node_modules/@types/babel__code-frame').codeFrameColumns = require('./babelBundleImpl').codeFrameColumns; +export const declare: typeof import('../bundles/babel/node_modules/@types/babel__helper-plugin-utils').declare = require('./babelBundleImpl').declare; +export const types: typeof import('../bundles/babel/node_modules/@types/babel__core').types = require('./babelBundleImpl').types; +export type BabelTransformFunction = (filename: string, isTypeScript: boolean, isModule: boolean, scriptPreprocessor: string | undefined, additionalPlugin: [string]) => BabelFileResult; +export const babelTransform: BabelTransformFunction = require('./babelBundleImpl').babelTransform; +export type { NodePath, types as T } from '../bundles/babel/node_modules/@types/babel__core'; +export type { BabelAPI } from '../bundles/babel/node_modules/@types/babel__helper-plugin-utils'; diff --git a/packages/playwright-test/src/cli.ts b/packages/playwright-test/src/cli.ts index e98ef0743e..f50c33e80c 100644 --- a/packages/playwright-test/src/cli.ts +++ b/packages/playwright-test/src/cli.ts @@ -16,7 +16,7 @@ /* eslint-disable no-console */ -import type { Command } from 'commander'; +import type { Command } from 'playwright-core/lib/utilsBundle'; import fs from 'fs'; import url from 'url'; import path from 'path'; diff --git a/packages/playwright-test/src/expect.ts b/packages/playwright-test/src/expect.ts index f50455de83..db3a6396ee 100644 --- a/packages/playwright-test/src/expect.ts +++ b/packages/playwright-test/src/expect.ts @@ -43,13 +43,12 @@ import type { Expect } from './types'; import { currentTestInfo } from './globals'; import { serializeError, captureStackTrace, currentExpectTimeout } from './util'; import { monotonicTime } from 'playwright-core/lib/utils'; - -const { expectLibrary } = require('./expectBundle'); -const { +import { + expect as expectLibrary, INVERTED_COLOR, RECEIVED_COLOR, printReceived, -} = require('./expectBundle'); +} from './expectBundle'; // from expect/build/types export type SyncExpectationResult = { diff --git a/packages/playwright-test/src/expectBundle.ts b/packages/playwright-test/src/expectBundle.ts new file mode 100644 index 0000000000..fa08f696f7 --- /dev/null +++ b/packages/playwright-test/src/expectBundle.ts @@ -0,0 +1,20 @@ +/** + * 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. + */ + +export const expect: typeof import('../bundles/expect/node_modules/expect') = require('./expectBundleImpl').expect; +export const INVERTED_COLOR: typeof import('../bundles/expect/node_modules/jest-matcher-utils').INVERTED_COLOR = require('./expectBundleImpl').INVERTED_COLOR; +export const RECEIVED_COLOR: typeof import('../bundles/expect/node_modules/jest-matcher-utils').RECEIVED_COLOR = require('./expectBundleImpl').RECEIVED_COLOR; +export const printReceived: typeof import('../bundles/expect/node_modules/jest-matcher-utils').printReceived = require('./expectBundleImpl').printReceived; diff --git a/packages/playwright-test/src/matchers/toMatchSnapshot.ts b/packages/playwright-test/src/matchers/toMatchSnapshot.ts index dd33de3d79..1e7fe9da50 100644 --- a/packages/playwright-test/src/matchers/toMatchSnapshot.ts +++ b/packages/playwright-test/src/matchers/toMatchSnapshot.ts @@ -26,7 +26,7 @@ import { addSuffixToFilePath, serializeError, sanitizeForFilePath, trimLongString, callLogText, currentExpectTimeout, expectTypes, captureStackTrace } from '../util'; -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import fs from 'fs'; import path from 'path'; import * as mime from 'mime'; diff --git a/packages/playwright-test/src/reporters/DEPS.list b/packages/playwright-test/src/reporters/DEPS.list index 3f622219b9..7b0a857451 100644 --- a/packages/playwright-test/src/reporters/DEPS.list +++ b/packages/playwright-test/src/reporters/DEPS.list @@ -1,3 +1,3 @@ [*] ../util.ts -../babelBundle +../babelBundle.ts diff --git a/packages/playwright-test/src/reporters/base.ts b/packages/playwright-test/src/reporters/base.ts index 1ebbb53176..10173171dd 100644 --- a/packages/playwright-test/src/reporters/base.ts +++ b/packages/playwright-test/src/reporters/base.ts @@ -14,15 +14,14 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import fs from 'fs'; import milliseconds from 'ms'; import path from 'path'; +import { StackUtils } from 'playwright-core/lib/utilsBundle'; import type { FullConfig, TestCase, Suite, TestResult, TestError, Reporter, FullResult, TestStep, Location } from '../../types/testReporter'; import type { FullConfigInternal } from '../types'; - -const { codeFrameColumns } = require('../babelBundle'); -const StackUtils: typeof import('stack-utils') = require('playwright-core/lib/utilsBundle').StackUtils; +import { codeFrameColumns } from '../babelBundle'; const stackUtils = new StackUtils(); export type TestResultOutput = { chunk: string | Buffer, type: 'stdout' | 'stderr' }; diff --git a/packages/playwright-test/src/reporters/dot.ts b/packages/playwright-test/src/reporters/dot.ts index 343604213b..3f12a168c0 100644 --- a/packages/playwright-test/src/reporters/dot.ts +++ b/packages/playwright-test/src/reporters/dot.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import { BaseReporter } from './base'; import type { FullResult, TestCase, TestResult, FullConfig, Suite } from '../../types/testReporter'; diff --git a/packages/playwright-test/src/reporters/html.ts b/packages/playwright-test/src/reporters/html.ts index e3dd50b530..b5c9b4a3bd 100644 --- a/packages/playwright-test/src/reporters/html.ts +++ b/packages/playwright-test/src/reporters/html.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import fs from 'fs'; import open from 'open'; import path from 'path'; @@ -29,9 +29,8 @@ import RawReporter from './raw'; import { stripAnsiEscapes } from './base'; import { getPackageJsonPath } from '../util'; import type { FullConfigInternal } from '../types'; - -import type { ZipFile } from 'yazl'; -const yazl: typeof import('yazl') = require('playwright-core/lib/zipBundle').yazl; +import type { ZipFile } from 'playwright-core/lib/zipBundle'; +import { yazl } from 'playwright-core/lib/zipBundle'; export type Stats = { total: number; diff --git a/packages/playwright-test/src/reporters/line.ts b/packages/playwright-test/src/reporters/line.ts index 2e74a9eafc..1b0c1dc94c 100644 --- a/packages/playwright-test/src/reporters/line.ts +++ b/packages/playwright-test/src/reporters/line.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import { BaseReporter, formatFailure, formatTestTitle } from './base'; import type { FullConfig, TestCase, Suite, TestResult, FullResult } from '../../types/testReporter'; diff --git a/packages/playwright-test/src/reporters/list.ts b/packages/playwright-test/src/reporters/list.ts index 8f7f393467..918478a4ff 100644 --- a/packages/playwright-test/src/reporters/list.ts +++ b/packages/playwright-test/src/reporters/list.ts @@ -15,7 +15,7 @@ */ /* eslint-disable no-console */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import milliseconds from 'ms'; import { BaseReporter, formatTestTitle } from './base'; import type { FullConfig, FullResult, Suite, TestCase, TestResult, TestStep } from '../../types/testReporter'; diff --git a/packages/playwright-test/src/reporters/raw.ts b/packages/playwright-test/src/reporters/raw.ts index 1d7d8aef08..5752d57189 100644 --- a/packages/playwright-test/src/reporters/raw.ts +++ b/packages/playwright-test/src/reporters/raw.ts @@ -22,8 +22,7 @@ import { sanitizeForFilePath } from '../util'; import { formatResultFailure } from './base'; import { toPosixPath, serializePatterns } from './json'; import { MultiMap } from 'playwright-core/lib/utils/multimap'; - -const { codeFrameColumns } = require('../babelBundle'); +import { codeFrameColumns } from '../babelBundle'; export type JsonLocation = Location; export type JsonError = string; diff --git a/packages/playwright-test/src/runner.ts b/packages/playwright-test/src/runner.ts index 5a92a8fbda..3532309431 100644 --- a/packages/playwright-test/src/runner.ts +++ b/packages/playwright-test/src/runner.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +import { rimraf } from 'playwright-core/lib/utilsBundle'; import * as fs from 'fs'; import * as path from 'path'; import { promisify } from 'util'; @@ -45,7 +46,6 @@ import { raceAgainstTimeout } from 'playwright-core/lib/utils/timeoutRunner'; import { SigIntWatcher } from './sigIntWatcher'; import { GlobalInfoImpl } from './globalInfo'; -const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf; const removeFolderAsync = promisify(rimraf); const readDirAsync = promisify(fs.readdir); const readFileAsync = promisify(fs.readFile); diff --git a/packages/playwright-test/src/timeoutManager.ts b/packages/playwright-test/src/timeoutManager.ts index 6d09e20550..d446154156 100644 --- a/packages/playwright-test/src/timeoutManager.ts +++ b/packages/playwright-test/src/timeoutManager.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors } from 'playwright-core/lib/utilsBundle'; import { TimeoutRunner, TimeoutRunnerError } from 'playwright-core/lib/utils/timeoutRunner'; import type { TestError } from '../types/test'; import type { Location } from './types'; diff --git a/packages/playwright-test/src/transform.ts b/packages/playwright-test/src/transform.ts index aae809c7f2..4a73f042ea 100644 --- a/packages/playwright-test/src/transform.ts +++ b/packages/playwright-test/src/transform.ts @@ -25,6 +25,7 @@ import type { Location } from './types'; import type { TsConfigLoaderResult } from './third_party/tsconfig-loader'; import { tsConfigLoader } from './third_party/tsconfig-loader'; import Module from 'module'; +import type { BabelTransformFunction } from './babelBundle'; const version = 8; const cacheDir = process.env.PWTEST_CACHE_DIR || path.join(os.tmpdir(), 'playwright-transform-cache'); @@ -183,7 +184,7 @@ export function transformHook(code: string, filename: string, isModule = false): process.env.BROWSERSLIST_IGNORE_OLD_DATA = 'true'; try { - const { babelTransform } = require('./babelBundle'); + const { babelTransform }: { babelTransform: BabelTransformFunction } = require('./babelBundle'); const result = babelTransform(filename, isTypeScript, isModule, hasPreprocessor ? scriptPreprocessor : undefined, [require.resolve('./tsxTransform')]); if (result.code) { fs.mkdirSync(path.dirname(cachePath), { recursive: true }); diff --git a/packages/playwright-test/src/tsxTransform.ts b/packages/playwright-test/src/tsxTransform.ts index f2af438613..63e64eae8f 100644 --- a/packages/playwright-test/src/tsxTransform.ts +++ b/packages/playwright-test/src/tsxTransform.ts @@ -14,9 +14,8 @@ * limitations under the License. */ -import type { NodePath, types as T } from '@babel/core'; -import type { BabelAPI } from '@babel/helper-plugin-utils'; -const { types, declare } = require('./babelBundle'); +import type { NodePath, T, BabelAPI } from './babelBundle'; +import { types, declare } from './babelBundle'; const t: typeof T = types; export default declare((api: BabelAPI) => { diff --git a/packages/playwright-test/src/util.ts b/packages/playwright-test/src/util.ts index d2e48e9640..aaacea2313 100644 --- a/packages/playwright-test/src/util.ts +++ b/packages/playwright-test/src/util.ts @@ -19,10 +19,9 @@ import * as mime from 'mime'; import util from 'util'; import path from 'path'; import url from 'url'; -import colors from 'colors/safe'; +import { colors, debug } from 'playwright-core/lib/utilsBundle'; import type { TestError, Location } from './types'; import { default as minimatch } from 'minimatch'; -import debug from 'debug'; import { calculateSha1, isRegExp } from 'playwright-core/lib/utils'; import { isInternalFileName } from 'playwright-core/lib/utils/stackTrace'; import { currentTestInfo } from './globals'; @@ -32,7 +31,8 @@ import { captureStackTrace as coreCaptureStackTrace } from 'playwright-core/lib/ export type { ParsedStackTrace }; const PLAYWRIGHT_CORE_PATH = path.dirname(require.resolve('playwright-core')); -const EXPECT_PATH = path.dirname(require.resolve('./expectBundle')); +const EXPECT_PATH = require.resolve('./expectBundle'); +const EXPECT_PATH_IMPL = require.resolve('./expectBundleImpl'); const PLAYWRIGHT_TEST_PATH = path.join(__dirname, '..'); function filterStackTrace(e: Error) { @@ -71,7 +71,7 @@ export function captureStackTrace(customApiName?: string): ParsedStackTrace { const frameTexts = []; for (let i = 0; i < stackTrace.frames.length; ++i) { const frame = stackTrace.frames[i]; - if (frame.file.startsWith(EXPECT_PATH)) + if (frame.file === EXPECT_PATH || frame.file === EXPECT_PATH_IMPL) continue; frames.push(frame); frameTexts.push(stackTrace.frameTexts[i]); diff --git a/packages/playwright-test/src/webServer.ts b/packages/playwright-test/src/webServer.ts index 8bf492bf32..a613f517d6 100644 --- a/packages/playwright-test/src/webServer.ts +++ b/packages/playwright-test/src/webServer.ts @@ -17,7 +17,7 @@ import http from 'http'; import https from 'https'; import net from 'net'; -import debug from 'debug'; +import { debug } from 'playwright-core/lib/utilsBundle'; import { raceAgainstTimeout } from 'playwright-core/lib/utils/timeoutRunner'; import type { WebServerConfig } from './types'; import { launchProcess } from 'playwright-core/lib/utils/processLauncher'; diff --git a/packages/playwright-test/src/workerRunner.ts b/packages/playwright-test/src/workerRunner.ts index 8e3fe81a04..090fc536c2 100644 --- a/packages/playwright-test/src/workerRunner.ts +++ b/packages/playwright-test/src/workerRunner.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import colors from 'colors/safe'; +import { colors, rimraf } from 'playwright-core/lib/utilsBundle'; import util from 'util'; import { EventEmitter } from 'events'; import { relativeFilePath, serializeError } from './util'; @@ -30,7 +30,6 @@ import { TestInfoImpl } from './testInfo'; import type { TimeSlot } from './timeoutManager'; import { TimeoutManager } from './timeoutManager'; -const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf; const removeFolderAsync = util.promisify(rimraf); export class WorkerRunner extends EventEmitter { diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.ts index 9b522ff7ae..cc7bdb1f3c 100644 --- a/tests/playwright-test/playwright-test-fixtures.ts +++ b/tests/playwright-test/playwright-test-fixtures.ts @@ -18,6 +18,7 @@ import type { JSONReport, JSONReportSuite } from '@playwright/test/reporter'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; +import { rimraf } from 'playwright-core/lib/utilsBundle'; import { PNG } from 'pngjs'; import { promisify } from 'util'; import type { CommonFixtures } from '../config/commonFixtures'; @@ -27,7 +28,6 @@ import { serverFixtures } from '../config/serverFixtures'; import type { TestInfo } from './stable-test-runner'; import { test as base } from './stable-test-runner'; -const rimraf: typeof import('rimraf') = require('playwright-core/lib/utilsBundle').rimraf; const removeFolderAsync = promisify(rimraf); type RunResult = {