🎉 initiate project *astro_rewrite*
This commit is contained in:
		
							parent
							
								
									ffd4d5e86c
								
							
						
					
					
						commit
						2ba37bfbe3
					
				
					 8658 changed files with 2268794 additions and 2538 deletions
				
			
		
							
								
								
									
										79
									
								
								node_modules/@babel/core/lib/parser/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								node_modules/@babel/core/lib/parser/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,79 @@ | |||
| "use strict"; | ||||
| 
 | ||||
| Object.defineProperty(exports, "__esModule", { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = parser; | ||||
| function _parser() { | ||||
|   const data = require("@babel/parser"); | ||||
|   _parser = function () { | ||||
|     return data; | ||||
|   }; | ||||
|   return data; | ||||
| } | ||||
| function _codeFrame() { | ||||
|   const data = require("@babel/code-frame"); | ||||
|   _codeFrame = function () { | ||||
|     return data; | ||||
|   }; | ||||
|   return data; | ||||
| } | ||||
| var _missingPluginHelper = require("./util/missing-plugin-helper"); | ||||
| function* parser(pluginPasses, { | ||||
|   parserOpts, | ||||
|   highlightCode = true, | ||||
|   filename = "unknown" | ||||
| }, code) { | ||||
|   try { | ||||
|     const results = []; | ||||
|     for (const plugins of pluginPasses) { | ||||
|       for (const plugin of plugins) { | ||||
|         const { | ||||
|           parserOverride | ||||
|         } = plugin; | ||||
|         if (parserOverride) { | ||||
|           const ast = parserOverride(code, parserOpts, _parser().parse); | ||||
|           if (ast !== undefined) results.push(ast); | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     if (results.length === 0) { | ||||
|       return (0, _parser().parse)(code, parserOpts); | ||||
|     } else if (results.length === 1) { | ||||
|       yield* []; | ||||
|       if (typeof results[0].then === "function") { | ||||
|         throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); | ||||
|       } | ||||
|       return results[0]; | ||||
|     } | ||||
|     throw new Error("More than one plugin attempted to override parsing."); | ||||
|   } catch (err) { | ||||
|     if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { | ||||
|       err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; | ||||
|     } | ||||
|     const { | ||||
|       loc, | ||||
|       missingPlugin | ||||
|     } = err; | ||||
|     if (loc) { | ||||
|       const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { | ||||
|         start: { | ||||
|           line: loc.line, | ||||
|           column: loc.column + 1 | ||||
|         } | ||||
|       }, { | ||||
|         highlightCode | ||||
|       }); | ||||
|       if (missingPlugin) { | ||||
|         err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); | ||||
|       } else { | ||||
|         err.message = `${filename}: ${err.message}\n\n` + codeFrame; | ||||
|       } | ||||
|       err.code = "BABEL_PARSE_ERROR"; | ||||
|     } | ||||
|     throw err; | ||||
|   } | ||||
| } | ||||
| 0 && 0; | ||||
| 
 | ||||
| //# sourceMappingURL=index.js.map
 | ||||
							
								
								
									
										1
									
								
								node_modules/@babel/core/lib/parser/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@babel/core/lib/parser/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| {"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper\";\nimport type { PluginPasses } from \"../config\";\n\nexport type ParseResult = ReturnType<typeof parse>;\n\nexport default function* parser(\n  pluginPasses: PluginPasses,\n  { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n  code: string,\n): Handler<ParseResult> {\n  try {\n    const results = [];\n    for (const plugins of pluginPasses) {\n      for (const plugin of plugins) {\n        const { parserOverride } = plugin;\n        if (parserOverride) {\n          const ast = parserOverride(code, parserOpts, parse);\n\n          if (ast !== undefined) results.push(ast);\n        }\n      }\n    }\n\n    if (results.length === 0) {\n      return parse(code, parserOpts);\n    } else if (results.length === 1) {\n      // @ts-expect-error - If we want to allow async parsers\n      yield* [];\n      if (typeof results[0].then === \"function\") {\n        throw new Error(\n          `You appear to be using an async parser plugin, ` +\n            `which your current version of Babel does not support. ` +\n            `If you're using a published plugin, you may need to upgrade ` +\n            `your @babel/core version.`,\n        );\n      }\n      return results[0];\n    }\n    // TODO: Add an error code\n    throw new Error(\"More than one plugin attempted to override parsing.\");\n  } catch (err) {\n    if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n      err.message +=\n        \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n        \"or sourceType:unambiguous in your Babel config for this file.\";\n      // err.code will be changed to BABEL_PARSE_ERROR later.\n    }\n\n    const { loc, missingPlugin } = err;\n    if (loc) {\n      const codeFrame = codeFrameColumns(\n        code,\n        {\n          start: {\n            line: loc.line,\n            column: loc.column + 1,\n          },\n        },\n        {\n          highlightCode,\n        },\n      );\n      if (missingPlugin) {\n        err.message =\n          `${filename}: ` +\n          generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);\n      } else {\n        err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n      }\n      err.code = \"BABEL_PARSE_ERROR\";\n    }\n    throw err;\n  }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAG,oBAAA,GAAAF,OAAA;AAKe,UAAUG,MAAMA,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAAe,CAAC,EAC/DC,IAAY,EACU;EACtB,IAAI;IACF,MAAMC,OAAO,GAAG,EAAE;IAClB,KAAK,MAAMC,OAAO,IAAIN,YAAY,EAAE;MAClC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;QAC5B,MAAM;UAAEE;QAAe,CAAC,GAAGD,MAAM;QACjC,IAAIC,cAAc,EAAE;UAClB,MAAMC,GAAG,GAAGD,cAAc,CAACJ,IAAI,EAAEH,UAAU,EAAES,eAAK,CAAC;UAEnD,IAAID,GAAG,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,GAAG,CAAC;QAC1C;MACF;IACF;IAEA,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO,IAAAH,eAAK,EAACN,IAAI,EAAEH,UAAU,CAAC;IAChC,CAAC,MAAM,IAAII,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MAE/B,OAAO,EAAE;MACT,IAAI,OAAOR,OAAO,CAAC,CAAC,CAAC,CAACS,IAAI,KAAK,UAAU,EAAE;QACzC,MAAM,IAAIC,KAAK,CACZ,iDAAgD,GAC9C,wDAAuD,GACvD,8DAA6D,GAC7D,2BACL,CAAC;MACH;MACA,OAAOV,OAAO,CAAC,CAAC,CAAC;IACnB;IAEA,MAAM,IAAIU,KAAK,CAAC,qDAAqD,CAAC;EACxE,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACZ,IAAI,KAAK,yCAAyC,EAAE;MAC1DY,GAAG,CAACC,OAAO,IACT,uEAAuE,GACvE,+DAA+D;IAEnE;IAEA,MAAM;MAAEC,GAAG;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CACF,CAAC;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACR,GAAEd,QAAS,IAAG,GACf,IAAAsB,4BAA4B,EAACN,aAAa,CAAC,CAAC,CAAC,EAAED,GAAG,EAAEE,SAAS,CAAC;MAClE,CAAC,MAAM;QACLJ,GAAG,CAACC,OAAO,GAAI,GAAEd,QAAS,KAAIa,GAAG,CAACC,OAAQ,MAAK,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC"} | ||||
							
								
								
									
										329
									
								
								node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										329
									
								
								node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,329 @@ | |||
| "use strict"; | ||||
| 
 | ||||
| Object.defineProperty(exports, "__esModule", { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = generateMissingPluginMessage; | ||||
| const pluginNameMap = { | ||||
|   asyncDoExpressions: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-async-do-expressions", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions" | ||||
|     } | ||||
|   }, | ||||
|   decimal: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-decimal", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal" | ||||
|     } | ||||
|   }, | ||||
|   decorators: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-decorators", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-decorators", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators" | ||||
|     } | ||||
|   }, | ||||
|   doExpressions: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-do-expressions", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-do-expressions", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions" | ||||
|     } | ||||
|   }, | ||||
|   exportDefaultFrom: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-export-default-from", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-export-default-from", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from" | ||||
|     } | ||||
|   }, | ||||
|   flow: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-flow", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/preset-flow", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow" | ||||
|     } | ||||
|   }, | ||||
|   functionBind: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-function-bind", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-function-bind", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind" | ||||
|     } | ||||
|   }, | ||||
|   functionSent: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-function-sent", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-function-sent", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent" | ||||
|     } | ||||
|   }, | ||||
|   jsx: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-jsx", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/preset-react", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react" | ||||
|     } | ||||
|   }, | ||||
|   importAttributes: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-import-attributes", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes" | ||||
|     } | ||||
|   }, | ||||
|   pipelineOperator: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-pipeline-operator", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-pipeline-operator", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator" | ||||
|     } | ||||
|   }, | ||||
|   recordAndTuple: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-record-and-tuple", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple" | ||||
|     } | ||||
|   }, | ||||
|   throwExpressions: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-throw-expressions", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/plugin-proposal-throw-expressions", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions" | ||||
|     } | ||||
|   }, | ||||
|   typescript: { | ||||
|     syntax: { | ||||
|       name: "@babel/plugin-syntax-typescript", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript" | ||||
|     }, | ||||
|     transform: { | ||||
|       name: "@babel/preset-typescript", | ||||
|       url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript" | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| { | ||||
|   Object.assign(pluginNameMap, { | ||||
|     asyncGenerators: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-async-generators", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-async-generator-functions", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions" | ||||
|       } | ||||
|     }, | ||||
|     classProperties: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-class-properties", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-class-properties", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" | ||||
|       } | ||||
|     }, | ||||
|     classPrivateProperties: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-class-properties", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-class-properties", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" | ||||
|       } | ||||
|     }, | ||||
|     classPrivateMethods: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-class-properties", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-private-methods", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods" | ||||
|       } | ||||
|     }, | ||||
|     classStaticBlock: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-class-static-block", | ||||
|         url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-class-static-block", | ||||
|         url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block" | ||||
|       } | ||||
|     }, | ||||
|     dynamicImport: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-dynamic-import", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import" | ||||
|       } | ||||
|     }, | ||||
|     exportNamespaceFrom: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-export-namespace-from", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-export-namespace-from", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from" | ||||
|       } | ||||
|     }, | ||||
|     importAssertions: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-import-assertions", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions" | ||||
|       } | ||||
|     }, | ||||
|     importMeta: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-import-meta", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta" | ||||
|       } | ||||
|     }, | ||||
|     logicalAssignment: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-logical-assignment-operators", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-logical-assignment-operators", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators" | ||||
|       } | ||||
|     }, | ||||
|     moduleStringNames: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-module-string-names", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names" | ||||
|       } | ||||
|     }, | ||||
|     numericSeparator: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-numeric-separator", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-numeric-separator", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator" | ||||
|       } | ||||
|     }, | ||||
|     nullishCoalescingOperator: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-nullish-coalescing-operator", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-nullish-coalescing-operator", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator" | ||||
|       } | ||||
|     }, | ||||
|     objectRestSpread: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-object-rest-spread", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-object-rest-spread", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread" | ||||
|       } | ||||
|     }, | ||||
|     optionalCatchBinding: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-optional-catch-binding", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-optional-catch-binding", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding" | ||||
|       } | ||||
|     }, | ||||
|     optionalChaining: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-optional-chaining", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-optional-chaining", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining" | ||||
|       } | ||||
|     }, | ||||
|     privateIn: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-private-property-in-object", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-private-property-in-object", | ||||
|         url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object" | ||||
|       } | ||||
|     }, | ||||
|     regexpUnicodeSets: { | ||||
|       syntax: { | ||||
|         name: "@babel/plugin-syntax-unicode-sets-regex", | ||||
|         url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md" | ||||
|       }, | ||||
|       transform: { | ||||
|         name: "@babel/plugin-transform-unicode-sets-regex", | ||||
|         url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md" | ||||
|       } | ||||
|     } | ||||
|   }); | ||||
| } | ||||
| const getNameURLCombination = ({ | ||||
|   name, | ||||
|   url | ||||
| }) => `${name} (${url})`; | ||||
| function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { | ||||
|   let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; | ||||
|   const pluginInfo = pluginNameMap[missingPluginName]; | ||||
|   if (pluginInfo) { | ||||
|     const { | ||||
|       syntax: syntaxPlugin, | ||||
|       transform: transformPlugin | ||||
|     } = pluginInfo; | ||||
|     if (syntaxPlugin) { | ||||
|       const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); | ||||
|       if (transformPlugin) { | ||||
|         const transformPluginInfo = getNameURLCombination(transformPlugin); | ||||
|         const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets"; | ||||
|         helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.
 | ||||
| If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;
 | ||||
|       } else { | ||||
|         helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   return helpMessage; | ||||
| } | ||||
| 0 && 0; | ||||
| 
 | ||||
| //# sourceMappingURL=missing-plugin-helper.js.map
 | ||||
							
								
								
									
										1
									
								
								node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 sindrekjelsrud
						sindrekjelsrud