rollup 4.17.2 → 4.18.1
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/LICENSE.md +1 -1
- package/dist/bin/rollup +2 -2
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +277 -312
- package/dist/es/shared/parseAst.js +481 -790
- package/dist/es/shared/watch.js +65 -52
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +65 -52
- package/dist/shared/loadConfigFile.js +9 -3
- package/dist/shared/parseAst.js +482 -791
- package/dist/shared/rollup.js +280 -315
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +58 -53
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.18.1
|
|
4
|
+
Mon, 08 Jul 2024 15:24:39 GMT - commit 21f9a4949358b60801c948cd4777d7a39d9e6de0
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
import { normalize, getImportPath, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, Program as Program$1, BLANK, logIllegalImportReassignment, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logParseError, logModuleParseError, error, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined,
|
|
10
|
+
import { normalize, getImportPath, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, Program as Program$1, BLANK, logIllegalImportReassignment, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, EMPTY_SET, logCannotCallNamespace, logEval, StaticBlock as StaticBlock$1, BlockStatement as BlockStatement$1, getRollupError, logParseError, logModuleParseError, error, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, EMPTY_OBJECT, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logCircularReexport, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logMissingNodeBuiltins, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logCannotAssignModuleToChunk, logAnonymousPluginCache, logDuplicatePluginName, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logFileNameConflict, logAssetNotFinalisedForFileName, logChunkNotGeneratedForFileName, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidFunctionPluginHook, logInvalidAddonPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
|
|
11
11
|
import { relative, dirname, basename, extname, resolve as resolve$1 } from 'node:path';
|
|
12
|
-
import require$$0
|
|
12
|
+
import require$$0, { win32, posix, isAbsolute, resolve } from 'path';
|
|
13
13
|
import { parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } from '../../native.js';
|
|
14
14
|
import process$1, { env as env$1 } from 'node:process';
|
|
15
15
|
import { performance } from 'node:perf_hooks';
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.
|
|
19
|
+
var version = "4.18.1";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2261,7 +2261,7 @@ function getAugmentedNamespace(n) {
|
|
|
2261
2261
|
|
|
2262
2262
|
var utils$3 = {};
|
|
2263
2263
|
|
|
2264
|
-
const path$1 = require$$0
|
|
2264
|
+
const path$1 = require$$0;
|
|
2265
2265
|
const WIN_SLASH = '\\\\/';
|
|
2266
2266
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
2267
2267
|
|
|
@@ -2441,7 +2441,7 @@ var constants$2 = {
|
|
|
2441
2441
|
|
|
2442
2442
|
(function (exports) {
|
|
2443
2443
|
|
|
2444
|
-
const path = require$$0
|
|
2444
|
+
const path = require$$0;
|
|
2445
2445
|
const win32 = process.platform === 'win32';
|
|
2446
2446
|
const {
|
|
2447
2447
|
REGEX_BACKSLASH,
|
|
@@ -3978,7 +3978,7 @@ parse$1.fastpaths = (input, options) => {
|
|
|
3978
3978
|
|
|
3979
3979
|
var parse_1 = parse$1;
|
|
3980
3980
|
|
|
3981
|
-
const path = require$$0
|
|
3981
|
+
const path = require$$0;
|
|
3982
3982
|
const scan = scan_1;
|
|
3983
3983
|
const parse = parse_1;
|
|
3984
3984
|
const utils = utils$3;
|
|
@@ -5200,10 +5200,10 @@ class ObjectEntity extends ExpressionEntity {
|
|
|
5200
5200
|
}
|
|
5201
5201
|
const key = path[0];
|
|
5202
5202
|
if (path.length === 1) {
|
|
5203
|
-
if (
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5203
|
+
if (key === UnknownInteger) {
|
|
5204
|
+
return this.deoptimizeIntegerProperties();
|
|
5205
|
+
}
|
|
5206
|
+
else if (typeof key !== 'string') {
|
|
5207
5207
|
return this.deoptimizeAllProperties(key === UnknownNonAccessorKey);
|
|
5208
5208
|
}
|
|
5209
5209
|
if (!this.deoptimizedPaths[key]) {
|
|
@@ -9365,6 +9365,38 @@ class MethodDefinition extends MethodBase {
|
|
|
9365
9365
|
applyDeoptimizations() { }
|
|
9366
9366
|
}
|
|
9367
9367
|
|
|
9368
|
+
class StaticBlock extends NodeBase {
|
|
9369
|
+
createScope(parentScope) {
|
|
9370
|
+
this.scope = new BlockScope(parentScope);
|
|
9371
|
+
}
|
|
9372
|
+
hasEffects(context) {
|
|
9373
|
+
for (const node of this.body) {
|
|
9374
|
+
if (node.hasEffects(context))
|
|
9375
|
+
return true;
|
|
9376
|
+
}
|
|
9377
|
+
return false;
|
|
9378
|
+
}
|
|
9379
|
+
include(context, includeChildrenRecursively) {
|
|
9380
|
+
this.included = true;
|
|
9381
|
+
for (const node of this.body) {
|
|
9382
|
+
if (includeChildrenRecursively || node.shouldBeIncluded(context))
|
|
9383
|
+
node.include(context, includeChildrenRecursively);
|
|
9384
|
+
}
|
|
9385
|
+
}
|
|
9386
|
+
render(code, options) {
|
|
9387
|
+
if (this.body.length > 0) {
|
|
9388
|
+
const bodyStartPos = findFirstOccurrenceOutsideComment(code.original.slice(this.start, this.end), '{') + 1;
|
|
9389
|
+
renderStatementList(this.body, code, this.start + bodyStartPos, this.end - 1, options);
|
|
9390
|
+
}
|
|
9391
|
+
else {
|
|
9392
|
+
super.render(code, options);
|
|
9393
|
+
}
|
|
9394
|
+
}
|
|
9395
|
+
}
|
|
9396
|
+
function isStaticBlock(statement) {
|
|
9397
|
+
return statement.type === StaticBlock$1;
|
|
9398
|
+
}
|
|
9399
|
+
|
|
9368
9400
|
class ObjectMember extends ExpressionEntity {
|
|
9369
9401
|
constructor(object, key) {
|
|
9370
9402
|
super();
|
|
@@ -9452,8 +9484,9 @@ class ClassNode extends NodeBase {
|
|
|
9452
9484
|
applyDeoptimizations() {
|
|
9453
9485
|
this.deoptimized = true;
|
|
9454
9486
|
for (const definition of this.body.body) {
|
|
9455
|
-
if (!(definition
|
|
9456
|
-
(definition
|
|
9487
|
+
if (!isStaticBlock(definition) &&
|
|
9488
|
+
!(definition.static ||
|
|
9489
|
+
(definition instanceof MethodDefinition && definition.kind === 'constructor'))) {
|
|
9457
9490
|
// Calls to methods are not tracked, ensure that the return value is deoptimized
|
|
9458
9491
|
definition.deoptimizePath(UNKNOWN_PATH);
|
|
9459
9492
|
}
|
|
@@ -9467,6 +9500,8 @@ class ClassNode extends NodeBase {
|
|
|
9467
9500
|
const staticProperties = [];
|
|
9468
9501
|
const dynamicMethods = [];
|
|
9469
9502
|
for (const definition of this.body.body) {
|
|
9503
|
+
if (isStaticBlock(definition))
|
|
9504
|
+
continue;
|
|
9470
9505
|
const properties = definition.static ? staticProperties : dynamicMethods;
|
|
9471
9506
|
const definitionKind = definition.kind;
|
|
9472
9507
|
// Note that class fields do not end up on the prototype
|
|
@@ -11579,35 +11614,6 @@ class SequenceExpression extends NodeBase {
|
|
|
11579
11614
|
}
|
|
11580
11615
|
}
|
|
11581
11616
|
|
|
11582
|
-
class StaticBlock extends NodeBase {
|
|
11583
|
-
createScope(parentScope) {
|
|
11584
|
-
this.scope = new BlockScope(parentScope);
|
|
11585
|
-
}
|
|
11586
|
-
hasEffects(context) {
|
|
11587
|
-
for (const node of this.body) {
|
|
11588
|
-
if (node.hasEffects(context))
|
|
11589
|
-
return true;
|
|
11590
|
-
}
|
|
11591
|
-
return false;
|
|
11592
|
-
}
|
|
11593
|
-
include(context, includeChildrenRecursively) {
|
|
11594
|
-
this.included = true;
|
|
11595
|
-
for (const node of this.body) {
|
|
11596
|
-
if (includeChildrenRecursively || node.shouldBeIncluded(context))
|
|
11597
|
-
node.include(context, includeChildrenRecursively);
|
|
11598
|
-
}
|
|
11599
|
-
}
|
|
11600
|
-
render(code, options) {
|
|
11601
|
-
if (this.body.length > 0) {
|
|
11602
|
-
const bodyStartPos = findFirstOccurrenceOutsideComment(code.original.slice(this.start, this.end), '{') + 1;
|
|
11603
|
-
renderStatementList(this.body, code, this.start + bodyStartPos, this.end - 1, options);
|
|
11604
|
-
}
|
|
11605
|
-
else {
|
|
11606
|
-
super.render(code, options);
|
|
11607
|
-
}
|
|
11608
|
-
}
|
|
11609
|
-
}
|
|
11610
|
-
|
|
11611
11617
|
class Super extends NodeBase {
|
|
11612
11618
|
bind() {
|
|
11613
11619
|
this.variable = this.scope.findVariable('this');
|
|
@@ -12396,7 +12402,7 @@ class YieldExpression extends NodeBase {
|
|
|
12396
12402
|
// This file is generated by scripts/generate-buffer-parsers.js.
|
|
12397
12403
|
// Do not edit this file directly.
|
|
12398
12404
|
function convertProgram(buffer, parent, parentScope) {
|
|
12399
|
-
return convertNode(parent, parentScope, 0,
|
|
12405
|
+
return convertNode(parent, parentScope, 0, getAstBuffer(buffer));
|
|
12400
12406
|
}
|
|
12401
12407
|
const nodeTypeStrings = [
|
|
12402
12408
|
'PanicError',
|
|
@@ -12561,21 +12567,21 @@ const nodeConstructors$1 = [
|
|
|
12561
12567
|
YieldExpression
|
|
12562
12568
|
];
|
|
12563
12569
|
const bufferParsers = [
|
|
12564
|
-
function panicError(node, position, buffer
|
|
12565
|
-
node.message = convertString(buffer[position]
|
|
12570
|
+
function panicError(node, position, buffer) {
|
|
12571
|
+
node.message = buffer.convertString(buffer[position]);
|
|
12566
12572
|
},
|
|
12567
|
-
function parseError(node, position, buffer
|
|
12568
|
-
node.message = convertString(buffer[position]
|
|
12573
|
+
function parseError(node, position, buffer) {
|
|
12574
|
+
node.message = buffer.convertString(buffer[position]);
|
|
12569
12575
|
},
|
|
12570
|
-
function arrayExpression(node, position, buffer
|
|
12576
|
+
function arrayExpression(node, position, buffer) {
|
|
12571
12577
|
const { scope } = node;
|
|
12572
|
-
node.elements = convertNodeList(node, scope, buffer[position], buffer
|
|
12578
|
+
node.elements = convertNodeList(node, scope, buffer[position], buffer);
|
|
12573
12579
|
},
|
|
12574
|
-
function arrayPattern(node, position, buffer
|
|
12580
|
+
function arrayPattern(node, position, buffer) {
|
|
12575
12581
|
const { scope } = node;
|
|
12576
|
-
node.elements = convertNodeList(node, scope, buffer[position], buffer
|
|
12582
|
+
node.elements = convertNodeList(node, scope, buffer[position], buffer);
|
|
12577
12583
|
},
|
|
12578
|
-
function arrowFunctionExpression(node, position, buffer
|
|
12584
|
+
function arrowFunctionExpression(node, position, buffer) {
|
|
12579
12585
|
const { scope } = node;
|
|
12580
12586
|
const flags = buffer[position];
|
|
12581
12587
|
node.async = (flags & 1) === 1;
|
|
@@ -12583,64 +12589,61 @@ const bufferParsers = [
|
|
|
12583
12589
|
node.generator = (flags & 4) === 4;
|
|
12584
12590
|
const annotations = (node.annotations = convertAnnotations(buffer[position + 1], buffer));
|
|
12585
12591
|
node.annotationNoSideEffects = annotations.some(comment => comment.type === 'noSideEffects');
|
|
12586
|
-
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 2], buffer
|
|
12592
|
+
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 2], buffer));
|
|
12587
12593
|
scope.addParameterVariables(parameters.map(parameter => parameter.declare('parameter', UNKNOWN_EXPRESSION)), parameters[parameters.length - 1] instanceof RestElement);
|
|
12588
|
-
node.body = convertNode(node, scope.bodyScope, buffer[position + 3], buffer
|
|
12594
|
+
node.body = convertNode(node, scope.bodyScope, buffer[position + 3], buffer);
|
|
12589
12595
|
},
|
|
12590
|
-
function assignmentExpression(node, position, buffer
|
|
12596
|
+
function assignmentExpression(node, position, buffer) {
|
|
12591
12597
|
const { scope } = node;
|
|
12592
12598
|
node.operator = FIXED_STRINGS[buffer[position]];
|
|
12593
|
-
node.left = convertNode(node, scope, buffer[position + 1], buffer
|
|
12594
|
-
node.right = convertNode(node, scope, buffer[position + 2], buffer
|
|
12599
|
+
node.left = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12600
|
+
node.right = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12595
12601
|
},
|
|
12596
|
-
function assignmentPattern(node, position, buffer
|
|
12602
|
+
function assignmentPattern(node, position, buffer) {
|
|
12597
12603
|
const { scope } = node;
|
|
12598
|
-
node.left = convertNode(node, scope, buffer[position], buffer
|
|
12599
|
-
node.right = convertNode(node, scope, buffer[position + 1], buffer
|
|
12604
|
+
node.left = convertNode(node, scope, buffer[position], buffer);
|
|
12605
|
+
node.right = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12600
12606
|
},
|
|
12601
|
-
function awaitExpression(node, position, buffer
|
|
12607
|
+
function awaitExpression(node, position, buffer) {
|
|
12602
12608
|
const { scope } = node;
|
|
12603
|
-
node.argument = convertNode(node, scope, buffer[position], buffer
|
|
12609
|
+
node.argument = convertNode(node, scope, buffer[position], buffer);
|
|
12604
12610
|
},
|
|
12605
|
-
function binaryExpression(node, position, buffer
|
|
12611
|
+
function binaryExpression(node, position, buffer) {
|
|
12606
12612
|
const { scope } = node;
|
|
12607
12613
|
node.operator = FIXED_STRINGS[buffer[position]];
|
|
12608
|
-
node.left = convertNode(node, scope, buffer[position + 1], buffer
|
|
12609
|
-
node.right = convertNode(node, scope, buffer[position + 2], buffer
|
|
12614
|
+
node.left = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12615
|
+
node.right = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12610
12616
|
},
|
|
12611
|
-
function blockStatement(node, position, buffer
|
|
12617
|
+
function blockStatement(node, position, buffer) {
|
|
12612
12618
|
const { scope } = node;
|
|
12613
|
-
node.body = convertNodeList(node, scope, buffer[position], buffer
|
|
12619
|
+
node.body = convertNodeList(node, scope, buffer[position], buffer);
|
|
12614
12620
|
},
|
|
12615
|
-
function breakStatement(node, position, buffer
|
|
12621
|
+
function breakStatement(node, position, buffer) {
|
|
12616
12622
|
const { scope } = node;
|
|
12617
12623
|
const labelPosition = buffer[position];
|
|
12618
|
-
node.label =
|
|
12619
|
-
labelPosition === 0 ? null : convertNode(node, scope, labelPosition, buffer, readString);
|
|
12624
|
+
node.label = labelPosition === 0 ? null : convertNode(node, scope, labelPosition, buffer);
|
|
12620
12625
|
},
|
|
12621
|
-
function callExpression(node, position, buffer
|
|
12626
|
+
function callExpression(node, position, buffer) {
|
|
12622
12627
|
const { scope } = node;
|
|
12623
12628
|
const flags = buffer[position];
|
|
12624
12629
|
node.optional = (flags & 1) === 1;
|
|
12625
12630
|
node.annotations = convertAnnotations(buffer[position + 1], buffer);
|
|
12626
|
-
node.callee = convertNode(node, scope, buffer[position + 2], buffer
|
|
12627
|
-
node.arguments = convertNodeList(node, scope, buffer[position + 3], buffer
|
|
12631
|
+
node.callee = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12632
|
+
node.arguments = convertNodeList(node, scope, buffer[position + 3], buffer);
|
|
12628
12633
|
},
|
|
12629
|
-
function catchClause(node, position, buffer
|
|
12634
|
+
function catchClause(node, position, buffer) {
|
|
12630
12635
|
const { scope } = node;
|
|
12631
12636
|
const parameterPosition = buffer[position];
|
|
12632
12637
|
const parameter = (node.param =
|
|
12633
|
-
parameterPosition === 0
|
|
12634
|
-
? null
|
|
12635
|
-
: convertNode(node, scope, parameterPosition, buffer, readString));
|
|
12638
|
+
parameterPosition === 0 ? null : convertNode(node, scope, parameterPosition, buffer));
|
|
12636
12639
|
parameter?.declare('parameter', UNKNOWN_EXPRESSION);
|
|
12637
|
-
node.body = convertNode(node, scope.bodyScope, buffer[position + 1], buffer
|
|
12640
|
+
node.body = convertNode(node, scope.bodyScope, buffer[position + 1], buffer);
|
|
12638
12641
|
},
|
|
12639
|
-
function chainExpression(node, position, buffer
|
|
12642
|
+
function chainExpression(node, position, buffer) {
|
|
12640
12643
|
const { scope } = node;
|
|
12641
|
-
node.expression = convertNode(node, scope, buffer[position], buffer
|
|
12644
|
+
node.expression = convertNode(node, scope, buffer[position], buffer);
|
|
12642
12645
|
},
|
|
12643
|
-
function classBody(node, position, buffer
|
|
12646
|
+
function classBody(node, position, buffer) {
|
|
12644
12647
|
const { scope } = node;
|
|
12645
12648
|
const bodyPosition = buffer[position];
|
|
12646
12649
|
const body = (node.body = []);
|
|
@@ -12648,127 +12651,110 @@ const bufferParsers = [
|
|
|
12648
12651
|
const length = buffer[bodyPosition];
|
|
12649
12652
|
for (let index = 0; index < length; index++) {
|
|
12650
12653
|
const nodePosition = buffer[bodyPosition + 1 + index];
|
|
12651
|
-
body.push(convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer
|
|
12654
|
+
body.push(convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer));
|
|
12652
12655
|
}
|
|
12653
12656
|
}
|
|
12654
12657
|
},
|
|
12655
|
-
function classDeclaration(node, position, buffer
|
|
12658
|
+
function classDeclaration(node, position, buffer) {
|
|
12656
12659
|
const { scope } = node;
|
|
12657
12660
|
const idPosition = buffer[position];
|
|
12658
12661
|
node.id =
|
|
12659
|
-
idPosition === 0
|
|
12660
|
-
? null
|
|
12661
|
-
: convertNode(node, scope.parent, idPosition, buffer, readString);
|
|
12662
|
+
idPosition === 0 ? null : convertNode(node, scope.parent, idPosition, buffer);
|
|
12662
12663
|
const superClassPosition = buffer[position + 1];
|
|
12663
12664
|
node.superClass =
|
|
12664
|
-
superClassPosition === 0
|
|
12665
|
-
|
|
12666
|
-
: convertNode(node, scope, superClassPosition, buffer, readString);
|
|
12667
|
-
node.body = convertNode(node, scope, buffer[position + 2], buffer, readString);
|
|
12665
|
+
superClassPosition === 0 ? null : convertNode(node, scope, superClassPosition, buffer);
|
|
12666
|
+
node.body = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12668
12667
|
},
|
|
12669
|
-
function classExpression(node, position, buffer
|
|
12668
|
+
function classExpression(node, position, buffer) {
|
|
12670
12669
|
const { scope } = node;
|
|
12671
12670
|
const idPosition = buffer[position];
|
|
12672
|
-
node.id = idPosition === 0 ? null : convertNode(node, scope, idPosition, buffer
|
|
12671
|
+
node.id = idPosition === 0 ? null : convertNode(node, scope, idPosition, buffer);
|
|
12673
12672
|
const superClassPosition = buffer[position + 1];
|
|
12674
12673
|
node.superClass =
|
|
12675
|
-
superClassPosition === 0
|
|
12676
|
-
|
|
12677
|
-
: convertNode(node, scope, superClassPosition, buffer, readString);
|
|
12678
|
-
node.body = convertNode(node, scope, buffer[position + 2], buffer, readString);
|
|
12674
|
+
superClassPosition === 0 ? null : convertNode(node, scope, superClassPosition, buffer);
|
|
12675
|
+
node.body = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12679
12676
|
},
|
|
12680
|
-
function conditionalExpression(node, position, buffer
|
|
12677
|
+
function conditionalExpression(node, position, buffer) {
|
|
12681
12678
|
const { scope } = node;
|
|
12682
|
-
node.test = convertNode(node, scope, buffer[position], buffer
|
|
12683
|
-
node.consequent = convertNode(node, scope, buffer[position + 1], buffer
|
|
12684
|
-
node.alternate = convertNode(node, scope, buffer[position + 2], buffer
|
|
12679
|
+
node.test = convertNode(node, scope, buffer[position], buffer);
|
|
12680
|
+
node.consequent = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12681
|
+
node.alternate = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12685
12682
|
},
|
|
12686
|
-
function continueStatement(node, position, buffer
|
|
12683
|
+
function continueStatement(node, position, buffer) {
|
|
12687
12684
|
const { scope } = node;
|
|
12688
12685
|
const labelPosition = buffer[position];
|
|
12689
|
-
node.label =
|
|
12690
|
-
labelPosition === 0 ? null : convertNode(node, scope, labelPosition, buffer, readString);
|
|
12686
|
+
node.label = labelPosition === 0 ? null : convertNode(node, scope, labelPosition, buffer);
|
|
12691
12687
|
},
|
|
12692
12688
|
function debuggerStatement() { },
|
|
12693
|
-
function directive(node, position, buffer
|
|
12689
|
+
function directive(node, position, buffer) {
|
|
12694
12690
|
const { scope } = node;
|
|
12695
|
-
node.directive = convertString(buffer[position]
|
|
12696
|
-
node.expression = convertNode(node, scope, buffer[position + 1], buffer
|
|
12691
|
+
node.directive = buffer.convertString(buffer[position]);
|
|
12692
|
+
node.expression = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12697
12693
|
},
|
|
12698
|
-
function doWhileStatement(node, position, buffer
|
|
12694
|
+
function doWhileStatement(node, position, buffer) {
|
|
12699
12695
|
const { scope } = node;
|
|
12700
|
-
node.body = convertNode(node, scope, buffer[position], buffer
|
|
12701
|
-
node.test = convertNode(node, scope, buffer[position + 1], buffer
|
|
12696
|
+
node.body = convertNode(node, scope, buffer[position], buffer);
|
|
12697
|
+
node.test = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12702
12698
|
},
|
|
12703
12699
|
function emptyStatement() { },
|
|
12704
|
-
function exportAllDeclaration(node, position, buffer
|
|
12700
|
+
function exportAllDeclaration(node, position, buffer) {
|
|
12705
12701
|
const { scope } = node;
|
|
12706
12702
|
const exportedPosition = buffer[position];
|
|
12707
12703
|
node.exported =
|
|
12708
|
-
exportedPosition === 0
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
node.source = convertNode(node, scope, buffer[position + 1], buffer, readString);
|
|
12712
|
-
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer, readString);
|
|
12704
|
+
exportedPosition === 0 ? null : convertNode(node, scope, exportedPosition, buffer);
|
|
12705
|
+
node.source = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12706
|
+
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
|
|
12713
12707
|
},
|
|
12714
|
-
function exportDefaultDeclaration(node, position, buffer
|
|
12708
|
+
function exportDefaultDeclaration(node, position, buffer) {
|
|
12715
12709
|
const { scope } = node;
|
|
12716
|
-
node.declaration = convertNode(node, scope, buffer[position], buffer
|
|
12710
|
+
node.declaration = convertNode(node, scope, buffer[position], buffer);
|
|
12717
12711
|
},
|
|
12718
|
-
function exportNamedDeclaration(node, position, buffer
|
|
12712
|
+
function exportNamedDeclaration(node, position, buffer) {
|
|
12719
12713
|
const { scope } = node;
|
|
12720
|
-
node.specifiers = convertNodeList(node, scope, buffer[position], buffer
|
|
12714
|
+
node.specifiers = convertNodeList(node, scope, buffer[position], buffer);
|
|
12721
12715
|
const sourcePosition = buffer[position + 1];
|
|
12722
|
-
node.source =
|
|
12723
|
-
|
|
12724
|
-
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer, readString);
|
|
12716
|
+
node.source = sourcePosition === 0 ? null : convertNode(node, scope, sourcePosition, buffer);
|
|
12717
|
+
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
|
|
12725
12718
|
const declarationPosition = buffer[position + 3];
|
|
12726
12719
|
node.declaration =
|
|
12727
|
-
declarationPosition === 0
|
|
12728
|
-
? null
|
|
12729
|
-
: convertNode(node, scope, declarationPosition, buffer, readString);
|
|
12720
|
+
declarationPosition === 0 ? null : convertNode(node, scope, declarationPosition, buffer);
|
|
12730
12721
|
},
|
|
12731
|
-
function exportSpecifier(node, position, buffer
|
|
12722
|
+
function exportSpecifier(node, position, buffer) {
|
|
12732
12723
|
const { scope } = node;
|
|
12733
|
-
node.local = convertNode(node, scope, buffer[position], buffer
|
|
12724
|
+
node.local = convertNode(node, scope, buffer[position], buffer);
|
|
12734
12725
|
const exportedPosition = buffer[position + 1];
|
|
12735
12726
|
node.exported =
|
|
12736
|
-
exportedPosition === 0
|
|
12737
|
-
? node.local
|
|
12738
|
-
: convertNode(node, scope, exportedPosition, buffer, readString);
|
|
12727
|
+
exportedPosition === 0 ? node.local : convertNode(node, scope, exportedPosition, buffer);
|
|
12739
12728
|
},
|
|
12740
|
-
function expressionStatement(node, position, buffer
|
|
12729
|
+
function expressionStatement(node, position, buffer) {
|
|
12741
12730
|
const { scope } = node;
|
|
12742
|
-
node.expression = convertNode(node, scope, buffer[position], buffer
|
|
12731
|
+
node.expression = convertNode(node, scope, buffer[position], buffer);
|
|
12743
12732
|
},
|
|
12744
|
-
function forInStatement(node, position, buffer
|
|
12733
|
+
function forInStatement(node, position, buffer) {
|
|
12745
12734
|
const { scope } = node;
|
|
12746
|
-
node.left = convertNode(node, scope, buffer[position], buffer
|
|
12747
|
-
node.right = convertNode(node, scope, buffer[position + 1], buffer
|
|
12748
|
-
node.body = convertNode(node, scope, buffer[position + 2], buffer
|
|
12735
|
+
node.left = convertNode(node, scope, buffer[position], buffer);
|
|
12736
|
+
node.right = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12737
|
+
node.body = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12749
12738
|
},
|
|
12750
|
-
function forOfStatement(node, position, buffer
|
|
12739
|
+
function forOfStatement(node, position, buffer) {
|
|
12751
12740
|
const { scope } = node;
|
|
12752
12741
|
const flags = buffer[position];
|
|
12753
12742
|
node.await = (flags & 1) === 1;
|
|
12754
|
-
node.left = convertNode(node, scope, buffer[position + 1], buffer
|
|
12755
|
-
node.right = convertNode(node, scope, buffer[position + 2], buffer
|
|
12756
|
-
node.body = convertNode(node, scope, buffer[position + 3], buffer
|
|
12743
|
+
node.left = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12744
|
+
node.right = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12745
|
+
node.body = convertNode(node, scope, buffer[position + 3], buffer);
|
|
12757
12746
|
},
|
|
12758
|
-
function forStatement(node, position, buffer
|
|
12747
|
+
function forStatement(node, position, buffer) {
|
|
12759
12748
|
const { scope } = node;
|
|
12760
12749
|
const initPosition = buffer[position];
|
|
12761
|
-
node.init =
|
|
12762
|
-
initPosition === 0 ? null : convertNode(node, scope, initPosition, buffer, readString);
|
|
12750
|
+
node.init = initPosition === 0 ? null : convertNode(node, scope, initPosition, buffer);
|
|
12763
12751
|
const testPosition = buffer[position + 1];
|
|
12764
|
-
node.test =
|
|
12765
|
-
testPosition === 0 ? null : convertNode(node, scope, testPosition, buffer, readString);
|
|
12752
|
+
node.test = testPosition === 0 ? null : convertNode(node, scope, testPosition, buffer);
|
|
12766
12753
|
const updatePosition = buffer[position + 2];
|
|
12767
|
-
node.update =
|
|
12768
|
-
|
|
12769
|
-
node.body = convertNode(node, scope, buffer[position + 3], buffer, readString);
|
|
12754
|
+
node.update = updatePosition === 0 ? null : convertNode(node, scope, updatePosition, buffer);
|
|
12755
|
+
node.body = convertNode(node, scope, buffer[position + 3], buffer);
|
|
12770
12756
|
},
|
|
12771
|
-
function functionDeclaration(node, position, buffer
|
|
12757
|
+
function functionDeclaration(node, position, buffer) {
|
|
12772
12758
|
const { scope } = node;
|
|
12773
12759
|
const flags = buffer[position];
|
|
12774
12760
|
node.async = (flags & 1) === 1;
|
|
@@ -12777,14 +12763,12 @@ const bufferParsers = [
|
|
|
12777
12763
|
node.annotationNoSideEffects = annotations.some(comment => comment.type === 'noSideEffects');
|
|
12778
12764
|
const idPosition = buffer[position + 2];
|
|
12779
12765
|
node.id =
|
|
12780
|
-
idPosition === 0
|
|
12781
|
-
|
|
12782
|
-
: convertNode(node, scope.parent, idPosition, buffer, readString);
|
|
12783
|
-
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 3], buffer, readString));
|
|
12766
|
+
idPosition === 0 ? null : convertNode(node, scope.parent, idPosition, buffer);
|
|
12767
|
+
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 3], buffer));
|
|
12784
12768
|
scope.addParameterVariables(parameters.map(parameter => parameter.declare('parameter', UNKNOWN_EXPRESSION)), parameters[parameters.length - 1] instanceof RestElement);
|
|
12785
|
-
node.body = convertNode(node, scope.bodyScope, buffer[position + 4], buffer
|
|
12769
|
+
node.body = convertNode(node, scope.bodyScope, buffer[position + 4], buffer);
|
|
12786
12770
|
},
|
|
12787
|
-
function functionExpression(node, position, buffer
|
|
12771
|
+
function functionExpression(node, position, buffer) {
|
|
12788
12772
|
const { scope } = node;
|
|
12789
12773
|
const flags = buffer[position];
|
|
12790
12774
|
node.async = (flags & 1) === 1;
|
|
@@ -12792,69 +12776,65 @@ const bufferParsers = [
|
|
|
12792
12776
|
const annotations = (node.annotations = convertAnnotations(buffer[position + 1], buffer));
|
|
12793
12777
|
node.annotationNoSideEffects = annotations.some(comment => comment.type === 'noSideEffects');
|
|
12794
12778
|
const idPosition = buffer[position + 2];
|
|
12795
|
-
node.id =
|
|
12796
|
-
|
|
12797
|
-
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 3], buffer, readString));
|
|
12779
|
+
node.id = idPosition === 0 ? null : convertNode(node, node.idScope, idPosition, buffer);
|
|
12780
|
+
const parameters = (node.params = convertNodeList(node, scope, buffer[position + 3], buffer));
|
|
12798
12781
|
scope.addParameterVariables(parameters.map(parameter => parameter.declare('parameter', UNKNOWN_EXPRESSION)), parameters[parameters.length - 1] instanceof RestElement);
|
|
12799
|
-
node.body = convertNode(node, scope.bodyScope, buffer[position + 4], buffer
|
|
12782
|
+
node.body = convertNode(node, scope.bodyScope, buffer[position + 4], buffer);
|
|
12800
12783
|
},
|
|
12801
|
-
function identifier(node, position, buffer
|
|
12802
|
-
node.name = convertString(buffer[position]
|
|
12784
|
+
function identifier(node, position, buffer) {
|
|
12785
|
+
node.name = buffer.convertString(buffer[position]);
|
|
12803
12786
|
},
|
|
12804
|
-
function ifStatement(node, position, buffer
|
|
12787
|
+
function ifStatement(node, position, buffer) {
|
|
12805
12788
|
const { scope } = node;
|
|
12806
|
-
node.test = convertNode(node, scope, buffer[position], buffer
|
|
12807
|
-
node.consequent = convertNode(node, (node.consequentScope = new TrackingScope(scope)), buffer[position + 1], buffer
|
|
12789
|
+
node.test = convertNode(node, scope, buffer[position], buffer);
|
|
12790
|
+
node.consequent = convertNode(node, (node.consequentScope = new TrackingScope(scope)), buffer[position + 1], buffer);
|
|
12808
12791
|
const alternatePosition = buffer[position + 2];
|
|
12809
12792
|
node.alternate =
|
|
12810
12793
|
alternatePosition === 0
|
|
12811
12794
|
? null
|
|
12812
|
-
: convertNode(node, (node.alternateScope = new TrackingScope(scope)), alternatePosition, buffer
|
|
12795
|
+
: convertNode(node, (node.alternateScope = new TrackingScope(scope)), alternatePosition, buffer);
|
|
12813
12796
|
},
|
|
12814
|
-
function importAttribute(node, position, buffer
|
|
12797
|
+
function importAttribute(node, position, buffer) {
|
|
12815
12798
|
const { scope } = node;
|
|
12816
|
-
node.key = convertNode(node, scope, buffer[position], buffer
|
|
12817
|
-
node.value = convertNode(node, scope, buffer[position + 1], buffer
|
|
12799
|
+
node.key = convertNode(node, scope, buffer[position], buffer);
|
|
12800
|
+
node.value = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12818
12801
|
},
|
|
12819
|
-
function importDeclaration(node, position, buffer
|
|
12802
|
+
function importDeclaration(node, position, buffer) {
|
|
12820
12803
|
const { scope } = node;
|
|
12821
|
-
node.specifiers = convertNodeList(node, scope, buffer[position], buffer
|
|
12822
|
-
node.source = convertNode(node, scope, buffer[position + 1], buffer
|
|
12823
|
-
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer
|
|
12804
|
+
node.specifiers = convertNodeList(node, scope, buffer[position], buffer);
|
|
12805
|
+
node.source = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12806
|
+
node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
|
|
12824
12807
|
},
|
|
12825
|
-
function importDefaultSpecifier(node, position, buffer
|
|
12808
|
+
function importDefaultSpecifier(node, position, buffer) {
|
|
12826
12809
|
const { scope } = node;
|
|
12827
|
-
node.local = convertNode(node, scope, buffer[position], buffer
|
|
12810
|
+
node.local = convertNode(node, scope, buffer[position], buffer);
|
|
12828
12811
|
},
|
|
12829
|
-
function importExpression(node, position, buffer
|
|
12812
|
+
function importExpression(node, position, buffer) {
|
|
12830
12813
|
const { scope } = node;
|
|
12831
|
-
node.source = convertNode(node, scope, buffer[position], buffer
|
|
12832
|
-
node.sourceAstNode = convertNode$1(buffer[position], buffer
|
|
12814
|
+
node.source = convertNode(node, scope, buffer[position], buffer);
|
|
12815
|
+
node.sourceAstNode = convertNode$1(buffer[position], buffer);
|
|
12833
12816
|
const optionsPosition = buffer[position + 1];
|
|
12834
|
-
node.options =
|
|
12835
|
-
optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer, readString);
|
|
12817
|
+
node.options = optionsPosition === 0 ? null : convertNode(node, scope, optionsPosition, buffer);
|
|
12836
12818
|
},
|
|
12837
|
-
function importNamespaceSpecifier(node, position, buffer
|
|
12819
|
+
function importNamespaceSpecifier(node, position, buffer) {
|
|
12838
12820
|
const { scope } = node;
|
|
12839
|
-
node.local = convertNode(node, scope, buffer[position], buffer
|
|
12821
|
+
node.local = convertNode(node, scope, buffer[position], buffer);
|
|
12840
12822
|
},
|
|
12841
|
-
function importSpecifier(node, position, buffer
|
|
12823
|
+
function importSpecifier(node, position, buffer) {
|
|
12842
12824
|
const { scope } = node;
|
|
12843
12825
|
const importedPosition = buffer[position];
|
|
12844
|
-
node.local = convertNode(node, scope, buffer[position + 1], buffer
|
|
12826
|
+
node.local = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12845
12827
|
node.imported =
|
|
12846
|
-
importedPosition === 0
|
|
12847
|
-
? node.local
|
|
12848
|
-
: convertNode(node, scope, importedPosition, buffer, readString);
|
|
12828
|
+
importedPosition === 0 ? node.local : convertNode(node, scope, importedPosition, buffer);
|
|
12849
12829
|
},
|
|
12850
|
-
function labeledStatement(node, position, buffer
|
|
12830
|
+
function labeledStatement(node, position, buffer) {
|
|
12851
12831
|
const { scope } = node;
|
|
12852
|
-
node.label = convertNode(node, scope, buffer[position], buffer
|
|
12853
|
-
node.body = convertNode(node, scope, buffer[position + 1], buffer
|
|
12832
|
+
node.label = convertNode(node, scope, buffer[position], buffer);
|
|
12833
|
+
node.body = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12854
12834
|
},
|
|
12855
|
-
function literalBigInt(node, position, buffer
|
|
12856
|
-
const bigint = (node.bigint = convertString(buffer[position]
|
|
12857
|
-
node.raw = convertString(buffer[position + 1]
|
|
12835
|
+
function literalBigInt(node, position, buffer) {
|
|
12836
|
+
const bigint = (node.bigint = buffer.convertString(buffer[position]));
|
|
12837
|
+
node.raw = buffer.convertString(buffer[position + 1]);
|
|
12858
12838
|
node.value = BigInt(bigint);
|
|
12859
12839
|
},
|
|
12860
12840
|
function literalBoolean(node, position, buffer) {
|
|
@@ -12865,208 +12845,197 @@ const bufferParsers = [
|
|
|
12865
12845
|
function literalNull(node) {
|
|
12866
12846
|
node.value = null;
|
|
12867
12847
|
},
|
|
12868
|
-
function literalNumber(node, position, buffer
|
|
12848
|
+
function literalNumber(node, position, buffer) {
|
|
12869
12849
|
const rawPosition = buffer[position];
|
|
12870
|
-
node.raw = rawPosition === 0 ? undefined : convertString(rawPosition
|
|
12850
|
+
node.raw = rawPosition === 0 ? undefined : buffer.convertString(rawPosition);
|
|
12871
12851
|
node.value = new DataView(buffer.buffer).getFloat64((position + 1) << 2, true);
|
|
12872
12852
|
},
|
|
12873
|
-
function literalRegExp(node, position, buffer
|
|
12874
|
-
const flags = convertString(buffer[position]
|
|
12875
|
-
const pattern = convertString(buffer[position + 1]
|
|
12853
|
+
function literalRegExp(node, position, buffer) {
|
|
12854
|
+
const flags = buffer.convertString(buffer[position]);
|
|
12855
|
+
const pattern = buffer.convertString(buffer[position + 1]);
|
|
12876
12856
|
node.raw = `/${pattern}/${flags}`;
|
|
12877
12857
|
node.regex = { flags, pattern };
|
|
12878
12858
|
node.value = new RegExp(pattern, flags);
|
|
12879
12859
|
},
|
|
12880
|
-
function literalString(node, position, buffer
|
|
12881
|
-
node.value = convertString(buffer[position]
|
|
12860
|
+
function literalString(node, position, buffer) {
|
|
12861
|
+
node.value = buffer.convertString(buffer[position]);
|
|
12882
12862
|
const rawPosition = buffer[position + 1];
|
|
12883
|
-
node.raw = rawPosition === 0 ? undefined : convertString(rawPosition
|
|
12863
|
+
node.raw = rawPosition === 0 ? undefined : buffer.convertString(rawPosition);
|
|
12884
12864
|
},
|
|
12885
|
-
function logicalExpression(node, position, buffer
|
|
12865
|
+
function logicalExpression(node, position, buffer) {
|
|
12886
12866
|
const { scope } = node;
|
|
12887
12867
|
node.operator = FIXED_STRINGS[buffer[position]];
|
|
12888
|
-
node.left = convertNode(node, scope, buffer[position + 1], buffer
|
|
12889
|
-
node.right = convertNode(node, scope, buffer[position + 2], buffer
|
|
12868
|
+
node.left = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12869
|
+
node.right = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12890
12870
|
},
|
|
12891
|
-
function memberExpression(node, position, buffer
|
|
12871
|
+
function memberExpression(node, position, buffer) {
|
|
12892
12872
|
const { scope } = node;
|
|
12893
12873
|
const flags = buffer[position];
|
|
12894
12874
|
node.computed = (flags & 1) === 1;
|
|
12895
12875
|
node.optional = (flags & 2) === 2;
|
|
12896
|
-
node.object = convertNode(node, scope, buffer[position + 1], buffer
|
|
12897
|
-
node.property = convertNode(node, scope, buffer[position + 2], buffer
|
|
12876
|
+
node.object = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12877
|
+
node.property = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12898
12878
|
},
|
|
12899
|
-
function metaProperty(node, position, buffer
|
|
12879
|
+
function metaProperty(node, position, buffer) {
|
|
12900
12880
|
const { scope } = node;
|
|
12901
|
-
node.meta = convertNode(node, scope, buffer[position], buffer
|
|
12902
|
-
node.property = convertNode(node, scope, buffer[position + 1], buffer
|
|
12881
|
+
node.meta = convertNode(node, scope, buffer[position], buffer);
|
|
12882
|
+
node.property = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12903
12883
|
},
|
|
12904
|
-
function methodDefinition(node, position, buffer
|
|
12884
|
+
function methodDefinition(node, position, buffer) {
|
|
12905
12885
|
const { scope } = node;
|
|
12906
12886
|
const flags = buffer[position];
|
|
12907
12887
|
node.static = (flags & 1) === 1;
|
|
12908
12888
|
node.computed = (flags & 2) === 2;
|
|
12909
|
-
node.key = convertNode(node, scope, buffer[position + 1], buffer
|
|
12910
|
-
node.value = convertNode(node, scope, buffer[position + 2], buffer
|
|
12889
|
+
node.key = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12890
|
+
node.value = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12911
12891
|
node.kind = FIXED_STRINGS[buffer[position + 3]];
|
|
12912
12892
|
},
|
|
12913
|
-
function newExpression(node, position, buffer
|
|
12893
|
+
function newExpression(node, position, buffer) {
|
|
12914
12894
|
const { scope } = node;
|
|
12915
12895
|
node.annotations = convertAnnotations(buffer[position], buffer);
|
|
12916
|
-
node.callee = convertNode(node, scope, buffer[position + 1], buffer
|
|
12917
|
-
node.arguments = convertNodeList(node, scope, buffer[position + 2], buffer
|
|
12896
|
+
node.callee = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12897
|
+
node.arguments = convertNodeList(node, scope, buffer[position + 2], buffer);
|
|
12918
12898
|
},
|
|
12919
|
-
function objectExpression(node, position, buffer
|
|
12899
|
+
function objectExpression(node, position, buffer) {
|
|
12920
12900
|
const { scope } = node;
|
|
12921
|
-
node.properties = convertNodeList(node, scope, buffer[position], buffer
|
|
12901
|
+
node.properties = convertNodeList(node, scope, buffer[position], buffer);
|
|
12922
12902
|
},
|
|
12923
|
-
function objectPattern(node, position, buffer
|
|
12903
|
+
function objectPattern(node, position, buffer) {
|
|
12924
12904
|
const { scope } = node;
|
|
12925
|
-
node.properties = convertNodeList(node, scope, buffer[position], buffer
|
|
12905
|
+
node.properties = convertNodeList(node, scope, buffer[position], buffer);
|
|
12926
12906
|
},
|
|
12927
|
-
function privateIdentifier(node, position, buffer
|
|
12928
|
-
node.name = convertString(buffer[position]
|
|
12907
|
+
function privateIdentifier(node, position, buffer) {
|
|
12908
|
+
node.name = buffer.convertString(buffer[position]);
|
|
12929
12909
|
},
|
|
12930
|
-
function program(node, position, buffer
|
|
12910
|
+
function program(node, position, buffer) {
|
|
12931
12911
|
const { scope } = node;
|
|
12932
|
-
node.body = convertNodeList(node, scope, buffer[position], buffer
|
|
12912
|
+
node.body = convertNodeList(node, scope, buffer[position], buffer);
|
|
12933
12913
|
node.invalidAnnotations = convertAnnotations(buffer[position + 1], buffer);
|
|
12934
12914
|
},
|
|
12935
|
-
function property(node, position, buffer
|
|
12915
|
+
function property(node, position, buffer) {
|
|
12936
12916
|
const { scope } = node;
|
|
12937
12917
|
const flags = buffer[position];
|
|
12938
12918
|
node.method = (flags & 1) === 1;
|
|
12939
12919
|
node.shorthand = (flags & 2) === 2;
|
|
12940
12920
|
node.computed = (flags & 4) === 4;
|
|
12941
12921
|
const keyPosition = buffer[position + 1];
|
|
12942
|
-
node.value = convertNode(node, scope, buffer[position + 2], buffer
|
|
12922
|
+
node.value = convertNode(node, scope, buffer[position + 2], buffer);
|
|
12943
12923
|
node.kind = FIXED_STRINGS[buffer[position + 3]];
|
|
12944
|
-
node.key =
|
|
12945
|
-
keyPosition === 0 ? node.value : convertNode(node, scope, keyPosition, buffer, readString);
|
|
12924
|
+
node.key = keyPosition === 0 ? node.value : convertNode(node, scope, keyPosition, buffer);
|
|
12946
12925
|
},
|
|
12947
|
-
function propertyDefinition(node, position, buffer
|
|
12926
|
+
function propertyDefinition(node, position, buffer) {
|
|
12948
12927
|
const { scope } = node;
|
|
12949
12928
|
const flags = buffer[position];
|
|
12950
12929
|
node.static = (flags & 1) === 1;
|
|
12951
12930
|
node.computed = (flags & 2) === 2;
|
|
12952
|
-
node.key = convertNode(node, scope, buffer[position + 1], buffer
|
|
12931
|
+
node.key = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12953
12932
|
const valuePosition = buffer[position + 2];
|
|
12954
|
-
node.value =
|
|
12955
|
-
valuePosition === 0 ? null : convertNode(node, scope, valuePosition, buffer, readString);
|
|
12933
|
+
node.value = valuePosition === 0 ? null : convertNode(node, scope, valuePosition, buffer);
|
|
12956
12934
|
},
|
|
12957
|
-
function restElement(node, position, buffer
|
|
12935
|
+
function restElement(node, position, buffer) {
|
|
12958
12936
|
const { scope } = node;
|
|
12959
|
-
node.argument = convertNode(node, scope, buffer[position], buffer
|
|
12937
|
+
node.argument = convertNode(node, scope, buffer[position], buffer);
|
|
12960
12938
|
},
|
|
12961
|
-
function returnStatement(node, position, buffer
|
|
12939
|
+
function returnStatement(node, position, buffer) {
|
|
12962
12940
|
const { scope } = node;
|
|
12963
12941
|
const argumentPosition = buffer[position];
|
|
12964
12942
|
node.argument =
|
|
12965
|
-
argumentPosition === 0
|
|
12966
|
-
? null
|
|
12967
|
-
: convertNode(node, scope, argumentPosition, buffer, readString);
|
|
12943
|
+
argumentPosition === 0 ? null : convertNode(node, scope, argumentPosition, buffer);
|
|
12968
12944
|
},
|
|
12969
|
-
function sequenceExpression(node, position, buffer
|
|
12945
|
+
function sequenceExpression(node, position, buffer) {
|
|
12970
12946
|
const { scope } = node;
|
|
12971
|
-
node.expressions = convertNodeList(node, scope, buffer[position], buffer
|
|
12947
|
+
node.expressions = convertNodeList(node, scope, buffer[position], buffer);
|
|
12972
12948
|
},
|
|
12973
|
-
function spreadElement(node, position, buffer
|
|
12949
|
+
function spreadElement(node, position, buffer) {
|
|
12974
12950
|
const { scope } = node;
|
|
12975
|
-
node.argument = convertNode(node, scope, buffer[position], buffer
|
|
12951
|
+
node.argument = convertNode(node, scope, buffer[position], buffer);
|
|
12976
12952
|
},
|
|
12977
|
-
function staticBlock(node, position, buffer
|
|
12953
|
+
function staticBlock(node, position, buffer) {
|
|
12978
12954
|
const { scope } = node;
|
|
12979
|
-
node.body = convertNodeList(node, scope, buffer[position], buffer
|
|
12955
|
+
node.body = convertNodeList(node, scope, buffer[position], buffer);
|
|
12980
12956
|
},
|
|
12981
12957
|
function superElement() { },
|
|
12982
|
-
function switchCase(node, position, buffer
|
|
12958
|
+
function switchCase(node, position, buffer) {
|
|
12983
12959
|
const { scope } = node;
|
|
12984
12960
|
const testPosition = buffer[position];
|
|
12985
|
-
node.test =
|
|
12986
|
-
|
|
12987
|
-
node.consequent = convertNodeList(node, scope, buffer[position + 1], buffer, readString);
|
|
12961
|
+
node.test = testPosition === 0 ? null : convertNode(node, scope, testPosition, buffer);
|
|
12962
|
+
node.consequent = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
12988
12963
|
},
|
|
12989
|
-
function switchStatement(node, position, buffer
|
|
12964
|
+
function switchStatement(node, position, buffer) {
|
|
12990
12965
|
const { scope } = node;
|
|
12991
|
-
node.discriminant = convertNode(node, node.parentScope, buffer[position], buffer
|
|
12992
|
-
node.cases = convertNodeList(node, scope, buffer[position + 1], buffer
|
|
12966
|
+
node.discriminant = convertNode(node, node.parentScope, buffer[position], buffer);
|
|
12967
|
+
node.cases = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
12993
12968
|
},
|
|
12994
|
-
function taggedTemplateExpression(node, position, buffer
|
|
12969
|
+
function taggedTemplateExpression(node, position, buffer) {
|
|
12995
12970
|
const { scope } = node;
|
|
12996
|
-
node.tag = convertNode(node, scope, buffer[position], buffer
|
|
12997
|
-
node.quasi = convertNode(node, scope, buffer[position + 1], buffer
|
|
12971
|
+
node.tag = convertNode(node, scope, buffer[position], buffer);
|
|
12972
|
+
node.quasi = convertNode(node, scope, buffer[position + 1], buffer);
|
|
12998
12973
|
},
|
|
12999
|
-
function templateElement(node, position, buffer
|
|
12974
|
+
function templateElement(node, position, buffer) {
|
|
13000
12975
|
const flags = buffer[position];
|
|
13001
12976
|
node.tail = (flags & 1) === 1;
|
|
13002
12977
|
const cookedPosition = buffer[position + 1];
|
|
13003
|
-
const cooked = cookedPosition === 0 ? undefined : convertString(cookedPosition
|
|
13004
|
-
const raw = convertString(buffer[position + 2]
|
|
12978
|
+
const cooked = cookedPosition === 0 ? undefined : buffer.convertString(cookedPosition);
|
|
12979
|
+
const raw = buffer.convertString(buffer[position + 2]);
|
|
13005
12980
|
node.value = { cooked, raw };
|
|
13006
12981
|
},
|
|
13007
|
-
function templateLiteral(node, position, buffer
|
|
12982
|
+
function templateLiteral(node, position, buffer) {
|
|
13008
12983
|
const { scope } = node;
|
|
13009
|
-
node.quasis = convertNodeList(node, scope, buffer[position], buffer
|
|
13010
|
-
node.expressions = convertNodeList(node, scope, buffer[position + 1], buffer
|
|
12984
|
+
node.quasis = convertNodeList(node, scope, buffer[position], buffer);
|
|
12985
|
+
node.expressions = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
13011
12986
|
},
|
|
13012
12987
|
function thisExpression() { },
|
|
13013
|
-
function throwStatement(node, position, buffer
|
|
12988
|
+
function throwStatement(node, position, buffer) {
|
|
13014
12989
|
const { scope } = node;
|
|
13015
|
-
node.argument = convertNode(node, scope, buffer[position], buffer
|
|
12990
|
+
node.argument = convertNode(node, scope, buffer[position], buffer);
|
|
13016
12991
|
},
|
|
13017
|
-
function tryStatement(node, position, buffer
|
|
12992
|
+
function tryStatement(node, position, buffer) {
|
|
13018
12993
|
const { scope } = node;
|
|
13019
|
-
node.block = convertNode(node, scope, buffer[position], buffer
|
|
12994
|
+
node.block = convertNode(node, scope, buffer[position], buffer);
|
|
13020
12995
|
const handlerPosition = buffer[position + 1];
|
|
13021
|
-
node.handler =
|
|
13022
|
-
handlerPosition === 0 ? null : convertNode(node, scope, handlerPosition, buffer, readString);
|
|
12996
|
+
node.handler = handlerPosition === 0 ? null : convertNode(node, scope, handlerPosition, buffer);
|
|
13023
12997
|
const finalizerPosition = buffer[position + 2];
|
|
13024
12998
|
node.finalizer =
|
|
13025
|
-
finalizerPosition === 0
|
|
13026
|
-
? null
|
|
13027
|
-
: convertNode(node, scope, finalizerPosition, buffer, readString);
|
|
12999
|
+
finalizerPosition === 0 ? null : convertNode(node, scope, finalizerPosition, buffer);
|
|
13028
13000
|
},
|
|
13029
|
-
function unaryExpression(node, position, buffer
|
|
13001
|
+
function unaryExpression(node, position, buffer) {
|
|
13030
13002
|
const { scope } = node;
|
|
13031
13003
|
node.operator = FIXED_STRINGS[buffer[position]];
|
|
13032
|
-
node.argument = convertNode(node, scope, buffer[position + 1], buffer
|
|
13004
|
+
node.argument = convertNode(node, scope, buffer[position + 1], buffer);
|
|
13033
13005
|
},
|
|
13034
|
-
function updateExpression(node, position, buffer
|
|
13006
|
+
function updateExpression(node, position, buffer) {
|
|
13035
13007
|
const { scope } = node;
|
|
13036
13008
|
const flags = buffer[position];
|
|
13037
13009
|
node.prefix = (flags & 1) === 1;
|
|
13038
13010
|
node.operator = FIXED_STRINGS[buffer[position + 1]];
|
|
13039
|
-
node.argument = convertNode(node, scope, buffer[position + 2], buffer
|
|
13011
|
+
node.argument = convertNode(node, scope, buffer[position + 2], buffer);
|
|
13040
13012
|
},
|
|
13041
|
-
function variableDeclaration(node, position, buffer
|
|
13013
|
+
function variableDeclaration(node, position, buffer) {
|
|
13042
13014
|
const { scope } = node;
|
|
13043
13015
|
node.kind = FIXED_STRINGS[buffer[position]];
|
|
13044
|
-
node.declarations = convertNodeList(node, scope, buffer[position + 1], buffer
|
|
13016
|
+
node.declarations = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
13045
13017
|
},
|
|
13046
|
-
function variableDeclarator(node, position, buffer
|
|
13018
|
+
function variableDeclarator(node, position, buffer) {
|
|
13047
13019
|
const { scope } = node;
|
|
13048
|
-
node.id = convertNode(node, scope, buffer[position], buffer
|
|
13020
|
+
node.id = convertNode(node, scope, buffer[position], buffer);
|
|
13049
13021
|
const initPosition = buffer[position + 1];
|
|
13050
|
-
node.init =
|
|
13051
|
-
initPosition === 0 ? null : convertNode(node, scope, initPosition, buffer, readString);
|
|
13022
|
+
node.init = initPosition === 0 ? null : convertNode(node, scope, initPosition, buffer);
|
|
13052
13023
|
},
|
|
13053
|
-
function whileStatement(node, position, buffer
|
|
13024
|
+
function whileStatement(node, position, buffer) {
|
|
13054
13025
|
const { scope } = node;
|
|
13055
|
-
node.test = convertNode(node, scope, buffer[position], buffer
|
|
13056
|
-
node.body = convertNode(node, scope, buffer[position + 1], buffer
|
|
13026
|
+
node.test = convertNode(node, scope, buffer[position], buffer);
|
|
13027
|
+
node.body = convertNode(node, scope, buffer[position + 1], buffer);
|
|
13057
13028
|
},
|
|
13058
|
-
function yieldExpression(node, position, buffer
|
|
13029
|
+
function yieldExpression(node, position, buffer) {
|
|
13059
13030
|
const { scope } = node;
|
|
13060
13031
|
const flags = buffer[position];
|
|
13061
13032
|
node.delegate = (flags & 1) === 1;
|
|
13062
13033
|
const argumentPosition = buffer[position + 1];
|
|
13063
13034
|
node.argument =
|
|
13064
|
-
argumentPosition === 0
|
|
13065
|
-
? null
|
|
13066
|
-
: convertNode(node, scope, argumentPosition, buffer, readString);
|
|
13035
|
+
argumentPosition === 0 ? null : convertNode(node, scope, argumentPosition, buffer);
|
|
13067
13036
|
}
|
|
13068
13037
|
];
|
|
13069
|
-
function convertNode(parent, parentScope, position, buffer
|
|
13038
|
+
function convertNode(parent, parentScope, position, buffer) {
|
|
13070
13039
|
const nodeType = buffer[position];
|
|
13071
13040
|
const NodeConstructor = nodeConstructors$1[nodeType];
|
|
13072
13041
|
/* istanbul ignore if: This should never be executed but is a safeguard against faulty buffers */
|
|
@@ -13078,18 +13047,18 @@ function convertNode(parent, parentScope, position, buffer, readString) {
|
|
|
13078
13047
|
node.type = nodeTypeStrings[nodeType];
|
|
13079
13048
|
node.start = buffer[position + 1];
|
|
13080
13049
|
node.end = buffer[position + 2];
|
|
13081
|
-
bufferParsers[nodeType](node, position + 3, buffer
|
|
13050
|
+
bufferParsers[nodeType](node, position + 3, buffer);
|
|
13082
13051
|
node.initialise();
|
|
13083
13052
|
return node;
|
|
13084
13053
|
}
|
|
13085
|
-
function convertNodeList(parent, parentScope, position, buffer
|
|
13054
|
+
function convertNodeList(parent, parentScope, position, buffer) {
|
|
13086
13055
|
if (position === 0)
|
|
13087
13056
|
return EMPTY_ARRAY;
|
|
13088
13057
|
const length = buffer[position++];
|
|
13089
13058
|
const list = [];
|
|
13090
13059
|
for (let index = 0; index < length; index++) {
|
|
13091
13060
|
const nodePosition = buffer[position++];
|
|
13092
|
-
list.push(nodePosition ? convertNode(parent, parentScope, nodePosition, buffer
|
|
13061
|
+
list.push(nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null);
|
|
13093
13062
|
}
|
|
13094
13063
|
return list;
|
|
13095
13064
|
}
|
|
@@ -13103,6 +13072,8 @@ class UnknownNode extends NodeBase {
|
|
|
13103
13072
|
}
|
|
13104
13073
|
}
|
|
13105
13074
|
|
|
13075
|
+
// This file is generated by scripts/generate-node-index.js.
|
|
13076
|
+
// Do not edit this file directly.
|
|
13106
13077
|
const nodeConstructors = {
|
|
13107
13078
|
ArrayExpression,
|
|
13108
13079
|
ArrayPattern,
|
|
@@ -13121,6 +13092,7 @@ const nodeConstructors = {
|
|
|
13121
13092
|
ClassExpression,
|
|
13122
13093
|
ConditionalExpression,
|
|
13123
13094
|
ContinueStatement,
|
|
13095
|
+
DebuggerStatement,
|
|
13124
13096
|
DoWhileStatement,
|
|
13125
13097
|
EmptyStatement,
|
|
13126
13098
|
ExportAllDeclaration,
|
|
@@ -14876,8 +14848,9 @@ function updateExtensionForRelativeAmdId(id, forceJsExtensionForImports) {
|
|
|
14876
14848
|
return forceJsExtensionForImports ? addJsExtension(id) : removeJsExtension(id);
|
|
14877
14849
|
}
|
|
14878
14850
|
|
|
14879
|
-
const
|
|
14851
|
+
const builtinModules = [
|
|
14880
14852
|
"assert",
|
|
14853
|
+
"assert/strict",
|
|
14881
14854
|
"async_hooks",
|
|
14882
14855
|
"buffer",
|
|
14883
14856
|
"child_process",
|
|
@@ -14888,31 +14861,42 @@ const require$$0 = [
|
|
|
14888
14861
|
"dgram",
|
|
14889
14862
|
"diagnostics_channel",
|
|
14890
14863
|
"dns",
|
|
14864
|
+
"dns/promises",
|
|
14891
14865
|
"domain",
|
|
14892
14866
|
"events",
|
|
14893
14867
|
"fs",
|
|
14868
|
+
"fs/promises",
|
|
14894
14869
|
"http",
|
|
14895
14870
|
"http2",
|
|
14896
14871
|
"https",
|
|
14897
14872
|
"inspector",
|
|
14873
|
+
"inspector/promises",
|
|
14898
14874
|
"module",
|
|
14899
14875
|
"net",
|
|
14900
14876
|
"os",
|
|
14901
14877
|
"path",
|
|
14878
|
+
"path/posix",
|
|
14879
|
+
"path/win32",
|
|
14902
14880
|
"perf_hooks",
|
|
14903
14881
|
"process",
|
|
14904
14882
|
"punycode",
|
|
14905
14883
|
"querystring",
|
|
14906
14884
|
"readline",
|
|
14885
|
+
"readline/promises",
|
|
14907
14886
|
"repl",
|
|
14908
14887
|
"stream",
|
|
14888
|
+
"stream/consumers",
|
|
14889
|
+
"stream/promises",
|
|
14890
|
+
"stream/web",
|
|
14909
14891
|
"string_decoder",
|
|
14910
14892
|
"timers",
|
|
14893
|
+
"timers/promises",
|
|
14911
14894
|
"tls",
|
|
14912
14895
|
"trace_events",
|
|
14913
14896
|
"tty",
|
|
14914
14897
|
"url",
|
|
14915
14898
|
"util",
|
|
14899
|
+
"util/types",
|
|
14916
14900
|
"v8",
|
|
14917
14901
|
"vm",
|
|
14918
14902
|
"wasi",
|
|
@@ -14920,26 +14904,7 @@ const require$$0 = [
|
|
|
14920
14904
|
"zlib"
|
|
14921
14905
|
];
|
|
14922
14906
|
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
const builtinModules = /*@__PURE__*/getDefaultExportFromCjs(_static);
|
|
14926
|
-
|
|
14927
|
-
const nodeBuiltins = new Set([
|
|
14928
|
-
...builtinModules,
|
|
14929
|
-
// TODO
|
|
14930
|
-
// remove once builtin-modules includes PR: https://github.com/sindresorhus/builtin-modules/pull/17
|
|
14931
|
-
'assert/strict',
|
|
14932
|
-
'dns/promises',
|
|
14933
|
-
'fs/promises',
|
|
14934
|
-
'path/posix',
|
|
14935
|
-
'path/win32',
|
|
14936
|
-
'readline/promises',
|
|
14937
|
-
'stream/consumers',
|
|
14938
|
-
'stream/promises',
|
|
14939
|
-
'stream/web',
|
|
14940
|
-
'timers/promises',
|
|
14941
|
-
'util/types'
|
|
14942
|
-
]);
|
|
14907
|
+
const nodeBuiltins = new Set(builtinModules);
|
|
14943
14908
|
function warnOnBuiltins(log, dependencies) {
|
|
14944
14909
|
const externalBuiltins = dependencies
|
|
14945
14910
|
.map(({ importPath }) => importPath)
|
|
@@ -20303,7 +20268,7 @@ const getHasModuleSideEffects = (moduleSideEffectsOption) => {
|
|
|
20303
20268
|
|
|
20304
20269
|
// https://datatracker.ietf.org/doc/html/rfc2396
|
|
20305
20270
|
// eslint-disable-next-line no-control-regex
|
|
20306
|
-
const INVALID_CHAR_REGEX = /[\u0000-\u001F"
|
|
20271
|
+
const INVALID_CHAR_REGEX = /[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g;
|
|
20307
20272
|
const DRIVE_LETTER_REGEX = /^[a-z]:/i;
|
|
20308
20273
|
function sanitizeFileName(name) {
|
|
20309
20274
|
const match = DRIVE_LETTER_REGEX.exec(name);
|