@rollup/wasm-node 4.21.3 → 4.22.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/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 +48 -40
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- 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 +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +47 -39
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +21 -21
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.22.1
|
|
5
|
+
Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.22.1
|
|
4
|
+
Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
|
|
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, 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,
|
|
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, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logCircularReexport, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logMissingNodeBuiltins, logReservedNamespace, 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, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, 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, URL_TREESHAKE_MODULESIDEEFFECTS, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_MANUALCHUNKS, 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
12
|
import require$$0, { win32, posix, isAbsolute, resolve } from 'path';
|
|
13
13
|
import { parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } from '../../native.js';
|
|
@@ -16,7 +16,7 @@ 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.22.1";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -4459,36 +4459,6 @@ const builtins = 'arguments Infinity NaN undefined null true false eval uneval i
|
|
|
4459
4459
|
const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
|
|
4460
4460
|
forbiddenIdentifiers.add('');
|
|
4461
4461
|
|
|
4462
|
-
function createInclusionContext() {
|
|
4463
|
-
return {
|
|
4464
|
-
brokenFlow: false,
|
|
4465
|
-
hasBreak: false,
|
|
4466
|
-
hasContinue: false,
|
|
4467
|
-
includedCallArguments: new Set(),
|
|
4468
|
-
includedLabels: new Set()
|
|
4469
|
-
};
|
|
4470
|
-
}
|
|
4471
|
-
function createHasEffectsContext() {
|
|
4472
|
-
return {
|
|
4473
|
-
accessed: new PathTracker(),
|
|
4474
|
-
assigned: new PathTracker(),
|
|
4475
|
-
brokenFlow: false,
|
|
4476
|
-
called: new DiscriminatedPathTracker(),
|
|
4477
|
-
hasBreak: false,
|
|
4478
|
-
hasContinue: false,
|
|
4479
|
-
ignore: {
|
|
4480
|
-
breaks: false,
|
|
4481
|
-
continues: false,
|
|
4482
|
-
labels: new Set(),
|
|
4483
|
-
returnYield: false,
|
|
4484
|
-
this: false
|
|
4485
|
-
},
|
|
4486
|
-
includedLabels: new Set(),
|
|
4487
|
-
instantiated: new DiscriminatedPathTracker(),
|
|
4488
|
-
replacedVariableInits: new Map()
|
|
4489
|
-
};
|
|
4490
|
-
}
|
|
4491
|
-
|
|
4492
4462
|
function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
|
|
4493
4463
|
return Object.create(inheritedDescriptions, memberDescriptions);
|
|
4494
4464
|
}
|
|
@@ -4770,6 +4740,36 @@ const childNodeKeys = {
|
|
|
4770
4740
|
YieldExpression: ['argument']
|
|
4771
4741
|
};
|
|
4772
4742
|
|
|
4743
|
+
function createInclusionContext() {
|
|
4744
|
+
return {
|
|
4745
|
+
brokenFlow: false,
|
|
4746
|
+
hasBreak: false,
|
|
4747
|
+
hasContinue: false,
|
|
4748
|
+
includedCallArguments: new Set(),
|
|
4749
|
+
includedLabels: new Set()
|
|
4750
|
+
};
|
|
4751
|
+
}
|
|
4752
|
+
function createHasEffectsContext() {
|
|
4753
|
+
return {
|
|
4754
|
+
accessed: new PathTracker(),
|
|
4755
|
+
assigned: new PathTracker(),
|
|
4756
|
+
brokenFlow: false,
|
|
4757
|
+
called: new DiscriminatedPathTracker(),
|
|
4758
|
+
hasBreak: false,
|
|
4759
|
+
hasContinue: false,
|
|
4760
|
+
ignore: {
|
|
4761
|
+
breaks: false,
|
|
4762
|
+
continues: false,
|
|
4763
|
+
labels: new Set(),
|
|
4764
|
+
returnYield: false,
|
|
4765
|
+
this: false
|
|
4766
|
+
},
|
|
4767
|
+
includedLabels: new Set(),
|
|
4768
|
+
instantiated: new DiscriminatedPathTracker(),
|
|
4769
|
+
replacedVariableInits: new Map()
|
|
4770
|
+
};
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4773
4773
|
const INCLUDE_PARAMETERS = 'variables';
|
|
4774
4774
|
const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
|
|
4775
4775
|
class NodeBase extends ExpressionEntity {
|
|
@@ -5887,6 +5887,7 @@ const knownGlobals = {
|
|
|
5887
5887
|
isView: PF,
|
|
5888
5888
|
prototype: O
|
|
5889
5889
|
},
|
|
5890
|
+
AggregateError: PC_WITH_ARRAY,
|
|
5890
5891
|
Atomics: O,
|
|
5891
5892
|
BigInt: C,
|
|
5892
5893
|
BigInt64Array: C,
|
|
@@ -5910,6 +5911,7 @@ const knownGlobals = {
|
|
|
5910
5911
|
escape: PF,
|
|
5911
5912
|
eval: O,
|
|
5912
5913
|
EvalError: PC,
|
|
5914
|
+
FinalizationRegistry: C,
|
|
5913
5915
|
Float32Array: ARRAY_TYPE,
|
|
5914
5916
|
Float64Array: ARRAY_TYPE,
|
|
5915
5917
|
Function: C,
|
|
@@ -6060,6 +6062,7 @@ const knownGlobals = {
|
|
|
6060
6062
|
URIError: PC,
|
|
6061
6063
|
valueOf: O,
|
|
6062
6064
|
WeakMap: PC_WITH_ARRAY,
|
|
6065
|
+
WeakRef: C,
|
|
6063
6066
|
WeakSet: PC_WITH_ARRAY,
|
|
6064
6067
|
// Additional globals shared by Node and Browser that are not strictly part of the language
|
|
6065
6068
|
clearInterval: C,
|
|
@@ -7047,9 +7050,10 @@ class Identifier extends NodeBase {
|
|
|
7047
7050
|
if (!(this.variable instanceof LocalVariable &&
|
|
7048
7051
|
this.variable.kind &&
|
|
7049
7052
|
tdzVariableKinds.has(this.variable.kind) &&
|
|
7050
|
-
//
|
|
7051
|
-
//
|
|
7052
|
-
|
|
7053
|
+
// We ignore modules that did not receive a treeshaking pass yet as that
|
|
7054
|
+
// causes many false positives due to circular dependencies or disabled
|
|
7055
|
+
// moduleSideEffects.
|
|
7056
|
+
this.variable.module.hasTreeShakingPassStarted)) {
|
|
7053
7057
|
return (this.isTDZAccess = false);
|
|
7054
7058
|
}
|
|
7055
7059
|
let decl_id;
|
|
@@ -7062,9 +7066,7 @@ class Identifier extends NodeBase {
|
|
|
7062
7066
|
// in the same function or at top level of module
|
|
7063
7067
|
return (this.isTDZAccess = true);
|
|
7064
7068
|
}
|
|
7065
|
-
|
|
7066
|
-
// moduleSideEffects are false.
|
|
7067
|
-
if (!this.variable.initReached && this.scope.context.module.isExecuted) {
|
|
7069
|
+
if (!this.variable.initReached) {
|
|
7068
7070
|
// Either a const/let TDZ violation or
|
|
7069
7071
|
// var use before declaration was encountered.
|
|
7070
7072
|
return (this.isTDZAccess = true);
|
|
@@ -7100,6 +7102,10 @@ class Identifier extends NodeBase {
|
|
|
7100
7102
|
applyDeoptimizations() {
|
|
7101
7103
|
this.deoptimized = true;
|
|
7102
7104
|
if (this.variable instanceof LocalVariable) {
|
|
7105
|
+
// When accessing a variable from a module without side effects, this
|
|
7106
|
+
// means we use an export of that module and therefore need to potentially
|
|
7107
|
+
// include it in the bundle.
|
|
7108
|
+
this.variable.module.isExecuted = true;
|
|
7103
7109
|
this.variable.consolidateInitializers();
|
|
7104
7110
|
this.scope.context.requestTreeshakingPass();
|
|
7105
7111
|
}
|
|
@@ -13833,6 +13839,7 @@ class Module {
|
|
|
13833
13839
|
this.dynamicImporters = [];
|
|
13834
13840
|
this.dynamicImports = [];
|
|
13835
13841
|
this.execIndex = Infinity;
|
|
13842
|
+
this.hasTreeShakingPassStarted = false;
|
|
13836
13843
|
this.implicitlyLoadedAfter = new Set();
|
|
13837
13844
|
this.implicitlyLoadedBefore = new Set();
|
|
13838
13845
|
this.importDescriptions = new Map();
|
|
@@ -20162,6 +20169,7 @@ class Graph {
|
|
|
20162
20169
|
this.needsTreeshakingPass = false;
|
|
20163
20170
|
for (const module of this.modules) {
|
|
20164
20171
|
if (module.isExecuted) {
|
|
20172
|
+
module.hasTreeShakingPassStarted = true;
|
|
20165
20173
|
if (module.info.moduleSideEffects === 'no-treeshake') {
|
|
20166
20174
|
module.includeAllInBundle();
|
|
20167
20175
|
}
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.22.1
|
|
4
|
+
Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.
|
|
34
|
+
var version = "4.22.1";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -5927,36 +5927,6 @@ const builtins = 'arguments Infinity NaN undefined null true false eval uneval i
|
|
|
5927
5927
|
const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
|
|
5928
5928
|
forbiddenIdentifiers.add('');
|
|
5929
5929
|
|
|
5930
|
-
function createInclusionContext() {
|
|
5931
|
-
return {
|
|
5932
|
-
brokenFlow: false,
|
|
5933
|
-
hasBreak: false,
|
|
5934
|
-
hasContinue: false,
|
|
5935
|
-
includedCallArguments: new Set(),
|
|
5936
|
-
includedLabels: new Set()
|
|
5937
|
-
};
|
|
5938
|
-
}
|
|
5939
|
-
function createHasEffectsContext() {
|
|
5940
|
-
return {
|
|
5941
|
-
accessed: new PathTracker(),
|
|
5942
|
-
assigned: new PathTracker(),
|
|
5943
|
-
brokenFlow: false,
|
|
5944
|
-
called: new DiscriminatedPathTracker(),
|
|
5945
|
-
hasBreak: false,
|
|
5946
|
-
hasContinue: false,
|
|
5947
|
-
ignore: {
|
|
5948
|
-
breaks: false,
|
|
5949
|
-
continues: false,
|
|
5950
|
-
labels: new Set(),
|
|
5951
|
-
returnYield: false,
|
|
5952
|
-
this: false
|
|
5953
|
-
},
|
|
5954
|
-
includedLabels: new Set(),
|
|
5955
|
-
instantiated: new DiscriminatedPathTracker(),
|
|
5956
|
-
replacedVariableInits: new Map()
|
|
5957
|
-
};
|
|
5958
|
-
}
|
|
5959
|
-
|
|
5960
5930
|
function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
|
|
5961
5931
|
return Object.create(inheritedDescriptions, memberDescriptions);
|
|
5962
5932
|
}
|
|
@@ -6238,6 +6208,36 @@ const childNodeKeys = {
|
|
|
6238
6208
|
YieldExpression: ['argument']
|
|
6239
6209
|
};
|
|
6240
6210
|
|
|
6211
|
+
function createInclusionContext() {
|
|
6212
|
+
return {
|
|
6213
|
+
brokenFlow: false,
|
|
6214
|
+
hasBreak: false,
|
|
6215
|
+
hasContinue: false,
|
|
6216
|
+
includedCallArguments: new Set(),
|
|
6217
|
+
includedLabels: new Set()
|
|
6218
|
+
};
|
|
6219
|
+
}
|
|
6220
|
+
function createHasEffectsContext() {
|
|
6221
|
+
return {
|
|
6222
|
+
accessed: new PathTracker(),
|
|
6223
|
+
assigned: new PathTracker(),
|
|
6224
|
+
brokenFlow: false,
|
|
6225
|
+
called: new DiscriminatedPathTracker(),
|
|
6226
|
+
hasBreak: false,
|
|
6227
|
+
hasContinue: false,
|
|
6228
|
+
ignore: {
|
|
6229
|
+
breaks: false,
|
|
6230
|
+
continues: false,
|
|
6231
|
+
labels: new Set(),
|
|
6232
|
+
returnYield: false,
|
|
6233
|
+
this: false
|
|
6234
|
+
},
|
|
6235
|
+
includedLabels: new Set(),
|
|
6236
|
+
instantiated: new DiscriminatedPathTracker(),
|
|
6237
|
+
replacedVariableInits: new Map()
|
|
6238
|
+
};
|
|
6239
|
+
}
|
|
6240
|
+
|
|
6241
6241
|
const INCLUDE_PARAMETERS = 'variables';
|
|
6242
6242
|
const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
|
|
6243
6243
|
class NodeBase extends ExpressionEntity {
|
|
@@ -7353,6 +7353,7 @@ const knownGlobals = {
|
|
|
7353
7353
|
isView: PF,
|
|
7354
7354
|
prototype: O
|
|
7355
7355
|
},
|
|
7356
|
+
AggregateError: PC_WITH_ARRAY,
|
|
7356
7357
|
Atomics: O,
|
|
7357
7358
|
BigInt: C,
|
|
7358
7359
|
BigInt64Array: C,
|
|
@@ -7376,6 +7377,7 @@ const knownGlobals = {
|
|
|
7376
7377
|
escape: PF,
|
|
7377
7378
|
eval: O,
|
|
7378
7379
|
EvalError: PC,
|
|
7380
|
+
FinalizationRegistry: C,
|
|
7379
7381
|
Float32Array: ARRAY_TYPE,
|
|
7380
7382
|
Float64Array: ARRAY_TYPE,
|
|
7381
7383
|
Function: C,
|
|
@@ -7526,6 +7528,7 @@ const knownGlobals = {
|
|
|
7526
7528
|
URIError: PC,
|
|
7527
7529
|
valueOf: O,
|
|
7528
7530
|
WeakMap: PC_WITH_ARRAY,
|
|
7531
|
+
WeakRef: C,
|
|
7529
7532
|
WeakSet: PC_WITH_ARRAY,
|
|
7530
7533
|
// Additional globals shared by Node and Browser that are not strictly part of the language
|
|
7531
7534
|
clearInterval: C,
|
|
@@ -8513,9 +8516,10 @@ class Identifier extends NodeBase {
|
|
|
8513
8516
|
if (!(this.variable instanceof LocalVariable &&
|
|
8514
8517
|
this.variable.kind &&
|
|
8515
8518
|
tdzVariableKinds.has(this.variable.kind) &&
|
|
8516
|
-
//
|
|
8517
|
-
//
|
|
8518
|
-
|
|
8519
|
+
// We ignore modules that did not receive a treeshaking pass yet as that
|
|
8520
|
+
// causes many false positives due to circular dependencies or disabled
|
|
8521
|
+
// moduleSideEffects.
|
|
8522
|
+
this.variable.module.hasTreeShakingPassStarted)) {
|
|
8519
8523
|
return (this.isTDZAccess = false);
|
|
8520
8524
|
}
|
|
8521
8525
|
let decl_id;
|
|
@@ -8528,9 +8532,7 @@ class Identifier extends NodeBase {
|
|
|
8528
8532
|
// in the same function or at top level of module
|
|
8529
8533
|
return (this.isTDZAccess = true);
|
|
8530
8534
|
}
|
|
8531
|
-
|
|
8532
|
-
// moduleSideEffects are false.
|
|
8533
|
-
if (!this.variable.initReached && this.scope.context.module.isExecuted) {
|
|
8535
|
+
if (!this.variable.initReached) {
|
|
8534
8536
|
// Either a const/let TDZ violation or
|
|
8535
8537
|
// var use before declaration was encountered.
|
|
8536
8538
|
return (this.isTDZAccess = true);
|
|
@@ -8566,6 +8568,10 @@ class Identifier extends NodeBase {
|
|
|
8566
8568
|
applyDeoptimizations() {
|
|
8567
8569
|
this.deoptimized = true;
|
|
8568
8570
|
if (this.variable instanceof LocalVariable) {
|
|
8571
|
+
// When accessing a variable from a module without side effects, this
|
|
8572
|
+
// means we use an export of that module and therefore need to potentially
|
|
8573
|
+
// include it in the bundle.
|
|
8574
|
+
this.variable.module.isExecuted = true;
|
|
8569
8575
|
this.variable.consolidateInitializers();
|
|
8570
8576
|
this.scope.context.requestTreeshakingPass();
|
|
8571
8577
|
}
|
|
@@ -15280,6 +15286,7 @@ class Module {
|
|
|
15280
15286
|
this.dynamicImporters = [];
|
|
15281
15287
|
this.dynamicImports = [];
|
|
15282
15288
|
this.execIndex = Infinity;
|
|
15289
|
+
this.hasTreeShakingPassStarted = false;
|
|
15283
15290
|
this.implicitlyLoadedAfter = new Set();
|
|
15284
15291
|
this.implicitlyLoadedBefore = new Set();
|
|
15285
15292
|
this.importDescriptions = new Map();
|
|
@@ -20602,6 +20609,7 @@ class Graph {
|
|
|
20602
20609
|
this.needsTreeshakingPass = false;
|
|
20603
20610
|
for (const module of this.modules) {
|
|
20604
20611
|
if (module.isExecuted) {
|
|
20612
|
+
module.hasTreeShakingPassStarted = true;
|
|
20605
20613
|
if (module.info.moduleSideEffects === 'no-treeshake') {
|
|
20606
20614
|
module.includeAllInBundle();
|
|
20607
20615
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rollup/wasm-node",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.1",
|
|
4
4
|
"description": "Next-generation ES module bundler with Node wasm",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"@types/estree": "1.0.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependenciesComments": {
|
|
32
|
-
"@types/node": "Version 18.19.0 breaks chokidar and vite types",
|
|
33
32
|
"core-js": "We only update manually as every update requires a snapshot update"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
@@ -39,9 +38,10 @@
|
|
|
39
38
|
"@codemirror/search": "^6.5.6",
|
|
40
39
|
"@codemirror/state": "^6.4.1",
|
|
41
40
|
"@codemirror/view": "^6.33.0",
|
|
42
|
-
"@eslint/js": "^9.
|
|
41
|
+
"@eslint/js": "^9.10.0",
|
|
42
|
+
"@inquirer/prompts": "^6.0.1",
|
|
43
43
|
"@jridgewell/sourcemap-codec": "^1.5.0",
|
|
44
|
-
"@mermaid-js/mermaid-cli": "^
|
|
44
|
+
"@mermaid-js/mermaid-cli": "^11.2.0",
|
|
45
45
|
"@napi-rs/cli": "^2.18.4",
|
|
46
46
|
"@rollup/plugin-alias": "^5.1.0",
|
|
47
47
|
"@rollup/plugin-buble": "^1.0.3",
|
|
@@ -52,11 +52,10 @@
|
|
|
52
52
|
"@rollup/plugin-terser": "^0.4.4",
|
|
53
53
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
54
54
|
"@rollup/pluginutils": "^5.1.0",
|
|
55
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
55
|
+
"@shikijs/vitepress-twoslash": "^1.17.7",
|
|
56
56
|
"@types/eslint": "^9.6.1",
|
|
57
|
-
"@types/
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/node": "~18.18.14",
|
|
57
|
+
"@types/mocha": "^10.0.8",
|
|
58
|
+
"@types/node": "^18.19.50",
|
|
60
59
|
"@types/semver": "^7.5.8",
|
|
61
60
|
"@types/yargs-parser": "^21.0.3",
|
|
62
61
|
"acorn": "^8.12.1",
|
|
@@ -65,24 +64,23 @@
|
|
|
65
64
|
"builtin-modules": "^4.0.0",
|
|
66
65
|
"chokidar": "^3.6.0",
|
|
67
66
|
"colorette": "^2.0.20",
|
|
68
|
-
"concurrently": "^
|
|
69
|
-
"core-js": "3.
|
|
67
|
+
"concurrently": "^9.0.1",
|
|
68
|
+
"core-js": "3.38.1",
|
|
70
69
|
"cross-env": "^7.0.3",
|
|
71
70
|
"date-time": "^4.0.0",
|
|
72
71
|
"es5-shim": "^4.6.7",
|
|
73
72
|
"es6-shim": "^0.35.8",
|
|
74
|
-
"eslint": "^9.
|
|
73
|
+
"eslint": "^9.10.0",
|
|
75
74
|
"eslint-config-prettier": "^9.1.0",
|
|
76
75
|
"eslint-plugin-prettier": "^5.2.1",
|
|
77
76
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
78
|
-
"eslint-plugin-vue": "^9.
|
|
77
|
+
"eslint-plugin-vue": "^9.28.0",
|
|
79
78
|
"fixturify": "^3.0.0",
|
|
80
79
|
"flru": "^1.0.2",
|
|
81
80
|
"fs-extra": "^11.2.0",
|
|
82
81
|
"github-api": "^3.4.0",
|
|
83
82
|
"globals": "^15.9.0",
|
|
84
|
-
"husky": "^9.1.
|
|
85
|
-
"inquirer": "^10.2.0",
|
|
83
|
+
"husky": "^9.1.6",
|
|
86
84
|
"is-reference": "^3.0.2",
|
|
87
85
|
"lint-staged": "^15.2.10",
|
|
88
86
|
"locate-character": "^3.0.0",
|
|
@@ -97,7 +95,7 @@
|
|
|
97
95
|
"pretty-bytes": "^6.1.1",
|
|
98
96
|
"pretty-ms": "^9.1.0",
|
|
99
97
|
"requirejs": "^2.3.7",
|
|
100
|
-
"rollup": "^4.21.
|
|
98
|
+
"rollup": "^4.21.3",
|
|
101
99
|
"rollup-plugin-license": "^3.5.2",
|
|
102
100
|
"rollup-plugin-string": "^3.0.0",
|
|
103
101
|
"semver": "^7.6.3",
|
|
@@ -106,13 +104,14 @@
|
|
|
106
104
|
"source-map": "^0.7.4",
|
|
107
105
|
"source-map-support": "^0.5.21",
|
|
108
106
|
"systemjs": "^6.15.1",
|
|
109
|
-
"terser": "^5.
|
|
107
|
+
"terser": "^5.32.0",
|
|
110
108
|
"tslib": "^2.7.0",
|
|
111
|
-
"typescript": "^5.
|
|
112
|
-
"typescript-eslint": "^8.
|
|
113
|
-
"vite": "^5.4.
|
|
109
|
+
"typescript": "^5.6.2",
|
|
110
|
+
"typescript-eslint": "^8.6.0",
|
|
111
|
+
"vite": "^5.4.6",
|
|
114
112
|
"vitepress": "^1.3.4",
|
|
115
|
-
"vue": "^3.
|
|
113
|
+
"vue": "^3.5.6",
|
|
114
|
+
"vue-tsc": "^2.1.6",
|
|
116
115
|
"wasm-pack": "^0.13.0",
|
|
117
116
|
"yargs-parser": "^21.1.1"
|
|
118
117
|
},
|
|
@@ -121,7 +120,8 @@
|
|
|
121
120
|
"semver": "^7.6.3",
|
|
122
121
|
"ws": "^8.18.0"
|
|
123
122
|
},
|
|
124
|
-
"
|
|
123
|
+
"comments": {
|
|
124
|
+
"vue-tsc": "This is necessary so that prettier-plugin-organize-imports works correctly in Vue templatges",
|
|
125
125
|
"ws": "mermaid requires an older 8.13.0 version via puppeteer with vulnerabilities"
|
|
126
126
|
},
|
|
127
127
|
"files": [
|