diff options
author | 2022-06-22 23:21:48 -0700 | |
---|---|---|
committer | 2022-06-22 23:21:48 -0700 | |
commit | 729d445b6885f69dd2c6355f38707bd42851c791 (patch) | |
tree | f87a7c408929ea3f57bbb7ace380cf869da83c0e /test/scripts | |
parent | 25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff) | |
download | bun-jarred/rename.tar.gz bun-jarred/rename.tar.zst bun-jarred/rename.zip |
change the directory structurejarred/rename
Diffstat (limited to 'test/scripts')
-rw-r--r-- | test/scripts/browser.js | 190 | ||||
-rw-r--r-- | test/scripts/bun.js | 86 | ||||
-rwxr-xr-x | test/scripts/bun.lockb | bin | 0 -> 15723 bytes | |||
-rw-r--r-- | test/scripts/package-lock.json | 892 | ||||
-rw-r--r-- | test/scripts/package.json | 5 | ||||
-rw-r--r-- | test/scripts/snippets.json | 32 |
6 files changed, 1205 insertions, 0 deletions
diff --git a/test/scripts/browser.js b/test/scripts/browser.js new file mode 100644 index 000000000..479a55c9c --- /dev/null +++ b/test/scripts/browser.js @@ -0,0 +1,190 @@ +const puppeteer = require("puppeteer"); +const http = require("http"); +const path = require("path"); +const url = require("url"); +const fs = require("fs"); +const child_process = require("child_process"); +const snippetsDir = path.resolve(__dirname, "../snippets"); +const serverURL = process.env.TEST_SERVER_URL || "http://localhost:8080"; +const USE_EXISTING_PROCESS = process.env.USE_EXISTING_PROCESS || false; +const DISABLE_HMR = !!process.env.DISABLE_HMR; +const bunFlags = [ + `--origin=${serverURL}`, + DISABLE_HMR && "--disable-hmr", +].filter(Boolean); +const bunExec = process.env.BUN_BIN || "bun"; + +var bunProcess; +var waitSpawn; +if (!USE_EXISTING_PROCESS) { + bunProcess = child_process.spawn(bunExec, bunFlags, { + cwd: snippetsDir, + stdio: "pipe", + env: { + ...process.env, + DISABLE_BUN_ANALYTICS: "1", + }, + + shell: false, + }); + console.log("$", bunExec, bunFlags.join(" ")); + bunProcess.stderr.pipe(process.stderr); + bunProcess.stdout.pipe(process.stdout); + var rejecter; + bunProcess.once("error", (err) => { + console.error("❌ bun error", err); + process.exit(1); + }); + if (!process.env.CI) { + waitSpawn = new Promise((resolve, reject) => { + bunProcess.once("spawn", (code) => { + console.log("Spawned"); + resolve(); + }); + }); + } + process.on("beforeExit", () => { + bunProcess && bunProcess.kill(0); + }); +} +const isDebug = bunExec.endsWith("-debug"); + +function writeSnapshot(name, code) { + let file = path.join(__dirname, "../snapshots", name); + + if (!DISABLE_HMR) { + file = + file.substring(0, file.length - path.extname(file).length) + + ".hmr" + + path.extname(file); + } + + if (!fs.existsSync(path.dirname(file))) { + fs.mkdirSync(path.dirname(file), { recursive: true }); + } + + fs.writeFileSync( + isDebug + ? file.substring(0, file.length - path.extname(file).length) + + ".debug" + + path.extname(file) + : file, + code + ); +} + +const baseOptions = { + dumpio: !!process.env.CI_DEBUG, + + args: [ + "--disable-gpu", + "--disable-dev-shm-usage", + "--disable-setuid-sandbox", + "--no-sandbox", + "--ignore-certificate-errors", + "--use-fake-ui-for-media-stream", + "--use-fake-device-for-media-stream", + "--disable-sync", + ], + executablePath: process.env.BROWSER_EXECUTABLE, + headless: true, +}; + +async function main() { + const launchOptions = USE_EXISTING_PROCESS + ? { ...baseOptions, devtools: !process.env.CI } + : baseOptions; + const browser = await puppeteer.launch(launchOptions); + const promises = []; + let allTestsPassed = true; + + if (waitSpawn) await waitSpawn; + var canRetry = true; + + async function runPage(key) { + var page; + try { + page = await browser.newPage(); + if (USE_EXISTING_PROCESS) { + await page.evaluate(` + globalThis.BUN_DEBUG_MODE = true; + `); + } + + var shouldClose = true; + page.on("console", (obj) => + console.log(`[console.${obj.type()}] ${obj.text()}`) + ); + page.exposeFunction("testFail", (error) => { + console.log(`❌ ${error}`); + allTestsPassed = false; + }); + let testDone = new Promise((resolve) => { + page.exposeFunction("testDone", resolve); + }); + try { + await page.goto(`${serverURL}/`, { + waitUntil: "domcontentloaded", + }); + + await page.evaluate(` + globalThis.runTest("${key}"); + `); + await testDone; + } catch (err) { + if (canRetry) { + console.log( + `❌ ${key} failed once (incase it's still booting on universal binary for the first time). Retrying...` + ); + canRetry = false; + return await runPage(key); + } + throw err; + } + + console.log(`✅ ${key}`); + } catch (e) { + if (USE_EXISTING_PROCESS) shouldClose = false; + allTestsPassed = false; + console.log(`❌ ${key}: ${(e && e.message) || e}`); + } finally { + try { + const code = await page.evaluate(` + globalThis.getModuleScriptSrc("${key}"); + `); + writeSnapshot(key, code); + } catch (exception) { + console.warn(`Failed to update snapshot: ${key}`, exception); + } + } + canRetry = false; + if (shouldClose) await page.close(); + } + + const tests = require("./snippets.json"); + tests.reverse(); + + for (let test of tests) { + await runPage(test); + } + + if (!USE_EXISTING_PROCESS || (USE_EXISTING_PROCESS && allTestsPassed)) { + bunProcess && bunProcess.kill(0); + + if (!allTestsPassed) { + console.error(`❌ browser test failed`); + process.exit(1); + } else { + console.log(`✅ browser test passed`); + bunProcess && bunProcess.kill(0); + process.exit(0); + } + await browser.close(); + } +} + +main().catch((error) => + setTimeout(() => { + throw error; + }) +); diff --git a/test/scripts/bun.js b/test/scripts/bun.js new file mode 100644 index 000000000..f8e4d2fa0 --- /dev/null +++ b/test/scripts/bun.js @@ -0,0 +1,86 @@ +const fail = true; +// import snippets from "./snippets.json"; + +// globalThis.console.assert = (condition, ...content) => { +// if (!condition) { +// throw new Error(content.join(" ")); +// } +// }; +// globalThis.getModuleScriptSrc = async (name) => { +// const response = await fetch(name, { +// cache: "force-cache", +// }); + +// if (response.ok) { +// return await response.text(); +// } else { +// throw new Error(`Failed to get module script ${name}`); +// } +// }; + +// globalThis.runTest = async (name) => { +// testSuccess = false; +// var Namespace = await import(name); +// var testFunction = Namespace.test; + +// if ( +// !("test" in Namespace) && +// "default" in Namespace && +// typeof Namespace.default === "function" +// ) { +// Namespace = Namespace.default(); +// testFunction = Namespace.test; +// } + +// if (!testFunction) { +// throw new Error("No test function found in " + name); +// } + +// if (typeof testFunction !== "function") { +// throw new Error( +// `Expected (await import(\"${name}\"")) to have a test function.\nReceived: ${Object.keys( +// Namespace +// ).join(", ")} ` +// ); +// } + +// if (globalThis.BUN_DEBUG_MODE) { +// try { +// await testFunction(); +// if (!testSuccess) { +// throw new Error("Test failed"); +// } +// } catch (exception) { +// console.error(exception); +// debugger; +// throw exception; +// } +// } else { +// await testFunction(); +// if (!testSuccess) { +// throw new Error("Test failed"); +// } +// } +// }; + +// var testSuccess = false; +// globalThis.testDone = () => { +// testSuccess = true; +// }; + +// let fail = 0; +// for (let snippet of snippets) { +// try { +// await runTest("../snippets/" + snippet.substring(1)); +// console.log("✅", snippet); +// } catch (exception) { +// console.error(`❌ ${snippet}`); +// console.error(exception); + +// fail++; +// } +// } + +if (fail) throw new Error(`❌ browser test failed (${fail})`); + +console.log(`✅ bun.js test passed`); diff --git a/test/scripts/bun.lockb b/test/scripts/bun.lockb Binary files differnew file mode 100755 index 000000000..2d9937d57 --- /dev/null +++ b/test/scripts/bun.lockb diff --git a/test/scripts/package-lock.json b/test/scripts/package-lock.json new file mode 100644 index 000000000..a41b9bd92 --- /dev/null +++ b/test/scripts/package-lock.json @@ -0,0 +1,892 @@ +{ + "name": "scripts", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "puppeteer": "^10.2.0" + } + }, + "node_modules/@types/node": { + "version": "16.11.26", + "license": "MIT", + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.9.2", + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.3", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "license": "ISC" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.1", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.901419", + "license": "BSD-3-Clause" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extract-zip/node_modules/debug": { + "version": "4.3.3", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/get-stream": { + "version": "5.2.0", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.3", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minimatch": { + "version": "3.0.8", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "license": "MIT", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "license": "MIT" + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/progress": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "10.4.0", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "4.3.1", + "devtools-protocol": "0.0.901419", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.1", + "pkg-dir": "4.2.0", + "progress": "2.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.0.0", + "unbzip2-stream": "1.3.3", + "ws": "7.4.6" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp": "^0.5.1", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/through": { + "version": "2.3.8", + "license": "MIT" + }, + "node_modules/unbzip2-stream": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.4.6", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + }, + "dependencies": { + "@types/node": { + "version": "16.11.26", + "optional": true + }, + "@types/yauzl": { + "version": "2.9.2", + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "agent-base": { + "version": "6.0.2", + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "balanced-match": { + "version": "1.0.2" + }, + "base64-js": { + "version": "1.5.1" + }, + "bl": { + "version": "4.1.0", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13" + }, + "chownr": { + "version": "1.1.4" + }, + "concat-map": { + "version": "0.0.1" + }, + "debug": { + "version": "4.3.1", + "requires": { + "ms": "2.1.2" + } + }, + "devtools-protocol": { + "version": "0.0.901419" + }, + "end-of-stream": { + "version": "1.4.4", + "requires": { + "once": "^1.4.0" + } + }, + "extract-zip": { + "version": "2.0.1", + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "fd-slicer": { + "version": "1.1.0", + "requires": { + "pend": "~1.2.0" + } + }, + "find-up": { + "version": "4.1.0", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fs-constants": { + "version": "1.0.0" + }, + "fs.realpath": { + "version": "1.0.0" + }, + "get-stream": { + "version": "5.2.0", + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.2.0", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "requires": { + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "ieee754": { + "version": "1.2.1" + }, + "inflight": { + "version": "1.0.6", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4" + }, + "locate-path": { + "version": "5.0.0", + "requires": { + "p-locate": "^4.1.0" + } + }, + "minimatch": { + "version": "3.0.8", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5" + }, + "mkdirp": { + "version": "0.5.5", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2" + }, + "node-fetch": { + "version": "2.6.1" + }, + "once": { + "version": "1.4.0", + "requires": { + "wrappy": "1" + } + }, + "p-limit": { + "version": "2.3.0", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0" + }, + "path-exists": { + "version": "4.0.0" + }, + "path-is-absolute": { + "version": "1.0.1" + }, + "pend": { + "version": "1.2.0" + }, + "pkg-dir": { + "version": "4.2.0", + "requires": { + "find-up": "^4.0.0" + } + }, + "progress": { + "version": "2.0.1" + }, + "proxy-from-env": { + "version": "1.1.0" + }, + "pump": { + "version": "3.0.0", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "puppeteer": { + "version": "10.4.0", + "requires": { + "debug": "4.3.1", + "devtools-protocol": "0.0.901419", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.1", + "pkg-dir": "4.2.0", + "progress": "2.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.0.0", + "unbzip2-stream": "1.3.3", + "ws": "7.4.6" + } + }, + "readable-stream": { + "version": "3.6.0", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "rimraf": { + "version": "3.0.2", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.2.1" + }, + "string_decoder": { + "version": "1.3.0", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "tar-fs": { + "version": "2.0.0", + "requires": { + "chownr": "^1.1.1", + "mkdirp": "^0.5.1", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "tar-stream": { + "version": "2.2.0", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "through": { + "version": "2.3.8" + }, + "unbzip2-stream": { + "version": "1.3.3", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "util-deprecate": { + "version": "1.0.2" + }, + "wrappy": { + "version": "1.0.2" + }, + "ws": { + "version": "7.4.6", + "requires": {} + }, + "yauzl": { + "version": "2.10.0", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/test/scripts/package.json b/test/scripts/package.json new file mode 100644 index 000000000..b4637138b --- /dev/null +++ b/test/scripts/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "puppeteer": "^10.2.0" + } +} diff --git a/test/scripts/snippets.json b/test/scripts/snippets.json new file mode 100644 index 000000000..ebdec23d3 --- /dev/null +++ b/test/scripts/snippets.json @@ -0,0 +1,32 @@ +[ + "/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js", + "/bundled-entry-point.js", + "/export.js", + "/type-only-imports.ts", + "/global-is-remapped-to-globalThis.js", + "/multiple-imports.js", + "/ts-fallback-rewrite-works.js", + "/tsx-fallback-rewrite-works.js", + "/lodash-regexp.js", + "/unicode-identifiers.js", + "/string-escapes.js", + "/package-json-exports/index.js", + "/array-args-with-default-values.js", + "/forbid-in-is-correct.js", + "/code-simplification-neql-define.js", + "/spread_with_key.tsx", + "/styledcomponents-output.js", + "/void-shouldnt-delete-call-expressions.js", + "/custom-emotion-jsx/file.jsx", + "/react-context-value-func.tsx", + "/latin1-chars-in-regexp.js", + "/jsx-spacing.jsx", + "/jsx-entities.jsx", + "/optional-chain-with-function.js", + "/template-literal.js", + "/number-literal-bug.js", + "/caught-require.js", + "/package-json-utf8.js", + "/multiple-var.js", + "/export-default-module-hot.js" +] |