Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@babel/core

Package Overview
Dependencies
Maintainers
4
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/core - npm Package Compare versions

Comparing version
8.0.0-rc.4
to
8.0.0-rc.5
+1
-1
lib/errors/rewrite-stack-trace.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"rewrite-stack-trace.js","sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet<Error>();\nconst virtualFrames = new WeakMap<Error, CallSite[]>();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as unknown as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack<A extends unknown[], R>(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack<A extends unknown[], R>(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err)!);\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","Object","getOwnPropertyDescriptor","writable","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"mappings":"AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC;AAElE,MAAMC,SAAS,GACb,CAAC,CAACH,KAAK,CAACI,iBAAiB,IACzBC,MAAM,CAACC,wBAAwB,CAACN,KAAK,EAAE,iBAAiB,CAAC,EAAEO,QAAQ,KAAK,IAAI;AAE9E,MAAMC,YAAY,GAAG,4CAA4C;AACjE,MAAMC,WAAW,GAAG,2CAA2C;AAI/D,MAAMC,cAAc,GAAG,IAAIC,OAAO,EAAS;AAC3C,MAAMC,aAAa,GAAG,IAAIC,OAAO,EAAqB;AAEtD,SAASC,QAAQA,CAACC,QAAgB,EAAY;EAE5C,OAAOV,MAAM,CAACW,MAAM,CAAC;IACnBC,QAAQ,EAAEA,MAAM,KAAK;IACrBC,aAAa,EAAEA,MAAM,KAAK;IAC1BC,UAAU,EAAEA,MAAM,IAAI;IACtBC,WAAW,EAAEA,MAAML,QAAQ;IAC3BM,aAAa,EAAEA,MAAMC,SAAS;IAC9BC,eAAe,EAAEA,MAAMD,SAAS;IAChCE,eAAe,EAAEA,MAAMF,SAAS;IAChCG,aAAa,EAAEA,MAAMH,SAAS;IAC9BI,WAAW,EAAEA,MAAMJ,SAAS;IAC5BpB,QAAQ,EAAEA,MAAMa;AAClB,GAAwB,CAAC;AAC3B;AAEO,SAASY,uBAAuBA,CAACC,KAAY,EAAEb,QAAgB,EAAE;EACtE,IAAI,CAACZ,SAAS,EAAE;AAEhB,EAAA,IAAI0B,MAAM,GAAGjB,aAAa,CAACkB,GAAG,CAACF,KAAK,CAAC;AACrC,EAAA,IAAI,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A,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE,OAAO5D,aAAa,CAACqD,GAAG,CAAC;AAEjD,EAAA,OAAO,CAAA,EAAGrD,aAAa,CAACqD,GAAG,CAAC,CAAA,SAAA,EAAYC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAC,CAAA,CAAE;AACnE;;;;"}
{"version":3,"file":"rewrite-stack-trace.js","sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet<Error>();\nconst virtualFrames = new WeakMap<Error, CallSite[]>();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n });\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack<A extends unknown[], R>(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack<A extends unknown[], R>(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err)!);\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","Object","getOwnPropertyDescriptor","writable","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"mappings":"AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC;AAElE,MAAMC,SAAS,GACb,CAAC,CAACH,KAAK,CAACI,iBAAiB,IACzBC,MAAM,CAACC,wBAAwB,CAACN,KAAK,EAAE,iBAAiB,CAAC,EAAEO,QAAQ,KAAK,IAAI;AAE9E,MAAMC,YAAY,GAAG,4CAA4C;AACjE,MAAMC,WAAW,GAAG,2CAA2C;AAI/D,MAAMC,cAAc,GAAG,IAAIC,OAAO,EAAS;AAC3C,MAAMC,aAAa,GAAG,IAAIC,OAAO,EAAqB;AAEtD,SAASC,QAAQA,CAACC,QAAgB,EAAY;EAE5C,OAAOV,MAAM,CAACW,MAAM,CAAC;IACnBC,QAAQ,EAAEA,MAAM,KAAK;IACrBC,aAAa,EAAEA,MAAM,KAAK;IAC1BC,UAAU,EAAEA,MAAM,IAAI;IACtBC,WAAW,EAAEA,MAAML,QAAQ;IAC3BM,aAAa,EAAEA,MAAMC,SAAS;IAC9BC,eAAe,EAAEA,MAAMD,SAAS;IAChCE,eAAe,EAAEA,MAAMF,SAAS;IAChCG,aAAa,EAAEA,MAAMH,SAAS;IAC9BI,WAAW,EAAEA,MAAMJ,SAAS;IAC5BpB,QAAQ,EAAEA,MAAMa;AAClB,GAAC,CAAC;AACJ;AAEO,SAASY,uBAAuBA,CAACC,KAAY,EAAEb,QAAgB,EAAE;EACtE,IAAI,CAACZ,SAAS,EAAE;AAEhB,EAAA,IAAI0B,MAAM,GAAGjB,aAAa,CAACkB,GAAG,CAACF,KAAK,CAAC;AACrC,EAAA,IAAI,CAACC,MAAM,EAAEjB,aAAa,CAACmB,GAAG,CAACH,KAAK,EAAGC,MAAM,GAA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AC;AAEjD,EAAA,OAAO,CAAA,EAAGrD,aAAa,CAACqD,GAAG,CAAC,CAAA,SAAA,EAAYC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAC,CAAA,CAAE;AACnE;;;;"}

@@ -376,3 +376,3 @@ import * as _babel_traverse from '@babel/traverse';

declare const loadPartialConfigRunner: gensync.Gensync<[opts?: InputOptions | undefined], PartialConfig | null, unknown>;
declare const loadPartialConfigRunner: gensync.Gensync<[opts?: InputOptions | undefined], PartialConfig | null, any>;
declare function loadPartialConfigAsync(...args: Parameters<typeof loadPartialConfigRunner.async>): Promise<PartialConfig | null>;

@@ -382,3 +382,3 @@ declare function loadPartialConfigSync(...args: Parameters<typeof loadPartialConfigRunner.sync>): PartialConfig | null;

declare function loadOptionsImpl(opts: InputOptions | null | undefined): Handler<ResolvedOptions | null>;
declare const loadOptionsRunner: gensync.Gensync<[opts: InputOptions | null | undefined], ResolvedOptions | null, unknown>;
declare const loadOptionsRunner: gensync.Gensync<[opts: InputOptions | null | undefined], ResolvedOptions | null, any>;
declare function loadOptionsAsync(...args: Parameters<typeof loadOptionsRunner.async>): Promise<ResolvedOptions | null>;

@@ -394,3 +394,3 @@ declare function loadOptionsSync(...args: Parameters<typeof loadOptionsRunner.sync>): ResolvedOptions | null;

type?: "preset" | "plugin";
} | undefined)?], ConfigItem<unknown>, unknown>;
} | undefined)?], ConfigItem<unknown>, any>;
declare function createConfigItemAsync(...args: Parameters<typeof createConfigItemRunner.async>): Promise<ConfigItem<unknown>>;

@@ -489,3 +489,3 @@ declare function createConfigItemSync(...args: Parameters<typeof createConfigItemRunner.sync>): ConfigItem<unknown>;

};
declare const transformRunner: gensync.Gensync<[code: string, opts?: InputOptions | null | undefined], FileResult | null, unknown>;
declare const transformRunner: gensync.Gensync<[code: string, opts?: InputOptions | null | undefined], FileResult | null, any>;
declare const transform: Transform;

@@ -495,3 +495,3 @@ declare function transformSync(...args: Parameters<typeof transformRunner.sync>): FileResult | null;

declare const transformFileRunner: gensync.Gensync<[filename: string, opts?: InputOptions | undefined], FileResult | null, unknown>;
declare const transformFileRunner: gensync.Gensync<[filename: string, opts?: InputOptions | undefined], FileResult | null, any>;
declare function transformFile(filename: string, callback: FileResultCallback): void;

@@ -507,3 +507,3 @@ declare function transformFile(filename: string, opts: InputOptions | undefined | null, callback: FileResultCallback): void;

};
declare const transformFromAstRunner: gensync.Gensync<[ast: AstRoot, code: string, opts: InputOptions | null | undefined], FileResult | null, unknown>;
declare const transformFromAstRunner: gensync.Gensync<[ast: AstRoot, code: string, opts: InputOptions | null | undefined], FileResult | null, any>;
declare const transformFromAst: TransformFromAst;

@@ -521,3 +521,3 @@ declare function transformFromAstSync(...args: Parameters<typeof transformFromAstRunner.sync>): FileResult | null;

};
declare const parseRunner: gensync.Gensync<[code: string, opts: InputOptions | null | undefined], ParseResult | null, unknown>;
declare const parseRunner: gensync.Gensync<[code: string, opts: InputOptions | null | undefined], ParseResult | null, any>;
declare const parse: Parse;

@@ -524,0 +524,0 @@ declare function parseSync(...args: Parameters<typeof parseRunner.sync>): ParseResult | null;

{
"name": "@babel/core",
"version": "8.0.0-rc.4",
"version": "8.0.0-rc.5",
"description": "Babel compiler core.",

@@ -34,3 +34,3 @@ "main": "./lib/index.js",

"engines": {
"node": "^20.19.0 || >=22.12.0"
"node": "^22.18.0 || >=24.11.0"
},

@@ -42,10 +42,10 @@ "funding": {

"dependencies": {
"@babel/code-frame": "^8.0.0-rc.4",
"@babel/generator": "^8.0.0-rc.4",
"@babel/helper-compilation-targets": "^8.0.0-rc.4",
"@babel/helpers": "^8.0.0-rc.4",
"@babel/parser": "^8.0.0-rc.4",
"@babel/template": "^8.0.0-rc.4",
"@babel/traverse": "^8.0.0-rc.4",
"@babel/types": "^8.0.0-rc.4",
"@babel/code-frame": "^8.0.0-rc.5",
"@babel/generator": "^8.0.0-rc.5",
"@babel/helper-compilation-targets": "^8.0.0-rc.5",
"@babel/helpers": "^8.0.0-rc.5",
"@babel/parser": "^8.0.0-rc.5",
"@babel/template": "^8.0.0-rc.5",
"@babel/traverse": "^8.0.0-rc.5",
"@babel/types": "^8.0.0-rc.5",
"@types/gensync": "^1.0.0",

@@ -60,8 +60,9 @@ "convert-source-map": "^2.0.0",

"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "^8.0.0-rc.4",
"@babel/plugin-syntax-flow": "^8.0.0-rc.4",
"@babel/plugin-transform-flow-strip-types": "^8.0.0-rc.4",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-rc.4",
"@babel/preset-env": "^8.0.0-rc.4",
"@babel/preset-typescript": "^8.0.0-rc.4",
"@babel/helper-transform-fixture-test-runner": "^8.0.0-rc.5",
"@babel/plugin-syntax-flow": "^8.0.0-rc.5",
"@babel/plugin-syntax-jsx": "^8.0.0-rc.5",
"@babel/plugin-transform-flow-strip-types": "^8.0.0-rc.5",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-rc.5",
"@babel/preset-env": "^8.0.0-rc.5",
"@babel/preset-typescript": "^8.0.0-rc.5",
"@jridgewell/trace-mapping": "^0.3.28",

@@ -68,0 +69,0 @@ "@types/convert-source-map": "^2.0.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display