@galadrim/galadmin 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/front/build/asset-manifest.json +3 -3
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/main.4ce5340d.chunk.js +2 -0
- package/src/front/build/static/js/main.4ce5340d.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/{a442b07ccfc975b334314fdb76b50b42.json → 04b67a528af96a9bceeadf265dfb56d2.json} +1 -1
- package/src/front/node_modules/.cache/babel-loader/cdf89c046963294c4cbf7482c8706cbc.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c3/3e/f2b5b90044b7bdbb4cff67b2c09e24bb506274240d920de24bb4b678f3f00b80f7e9f0900cd1de883484031488d8603e97ea6b4e39a9c6ab5160353d3be9 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/6c/19/fe86ba5d7c4062f185480ad22dd3b9fae9b30149827224339f9a633a9a94 +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/87/08/421190bfe6e50816e059da6c33526c9943732ef856ebd2752d0cbfb4a852 +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{b3/58/c0bc4ec69302d38ceac243da47ee7549ca88af7e0c89962c82ad9b304bbb → c2/e5/5451dd89bb0fd48f988bf27c7ee614c66eb91f7085c5b5c8cb33048d0c32} +1 -1
- package/src/front/node_modules/.package-lock.json +50 -58
- package/src/front/node_modules/@babel/compat-data/README.md +1 -1
- package/src/front/node_modules/@babel/compat-data/data/corejs2-built-ins.json +146 -0
- package/src/front/node_modules/@babel/compat-data/data/native-modules.json +1 -1
- package/src/front/node_modules/@babel/compat-data/data/plugin-bugfixes.json +15 -0
- package/src/front/node_modules/@babel/compat-data/data/plugins.json +68 -9
- package/src/front/node_modules/@babel/compat-data/package.json +4 -4
- package/src/front/node_modules/@babel/core/README.md +1 -1
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js +1 -3
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js +5 -5
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/full.js +2 -3
- package/src/front/node_modules/@babel/core/lib/config/full.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js +4 -4
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js +1 -3
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js +5 -2
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +2 -1
- package/src/front/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/index.js +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/file.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transformation/file/file.js.map +1 -1
- package/src/front/node_modules/@babel/core/package.json +10 -10
- package/src/front/node_modules/@babel/generator/README.md +1 -1
- package/src/front/node_modules/@babel/generator/lib/buffer.js +6 -6
- package/src/front/node_modules/@babel/generator/lib/buffer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/types.js +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/printer.js +4 -4
- package/src/front/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/package.json +4 -3
- package/src/front/node_modules/@babel/helper-compilation-targets/README.md +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js +2 -2
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +5 -9
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js +8 -4
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/options.js +2 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/options.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js +2 -2
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/targets.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/targets.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js +3 -3
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/package.json +6 -6
- package/src/front/node_modules/@babel/helper-split-export-declaration/README.md +1 -1
- package/src/front/node_modules/@babel/helper-split-export-declaration/lib/index.js +5 -1
- package/src/front/node_modules/@babel/helper-split-export-declaration/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-split-export-declaration/package.json +1 -1
- package/src/front/node_modules/@babel/helpers/README.md +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers/dispose.js +9 -13
- package/src/front/node_modules/@babel/helpers/lib/helpers/dispose.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers/using.js +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers/using.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js +2 -2
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/package.json +3 -3
- package/src/front/node_modules/@babel/parser/README.md +1 -1
- package/src/front/node_modules/@babel/parser/lib/index.js +1 -3
- package/src/front/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js +1 -3
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js.map +1 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js.map +1 -1
- package/src/front/node_modules/@babel/parser/package.json +2 -2
- package/src/front/node_modules/@babel/traverse/README.md +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js +21 -9
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/types.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/visitors.js +22 -15
- package/src/front/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/package.json +4 -4
- package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/README.md +13 -2
- package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/package.json +4 -4
- package/src/front/node_modules/{@babel/helper-compilation-targets/node_modules/semver → @nicolo-ribaudo/semver-v6}/semver.js +40 -27
- package/src/front/node_modules/typescript/lib/tsc.js +16 -19
- package/src/front/node_modules/typescript/lib/tsserver.js +22 -24
- package/src/front/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -1
- package/src/front/node_modules/typescript/lib/tsserverlibrary.js +22 -24
- package/src/front/node_modules/typescript/lib/typescript.d.ts +0 -1
- package/src/front/node_modules/typescript/lib/typescript.js +22 -24
- package/src/front/node_modules/typescript/lib/typingsInstaller.js +1 -1
- package/src/front/node_modules/typescript/package.json +1 -1
- package/src/front/package-lock.json +97 -112
- package/src/front/src/components/Input.js +6 -0
- package/src/front/src/components/Sidebar.js +2 -2
- package/src/front/build/static/js/main.405f6f90.chunk.js +0 -2
- package/src/front/build/static/js/main.405f6f90.chunk.js.map +0 -1
- package/src/front/node_modules/.cache/babel-loader/964c56108bc43622244156806407d3d8.json +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/00/35/f206f48274d030c7a1e2457996323f694ca72c9ec94bddb8ecc8f37aa4632918182acf152491e9b475b95f567493b47644434cdb77f795b23c0b8392aaf7 +0 -1
- package/src/front/node_modules/@babel/core/node_modules/semver/semver.js +0 -1596
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/CHANGELOG.md +0 -70
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/LICENSE +0 -15
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/README.md +0 -443
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/bin/semver.js +0 -174
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/package.json +0 -28
- package/src/front/node_modules/@babel/helper-compilation-targets/node_modules/semver/range.bnf +0 -16
- /package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/CHANGELOG.md +0 -0
- /package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/LICENSE +0 -0
- /package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/bin/semver.js +0 -0
- /package/src/front/node_modules/{@babel/core/node_modules/semver → @nicolo-ribaudo/semver-v6}/range.bnf +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_t","require","_jsesc","isAssignmentPattern","isIdentifier","Identifier","node","_node$loc","sourceIdentifierName","loc","identifierName","name","word","ArgumentPlaceholder","token","RestElement","print","argument","ObjectExpression","props","properties","length","space","printList","indent","statement","sourceWithOffset","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","value","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","numbers","number","jsesc","minified","StringLiteral","undefined","val","BigIntLiteral","DecimalLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.sourceIdentifierName(\n // @ts-expect-error Undocumented property identifierName\n node.loc?.identifierName || node.name,\n );\n this.word(node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators, node);\n this._methodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value, node);\n return;\n }\n\n this.print(node.key, node);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\");\n }\n }\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value + \"\";\n if (opts.numbers) {\n this.number(jsesc(node.value, opts));\n } else if (raw == null) {\n this.number(value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < value.length ? raw : value);\n } else {\n this.number(raw);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\nexport function DecimalLiteral(this: Printer, node: t.DecimalLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression, node);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee, node);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAA0B;EAFjBE,mBAAmB;EAAEC;AAAY,IAAAJ,EAAA;AAInC,SAASK,UAAUA,CAAgBC,IAAkB,EAAE;EAAA,IAAAC,SAAA;EAC5D,IAAI,CAACC,oBAAoB,CAEvB,EAAAD,SAAA,GAAAD,IAAI,CAACG,GAAG,qBAARF,SAAA,CAAUG,cAAc,KAAIJ,IAAI,CAACK,IACnC,CAAC;EACD,IAAI,CAACC,IAAI,CAACN,IAAI,CAACK,IAAI,CAAC;AACtB;AAEO,SAASE,mBAAmBA,CAAA,EAAgB;EACjD,IAAI,CAACC,SAAK,GAAI,CAAC;AACjB;AAEO,SAASC,WAAWA,CAAgBT,IAAmB,EAAE;EAC9D,IAAI,CAACQ,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACE,KAAK,CAACV,IAAI,CAACW,QAAQ,EAAEX,IAAI,CAAC;AACjC;AAIO,SAASY,gBAAgBA,CAAgBZ,IAAwB,EAAE;EACxE,MAAMa,KAAK,GAAGb,IAAI,CAACc,UAAU;EAE7B,IAAI,CAACN,SAAK,IAAI,CAAC;EAEf,IAAIK,KAAK,CAACE,MAAM,EAAE;IAChB,IAAI,CAACC,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,SAAS,CAACJ,KAAK,EAAEb,IAAI,EAAE;MAAE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IAAI,CAAC+C,GAAG,CAAC;IACd;EACF;EACA,IAAI,CAAC/C,IAAI,CAACN,IAAI,CAAC6B,KAAK,GAAG,GAAG,CAAC;AAC7B;AAGA,MAAMqC,kBAAkB,GAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,SAASC,cAAcA,CAAA,EAAgB;EAC5C,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAI,CAAC5B,MAAM;EAElC,IAAIyB,kBAAkB,CAACI,GAAG,CAACD,UAAU,CAAC,EAAE;IACtC,IAAI,CAAC7D,KAAK,CAAC6D,UAAU,CAAC;EACxB,CAAC,MAAM;IACL,MAAME,mBAAmB,GAAG3B,IAAI,CAACC,SAAS,CAACwB,UAAU,CAAC;IACtD,MAAMG,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACR,kBAAkB,EAAES,CAAC,IAAI/B,IAAI,CAACC,SAAS,CAAC8B,CAAC,CAAC,CAAC;IAC1E,MAAM,IAAIhC,KAAK,CACZ,mDAAkD,GAChD,GAAE6B,WAAW,CAACI,IAAI,CAAC,IAAI,CAAE,KAAIL,mBAAoB,qBACtD,CAAC;EACH;AACF;AAGO,SAASM,uBAAuBA,CAErC7E,IAA+B,EAC/B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAAC8E,UAAU,EAAE9E,IAAI,CAAC;AACnC;AAEO,SAAS+E,oBAAoBA,CAElC/E,IAA4B,EAC5B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAACgF,MAAM,EAAEhF,IAAI,CAAC;AAC/B;AAEO,SAASiF,6BAA6BA,CAAA,EAAgB;EAC3D,IAAI,CAACzE,SAAK,GAAI,CAAC;AACjB"}
|
|
1
|
+
{"version":3,"names":["_t","require","_jsesc","isAssignmentPattern","isIdentifier","Identifier","node","_node$loc","sourceIdentifierName","loc","identifierName","name","word","ArgumentPlaceholder","token","RestElement","print","argument","ObjectExpression","props","properties","length","space","printList","indent","statement","sourceWithOffset","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","value","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","numbers","number","jsesc","minified","StringLiteral","undefined","val","BigIntLiteral","DecimalLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.sourceIdentifierName(\n // @ts-expect-error Undocumented property identifierName\n node.loc?.identifierName || node.name,\n );\n this.word(node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n\n this.sourceWithOffset(\"end\", node.loc, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators, node);\n this._methodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value, node);\n return;\n }\n\n this.print(node.key, node);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\");\n }\n }\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value + \"\";\n if (opts.numbers) {\n this.number(jsesc(node.value, opts));\n } else if (raw == null) {\n this.number(value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < value.length ? raw : value);\n } else {\n this.number(raw);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\nexport function DecimalLiteral(this: Printer, node: t.DecimalLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression, node);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee, node);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAA0B;EAFjBE,mBAAmB;EAAEC;AAAY,IAAAJ,EAAA;AAInC,SAASK,UAAUA,CAAgBC,IAAkB,EAAE;EAAA,IAAAC,SAAA;EAC5D,IAAI,CAACC,oBAAoB,CAEvB,EAAAD,SAAA,GAAAD,IAAI,CAACG,GAAG,qBAARF,SAAA,CAAUG,cAAc,KAAIJ,IAAI,CAACK,IACnC,CAAC;EACD,IAAI,CAACC,IAAI,CAACN,IAAI,CAACK,IAAI,CAAC;AACtB;AAEO,SAASE,mBAAmBA,CAAA,EAAgB;EACjD,IAAI,CAACC,SAAK,GAAI,CAAC;AACjB;AAEO,SAASC,WAAWA,CAAgBT,IAAmB,EAAE;EAC9D,IAAI,CAACQ,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACE,KAAK,CAACV,IAAI,CAACW,QAAQ,EAAEX,IAAI,CAAC;AACjC;AAIO,SAASY,gBAAgBA,CAAgBZ,IAAwB,EAAE;EACxE,MAAMa,KAAK,GAAGb,IAAI,CAACc,UAAU;EAE7B,IAAI,CAACN,SAAK,IA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@@ -73,11 +73,11 @@ class Printer {
|
|
|
73
73
|
if (this.format.minified) {
|
|
74
74
|
this._buf.removeLastSemicolon();
|
|
75
75
|
}
|
|
76
|
-
this.sourceWithOffset("end", node.loc,
|
|
76
|
+
this.sourceWithOffset("end", node.loc, -1);
|
|
77
77
|
this.tokenChar(125);
|
|
78
78
|
}
|
|
79
79
|
rightParens(node) {
|
|
80
|
-
this.sourceWithOffset("end", node.loc,
|
|
80
|
+
this.sourceWithOffset("end", node.loc, -1);
|
|
81
81
|
this.tokenChar(41);
|
|
82
82
|
}
|
|
83
83
|
space(force = false) {
|
|
@@ -167,10 +167,10 @@ class Printer {
|
|
|
167
167
|
this._catchUp(prop, loc);
|
|
168
168
|
this._buf.source(prop, loc);
|
|
169
169
|
}
|
|
170
|
-
sourceWithOffset(prop, loc,
|
|
170
|
+
sourceWithOffset(prop, loc, columnOffset) {
|
|
171
171
|
if (!loc) return;
|
|
172
172
|
this._catchUp(prop, loc);
|
|
173
|
-
this._buf.sourceWithOffset(prop, loc,
|
|
173
|
+
this._buf.sourceWithOffset(prop, loc, columnOffset);
|
|
174
174
|
}
|
|
175
175
|
withSource(prop, loc, cb) {
|
|
176
176
|
if (!loc) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_buffer","require","n","_t","generatorFunctions","isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumDeclaration","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","NON_DECIMAL_LITERAL","PURE_ANNOTATION_RE","HAS_NEWLINE","HAS_BlOCK_COMMENT_END","needsParens","Printer","constructor","format","map","inForStatementInitCounter","_printStack","_indent","_indentChar","_indentRepeat","_insideAux","_parenPushNewlineState","_noLineTerminator","_printAuxAfterOnNextUserNode","_printedComments","Set","_endsWithInteger","_endsWithWord","_lastCommentLine","_endsWithInnerRaw","_indentInnerComments","_buf","Buffer","indent","style","charCodeAt","length","_inputMap","generate","ast","print","_maybeAddAuxComment","get","compact","concise","dedent","semicolon","force","_appendChar","_queue","rightBrace","node","minified","removeLastSemicolon","sourceWithOffset","loc","token","rightParens","space","_space","hasContent","lastCp","getLastChar","word","str","noLineTerminatorAfter","_maybePrintInnerComments","endsWith","_append","number","Number","isInteger","test","maybeNewline","lastChar","strFirst","tokenChar","char","newline","i","retainLines","getNewlineCount","j","_newline","endsWithCharAndNewline","removeTrailingNewline","exactSource","cb","_catchUp","source","prop","lineOffset","columnOffset","withSource","sourceIdentifierName","identifierName","pos","_canMarkIdName","sourcePosition","_sourcePosition","identifierNamePos","_maybeAddParen","_maybeIndent","append","_maybeAddParenChar","appendChar","queue","firstChar","queueIndentation","_getIndent","_shouldIndent","parenPushNewlineState","printed","len","cha","chaPost","slice","catchUp","line","count","getCurrentLine","_loc$prop","printTerminatorless","parent","isLabel","terminatorState","trailingCommentsLineOffset","forceParens","_node$extra","nodeType","type","oldConcise","_compact","printMethod","undefined","ReferenceError","JSON","stringify","name","push","oldInAux","shouldPrintParens","retainFunctionParens","extra","parenthesized","_printLeadingComments","bind","_printTrailingComments","pop","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","auxiliaryCommentBefore","_printComment","value","auxiliaryCommentAfter","getPossibleRaw","raw","rawValue","printJoin","nodes","opts","_nodes$0$loc","startLine","start","newlineOpts","addNewlines","nextNodeStartLine","separator","statement","_printNewline","iterator","_nextNode$loc","nextNode","printAndIndentOnComments","leadingComments","printBlock","body","innerComments","trailingComments","_printComments","comments","printInnerComments","hasSpace","printedCommentsCount","size","noIndentInnerCommentsHere","printSequence","_opts$indent","printList","items","commaSeparator","newLine","lastCommentLine","offset","_shouldPrintComment","ignore","has","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","lastCharCode","val","adjustMultilineComment","_comment$loc","column","newlineRegex","RegExp","replace","indentSize","getCurrentColumn","repeat","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","end","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","Object","assign","prototype","Noop","_default","exports","default"],"sources":["../src/printer.ts"],"sourcesContent":["import Buffer, { type Pos } from \"./buffer\";\nimport type { Loc } from \"./buffer\";\nimport * as n from \"./node\";\nimport type * as t from \"@babel/types\";\nimport {\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumDeclaration,\n} from \"@babel/types\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport * as generatorFunctions from \"./generators\";\nimport type SourceMap from \"./source-map\";\nimport * as charCodes from \"charcodes\";\nimport type { TraceMap } from \"@jridgewell/trace-mapping\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\nconst PURE_ANNOTATION_RE = /^\\s*[@#]__PURE__\\s*$/;\nconst HAS_NEWLINE = /[\\n\\r\\u2028\\u2029]/;\nconst HAS_BlOCK_COMMENT_END = /\\*\\//;\n\nconst { needsParens } = n;\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n ALL,\n LEADING,\n TRAILING,\n}\n\nconst enum PRINT_COMMENT_HINT {\n SKIP,\n ALLOW,\n DEFER,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n retainLines: boolean;\n retainFunctionParens: boolean;\n comments: boolean;\n auxiliaryCommentBefore: string;\n auxiliaryCommentAfter: string;\n compact: boolean | \"auto\";\n minified: boolean;\n concise: boolean;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n recordAndTupleSyntaxType: RecordAndTuplePluginOptions[\"syntaxType\"];\n jsescOption: jsescOptions;\n /**\n * @deprecated Removed in Babel 8, use `jsescOption` instead\n */\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n};\n\ninterface AddNewlinesOptions {\n addNewlines(leading: boolean, node: t.Node): number;\n nextNodeStartLine: number;\n}\n\ninterface PrintSequenceOptions extends Partial<AddNewlinesOptions> {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer) => void;\n iterator?: (node: t.Node, index: number) => void;\n statement?: boolean;\n indent?: boolean;\n}\n\nexport type PrintJoinOptions = PrintListOptions & PrintSequenceOptions;\nclass Printer {\n constructor(format: Format, map: SourceMap) {\n this.format = format;\n this._buf = new Buffer(map);\n\n this._indentChar = format.indent.style.charCodeAt(0);\n this._indentRepeat = format.indent.style.length;\n\n this._inputMap = map?._inputMap;\n }\n declare _inputMap: TraceMap;\n\n declare format: Format;\n inForStatementInitCounter: number = 0;\n\n declare _buf: Buffer;\n _printStack: Array<t.Node> = [];\n _indent: number = 0;\n _indentChar: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _parenPushNewlineState: { printed: boolean } | null = null;\n _noLineTerminator: boolean = false;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set<t.Comment>();\n _endsWithInteger = false;\n _endsWithWord = false;\n _lastCommentLine = 0;\n _endsWithInnerRaw: boolean = false;\n _indentInnerComments: boolean = true;\n\n generate(ast: t.Node) {\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent++;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent--;\n }\n\n /**\n * Add a semicolon to the buffer.\n */\n\n semicolon(force: boolean = false): void {\n this._maybeAddAuxComment();\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n this._noLineTerminator = false;\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(node: t.Node): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.token(\"}\");\n }\n\n rightParens(node: t.Node): void {\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.token(\")\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this.format.compact) return;\n\n if (force) {\n this._space();\n } else if (this._buf.hasContent()) {\n const lastCp = this.getLastChar();\n if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string, noLineTerminatorAfter: boolean = false): void {\n this._maybePrintInnerComments();\n\n // prevent concatenating words and creating // comment out of division and regex\n if (\n this._endsWithWord ||\n (str.charCodeAt(0) === charCodes.slash && this.endsWith(charCodes.slash))\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, false);\n\n this._endsWithWord = true;\n this._noLineTerminator = noLineTerminatorAfter;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string): void {\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted\n // immediately after them.\n this._endsWithInteger =\n Number.isInteger(+str) &&\n !NON_DECIMAL_LITERAL.test(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot;\n }\n\n /**\n * Writes a simple token.\n */\n token(str: string, maybeNewline = false): void {\n this._maybePrintInnerComments();\n\n const lastChar = this.getLastChar();\n const strFirst = str.charCodeAt(0);\n if (\n (lastChar === charCodes.exclamationMark &&\n // space is mandatory to avoid outputting <!--\n // http://javascript.spec.whatwg.org/#comment-syntax\n (str === \"--\" ||\n // Needs spaces to avoid changing a! == 0 to a!== 0\n strFirst === charCodes.equalsTo)) ||\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (strFirst === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (strFirst === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (strFirst === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, maybeNewline);\n this._noLineTerminator = false;\n }\n\n tokenChar(char: number): void {\n this._maybePrintInnerComments();\n\n const lastChar = this.getLastChar();\n if (\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (char === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (char === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (char === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._appendChar(char);\n this._noLineTerminator = false;\n }\n\n /**\n * Add a newline (or many newlines), maintaining formatting.\n * This function checks the number of newlines in the queue and subtracts them.\n * It currently has some limitations.\n * @see {Buffer#getNewlineCount}\n */\n newline(i: number = 1, force?: boolean): void {\n if (i <= 0) return;\n\n if (!force) {\n if (this.format.retainLines || this.format.compact) return;\n\n if (this.format.concise) {\n this.space();\n return;\n }\n }\n\n if (i > 2) i = 2; // Max two lines\n\n i -= this._buf.getNewlineCount();\n\n for (let j = 0; j < i; j++) {\n this._newline();\n }\n\n return;\n }\n\n endsWith(char: number): boolean {\n return this.getLastChar() === char;\n }\n\n getLastChar(): number {\n return this._buf.getLastChar();\n }\n\n endsWithCharAndNewline(): number {\n return this._buf.endsWithCharAndNewline();\n }\n\n removeTrailingNewline(): void {\n this._buf.removeTrailingNewline();\n }\n\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!loc) {\n cb();\n return;\n }\n\n this._catchUp(\"start\", loc);\n\n this._buf.exactSource(loc, cb);\n }\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.source(prop, loc);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n lineOffset: number,\n columnOffset: number,\n ): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.sourceWithOffset(prop, loc, lineOffset, columnOffset);\n }\n\n withSource(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n cb: () => void,\n ): void {\n if (!loc) {\n cb();\n return;\n }\n\n this._catchUp(prop, loc);\n\n this._buf.withSource(prop, loc, cb);\n }\n\n sourceIdentifierName(identifierName: string, pos?: Pos): void {\n if (!this._buf._canMarkIdName) return;\n\n const sourcePosition = this._buf._sourcePosition;\n sourcePosition.identifierNamePos = pos;\n sourcePosition.identifierName = identifierName;\n }\n\n _space(): void {\n this._queue(charCodes.space);\n }\n\n _newline(): void {\n this._queue(charCodes.lineFeed);\n }\n\n _append(str: string, maybeNewline: boolean): void {\n this._maybeAddParen(str);\n this._maybeIndent(str.charCodeAt(0));\n\n this._buf.append(str, maybeNewline);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _appendChar(char: number): void {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.appendChar(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _queue(char: number) {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.queue(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _maybeIndent(firstChar: number): void {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n this._buf.queueIndentation(this._indentChar, this._getIndent());\n }\n }\n\n _shouldIndent(firstChar: number) {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n return true;\n }\n }\n\n _maybeAddParenChar(char: number): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n if (char === charCodes.space) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n if (char !== charCodes.lineFeed) {\n this._parenPushNewlineState = null;\n return;\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n _maybeAddParen(str: string): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n const len = str.length;\n\n let i;\n for (i = 0; i < len && str.charCodeAt(i) === charCodes.space; i++) continue;\n if (i === len) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n const cha = str.charCodeAt(i);\n if (cha !== charCodes.lineFeed) {\n if (\n // This is not a comment (it doesn't start with /)\n cha !== charCodes.slash ||\n // This is not a comment (it's a / operator)\n i + 1 === len\n ) {\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n\n const chaPost = str.charCodeAt(i + 1);\n\n if (chaPost === charCodes.asterisk) {\n // This is a block comment\n\n if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) {\n // We avoid printing newlines after #__PURE__ comments (we treat\n // then as unary operators), but we must keep the old\n // parenPushNewlineState because, if a newline was forbidden, it is\n // still forbidden after the comment.\n return;\n }\n\n // NOTE: code flow continues from here to after these if/elses\n } else if (chaPost !== charCodes.slash) {\n // This is neither a block comment, nor a line comment.\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n catchUp(line: number) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const count = line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n\n _catchUp(prop: \"start\" | \"end\", loc?: Loc) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const line = loc?.[prop]?.line;\n if (line != null) {\n const count = line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n }\n\n /**\n * Get the current indent.\n */\n\n _getIndent(): number {\n return this._indentRepeat * this._indent;\n }\n\n printTerminatorless(node: t.Node, parent: t.Node, isLabel: boolean) {\n /**\n * Set some state that will be modified if a newline has been inserted before any\n * non-space characters.\n *\n * This is to prevent breaking semantics for terminatorless separator nodes. eg:\n *\n * return foo;\n *\n * returns `foo`. But if we do:\n *\n * return\n * foo;\n *\n * `undefined` will be returned and not `foo` due to the terminator.\n */\n if (isLabel) {\n this._noLineTerminator = true;\n this.print(node, parent);\n } else {\n const terminatorState = {\n printed: false,\n };\n this._parenPushNewlineState = terminatorState;\n this.print(node, parent);\n /**\n * Print an ending parentheses if a starting one has been printed.\n */\n if (terminatorState.printed) {\n this.dedent();\n this.newline();\n this.token(\")\");\n }\n }\n }\n\n print(\n node: t.Node | null,\n parent?: t.Node,\n noLineTerminatorAfter?: boolean,\n // trailingCommentsLineOffset also used to check if called from printJoin\n // it will be ignored if `noLineTerminatorAfter||this._noLineTerminator`\n trailingCommentsLineOffset?: number,\n forceParens?: boolean,\n ) {\n if (!node) return;\n\n this._endsWithInnerRaw = false;\n\n const nodeType = node.type;\n const format = this.format;\n\n const oldConcise = format.concise;\n if (\n // @ts-expect-error document _compact AST properties\n node._compact\n ) {\n format.concise = true;\n }\n\n const printMethod =\n this[\n nodeType as Exclude<\n t.Node[\"type\"],\n // removed\n | \"Noop\"\n // renamed\n | t.DeprecatedAliases[\"type\"]\n >\n ];\n if (printMethod === undefined) {\n throw new ReferenceError(\n `unknown node of type ${JSON.stringify(\n nodeType,\n )} with constructor ${JSON.stringify(node.constructor.name)}`,\n );\n }\n\n this._printStack.push(node);\n\n const oldInAux = this._insideAux;\n this._insideAux = node.loc == undefined;\n this._maybeAddAuxComment(this._insideAux && !oldInAux);\n\n const shouldPrintParens =\n forceParens ||\n (format.retainFunctionParens &&\n nodeType === \"FunctionExpression\" &&\n node.extra?.parenthesized) ||\n needsParens(node, parent, this._printStack);\n\n if (shouldPrintParens) {\n this.token(\"(\");\n this._endsWithInnerRaw = false;\n }\n\n this._lastCommentLine = 0;\n\n this._printLeadingComments(node, parent);\n\n const loc = nodeType === \"Program\" || nodeType === \"File\" ? null : node.loc;\n\n this.exactSource(loc, printMethod.bind(this, node, parent));\n\n if (shouldPrintParens) {\n this._printTrailingComments(node, parent);\n this.token(\")\");\n this._noLineTerminator = noLineTerminatorAfter;\n } else if (noLineTerminatorAfter && !this._noLineTerminator) {\n this._noLineTerminator = true;\n this._printTrailingComments(node, parent);\n } else {\n this._printTrailingComments(node, parent, trailingCommentsLineOffset);\n }\n\n // end\n this._printStack.pop();\n\n format.concise = oldConcise;\n this._insideAux = oldInAux;\n\n this._endsWithInnerRaw = false;\n }\n\n _maybeAddAuxComment(enteredPositionlessNode?: boolean) {\n if (enteredPositionlessNode) this._printAuxBeforeComment();\n if (!this._insideAux) this._printAuxAfterComment();\n }\n\n _printAuxBeforeComment() {\n if (this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = true;\n\n const comment = this.format.auxiliaryCommentBefore;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n _printAuxAfterComment() {\n if (!this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = false;\n\n const comment = this.format.auxiliaryCommentAfter;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n getPossibleRaw(\n node:\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.DecimalLiteral\n | t.DirectiveLiteral\n | t.JSXText,\n ): string | undefined {\n const extra = node.extra;\n if (\n extra &&\n extra.raw != null &&\n extra.rawValue != null &&\n node.value === extra.rawValue\n ) {\n // @ts-expect-error: The extra.raw of these AST node types must be a string\n return extra.raw;\n }\n }\n\n printJoin(\n nodes: Array<t.Node> | undefined | null,\n parent: t.Node,\n opts: PrintJoinOptions = {},\n ) {\n if (!nodes?.length) return;\n\n let { indent } = opts;\n\n if (indent == null && this.format.retainLines) {\n const startLine = nodes[0].loc?.start.line;\n if (startLine != null && startLine !== this._buf.getCurrentLine()) {\n indent = true;\n }\n }\n\n if (indent) this.indent();\n\n const newlineOpts: AddNewlinesOptions = {\n addNewlines: opts.addNewlines,\n nextNodeStartLine: 0,\n };\n\n const separator = opts.separator ? opts.separator.bind(this) : null;\n\n const len = nodes.length;\n for (let i = 0; i < len; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n if (opts.statement) this._printNewline(i === 0, newlineOpts);\n\n this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0);\n\n opts.iterator?.(node, i);\n\n if (i < len - 1) separator?.();\n\n if (opts.statement) {\n if (i + 1 === len) {\n this.newline(1);\n } else {\n const nextNode = nodes[i + 1];\n newlineOpts.nextNodeStartLine = nextNode.loc?.start.line || 0;\n\n this._printNewline(true, newlineOpts);\n }\n }\n }\n\n if (indent) this.dedent();\n }\n\n printAndIndentOnComments(node: t.Node, parent: t.Node) {\n const indent = node.leadingComments && node.leadingComments.length > 0;\n if (indent) this.indent();\n this.print(node, parent);\n if (indent) this.dedent();\n }\n\n printBlock(parent: Extract<t.Node, { body: t.Statement }>) {\n const node = parent.body;\n\n if (node.type !== \"EmptyStatement\") {\n this.space();\n }\n\n this.print(node, parent);\n }\n\n _printTrailingComments(node: t.Node, parent?: t.Node, lineOffset?: number) {\n const { innerComments, trailingComments } = node;\n // We print inner comments here, so that if for some reason they couldn't\n // be printed in earlier locations they are still printed *somewhere*,\n // even if at the end of the node.\n if (innerComments?.length) {\n this._printComments(\n COMMENT_TYPE.TRAILING,\n innerComments,\n node,\n parent,\n lineOffset,\n );\n }\n if (trailingComments?.length) {\n this._printComments(\n COMMENT_TYPE.TRAILING,\n trailingComments,\n node,\n parent,\n lineOffset,\n );\n }\n }\n\n _printLeadingComments(node: t.Node, parent: t.Node) {\n const comments = node.leadingComments;\n if (!comments?.length) return;\n this._printComments(COMMENT_TYPE.LEADING, comments, node, parent);\n }\n\n _maybePrintInnerComments() {\n if (this._endsWithInnerRaw) this.printInnerComments();\n this._endsWithInnerRaw = true;\n this._indentInnerComments = true;\n }\n\n printInnerComments() {\n const node = this._printStack[this._printStack.length - 1];\n const comments = node.innerComments;\n if (!comments?.length) return;\n\n const hasSpace = this.endsWith(charCodes.space);\n const indent = this._indentInnerComments;\n const printedCommentsCount = this._printedComments.size;\n if (indent) this.indent();\n this._printComments(COMMENT_TYPE.INNER, comments, node);\n if (hasSpace && printedCommentsCount !== this._printedComments.size) {\n this.space();\n }\n if (indent) this.dedent();\n }\n\n noIndentInnerCommentsHere() {\n this._indentInnerComments = false;\n }\n\n printSequence(\n nodes: t.Node[],\n parent: t.Node,\n opts: PrintSequenceOptions = {},\n ) {\n opts.statement = true;\n opts.indent ??= false;\n this.printJoin(nodes, parent, opts);\n }\n\n printList(items: t.Node[], parent: t.Node, opts: PrintListOptions = {}) {\n if (opts.separator == null) {\n opts.separator = commaSeparator;\n }\n\n this.printJoin(items, parent, opts);\n }\n\n _printNewline(newLine: boolean, opts: AddNewlinesOptions) {\n const format = this.format;\n\n // Fast path since 'this.newline' does nothing when not tracking lines.\n if (format.retainLines || format.compact) return;\n\n // Fast path for concise since 'this.newline' just inserts a space when\n // concise formatting is in use.\n if (format.concise) {\n this.space();\n return;\n }\n\n if (!newLine) {\n return;\n }\n\n const startLine = opts.nextNodeStartLine;\n const lastCommentLine = this._lastCommentLine;\n if (startLine > 0 && lastCommentLine > 0) {\n const offset = startLine - lastCommentLine;\n if (offset >= 0) {\n this.newline(offset || 1);\n return;\n }\n }\n\n // don't add newlines at the beginning of the file\n if (this._buf.hasContent()) {\n // Here is the logic of the original line wrapping according to the node layout, we are not using it now.\n // We currently add at most one newline to each node in the list, ignoring `opts.addNewlines`.\n\n // let lines = 0;\n // if (!leading) lines++; // always include at least a single line after\n // if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;\n\n // const needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;\n // if (needs(node, parent)) lines++;\n\n // this.newline(Math.min(2, lines));\n\n this.newline(1);\n }\n }\n\n // Returns `PRINT_COMMENT_HINT.DEFER` if the comment cannot be printed in this position due to\n // line terminators, signaling that the print comments loop can stop and\n // resume printing comments at the next possible position. This happens when\n // printing inner comments, since if we have an inner comment with a multiline\n // there is at least one inner position where line terminators are allowed.\n _shouldPrintComment(comment: t.Comment): PRINT_COMMENT_HINT {\n // Some plugins (such as flow-strip-types) use this to mark comments as removed using the AST-root 'comments' property,\n // where they can't manually mutate the AST node comment lists.\n if (comment.ignore) return PRINT_COMMENT_HINT.SKIP;\n\n if (this._printedComments.has(comment)) return PRINT_COMMENT_HINT.SKIP;\n\n if (\n this._noLineTerminator &&\n (HAS_NEWLINE.test(comment.value) ||\n HAS_BlOCK_COMMENT_END.test(comment.value))\n ) {\n return PRINT_COMMENT_HINT.DEFER;\n }\n\n this._printedComments.add(comment);\n\n if (!this.format.shouldPrintComment(comment.value)) {\n return PRINT_COMMENT_HINT.SKIP;\n }\n\n return PRINT_COMMENT_HINT.ALLOW;\n }\n\n _printComment(comment: t.Comment, skipNewLines: COMMENT_SKIP_NEWLINE) {\n const noLineTerminator = this._noLineTerminator;\n const isBlockComment = comment.type === \"CommentBlock\";\n\n // Add a newline before and after a block comment, unless explicitly\n // disallowed\n const printNewLines =\n isBlockComment &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.ALL &&\n !this._noLineTerminator;\n\n if (\n printNewLines &&\n this._buf.hasContent() &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.LEADING\n ) {\n this.newline(1);\n }\n\n const lastCharCode = this.getLastChar();\n if (\n lastCharCode !== charCodes.leftSquareBracket &&\n lastCharCode !== charCodes.leftCurlyBrace\n ) {\n this.space();\n }\n\n let val;\n if (isBlockComment) {\n val = `/*${comment.value}*/`;\n if (this.format.indent.adjustMultilineComment) {\n const offset = comment.loc?.start.column;\n if (offset) {\n const newlineRegex = new RegExp(\"\\\\n\\\\s{1,\" + offset + \"}\", \"g\");\n val = val.replace(newlineRegex, \"\\n\");\n }\n\n let indentSize = this.format.retainLines\n ? 0\n : this._buf.getCurrentColumn();\n\n if (this._shouldIndent(charCodes.slash) || this.format.retainLines) {\n indentSize += this._getIndent();\n }\n\n val = val.replace(/\\n(?!$)/g, `\\n${\" \".repeat(indentSize)}`);\n }\n } else if (!noLineTerminator) {\n val = `//${comment.value}`;\n } else {\n // It was a single-line comment, so it's guaranteed to not\n // contain newlines and it can be safely printed as a block\n // comment.\n val = `/*${comment.value}*/`;\n }\n\n // Avoid creating //* comments\n if (this.endsWith(charCodes.slash)) this._space();\n\n this.source(\"start\", comment.loc);\n this._append(val, isBlockComment);\n\n if (!isBlockComment && !noLineTerminator) {\n this.newline(1, true);\n }\n\n if (printNewLines && skipNewLines !== COMMENT_SKIP_NEWLINE.TRAILING) {\n this.newline(1);\n }\n }\n\n _printComments(\n type: COMMENT_TYPE,\n comments: readonly t.Comment[],\n node: t.Node,\n parent?: t.Node,\n lineOffset: number = 0,\n ) {\n const nodeLoc = node.loc;\n const len = comments.length;\n let hasLoc = !!nodeLoc;\n const nodeStartLine = hasLoc ? nodeLoc.start.line : 0;\n const nodeEndLine = hasLoc ? nodeLoc.end.line : 0;\n let lastLine = 0;\n let leadingCommentNewline = 0;\n\n const maybeNewline = this._noLineTerminator\n ? function () {}\n : this.newline.bind(this);\n\n for (let i = 0; i < len; i++) {\n const comment = comments[i];\n\n const shouldPrint = this._shouldPrintComment(comment);\n if (shouldPrint === PRINT_COMMENT_HINT.DEFER) {\n hasLoc = false;\n break;\n }\n if (hasLoc && comment.loc && shouldPrint === PRINT_COMMENT_HINT.ALLOW) {\n const commentStartLine = comment.loc.start.line;\n const commentEndLine = comment.loc.end.line;\n if (type === COMMENT_TYPE.LEADING) {\n let offset = 0;\n if (i === 0) {\n // Because currently we cannot handle blank lines before leading comments,\n // we always wrap before and after multi-line comments.\n if (\n this._buf.hasContent() &&\n (comment.type === \"CommentLine\" ||\n commentStartLine != commentEndLine)\n ) {\n offset = leadingCommentNewline = 1;\n }\n } else {\n offset = commentStartLine - lastLine;\n }\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n\n if (i + 1 === len) {\n maybeNewline(\n Math.max(nodeStartLine - lastLine, leadingCommentNewline),\n );\n lastLine = nodeStartLine;\n }\n } else if (type === COMMENT_TYPE.INNER) {\n const offset =\n commentStartLine - (i === 0 ? nodeStartLine : lastLine);\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n\n if (i + 1 === len) {\n maybeNewline(Math.min(1, nodeEndLine - lastLine)); // TODO: Improve here when inner comments processing is stronger\n lastLine = nodeEndLine;\n }\n } else {\n const offset =\n commentStartLine - (i === 0 ? nodeEndLine - lineOffset : lastLine);\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n }\n } else {\n hasLoc = false;\n if (shouldPrint !== PRINT_COMMENT_HINT.ALLOW) {\n continue;\n }\n\n if (len === 1) {\n const singleLine = comment.loc\n ? comment.loc.start.line === comment.loc.end.line\n : !HAS_NEWLINE.test(comment.value);\n\n const shouldSkipNewline =\n singleLine &&\n !isStatement(node) &&\n !isClassBody(parent) &&\n !isTSInterfaceBody(parent) &&\n !isTSEnumDeclaration(parent);\n\n if (type === COMMENT_TYPE.LEADING) {\n this._printComment(\n comment,\n (shouldSkipNewline && node.type !== \"ObjectExpression\") ||\n (singleLine && isFunction(parent, { body: node }))\n ? COMMENT_SKIP_NEWLINE.ALL\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else if (shouldSkipNewline && type === COMMENT_TYPE.TRAILING) {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n } else if (\n type === COMMENT_TYPE.INNER &&\n !(node.type === \"ObjectExpression\" && node.properties.length > 1) &&\n node.type !== \"ClassBody\" &&\n node.type !== \"TSInterfaceBody\"\n ) {\n // class X {\n // /*:: a: number*/\n // /*:: b: ?string*/\n // }\n\n this._printComment(\n comment,\n i === 0\n ? COMMENT_SKIP_NEWLINE.LEADING\n : i === len - 1\n ? COMMENT_SKIP_NEWLINE.TRAILING\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n }\n }\n\n if (type === COMMENT_TYPE.TRAILING && hasLoc && lastLine) {\n this._lastCommentLine = lastLine;\n }\n }\n}\n\n// Expose the node type functions and helpers on the prototype for easy usage.\nObject.assign(Printer.prototype, generatorFunctions);\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 has Noop print method\n Printer.prototype.Noop = function Noop(this: Printer) {};\n}\n\ntype GeneratorFunctions = typeof generatorFunctions;\ninterface Printer extends GeneratorFunctions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AAO,CAAC+N,SAAS,EAAE5O,kBAAkB,CAAC;AAEjB;EAEjCa,OAAO,CAAC+N,SAAS,CAACC,IAAI,GAAG,SAASA,IAAIA,CAAA,EAAgB,CAAC,CAAC;AAC1D;AAAC,IAAAC,QAAA,GAIcjO,OAAO;AAAAkO,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAEtB,SAAS5C,cAAcA,CAAA,EAAgB;EACrC,IAAI,CAACxI,SAAK,GAAI,CAAC;EACf,IAAI,CAACE,KAAK,CAAC,CAAC;AACd"}
|
|
1
|
+
{"version":3,"names":["_buffer","require","n","_t","generatorFunctions","isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumDeclaration","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","NON_DECIMAL_LITERAL","PURE_ANNOTATION_RE","HAS_NEWLINE","HAS_BlOCK_COMMENT_END","needsParens","Printer","constructor","format","map","inForStatementInitCounter","_printStack","_indent","_indentChar","_indentRepeat","_insideAux","_parenPushNewlineState","_noLineTerminator","_printAuxAfterOnNextUserNode","_printedComments","Set","_endsWithInteger","_endsWithWord","_lastCommentLine","_endsWithInnerRaw","_indentInnerComments","_buf","Buffer","indent","style","charCodeAt","length","_inputMap","generate","ast","print","_maybeAddAuxComment","get","compact","concise","dedent","semicolon","force","_appendChar","_queue","rightBrace","node","minified","removeLastSemicolon","sourceWithOffset","loc","token","rightParens","space","_space","hasContent","lastCp","getLastChar","word","str","noLineTerminatorAfter","_maybePrintInnerComments","endsWith","_append","number","Number","isInteger","test","maybeNewline","lastChar","strFirst","tokenChar","char","newline","i","retainLines","getNewlineCount","j","_newline","endsWithCharAndNewline","removeTrailingNewline","exactSource","cb","_catchUp","source","prop","columnOffset","withSource","sourceIdentifierName","identifierName","pos","_canMarkIdName","sourcePosition","_sourcePosition","identifierNamePos","_maybeAddParen","_maybeIndent","append","_maybeAddParenChar","appendChar","queue","firstChar","queueIndentation","_getIndent","_shouldIndent","parenPushNewlineState","printed","len","cha","chaPost","slice","catchUp","line","count","getCurrentLine","_loc$prop","printTerminatorless","parent","isLabel","terminatorState","trailingCommentsLineOffset","forceParens","_node$extra","nodeType","type","oldConcise","_compact","printMethod","undefined","ReferenceError","JSON","stringify","name","push","oldInAux","shouldPrintParens","retainFunctionParens","extra","parenthesized","_printLeadingComments","bind","_printTrailingComments","pop","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","auxiliaryCommentBefore","_printComment","value","auxiliaryCommentAfter","getPossibleRaw","raw","rawValue","printJoin","nodes","opts","_nodes$0$loc","startLine","start","newlineOpts","addNewlines","nextNodeStartLine","separator","statement","_printNewline","iterator","_nextNode$loc","nextNode","printAndIndentOnComments","leadingComments","printBlock","body","lineOffset","innerComments","trailingComments","_printComments","comments","printInnerComments","hasSpace","printedCommentsCount","size","noIndentInnerCommentsHere","printSequence","_opts$indent","printList","items","commaSeparator","newLine","lastCommentLine","offset","_shouldPrintComment","ignore","has","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","lastCharCode","val","adjustMultilineComment","_comment$loc","column","newlineRegex","RegExp","replace","indentSize","getCurrentColumn","repeat","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","end","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","Object","assign","prototype","Noop","_default","exports","default"],"sources":["../src/printer.ts"],"sourcesContent":["import Buffer, { type Pos } from \"./buffer\";\nimport type { Loc } from \"./buffer\";\nimport * as n from \"./node\";\nimport type * as t from \"@babel/types\";\nimport {\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumDeclaration,\n} from \"@babel/types\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport * as generatorFunctions from \"./generators\";\nimport type SourceMap from \"./source-map\";\nimport * as charCodes from \"charcodes\";\nimport type { TraceMap } from \"@jridgewell/trace-mapping\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\nconst PURE_ANNOTATION_RE = /^\\s*[@#]__PURE__\\s*$/;\nconst HAS_NEWLINE = /[\\n\\r\\u2028\\u2029]/;\nconst HAS_BlOCK_COMMENT_END = /\\*\\//;\n\nconst { needsParens } = n;\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n ALL,\n LEADING,\n TRAILING,\n}\n\nconst enum PRINT_COMMENT_HINT {\n SKIP,\n ALLOW,\n DEFER,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n retainLines: boolean;\n retainFunctionParens: boolean;\n comments: boolean;\n auxiliaryCommentBefore: string;\n auxiliaryCommentAfter: string;\n compact: boolean | \"auto\";\n minified: boolean;\n concise: boolean;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n recordAndTupleSyntaxType: RecordAndTuplePluginOptions[\"syntaxType\"];\n jsescOption: jsescOptions;\n /**\n * @deprecated Removed in Babel 8, use `jsescOption` instead\n */\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n};\n\ninterface AddNewlinesOptions {\n addNewlines(leading: boolean, node: t.Node): number;\n nextNodeStartLine: number;\n}\n\ninterface PrintSequenceOptions extends Partial<AddNewlinesOptions> {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer) => void;\n iterator?: (node: t.Node, index: number) => void;\n statement?: boolean;\n indent?: boolean;\n}\n\nexport type PrintJoinOptions = PrintListOptions & PrintSequenceOptions;\nclass Printer {\n constructor(format: Format, map: SourceMap) {\n this.format = format;\n this._buf = new Buffer(map);\n\n this._indentChar = format.indent.style.charCodeAt(0);\n this._indentRepeat = format.indent.style.length;\n\n this._inputMap = map?._inputMap;\n }\n declare _inputMap: TraceMap;\n\n declare format: Format;\n inForStatementInitCounter: number = 0;\n\n declare _buf: Buffer;\n _printStack: Array<t.Node> = [];\n _indent: number = 0;\n _indentChar: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _parenPushNewlineState: { printed: boolean } | null = null;\n _noLineTerminator: boolean = false;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set<t.Comment>();\n _endsWithInteger = false;\n _endsWithWord = false;\n _lastCommentLine = 0;\n _endsWithInnerRaw: boolean = false;\n _indentInnerComments: boolean = true;\n\n generate(ast: t.Node) {\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent++;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent--;\n }\n\n /**\n * Add a semicolon to the buffer.\n */\n\n semicolon(force: boolean = false): void {\n this._maybeAddAuxComment();\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n this._noLineTerminator = false;\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(node: t.Node): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.sourceWithOffset(\"end\", node.loc, -1);\n this.token(\"}\");\n }\n\n rightParens(node: t.Node): void {\n this.sourceWithOffset(\"end\", node.loc, -1);\n this.token(\")\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this.format.compact) return;\n\n if (force) {\n this._space();\n } else if (this._buf.hasContent()) {\n const lastCp = this.getLastChar();\n if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string, noLineTerminatorAfter: boolean = false): void {\n this._maybePrintInnerComments();\n\n // prevent concatenating words and creating // comment out of division and regex\n if (\n this._endsWithWord ||\n (str.charCodeAt(0) === charCodes.slash && this.endsWith(charCodes.slash))\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, false);\n\n this._endsWithWord = true;\n this._noLineTerminator = noLineTerminatorAfter;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string): void {\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted\n // immediately after them.\n this._endsWithInteger =\n Number.isInteger(+str) &&\n !NON_DECIMAL_LITERAL.test(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot;\n }\n\n /**\n * Writes a simple token.\n */\n token(str: string, maybeNewline = false): void {\n this._maybePrintInnerComments();\n\n const lastChar = this.getLastChar();\n const strFirst = str.charCodeAt(0);\n if (\n (lastChar === charCodes.exclamationMark &&\n // space is mandatory to avoid outputting <!--\n // http://javascript.spec.whatwg.org/#comment-syntax\n (str === \"--\" ||\n // Needs spaces to avoid changing a! == 0 to a!== 0\n strFirst === charCodes.equalsTo)) ||\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (strFirst === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (strFirst === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (strFirst === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, maybeNewline);\n this._noLineTerminator = false;\n }\n\n tokenChar(char: number): void {\n this._maybePrintInnerComments();\n\n const lastChar = this.getLastChar();\n if (\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (char === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (char === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (char === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._appendChar(char);\n this._noLineTerminator = false;\n }\n\n /**\n * Add a newline (or many newlines), maintaining formatting.\n * This function checks the number of newlines in the queue and subtracts them.\n * It currently has some limitations.\n * @see {Buffer#getNewlineCount}\n */\n newline(i: number = 1, force?: boolean): void {\n if (i <= 0) return;\n\n if (!force) {\n if (this.format.retainLines || this.format.compact) return;\n\n if (this.format.concise) {\n this.space();\n return;\n }\n }\n\n if (i > 2) i = 2; // Max two lines\n\n i -= this._buf.getNewlineCount();\n\n for (let j = 0; j < i; j++) {\n this._newline();\n }\n\n return;\n }\n\n endsWith(char: number): boolean {\n return this.getLastChar() === char;\n }\n\n getLastChar(): number {\n return this._buf.getLastChar();\n }\n\n endsWithCharAndNewline(): number {\n return this._buf.endsWithCharAndNewline();\n }\n\n removeTrailingNewline(): void {\n this._buf.removeTrailingNewline();\n }\n\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!loc) {\n cb();\n return;\n }\n\n this._catchUp(\"start\", loc);\n\n this._buf.exactSource(loc, cb);\n }\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.source(prop, loc);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n columnOffset: number,\n ): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.sourceWithOffset(prop, loc, columnOffset);\n }\n\n withSource(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n cb: () => void,\n ): void {\n if (!loc) {\n cb();\n return;\n }\n\n this._catchUp(prop, loc);\n\n this._buf.withSource(prop, loc, cb);\n }\n\n sourceIdentifierName(identifierName: string, pos?: Pos): void {\n if (!this._buf._canMarkIdName) return;\n\n const sourcePosition = this._buf._sourcePosition;\n sourcePosition.identifierNamePos = pos;\n sourcePosition.identifierName = identifierName;\n }\n\n _space(): void {\n this._queue(charCodes.space);\n }\n\n _newline(): void {\n this._queue(charCodes.lineFeed);\n }\n\n _append(str: string, maybeNewline: boolean): void {\n this._maybeAddParen(str);\n this._maybeIndent(str.charCodeAt(0));\n\n this._buf.append(str, maybeNewline);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _appendChar(char: number): void {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.appendChar(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _queue(char: number) {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.queue(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _maybeIndent(firstChar: number): void {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n this._buf.queueIndentation(this._indentChar, this._getIndent());\n }\n }\n\n _shouldIndent(firstChar: number) {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n return true;\n }\n }\n\n _maybeAddParenChar(char: number): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n if (char === charCodes.space) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n if (char !== charCodes.lineFeed) {\n this._parenPushNewlineState = null;\n return;\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n _maybeAddParen(str: string): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n const len = str.length;\n\n let i;\n for (i = 0; i < len && str.charCodeAt(i) === charCodes.space; i++) continue;\n if (i === len) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n const cha = str.charCodeAt(i);\n if (cha !== charCodes.lineFeed) {\n if (\n // This is not a comment (it doesn't start with /)\n cha !== charCodes.slash ||\n // This is not a comment (it's a / operator)\n i + 1 === len\n ) {\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n\n const chaPost = str.charCodeAt(i + 1);\n\n if (chaPost === charCodes.asterisk) {\n // This is a block comment\n\n if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) {\n // We avoid printing newlines after #__PURE__ comments (we treat\n // then as unary operators), but we must keep the old\n // parenPushNewlineState because, if a newline was forbidden, it is\n // still forbidden after the comment.\n return;\n }\n\n // NOTE: code flow continues from here to after these if/elses\n } else if (chaPost !== charCodes.slash) {\n // This is neither a block comment, nor a line comment.\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n catchUp(line: number) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const count = line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n\n _catchUp(prop: \"start\" | \"end\", loc?: Loc) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const line = loc?.[prop]?.line;\n if (line != null) {\n const count = line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n }\n\n /**\n * Get the current indent.\n */\n\n _getIndent(): number {\n return this._indentRepeat * this._indent;\n }\n\n printTerminatorless(node: t.Node, parent: t.Node, isLabel: boolean) {\n /**\n * Set some state that will be modified if a newline has been inserted before any\n * non-space characters.\n *\n * This is to prevent breaking semantics for terminatorless separator nodes. eg:\n *\n * return foo;\n *\n * returns `foo`. But if we do:\n *\n * return\n * foo;\n *\n * `undefined` will be returned and not `foo` due to the terminator.\n */\n if (isLabel) {\n this._noLineTerminator = true;\n this.print(node, parent);\n } else {\n const terminatorState = {\n printed: false,\n };\n this._parenPushNewlineState = terminatorState;\n this.print(node, parent);\n /**\n * Print an ending parentheses if a starting one has been printed.\n */\n if (terminatorState.printed) {\n this.dedent();\n this.newline();\n this.token(\")\");\n }\n }\n }\n\n print(\n node: t.Node | null,\n parent?: t.Node,\n noLineTerminatorAfter?: boolean,\n // trailingCommentsLineOffset also used to check if called from printJoin\n // it will be ignored if `noLineTerminatorAfter||this._noLineTerminator`\n trailingCommentsLineOffset?: number,\n forceParens?: boolean,\n ) {\n if (!node) return;\n\n this._endsWithInnerRaw = false;\n\n const nodeType = node.type;\n const format = this.format;\n\n const oldConcise = format.concise;\n if (\n // @ts-expect-error document _compact AST properties\n node._compact\n ) {\n format.concise = true;\n }\n\n const printMethod =\n this[\n nodeType as Exclude<\n t.Node[\"type\"],\n // removed\n | \"Noop\"\n // renamed\n | t.DeprecatedAliases[\"type\"]\n >\n ];\n if (printMethod === undefined) {\n throw new ReferenceError(\n `unknown node of type ${JSON.stringify(\n nodeType,\n )} with constructor ${JSON.stringify(node.constructor.name)}`,\n );\n }\n\n this._printStack.push(node);\n\n const oldInAux = this._insideAux;\n this._insideAux = node.loc == undefined;\n this._maybeAddAuxComment(this._insideAux && !oldInAux);\n\n const shouldPrintParens =\n forceParens ||\n (format.retainFunctionParens &&\n nodeType === \"FunctionExpression\" &&\n node.extra?.parenthesized) ||\n needsParens(node, parent, this._printStack);\n\n if (shouldPrintParens) {\n this.token(\"(\");\n this._endsWithInnerRaw = false;\n }\n\n this._lastCommentLine = 0;\n\n this._printLeadingComments(node, parent);\n\n const loc = nodeType === \"Program\" || nodeType === \"File\" ? null : node.loc;\n\n this.exactSource(loc, printMethod.bind(this, node, parent));\n\n if (shouldPrintParens) {\n this._printTrailingComments(node, parent);\n this.token(\")\");\n this._noLineTerminator = noLineTerminatorAfter;\n } else if (noLineTerminatorAfter && !this._noLineTerminator) {\n this._noLineTerminator = true;\n this._printTrailingComments(node, parent);\n } else {\n this._printTrailingComments(node, parent, trailingCommentsLineOffset);\n }\n\n // end\n this._printStack.pop();\n\n format.concise = oldConcise;\n this._insideAux = oldInAux;\n\n this._endsWithInnerRaw = false;\n }\n\n _maybeAddAuxComment(enteredPositionlessNode?: boolean) {\n if (enteredPositionlessNode) this._printAuxBeforeComment();\n if (!this._insideAux) this._printAuxAfterComment();\n }\n\n _printAuxBeforeComment() {\n if (this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = true;\n\n const comment = this.format.auxiliaryCommentBefore;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n _printAuxAfterComment() {\n if (!this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = false;\n\n const comment = this.format.auxiliaryCommentAfter;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n getPossibleRaw(\n node:\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.DecimalLiteral\n | t.DirectiveLiteral\n | t.JSXText,\n ): string | undefined {\n const extra = node.extra;\n if (\n extra &&\n extra.raw != null &&\n extra.rawValue != null &&\n node.value === extra.rawValue\n ) {\n // @ts-expect-error: The extra.raw of these AST node types must be a string\n return extra.raw;\n }\n }\n\n printJoin(\n nodes: Array<t.Node> | undefined | null,\n parent: t.Node,\n opts: PrintJoinOptions = {},\n ) {\n if (!nodes?.length) return;\n\n let { indent } = opts;\n\n if (indent == null && this.format.retainLines) {\n const startLine = nodes[0].loc?.start.line;\n if (startLine != null && startLine !== this._buf.getCurrentLine()) {\n indent = true;\n }\n }\n\n if (indent) this.indent();\n\n const newlineOpts: AddNewlinesOptions = {\n addNewlines: opts.addNewlines,\n nextNodeStartLine: 0,\n };\n\n const separator = opts.separator ? opts.separator.bind(this) : null;\n\n const len = nodes.length;\n for (let i = 0; i < len; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n if (opts.statement) this._printNewline(i === 0, newlineOpts);\n\n this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0);\n\n opts.iterator?.(node, i);\n\n if (i < len - 1) separator?.();\n\n if (opts.statement) {\n if (i + 1 === len) {\n this.newline(1);\n } else {\n const nextNode = nodes[i + 1];\n newlineOpts.nextNodeStartLine = nextNode.loc?.start.line || 0;\n\n this._printNewline(true, newlineOpts);\n }\n }\n }\n\n if (indent) this.dedent();\n }\n\n printAndIndentOnComments(node: t.Node, parent: t.Node) {\n const indent = node.leadingComments && node.leadingComments.length > 0;\n if (indent) this.indent();\n this.print(node, parent);\n if (indent) this.dedent();\n }\n\n printBlock(parent: Extract<t.Node, { body: t.Statement }>) {\n const node = parent.body;\n\n if (node.type !== \"EmptyStatement\") {\n this.space();\n }\n\n this.print(node, parent);\n }\n\n _printTrailingComments(node: t.Node, parent?: t.Node, lineOffset?: number) {\n const { innerComments, trailingComments } = node;\n // We print inner comments here, so that if for some reason they couldn't\n // be printed in earlier locations they are still printed *somewhere*,\n // even if at the end of the node.\n if (innerComments?.length) {\n this._printComments(\n COMMENT_TYPE.TRAILING,\n innerComments,\n node,\n parent,\n lineOffset,\n );\n }\n if (trailingComments?.length) {\n this._printComments(\n COMMENT_TYPE.TRAILING,\n trailingComments,\n node,\n parent,\n lineOffset,\n );\n }\n }\n\n _printLeadingComments(node: t.Node, parent: t.Node) {\n const comments = node.leadingComments;\n if (!comments?.length) return;\n this._printComments(COMMENT_TYPE.LEADING, comments, node, parent);\n }\n\n _maybePrintInnerComments() {\n if (this._endsWithInnerRaw) this.printInnerComments();\n this._endsWithInnerRaw = true;\n this._indentInnerComments = true;\n }\n\n printInnerComments() {\n const node = this._printStack[this._printStack.length - 1];\n const comments = node.innerComments;\n if (!comments?.length) return;\n\n const hasSpace = this.endsWith(charCodes.space);\n const indent = this._indentInnerComments;\n const printedCommentsCount = this._printedComments.size;\n if (indent) this.indent();\n this._printComments(COMMENT_TYPE.INNER, comments, node);\n if (hasSpace && printedCommentsCount !== this._printedComments.size) {\n this.space();\n }\n if (indent) this.dedent();\n }\n\n noIndentInnerCommentsHere() {\n this._indentInnerComments = false;\n }\n\n printSequence(\n nodes: t.Node[],\n parent: t.Node,\n opts: PrintSequenceOptions = {},\n ) {\n opts.statement = true;\n opts.indent ??= false;\n this.printJoin(nodes, parent, opts);\n }\n\n printList(items: t.Node[], parent: t.Node, opts: PrintListOptions = {}) {\n if (opts.separator == null) {\n opts.separator = commaSeparator;\n }\n\n this.printJoin(items, parent, opts);\n }\n\n _printNewline(newLine: boolean, opts: AddNewlinesOptions) {\n const format = this.format;\n\n // Fast path since 'this.newline' does nothing when not tracking lines.\n if (format.retainLines || format.compact) return;\n\n // Fast path for concise since 'this.newline' just inserts a space when\n // concise formatting is in use.\n if (format.concise) {\n this.space();\n return;\n }\n\n if (!newLine) {\n return;\n }\n\n const startLine = opts.nextNodeStartLine;\n const lastCommentLine = this._lastCommentLine;\n if (startLine > 0 && lastCommentLine > 0) {\n const offset = startLine - lastCommentLine;\n if (offset >= 0) {\n this.newline(offset || 1);\n return;\n }\n }\n\n // don't add newlines at the beginning of the file\n if (this._buf.hasContent()) {\n // Here is the logic of the original line wrapping according to the node layout, we are not using it now.\n // We currently add at most one newline to each node in the list, ignoring `opts.addNewlines`.\n\n // let lines = 0;\n // if (!leading) lines++; // always include at least a single line after\n // if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;\n\n // const needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;\n // if (needs(node, parent)) lines++;\n\n // this.newline(Math.min(2, lines));\n\n this.newline(1);\n }\n }\n\n // Returns `PRINT_COMMENT_HINT.DEFER` if the comment cannot be printed in this position due to\n // line terminators, signaling that the print comments loop can stop and\n // resume printing comments at the next possible position. This happens when\n // printing inner comments, since if we have an inner comment with a multiline\n // there is at least one inner position where line terminators are allowed.\n _shouldPrintComment(comment: t.Comment): PRINT_COMMENT_HINT {\n // Some plugins (such as flow-strip-types) use this to mark comments as removed using the AST-root 'comments' property,\n // where they can't manually mutate the AST node comment lists.\n if (comment.ignore) return PRINT_COMMENT_HINT.SKIP;\n\n if (this._printedComments.has(comment)) return PRINT_COMMENT_HINT.SKIP;\n\n if (\n this._noLineTerminator &&\n (HAS_NEWLINE.test(comment.value) ||\n HAS_BlOCK_COMMENT_END.test(comment.value))\n ) {\n return PRINT_COMMENT_HINT.DEFER;\n }\n\n this._printedComments.add(comment);\n\n if (!this.format.shouldPrintComment(comment.value)) {\n return PRINT_COMMENT_HINT.SKIP;\n }\n\n return PRINT_COMMENT_HINT.ALLOW;\n }\n\n _printComment(comment: t.Comment, skipNewLines: COMMENT_SKIP_NEWLINE) {\n const noLineTerminator = this._noLineTerminator;\n const isBlockComment = comment.type === \"CommentBlock\";\n\n // Add a newline before and after a block comment, unless explicitly\n // disallowed\n const printNewLines =\n isBlockComment &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.ALL &&\n !this._noLineTerminator;\n\n if (\n printNewLines &&\n this._buf.hasContent() &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.LEADING\n ) {\n this.newline(1);\n }\n\n const lastCharCode = this.getLastChar();\n if (\n lastCharCode !== charCodes.leftSquareBracket &&\n lastCharCode !== charCodes.leftCurlyBrace\n ) {\n this.space();\n }\n\n let val;\n if (isBlockComment) {\n val = `/*${comment.value}*/`;\n if (this.format.indent.adjustMultilineComment) {\n const offset = comment.loc?.start.column;\n if (offset) {\n const newlineRegex = new RegExp(\"\\\\n\\\\s{1,\" + offset + \"}\", \"g\");\n val = val.replace(newlineRegex, \"\\n\");\n }\n\n let indentSize = this.format.retainLines\n ? 0\n : this._buf.getCurrentColumn();\n\n if (this._shouldIndent(charCodes.slash) || this.format.retainLines) {\n indentSize += this._getIndent();\n }\n\n val = val.replace(/\\n(?!$)/g, `\\n${\" \".repeat(indentSize)}`);\n }\n } else if (!noLineTerminator) {\n val = `//${comment.value}`;\n } else {\n // It was a single-line comment, so it's guaranteed to not\n // contain newlines and it can be safely printed as a block\n // comment.\n val = `/*${comment.value}*/`;\n }\n\n // Avoid creating //* comments\n if (this.endsWith(charCodes.slash)) this._space();\n\n this.source(\"start\", comment.loc);\n this._append(val, isBlockComment);\n\n if (!isBlockComment && !noLineTerminator) {\n this.newline(1, true);\n }\n\n if (printNewLines && skipNewLines !== COMMENT_SKIP_NEWLINE.TRAILING) {\n this.newline(1);\n }\n }\n\n _printComments(\n type: COMMENT_TYPE,\n comments: readonly t.Comment[],\n node: t.Node,\n parent?: t.Node,\n lineOffset: number = 0,\n ) {\n const nodeLoc = node.loc;\n const len = comments.length;\n let hasLoc = !!nodeLoc;\n const nodeStartLine = hasLoc ? nodeLoc.start.line : 0;\n const nodeEndLine = hasLoc ? nodeLoc.end.line : 0;\n let lastLine = 0;\n let leadingCommentNewline = 0;\n\n const maybeNewline = this._noLineTerminator\n ? function () {}\n : this.newline.bind(this);\n\n for (let i = 0; i < len; i++) {\n const comment = comments[i];\n\n const shouldPrint = this._shouldPrintComment(comment);\n if (shouldPrint === PRINT_COMMENT_HINT.DEFER) {\n hasLoc = false;\n break;\n }\n if (hasLoc && comment.loc && shouldPrint === PRINT_COMMENT_HINT.ALLOW) {\n const commentStartLine = comment.loc.start.line;\n const commentEndLine = comment.loc.end.line;\n if (type === COMMENT_TYPE.LEADING) {\n let offset = 0;\n if (i === 0) {\n // Because currently we cannot handle blank lines before leading comments,\n // we always wrap before and after multi-line comments.\n if (\n this._buf.hasContent() &&\n (comment.type === \"CommentLine\" ||\n commentStartLine != commentEndLine)\n ) {\n offset = leadingCommentNewline = 1;\n }\n } else {\n offset = commentStartLine - lastLine;\n }\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n\n if (i + 1 === len) {\n maybeNewline(\n Math.max(nodeStartLine - lastLine, leadingCommentNewline),\n );\n lastLine = nodeStartLine;\n }\n } else if (type === COMMENT_TYPE.INNER) {\n const offset =\n commentStartLine - (i === 0 ? nodeStartLine : lastLine);\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n\n if (i + 1 === len) {\n maybeNewline(Math.min(1, nodeEndLine - lastLine)); // TODO: Improve here when inner comments processing is stronger\n lastLine = nodeEndLine;\n }\n } else {\n const offset =\n commentStartLine - (i === 0 ? nodeEndLine - lineOffset : lastLine);\n lastLine = commentEndLine;\n\n maybeNewline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n }\n } else {\n hasLoc = false;\n if (shouldPrint !== PRINT_COMMENT_HINT.ALLOW) {\n continue;\n }\n\n if (len === 1) {\n const singleLine = comment.loc\n ? comment.loc.start.line === comment.loc.end.line\n : !HAS_NEWLINE.test(comment.value);\n\n const shouldSkipNewline =\n singleLine &&\n !isStatement(node) &&\n !isClassBody(parent) &&\n !isTSInterfaceBody(parent) &&\n !isTSEnumDeclaration(parent);\n\n if (type === COMMENT_TYPE.LEADING) {\n this._printComment(\n comment,\n (shouldSkipNewline && node.type !== \"ObjectExpression\") ||\n (singleLine && isFunction(parent, { body: node }))\n ? COMMENT_SKIP_NEWLINE.ALL\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else if (shouldSkipNewline && type === COMMENT_TYPE.TRAILING) {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.ALL);\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n } else if (\n type === COMMENT_TYPE.INNER &&\n !(node.type === \"ObjectExpression\" && node.properties.length > 1) &&\n node.type !== \"ClassBody\" &&\n node.type !== \"TSInterfaceBody\"\n ) {\n // class X {\n // /*:: a: number*/\n // /*:: b: ?string*/\n // }\n\n this._printComment(\n comment,\n i === 0\n ? COMMENT_SKIP_NEWLINE.LEADING\n : i === len - 1\n ? COMMENT_SKIP_NEWLINE.TRAILING\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n }\n }\n\n if (type === COMMENT_TYPE.TRAILING && hasLoc && lastLine) {\n this._lastCommentLine = lastLine;\n }\n }\n}\n\n// Expose the node type functions and helpers on the prototype for easy usage.\nObject.assign(Printer.prototype, generatorFunctions);\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 has Noop print method\n Printer.prototype.Noop = function Noop(this: Printer) {};\n}\n\ntype GeneratorFunctions = typeof generatorFunctions;\ninterface Printer extends GeneratorFunctions {}\nexport default Printer;\n\nfunction commaSeparator(this: Printer) {\n this.token(\",\");\n this.space();\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,CAAA,GAAAD,OAAA;AAEA,IAAAE,EAAA,GAAAF,OAAA;AAaA,IAAAG,kBAAA,GAAAH,OAAA;AAAmD;EAZjDI,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,iBAAiB;EACjBC;AAAmB,IAAAN,EAAA;AAarB,MAAMO,mBAAmB,GAAG,IAAI;AAChC,MAAMC,oBAAoB,GAAG,OAAO;AACpC,MAAMC,mBAAmB,GAAG,SAAS;AACrC,MAAMC,kBAAkB,GAAG,sBAAsB;AACjD,MAAMC,WAAW,GAAG,oB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YAC9D,IAAI,CAACwB,aAAa,CAACF,OAAO,GAA0B,CAAC;UACvD,CAAC,MAAM;YACL,IAAI,CAACE,aAAa,CAACF,OAAO,GAA8B,CAAC;UAC3D;QACF,CAAC,MAAM,IACLtB,IAAI,MAAuB,IAC3B,EAAE9E,IAAI,CAAC8E,IAAI,KAAK,kBAAkB,IAAI9E,IAAI,CAACoL,UAAU,CAACnM,MAAM,GAAG,CAAC,CAAC,IACjEe,IAAI,CAAC8E,IAAI,KAAK,WAAW,IACzB9E,IAAI,CAAC8E,IAAI,KAAK,iBAAiB,EAC/B;UAMA,IAAI,CAACwB,aAAa,CAChBF,OAAO,EACPxE,CAAC,KAAK,CAAC,OAEHA,CAAC,KAAKiC,GAAG,GAAG,CAAC,QAGnB,CAAC;QACH,CAAC,MAAM;UACL,IAAI,CAACyC,aAAa,CAACF,OAAO,GAA8B,CAAC;QAC3D;MACF;IACF;IAEA,IAAItB,IAAI,MAA0B,IAAIwF,MAAM,IAAII,QAAQ,EAAE;MACxD,IAAI,CAACjM,gBAAgB,GAAGiM,QAAQ;IAClC;EACF;AACF;AAGAW,MAAM,CAACC,MAAM,CAAC9N,OAAO,CAAC+N,SAAS,EAAE5O,kBAAkB,CAAC;AAEjB;EAEjCa,OAAO,CAAC+N,SAAS,CAACC,IAAI,GAAG,SAASA,IAAIA,CAAA,EAAgB,CAAC,CAAC;AAC1D;AAAC,IAAAC,QAAA,GAIcjO,OAAO;AAAAkO,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAEtB,SAAS5C,cAAcA,CAAA,EAAgB;EACrC,IAAI,CAACxI,SAAK,GAAI,CAAC;EACf,IAAI,CAACE,KAAK,CAAC,CAAC;AACd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babel/generator",
|
|
3
|
-
"version": "7.22.
|
|
3
|
+
"version": "7.22.7",
|
|
4
4
|
"description": "Turns an AST into code.",
|
|
5
5
|
"author": "The Babel Team (https://babel.dev/team)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"jsesc": "^2.5.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@babel/helper-fixtures": "^7.22.
|
|
29
|
-
"@babel/parser": "^7.22.
|
|
28
|
+
"@babel/helper-fixtures": "^7.22.6",
|
|
29
|
+
"@babel/parser": "^7.22.7",
|
|
30
|
+
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
30
31
|
"@types/jsesc": "^2.5.0",
|
|
31
32
|
"charcodes": "^0.2.0"
|
|
32
33
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Helper functions on Babel compilation targets
|
|
4
4
|
|
|
5
|
-
See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/
|
|
5
|
+
See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/babel-helper-compilation-targets) for more information.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getInclusionReasons = getInclusionReasons;
|
|
7
|
-
var
|
|
7
|
+
var _semverV = require("@nicolo-ribaudo/semver-v6");
|
|
8
8
|
var _pretty = require("./pretty");
|
|
9
9
|
var _utils = require("./utils");
|
|
10
10
|
function getInclusionReasons(item, targetVersions, list) {
|
|
@@ -17,7 +17,7 @@ function getInclusionReasons(item, targetVersions, list) {
|
|
|
17
17
|
} else {
|
|
18
18
|
const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
|
|
19
19
|
const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
|
|
20
|
-
if (!targetIsUnreleased && (minIsUnreleased ||
|
|
20
|
+
if (!targetIsUnreleased && (minIsUnreleased || _semverV.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
|
|
21
21
|
result[env] = (0, _pretty.prettifyVersion)(targetVersion);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_semverV","require","_pretty","_utils","getInclusionReasons","item","targetVersions","list","minVersions","Object","keys","reduce","result","env","minVersion","getLowestImplementedVersion","targetVersion","prettifyVersion","minIsUnreleased","isUnreleasedVersion","targetIsUnreleased","semver","lt","toString","semverify"],"sources":["../src/debug.ts"],"sourcesContent":["/// <reference path=\"../../../lib/semver.d.ts\" />\n\n// TODO(Babel 8): Use \"semver\" directly\nimport semver from \"@nicolo-ribaudo/semver-v6\";\nimport { prettifyVersion } from \"./pretty\";\nimport {\n semverify,\n isUnreleasedVersion,\n getLowestImplementedVersion,\n} from \"./utils\";\nimport type { Target, Targets } from \"./types\";\n\nexport function getInclusionReasons(\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) {\n const minVersions = list[item] || {};\n\n return (Object.keys(targetVersions) as Target[]).reduce(\n (result, env) => {\n const minVersion = getLowestImplementedVersion(minVersions, env);\n const targetVersion = targetVersions[env];\n\n if (!minVersion) {\n result[env] = prettifyVersion(targetVersion);\n } else {\n const minIsUnreleased = isUnreleasedVersion(minVersion, env);\n const targetIsUnreleased = isUnreleasedVersion(targetVersion, env);\n\n if (\n !targetIsUnreleased &&\n (minIsUnreleased ||\n semver.lt(targetVersion.toString(), semverify(minVersion)))\n ) {\n result[env] = prettifyVersion(targetVersion);\n }\n }\n\n return result;\n },\n {} as Partial<Record<Target, string>>,\n );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOO,SAASG,mBAAmBA,CACjCC,IAAY,EACZC,cAAuB,EACvBC,IAAgC,EAChC;EACA,MAAMC,WAAW,GAAGD,IAAI,CAACF,IAAI,CAAC,IAAI,CAAC,CAAC;EAEpC,OAAQI,MAAM,CAACC,IAAI,CAACJ,cAAc,CAAC,CAAcK,MAAM,CACrD,CAACC,MAAM,EAAEC,GAAG,KAAK;IACf,MAAMC,UAAU,GAAG,IAAAC,kCAA2B,EAACP,WAAW,EAAEK,GAAG,CAAC;IAChE,MAAMG,aAAa,GAAGV,cAAc,CAACO,GAAG,CAAC;IAEzC,IAAI,CAACC,UAAU,EAAE;MACfF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;IAC9C,CAAC,MAAM;MACL,MAAME,eAAe,GAAG,IAAAC,0BAAmB,EAACL,UAAU,EAAED,GAAG,CAAC;MAC5D,MAAMO,kBAAkB,GAAG,IAAAD,0BAAmB,EAACH,aAAa,EAAEH,GAAG,CAAC;MAElE,IACE,CAACO,kBAAkB,KAClBF,eAAe,IACdG,QAAM,CAACC,EAAE,CAACN,aAAa,CAACO,QAAQ,CAAC,CAAC,EAAE,IAAAC,gBAAS,EAACV,UAAU,CAAC,CAAC,CAAC,EAC7D;QACAF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;MAC9C;IACF;IAEA,OAAOJ,MAAM;EACf,CAAC,EACD,CAAC,CACH,CAAC;AACH"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = filterItems;
|
|
7
7
|
exports.isRequired = isRequired;
|
|
8
8
|
exports.targetsSupported = targetsSupported;
|
|
9
|
-
var
|
|
9
|
+
var _semverV = require("@nicolo-ribaudo/semver-v6");
|
|
10
10
|
var _plugins = require("@babel/compat-data/plugins");
|
|
11
11
|
var _utils = require("./utils");
|
|
12
12
|
function targetsSupported(target, support) {
|
|
@@ -26,10 +26,10 @@ function targetsSupported(target, support) {
|
|
|
26
26
|
if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) {
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
|
-
if (!
|
|
29
|
+
if (!_semverV.valid(lowestTargetedVersion.toString())) {
|
|
30
30
|
throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)");
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return _semverV.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString());
|
|
33
33
|
});
|
|
34
34
|
return unsupportedEnvironments.length === 0;
|
|
35
35
|
}
|
|
@@ -59,12 +59,8 @@ function filterItems(list, includes, excludes, targets, defaultIncludes, default
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (defaultExcludes) {
|
|
66
|
-
defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));
|
|
67
|
-
}
|
|
62
|
+
defaultIncludes == null ? void 0 : defaultIncludes.forEach(item => !excludes.has(item) && result.add(item));
|
|
63
|
+
defaultExcludes == null ? void 0 : defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));
|
|
68
64
|
return result;
|
|
69
65
|
}
|
|
70
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_semverV","require","_plugins","_utils","targetsSupported","target","support","targetEnvironments","Object","keys","length","unsupportedEnvironments","filter","environment","lowestImplementedVersion","getLowestImplementedVersion","lowestTargetedVersion","isUnreleasedVersion","semver","valid","toString","Error","gt","semverify","isRequired","name","targets","compatData","pluginsCompatData","includes","excludes","has","filterItems","list","defaultIncludes","defaultExcludes","pluginSyntaxMap","result","Set","options","item","add","shippedProposalsSyntax","get","forEach","delete"],"sources":["../src/filter-items.ts"],"sourcesContent":["// TODO(Babel 8): Use \"semver\" directly\nimport semver from \"@nicolo-ribaudo/semver-v6\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\";\n\nimport type { Targets } from \"./types\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as Array<keyof Targets>;\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: { [feature: string]: Targets };\n includes?: Set<string>;\n excludes?: Set<string>;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: { [feature: string]: Targets },\n includes: Set<string>,\n excludes: Set<string>,\n targets: Targets,\n defaultIncludes: Array<string> | null,\n defaultExcludes?: Array<string> | null,\n pluginSyntaxMap?: Map<string, string | null>,\n) {\n const result = new Set<string>();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n defaultIncludes?.forEach(item => !excludes.has(item) && result.add(item));\n defaultExcludes?.forEach(item => !includes.has(item) && result.delete(item));\n\n return result;\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAMO,SAASG,gBAAgBA,CAACC,MAAe,EAAEC,OAAgB,EAAE;EAClE,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,IAAI,CAACJ,MAAM,CAAyB;EAEtE,IAAIE,kBAAkB,CAACG,MAAM,KAAK,CAAC,EAAE;IACnC,OAAO,KAAK;EACd;EAEA,MAAMC,uBAAuB,GAAGJ,kBAAkB,CAACK,MAAM,CAACC,WAAW,IAAI;IACvE,MAAMC,wBAAwB,GAAG,IAAAC,kCAA2B,EAC1DT,OAAO,EACPO,WACF,CAAC;IAGD,IAAI,CAACC,wBAAwB,EAAE;MAC7B,OAAO,IAAI;IACb;IAEA,MAAME,qBAAqB,GAAGX,MAAM,CAACQ,WAAW,CAAC;IAGjD,IAAI,IAAAI,0BAAmB,EAACD,qBAAqB,EAAEH,WAAW,CAAC,EAAE;MAC3D,OAAO,KAAK;IACd;IAGA,IAAI,IAAAI,0BAAmB,EAACH,wBAAwB,EAAED,WAAW,CAAC,EAAE;MAC9D,OAAO,IAAI;IACb;IAEA,IAAI,CAACK,QAAM,CAACC,KAAK,CAACH,qBAAqB,CAACI,QAAQ,CAAC,CAAC,CAAC,EAAE;MACnD,MAAM,IAAIC,KAAK,CACZ,sCAAqCR,WAAY,OAAMG,qBAAsB,KAAI,GAChF,uDACJ,CAAC;IACH;IAEA,OAAOE,QAAM,CAACI,EAAE,CACd,IAAAC,gBAAS,EAACT,wBAAwB,CAAC,EACnCE,qBAAqB,CAACI,QAAQ,CAAC,CACjC,CAAC;EACH,CAAC,CAAC;EAEF,OAAOT,uBAAuB,CAACD,MAAM,KAAK,CAAC;AAC7C;AAEO,SAASc,UAAUA,CACxBC,IAAY,EACZC,OAAgB,EAChB;EACE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AACL,IAAI,CAAC,CAAC;EAE5E,OAAOH,MAAM;AACf"}
|
|
@@ -187,10 +187,14 @@ function getTargets(inputTargets = {}, options = {}) {
|
|
|
187
187
|
const queryBrowsers = resolveTargetsCached(browsers, options.browserslistEnv);
|
|
188
188
|
if (esmodules === "intersect") {
|
|
189
189
|
for (const browser of Object.keys(queryBrowsers)) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
if (browser !== "deno" && browser !== "ie") {
|
|
191
|
+
const esmSupportVersion = ESM_SUPPORT[browser === "opera_mobile" ? "op_mob" : browser];
|
|
192
|
+
if (esmSupportVersion) {
|
|
193
|
+
const version = queryBrowsers[browser];
|
|
194
|
+
queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version, (0, _utils.semverify)(esmSupportVersion), browser);
|
|
195
|
+
} else {
|
|
196
|
+
delete queryBrowsers[browser];
|
|
197
|
+
}
|
|
194
198
|
} else {
|
|
195
199
|
delete queryBrowsers[browser];
|
|
196
200
|
}
|