1 | {"version":3,"names":["babel","require","_helperFixtures","_codeFrame","helpers","_assert","_fs","_path","_vm","_quickLru","_url","_module","_helperCheckDuplicateNodes","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","assert","rejects","block","validateError","Error","EXTERNAL_HELPERS_VERSION","cachedScripts","QuickLRU","maxSize","contextModuleCache","WeakMap","sharedTestContext","createContext","transformWithoutConfigFile","code","opts","transformSync","Object","assign","configFile","babelrc","transformAsyncWithoutConfigFile","transformAsync","context","vm","process","transform","setTimeout","setImmediate","expect","global","moduleCache","create","set","runCacheableScriptInTestContext","path","join","dirname","__filename","buildExternalHelpers","filename","srcFn","cached","get","cachedData","script","Script","displayErrors","lineOffset","produceCachedData","cachedDataProduced","module","id","exports","req","runModuleInTestContext","runInContext","call","relativeFilename","v","w","split","versions","node","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","fs","readFileSync","runCodeInTestContext","oldCwd","cwd","chdir","src","maybeMockConsole","_x3","_x4","_maybeMockConsole","validateLogs","run","actualLogs","stdout","stderr","result","spy1","jest","spyOn","console","mockImplementation","msg","spy2","mockRestore","_x5","_run","task","actual","expected","exec","options","doNotSetSourceType","optionsDir","ignoreOutput","getOpts","newOpts","ast","loc","filenameRelative","sourceFileName","sourceType","inputSourceMap","resolveOptionPluginOrPreset","execCode","resultExec","execOpts","checkDuplicateNodes","message","codeFrameColumns","inputCode","expectedCode","outputCode","normalizeOutput","throws","statSync","isDirectory","env","CI","expectedFile","replace","log","writeFileSync","unlinkSync","e","validateFile","toMatch","normalizationOpts","normalizePathSeparator","normalizePresetEnvDebug","taskDir","includes","sourceMaps","map","toEqual","sourceMap","OVERWRITE","sourceMapFile","JSON","stringify","actualCode","expectedLoc","toEqualFile","escapeRegExp","string","projectRoot","cwdSymbol","trim","RegExp","platform","parseInt","extend","isNot","pass","diffString","utils","diff","expand","_default","fixturesLoc","name","suiteOpts","taskOpts","dynamicOpts","suites","getFixtures","testSuite","_suiteOpts$ignoreSuit","ignoreSuites","title","describe","tests","_suiteOpts$ignoreTask","_suiteOpts$ignoreTask2","ignoreTasks","testFn","disabled","it","skip","runTask","externalHelpers","_task$options","_task$options$plugins","plugins","push","helperVersion","throwMsg","ok"],"sources":["../src/index.ts"],"sourcesContent":["/* eslint-env jest */\nimport * as babel from \"@babel/core\";\nimport {\n buildExternalHelpers,\n type InputOptions,\n type FileResult,\n} from \"@babel/core\";\nimport {\n default as getFixtures,\n resolveOptionPluginOrPreset,\n type Test,\n type TestFile,\n type TaskOptions,\n} from \"@babel/helper-fixtures\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport * as helpers from \"./helpers\";\nimport assert from \"assert\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport vm from \"vm\";\nimport QuickLRU from \"quick-lru\";\nimport { fileURLToPath } from \"url\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nimport checkDuplicateNodes from \"@babel/helper-check-duplicate-nodes\";\n\ntype Module = {\n id: string;\n exports: Record<string, unknown>;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // Introduced in Node.js 10\n if (!assert.rejects) {\n assert.rejects = async function (block, validateError) {\n try {\n await (typeof block === \"function\" ? block() : block);\n return Promise.reject(new Error(\"Promise not rejected\"));\n } catch (error) {\n // @ts-expect-error Fixme: validateError can be a string | object\n // see https://nodejs.org/api/assert.html#assertrejectsasyncfn-error-message\n if (typeof validateError === \"function\" && !validateError(error)) {\n return Promise.reject(\n new Error(\"Promise rejected with invalid error\"),\n );\n }\n }\n };\n }\n}\n\nconst EXTERNAL_HELPERS_VERSION = \"7.100.0\";\n\nconst cachedScripts = new QuickLRU<\n string,\n { code: string; cachedData?: Buffer }\n>({ maxSize: 10 });\nconst contextModuleCache = new WeakMap();\nconst sharedTestContext = createContext();\n\n// We never want our tests to accidentally load the root\n// babel.config.js file, so we disable config loading by\n// default. Tests can still set `configFile: true | string`\n// to re-enable config loading.\nfunction transformWithoutConfigFile(code: string, opts: InputOptions) {\n return babel.transformSync(code, {\n configFile: false,\n babelrc: false,\n ...opts,\n });\n}\nfunction transformAsyncWithoutConfigFile(code: string, opts: InputOptions) {\n return babel.transformAsync(code, {\n configFile: false,\n babelrc: false,\n ...opts,\n });\n}\n\nfunction createContext() {\n const context = vm.createContext({\n ...helpers,\n process: process,\n transform: transformWithoutConfigFile,\n transformAsync: transformAsyncWithoutConfigFile,\n setTimeout: setTimeout,\n setImmediate: setImmediate,\n expect,\n });\n context.global = context;\n\n const moduleCache = Object.create(null);\n contextModuleCache.set(context, moduleCache);\n\n // Populate the \"babelHelpers\" global with Babel's helper utilities.\n runCacheableScriptInTestContext(\n path.join(\n path.dirname(fileURLToPath(import.meta.url)),\n \"babel-helpers-in-memory.js\",\n ),\n buildExternalHelpers,\n context,\n moduleCache,\n );\n\n return context;\n}\n\nfunction runCacheableScriptInTestContext(\n filename: string,\n srcFn: () => string,\n context: vm.Context,\n moduleCache: any,\n): Module {\n let cached = cachedScripts.get(filename);\n if (!cached) {\n const code = `(function (exports, require, module, __filename, __dirname) {\\n${srcFn()}\\n});`;\n cached = {\n code,\n cachedData: undefined,\n };\n cachedScripts.set(filename, cached);\n }\n\n let script: vm.Script;\n if (process.env.BABEL_8_BREAKING) {\n script = new vm.Script(cached.code, {\n filename,\n displayErrors: true,\n lineOffset: -1,\n cachedData: cached.cachedData,\n });\n cached.cachedData = script.createCachedData();\n } else {\n script = new vm.Script(cached.code, {\n filename,\n displayErrors: true,\n lineOffset: -1,\n cachedData: cached.cachedData,\n produceCachedData: true,\n });\n if (script.cachedDataProduced) {\n cached.cachedData = script.cachedData;\n }\n }\n\n const module = {\n id: filename,\n exports: {},\n };\n moduleCache[filename] = module;\n\n const req = (id: string) =>\n runModuleInTestContext(id, filename, context, moduleCache);\n const dirname = path.dirname(filename);\n\n script\n .runInContext(context)\n .call(module.exports, module.exports, req, module, filename, dirname);\n\n return module;\n}\n\n/**\n * A basic implementation of CommonJS so we can execute `@babel/polyfill` inside our test context.\n * This allows us to run our unittests\n */\nfunction runModuleInTestContext(\n id: string,\n relativeFilename: string,\n context: vm.Context,\n moduleCache: any,\n) {\n const filename = require.resolve(id, {\n paths: [path.dirname(relativeFilename)],\n });\n\n // Expose Node-internal modules if the tests want them. Note, this will not execute inside\n // the context's global scope.\n if (filename === id) return require(id);\n\n // Modules can only evaluate once per context, so the moduleCache is a\n // stronger cache guarantee than the LRU's Script cache.\n if (moduleCache[filename]) return moduleCache[filename].exports;\n\n return runCacheableScriptInTestContext(\n filename,\n () => fs.readFileSync(filename, \"utf8\"),\n context,\n moduleCache,\n ).exports;\n}\n\n/**\n * Run the given snippet of code inside a CommonJS module.\n *\n * Exposed for unit tests, not for use as an API.\n */\nexport function runCodeInTestContext(\n code: string,\n opts: {\n filename: string;\n },\n context = sharedTestContext,\n) {\n const filename = opts.filename;\n const dirname = path.dirname(filename);\n const moduleCache = contextModuleCache.get(context);\n const req = (id: string) =>\n runModuleInTestContext(id, filename, context, moduleCache);\n\n const module: Module = {\n id: filename,\n exports: {},\n };\n\n const oldCwd = process.cwd();\n try {\n if (opts.filename) process.chdir(path.dirname(opts.filename));\n\n // Expose the test options as \"opts\", but otherwise run the test in a CommonJS-like environment.\n // Note: This isn't doing .call(module.exports, ...) because some of our tests currently\n // rely on 'this === global'.\n const src = `(function(exports, require, module, __filename, __dirname, opts) {\\n${code}\\n});`;\n return vm.runInContext(src, context, {\n filename,\n displayErrors: true,\n lineOffset: -1,\n })(module.exports, req, module, filename, dirname, opts);\n } finally {\n process.chdir(oldCwd);\n }\n}\n\nasync function maybeMockConsole<R>(validateLogs: boolean, run: () => R) {\n const actualLogs = { stdout: \"\", stderr: \"\" };\n\n if (!validateLogs) return { result: await run(), actualLogs };\n\n const spy1 = jest.spyOn(console, \"log\").mockImplementation(msg => {\n actualLogs.stdout += `${msg}\\n`;\n });\n const spy2 = jest.spyOn(console, \"warn\").mockImplementation(msg => {\n actualLogs.stderr += `${msg}\\n`;\n });\n\n try {\n return { result: await run(), actualLogs };\n } finally {\n spy1.mockRestore();\n spy2.mockRestore();\n }\n}\n\nasync function run(task: Test) {\n const {\n actual,\n expect: expected,\n exec,\n options: opts,\n doNotSetSourceType,\n optionsDir,\n validateLogs,\n ignoreOutput,\n stdout,\n stderr,\n } = task;\n\n // todo(flow->ts) add proper return type (added any, because empty object is inferred)\n function getOpts(self: TestFile): any {\n const newOpts = {\n ast: true,\n cwd: path.dirname(self.loc),\n filename: self.loc,\n filenameRelative: self.filename,\n sourceFileName: self.filename,\n ...(doNotSetSourceType ? {} : { sourceType: \"script\" }),\n babelrc: false,\n configFile: false,\n inputSourceMap: task.inputSourceMap || undefined,\n ...opts,\n };\n\n return resolveOptionPluginOrPreset(newOpts, optionsDir);\n }\n\n let execCode = exec.code;\n let result: FileResult;\n let resultExec;\n\n if (execCode) {\n const context = createContext();\n const execOpts = getOpts(exec);\n\n // Ignore Babel logs of exec.js files.\n // They will be validated in input/output files.\n ({ result } = await maybeMockConsole(validateLogs, () =>\n babel.transformAsync(execCode, execOpts),\n ));\n\n checkDuplicateNodes(result.ast);\n execCode = result.code;\n\n try {\n resultExec = runCodeInTestContext(execCode, execOpts, context);\n } catch (err) {\n // Pass empty location to include the whole file in the output.\n err.message =\n `${exec.loc}: ${err.message}\\n` + codeFrameColumns(execCode, {} as any);\n throw err;\n }\n }\n\n const inputCode = actual.code;\n const expectedCode = expected.code;\n if (!execCode || inputCode) {\n let actualLogs;\n\n ({ result, actualLogs } = await maybeMockConsole(validateLogs, () =>\n babel.transformAsync(inputCode, getOpts(actual)),\n ));\n\n const outputCode = normalizeOutput(result.code);\n\n checkDuplicateNodes(result.ast);\n if (!ignoreOutput) {\n if (\n !expected.code &&\n outputCode &&\n !opts.throws &&\n fs.statSync(path.dirname(expected.loc)).isDirectory() &&\n !process.env.CI\n ) {\n const expectedFile = expected.loc.replace(\n /\\.m?js$/,\n result.sourceType === \"module\" ? \".mjs\" : \".js\",\n );\n\n console.log(`New test file created: ${expectedFile}`);\n fs.writeFileSync(expectedFile, `${outputCode}\\n`);\n\n if (expected.loc !== expectedFile) {\n try {\n fs.unlinkSync(expected.loc);\n } catch (e) {}\n }\n } else {\n validateFile(outputCode, expected.loc, expectedCode);\n\n if (inputCode) {\n expect(expected.loc).toMatch(\n result.sourceType === \"module\" ? /\\.mjs$/ : /\\.js$/,\n );\n }\n }\n }\n\n if (validateLogs) {\n const normalizationOpts = {\n normalizePathSeparator: true,\n normalizePresetEnvDebug: task.taskDir.includes(\"babel-preset-env\"),\n };\n\n validateFile(\n normalizeOutput(actualLogs.stdout, normalizationOpts),\n stdout.loc,\n stdout.code,\n );\n validateFile(\n normalizeOutput(actualLogs.stderr, normalizationOpts),\n stderr.loc,\n stderr.code,\n );\n }\n }\n\n if (opts.sourceMaps === true) {\n try {\n expect(result.map).toEqual(task.sourceMap);\n } catch (e) {\n if (!process.env.OVERWRITE && task.sourceMap) throw e;\n\n console.log(`Updated test file: ${task.sourceMapFile.loc}`);\n fs.writeFileSync(\n task.sourceMapFile.loc,\n JSON.stringify(result.map, null, 2),\n );\n }\n }\n\n if (execCode && resultExec) {\n return resultExec;\n }\n}\n\nfunction validateFile(\n actualCode: string,\n expectedLoc: string,\n expectedCode: string,\n) {\n try {\n expect(actualCode).toEqualFile({\n filename: expectedLoc,\n code: expectedCode,\n });\n } catch (e) {\n if (!process.env.OVERWRITE) throw e;\n\n console.log(`Updated test file: ${expectedLoc}`);\n fs.writeFileSync(expectedLoc, `${actualCode}\\n`);\n }\n}\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\nfunction normalizeOutput(\n code: string,\n { normalizePathSeparator = false, normalizePresetEnvDebug = false } = {},\n) {\n const projectRoot = path.resolve(\n path.dirname(fileURLToPath(import.meta.url)),\n \"../../../\",\n );\n const cwdSymbol = \"<CWD>\";\n let result = code\n .trim()\n // (non-win32) /foo/babel/packages -> <CWD>/packages\n // (win32) C:\\foo\\babel\\packages -> <CWD>\\packages\n .replace(new RegExp(escapeRegExp(projectRoot), \"g\"), cwdSymbol);\n if (process.platform === \"win32\") {\n result = result\n // C:/foo/babel/packages -> <CWD>/packages\n .replace(\n new RegExp(escapeRegExp(projectRoot.replace(/\\\\/g, \"/\")), \"g\"),\n cwdSymbol,\n )\n // C:\\\\foo\\\\babel\\\\packages -> <CWD>\\\\packages (in js string literal)\n .replace(\n new RegExp(escapeRegExp(projectRoot.replace(/\\\\/g, \"\\\\\\\\\")), \"g\"),\n cwdSymbol,\n );\n if (normalizePathSeparator) {\n result = result.replace(/<CWD>[\\w\\\\/.-]+/g, path =>\n path.replace(/\\\\\\\\?/g, \"/\"),\n );\n }\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // In Babel 8, preset-env logs transform- instead of proposal-. Manually rewrite\n // the output logs so that we don't have to duplicate all the debug fixtures for\n // the two different Babel versions.\n if (normalizePresetEnvDebug) {\n result = result.replace(/(\\s+)proposal-/gm, \"$1transform-\");\n }\n\n // For some reasons, in older Node.js versions some symlinks are not properly\n // resolved. The behavior is still ok, but we need to unify the output with\n // newer Node.js versions.\n if (parseInt(process.versions.node, 10) <= 8) {\n result = result.replace(\n /<CWD>\\/node_modules\\/@babel\\/runtime-corejs3/g,\n \"<CWD>/packages/babel-runtime-corejs3\",\n );\n }\n }\n\n return result;\n}\n\nexpect.extend({\n toEqualFile(actual, { filename, code }: Pick<TestFile, \"filename\" | \"code\">) {\n if (this.isNot) {\n throw new Error(\".toEqualFile does not support negation\");\n }\n\n const pass = actual === code;\n return {\n pass,\n message: () => {\n const diffString = this.utils.diff(code, actual, {\n expand: false,\n });\n return (\n `Expected ${filename} to match transform output.\\n` +\n `To autogenerate a passing version of this file, delete the file and re-run the tests.\\n\\n` +\n `Diff:\\n\\n${diffString}`\n );\n },\n };\n },\n});\n\ndeclare global {\n // eslint-disable-next-line no-redeclare,@typescript-eslint/no-unused-vars\n namespace jest {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Matchers<R> {\n toEqualFile({\n filename,\n code,\n }: Pick<TestFile, \"filename\" | \"code\">): jest.CustomMatcherResult;\n }\n }\n}\n\nexport type SuiteOptions = {\n ignoreSuites?: string[];\n ignoreTasks?: string[];\n};\n\nexport default function (\n fixturesLoc: string,\n name: string,\n suiteOpts: SuiteOptions = {},\n taskOpts: TaskOptions = {},\n dynamicOpts?: (options: TaskOptions, task: Test) => void,\n) {\n const suites = getFixtures(fixturesLoc);\n\n for (const testSuite of suites) {\n if (suiteOpts.ignoreSuites?.includes(testSuite.title)) continue;\n\n describe(name + \"/\" + testSuite.title, function () {\n for (const task of testSuite.tests) {\n if (\n suiteOpts.ignoreTasks?.includes(task.title) ||\n suiteOpts.ignoreTasks?.includes(testSuite.title + \"/\" + task.title)\n ) {\n continue;\n }\n\n const testFn = task.disabled ? it.skip : it;\n\n testFn(\n task.title,\n\n async function () {\n const runTask = () => run(task);\n\n if (\"sourceMap\" in task.options) {\n throw new Error(\n \"`sourceMap` option is deprecated. Use `sourceMaps` instead.\",\n );\n }\n\n if (\"sourceMaps\" in task.options === false) {\n task.options.sourceMaps = !!task.sourceMap;\n }\n\n Object.assign(task.options, taskOpts);\n\n if (dynamicOpts) dynamicOpts(task.options, task);\n\n if (task.externalHelpers) {\n (task.options.plugins ??= [])\n // @ts-expect-error manipulating input options\n .push([\n \"external-helpers\",\n { helperVersion: EXTERNAL_HELPERS_VERSION },\n ]);\n }\n\n const throwMsg = task.options.throws;\n if (throwMsg) {\n // internal api doesn't have this option but it's best not to pollute\n // the options object with useless options\n delete task.options.throws;\n\n await assert.rejects(runTask, function (err: Error) {\n assert.ok(\n throwMsg === true || err.message.includes(throwMsg),\n `\nExpected Error: ${throwMsg}\nActual Error: ${err.message}`,\n );\n return true;\n });\n } else {\n return runTask();\n }\n },\n );\n }\n });\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,eAAA,GAAAD,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