@rollup/wasm-node 4.53.2 → 4.53.4
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 +106 -54
- 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.d.ts +5 -3
- 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 +106 -54
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/dist/wasm-node/bindings_wasm.js +68 -71
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +24 -23
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.53.
|
|
4
|
-
Mon,
|
|
3
|
+
Rollup.js v4.53.4
|
|
4
|
+
Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
|
|
|
42
42
|
|
|
43
43
|
const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
|
|
44
44
|
|
|
45
|
-
var version = "4.53.
|
|
45
|
+
var version = "4.53.4";
|
|
46
46
|
|
|
47
47
|
function ensureArray$1(items) {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
@@ -369,7 +369,7 @@ class FileEmitter {
|
|
|
369
369
|
}
|
|
370
370
|
else {
|
|
371
371
|
const sourceHash = getHash(consumedFile.source);
|
|
372
|
-
getOrCreate(consumedAssetsByHash, sourceHash,
|
|
372
|
+
getOrCreate(consumedAssetsByHash, sourceHash, getNewArray).push(consumedFile);
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
else if (consumedFile.type === 'prebuilt-chunk') {
|
|
@@ -5793,6 +5793,10 @@ const UnknownKey = Symbol('Unknown Key');
|
|
|
5793
5793
|
const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
|
|
5794
5794
|
const UnknownInteger = Symbol('Unknown Integer');
|
|
5795
5795
|
const SymbolToStringTag = Symbol('Symbol.toStringTag');
|
|
5796
|
+
const SymbolDispose = Symbol('Symbol.asyncDispose');
|
|
5797
|
+
const SymbolAsyncDispose = Symbol('Symbol.dispose');
|
|
5798
|
+
const WELL_KNOWN_SYMBOLS_LIST = [SymbolToStringTag, SymbolDispose, SymbolAsyncDispose];
|
|
5799
|
+
const WELL_KNOWN_SYMBOLS = new Set(WELL_KNOWN_SYMBOLS_LIST);
|
|
5796
5800
|
const EMPTY_PATH = [];
|
|
5797
5801
|
const UNKNOWN_PATH = [UnknownKey];
|
|
5798
5802
|
// For deoptimizations, this means we are modifying an unknown property but did
|
|
@@ -6375,6 +6379,7 @@ class ExternalModule {
|
|
|
6375
6379
|
this.reexported = false;
|
|
6376
6380
|
this.used = false;
|
|
6377
6381
|
this.declarations = new Map();
|
|
6382
|
+
this.importersByExportedName = new Map();
|
|
6378
6383
|
this.mostCommonSuggestion = 0;
|
|
6379
6384
|
this.nameSuggestions = new Map();
|
|
6380
6385
|
this.suggestedVariableName = makeLegal(id.split(/[/\\]/).pop());
|
|
@@ -6411,8 +6416,11 @@ class ExternalModule {
|
|
|
6411
6416
|
cacheInfoGetters() {
|
|
6412
6417
|
cacheObjectGetters(this.info, ['dynamicImporters', 'importers']);
|
|
6413
6418
|
}
|
|
6414
|
-
getVariableForExportName(name) {
|
|
6419
|
+
getVariableForExportName(name, { importChain }) {
|
|
6415
6420
|
const declaration = this.declarations.get(name);
|
|
6421
|
+
for (const module of importChain) {
|
|
6422
|
+
getOrCreate(this.importersByExportedName, name, getNewSet).add(module);
|
|
6423
|
+
}
|
|
6416
6424
|
if (declaration)
|
|
6417
6425
|
return [declaration];
|
|
6418
6426
|
const externalVariable = new ExternalVariable(this, name);
|
|
@@ -6436,7 +6444,10 @@ class ExternalModule {
|
|
|
6436
6444
|
return;
|
|
6437
6445
|
const importersSet = new Set();
|
|
6438
6446
|
for (const name of unused) {
|
|
6439
|
-
|
|
6447
|
+
const importersOfName = this.importersByExportedName.get(name);
|
|
6448
|
+
for (const importer of this.importers) {
|
|
6449
|
+
if (!importersOfName?.has(importer))
|
|
6450
|
+
continue;
|
|
6440
6451
|
importersSet.add(importer);
|
|
6441
6452
|
}
|
|
6442
6453
|
}
|
|
@@ -8052,6 +8063,27 @@ const knownGlobals = {
|
|
|
8052
8063
|
for: PF,
|
|
8053
8064
|
keyFor: PF,
|
|
8054
8065
|
prototype: O,
|
|
8066
|
+
asyncDispose: {
|
|
8067
|
+
__proto__: null,
|
|
8068
|
+
[ValueProperties]: {
|
|
8069
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
8070
|
+
getLiteralValue() {
|
|
8071
|
+
return SymbolAsyncDispose;
|
|
8072
|
+
},
|
|
8073
|
+
// This might not be needed, but then we need to check a few more cases
|
|
8074
|
+
hasEffectsWhenCalled: returnTrue
|
|
8075
|
+
}
|
|
8076
|
+
},
|
|
8077
|
+
dispose: {
|
|
8078
|
+
__proto__: null,
|
|
8079
|
+
[ValueProperties]: {
|
|
8080
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
8081
|
+
getLiteralValue() {
|
|
8082
|
+
return SymbolDispose;
|
|
8083
|
+
},
|
|
8084
|
+
hasEffectsWhenCalled: returnTrue
|
|
8085
|
+
}
|
|
8086
|
+
},
|
|
8055
8087
|
toStringTag: {
|
|
8056
8088
|
__proto__: null,
|
|
8057
8089
|
[ValueProperties]: {
|
|
@@ -8899,6 +8931,7 @@ class LocalVariable extends Variable {
|
|
|
8899
8931
|
return true;
|
|
8900
8932
|
if (path.length === 0)
|
|
8901
8933
|
return false;
|
|
8934
|
+
// if (this.isReassigned || this.init.included) return true;
|
|
8902
8935
|
if (this.isReassigned)
|
|
8903
8936
|
return true;
|
|
8904
8937
|
return (!context.assigned.trackEntityAtPathAndGetIfTracked(path, this) &&
|
|
@@ -11439,11 +11472,11 @@ class MemberExpression extends NodeBase {
|
|
|
11439
11472
|
this.dynamicPropertyKey = this.propertyKey;
|
|
11440
11473
|
const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
|
|
11441
11474
|
return (this.dynamicPropertyKey =
|
|
11442
|
-
value ===
|
|
11443
|
-
? value
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11475
|
+
typeof value === 'symbol'
|
|
11476
|
+
? WELL_KNOWN_SYMBOLS.has(value)
|
|
11477
|
+
? value
|
|
11478
|
+
: UnknownKey
|
|
11479
|
+
: String(value));
|
|
11447
11480
|
}
|
|
11448
11481
|
return this.dynamicPropertyKey;
|
|
11449
11482
|
}
|
|
@@ -13236,7 +13269,8 @@ class AssignmentExpression extends NodeBase {
|
|
|
13236
13269
|
this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
|
|
13237
13270
|
}
|
|
13238
13271
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
13239
|
-
return this.
|
|
13272
|
+
return ((interaction.type === INTERACTION_ASSIGNED && this.left.included) ||
|
|
13273
|
+
this.right.hasEffectsOnInteractionAtPath(path, interaction, context));
|
|
13240
13274
|
}
|
|
13241
13275
|
include(context, includeChildrenRecursively) {
|
|
13242
13276
|
const { deoptimized, isConstReassignment, left, right, operator } = this;
|
|
@@ -14653,8 +14687,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
|
|
|
14653
14687
|
}
|
|
14654
14688
|
|
|
14655
14689
|
class VariableDeclarator extends NodeBase {
|
|
14656
|
-
declareDeclarator(kind
|
|
14657
|
-
this.isUsingDeclaration =
|
|
14690
|
+
declareDeclarator(kind) {
|
|
14691
|
+
this.isUsingDeclaration = kind === 'using';
|
|
14692
|
+
this.isAsyncUsingDeclaration = kind === 'await using';
|
|
14658
14693
|
this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
|
|
14659
14694
|
}
|
|
14660
14695
|
deoptimizePath(path) {
|
|
@@ -14665,6 +14700,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14665
14700
|
this.id.markDeclarationReached();
|
|
14666
14701
|
return (initEffect ||
|
|
14667
14702
|
this.isUsingDeclaration ||
|
|
14703
|
+
this.isAsyncUsingDeclaration ||
|
|
14668
14704
|
this.id.hasEffects(context) ||
|
|
14669
14705
|
(this.scope.context.options.treeshake
|
|
14670
14706
|
.propertyReadSideEffects &&
|
|
@@ -14673,7 +14709,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14673
14709
|
include(context, includeChildrenRecursively) {
|
|
14674
14710
|
const { id, init } = this;
|
|
14675
14711
|
if (!this.included)
|
|
14676
|
-
this.includeNode();
|
|
14712
|
+
this.includeNode(context);
|
|
14677
14713
|
init?.include(context, includeChildrenRecursively);
|
|
14678
14714
|
id.markDeclarationReached();
|
|
14679
14715
|
if (includeChildrenRecursively) {
|
|
@@ -14689,7 +14725,7 @@ class VariableDeclarator extends NodeBase {
|
|
|
14689
14725
|
render(code, options) {
|
|
14690
14726
|
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
14691
14727
|
const { end, id, init, start } = this;
|
|
14692
|
-
const renderId = id.included || this.isUsingDeclaration;
|
|
14728
|
+
const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
|
|
14693
14729
|
if (renderId) {
|
|
14694
14730
|
id.render(code, options);
|
|
14695
14731
|
}
|
|
@@ -14711,20 +14747,30 @@ class VariableDeclarator extends NodeBase {
|
|
|
14711
14747
|
code.appendLeft(end, `${_}=${_}void 0`);
|
|
14712
14748
|
}
|
|
14713
14749
|
}
|
|
14714
|
-
includeNode() {
|
|
14750
|
+
includeNode(context) {
|
|
14715
14751
|
this.included = true;
|
|
14716
14752
|
const { id, init } = this;
|
|
14717
|
-
if (init
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14753
|
+
if (init) {
|
|
14754
|
+
if (this.isUsingDeclaration) {
|
|
14755
|
+
init.includePath(SYMBOL_DISPOSE_PATH, context);
|
|
14756
|
+
}
|
|
14757
|
+
else if (this.isAsyncUsingDeclaration) {
|
|
14758
|
+
init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
|
|
14759
|
+
}
|
|
14760
|
+
if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
|
|
14761
|
+
const { name, variable } = id;
|
|
14762
|
+
for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
|
|
14763
|
+
if (accessedVariable !== variable) {
|
|
14764
|
+
accessedVariable.forbidName(name);
|
|
14765
|
+
}
|
|
14722
14766
|
}
|
|
14723
14767
|
}
|
|
14724
14768
|
}
|
|
14725
14769
|
}
|
|
14726
14770
|
}
|
|
14727
14771
|
VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
|
|
14772
|
+
const SYMBOL_DISPOSE_PATH = [SymbolDispose];
|
|
14773
|
+
const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
|
|
14728
14774
|
|
|
14729
14775
|
function getChunkInfoWithPath(chunk) {
|
|
14730
14776
|
return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
|
|
@@ -16962,23 +17008,6 @@ class UpdateExpression extends NodeBase {
|
|
|
16962
17008
|
}
|
|
16963
17009
|
UpdateExpression.prototype.includeNode = onlyIncludeSelf;
|
|
16964
17010
|
|
|
16965
|
-
function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
|
|
16966
|
-
for (const declarator of declarations) {
|
|
16967
|
-
if (!declarator.id.included)
|
|
16968
|
-
return false;
|
|
16969
|
-
if (declarator.id.type === parseAst_js.Identifier) {
|
|
16970
|
-
if (exportNamesByVariable.has(declarator.id.variable))
|
|
16971
|
-
return false;
|
|
16972
|
-
}
|
|
16973
|
-
else {
|
|
16974
|
-
const exportedVariables = [];
|
|
16975
|
-
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
16976
|
-
if (exportedVariables.length > 0)
|
|
16977
|
-
return false;
|
|
16978
|
-
}
|
|
16979
|
-
}
|
|
16980
|
-
return true;
|
|
16981
|
-
}
|
|
16982
17011
|
class VariableDeclaration extends NodeBase {
|
|
16983
17012
|
deoptimizePath() {
|
|
16984
17013
|
for (const declarator of this.declarations) {
|
|
@@ -17008,17 +17037,15 @@ class VariableDeclaration extends NodeBase {
|
|
|
17008
17037
|
}
|
|
17009
17038
|
initialise() {
|
|
17010
17039
|
super.initialise();
|
|
17011
|
-
this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
|
|
17012
17040
|
for (const declarator of this.declarations) {
|
|
17013
|
-
declarator.declareDeclarator(this.kind
|
|
17041
|
+
declarator.declareDeclarator(this.kind);
|
|
17014
17042
|
}
|
|
17015
17043
|
}
|
|
17016
17044
|
removeAnnotations(code) {
|
|
17017
17045
|
this.declarations[0].removeAnnotations(code);
|
|
17018
17046
|
}
|
|
17019
17047
|
render(code, options, nodeRenderOptions = parseAst_js.BLANK) {
|
|
17020
|
-
if (this.
|
|
17021
|
-
areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
17048
|
+
if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
|
|
17022
17049
|
for (const declarator of this.declarations) {
|
|
17023
17050
|
declarator.render(code, options);
|
|
17024
17051
|
}
|
|
@@ -17118,6 +17145,26 @@ class VariableDeclaration extends NodeBase {
|
|
|
17118
17145
|
}
|
|
17119
17146
|
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
|
|
17120
17147
|
}
|
|
17148
|
+
areAllDeclarationsIncludedAndNotExported(exportNamesByVariable) {
|
|
17149
|
+
if (this.kind === 'await using' || this.kind === 'using') {
|
|
17150
|
+
return true;
|
|
17151
|
+
}
|
|
17152
|
+
for (const declarator of this.declarations) {
|
|
17153
|
+
if (!declarator.id.included)
|
|
17154
|
+
return false;
|
|
17155
|
+
if (declarator.id.type === parseAst_js.Identifier) {
|
|
17156
|
+
if (exportNamesByVariable.has(declarator.id.variable))
|
|
17157
|
+
return false;
|
|
17158
|
+
}
|
|
17159
|
+
else {
|
|
17160
|
+
const exportedVariables = [];
|
|
17161
|
+
declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
|
|
17162
|
+
if (exportedVariables.length > 0)
|
|
17163
|
+
return false;
|
|
17164
|
+
}
|
|
17165
|
+
}
|
|
17166
|
+
return true;
|
|
17167
|
+
}
|
|
17121
17168
|
}
|
|
17122
17169
|
function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
|
|
17123
17170
|
let singleSystemExport = null;
|
|
@@ -18353,7 +18400,7 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
|
|
|
18353
18400
|
identifier: null,
|
|
18354
18401
|
localName: MISSING_EXPORT_SHIM_VARIABLE
|
|
18355
18402
|
};
|
|
18356
|
-
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map()) {
|
|
18403
|
+
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain) {
|
|
18357
18404
|
const searchedModules = searchedNamesAndModules.get(name);
|
|
18358
18405
|
if (searchedModules) {
|
|
18359
18406
|
if (searchedModules.has(target)) {
|
|
@@ -18365,6 +18412,7 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
|
|
|
18365
18412
|
searchedNamesAndModules.set(name, new Set([target]));
|
|
18366
18413
|
}
|
|
18367
18414
|
return target.getVariableForExportName(name, {
|
|
18415
|
+
importChain,
|
|
18368
18416
|
importerForSideEffects,
|
|
18369
18417
|
isExportAllSearch,
|
|
18370
18418
|
searchedNamesAndModules
|
|
@@ -18695,7 +18743,7 @@ class Module {
|
|
|
18695
18743
|
}
|
|
18696
18744
|
return this.syntheticNamespace;
|
|
18697
18745
|
}
|
|
18698
|
-
getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, onlyExplicit, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
|
|
18746
|
+
getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
|
|
18699
18747
|
if (name[0] === '*') {
|
|
18700
18748
|
if (name.length === 1) {
|
|
18701
18749
|
// export * from './other'
|
|
@@ -18703,12 +18751,14 @@ class Module {
|
|
|
18703
18751
|
}
|
|
18704
18752
|
// export * from 'external'
|
|
18705
18753
|
const module = this.graph.modulesById.get(name.slice(1));
|
|
18706
|
-
return module.getVariableForExportName('*'
|
|
18754
|
+
return module.getVariableForExportName('*', {
|
|
18755
|
+
importChain: [...importChain, this.id]
|
|
18756
|
+
});
|
|
18707
18757
|
}
|
|
18708
18758
|
// export { foo } from './other'
|
|
18709
18759
|
const reexportDeclaration = this.reexportDescriptions.get(name);
|
|
18710
18760
|
if (reexportDeclaration) {
|
|
18711
|
-
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
|
|
18761
|
+
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id]);
|
|
18712
18762
|
if (!variable) {
|
|
18713
18763
|
return this.error(parseAst_js.logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
|
|
18714
18764
|
}
|
|
@@ -18744,7 +18794,7 @@ class Module {
|
|
|
18744
18794
|
}
|
|
18745
18795
|
if (name !== 'default') {
|
|
18746
18796
|
const foundNamespaceReexport = this.namespaceReexportsByName.get(name) ??
|
|
18747
|
-
this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules);
|
|
18797
|
+
this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, [...importChain, this.id]);
|
|
18748
18798
|
this.namespaceReexportsByName.set(name, foundNamespaceReexport);
|
|
18749
18799
|
if (foundNamespaceReexport[0]) {
|
|
18750
18800
|
return foundNamespaceReexport;
|
|
@@ -18998,7 +19048,7 @@ class Module {
|
|
|
18998
19048
|
if (otherModule instanceof Module && importDescription.name === '*') {
|
|
18999
19049
|
return otherModule.namespace;
|
|
19000
19050
|
}
|
|
19001
|
-
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
|
|
19051
|
+
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id]);
|
|
19002
19052
|
if (!declaration) {
|
|
19003
19053
|
return this.error(parseAst_js.logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
|
|
19004
19054
|
}
|
|
@@ -19203,13 +19253,13 @@ class Module {
|
|
|
19203
19253
|
getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
|
|
19204
19254
|
const { id } = this.resolvedIds[importSource];
|
|
19205
19255
|
const module = this.graph.modulesById.get(id);
|
|
19206
|
-
const [variable] = module.getVariableForExportName(baseName);
|
|
19256
|
+
const [variable] = module.getVariableForExportName(baseName, { importChain: [this.id] });
|
|
19207
19257
|
if (!variable) {
|
|
19208
19258
|
return this.error(parseAst_js.logMissingJsxExport(baseName, id, this.id), nodeStart);
|
|
19209
19259
|
}
|
|
19210
19260
|
return variable;
|
|
19211
19261
|
}
|
|
19212
|
-
getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
|
|
19262
|
+
getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, importChain) {
|
|
19213
19263
|
let foundSyntheticDeclaration = null;
|
|
19214
19264
|
const foundInternalDeclarations = new Map();
|
|
19215
19265
|
const foundExternalDeclarations = new Set();
|
|
@@ -19221,7 +19271,7 @@ class Module {
|
|
|
19221
19271
|
const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
|
|
19222
19272
|
// We are creating a copy to handle the case where the same binding is
|
|
19223
19273
|
// imported through different namespace reexports gracefully
|
|
19224
|
-
copyNameToModulesMap(searchedNamesAndModules));
|
|
19274
|
+
copyNameToModulesMap(searchedNamesAndModules), importChain);
|
|
19225
19275
|
if (module instanceof ExternalModule || options?.indirectExternal) {
|
|
19226
19276
|
foundExternalDeclarations.add(variable);
|
|
19227
19277
|
}
|
|
@@ -19262,7 +19312,9 @@ class Module {
|
|
|
19262
19312
|
const syntheticNamespaces = new Set();
|
|
19263
19313
|
for (const module of [this, ...this.exportAllModules]) {
|
|
19264
19314
|
if (module instanceof ExternalModule) {
|
|
19265
|
-
const [externalVariable] = module.getVariableForExportName('*'
|
|
19315
|
+
const [externalVariable] = module.getVariableForExportName('*', {
|
|
19316
|
+
importChain: [this.id]
|
|
19317
|
+
});
|
|
19266
19318
|
externalVariable.includePath(UNKNOWN_PATH, createInclusionContext());
|
|
19267
19319
|
this.includedImports.add(externalVariable);
|
|
19268
19320
|
externalNamespaces.add(externalVariable);
|
|
@@ -23109,7 +23161,7 @@ class Graph {
|
|
|
23109
23161
|
for (const module of this.modules) {
|
|
23110
23162
|
for (const importDescription of module.importDescriptions.values()) {
|
|
23111
23163
|
if (importDescription.name !== '*') {
|
|
23112
|
-
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
|
|
23164
|
+
const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
|
|
23113
23165
|
if (!variable) {
|
|
23114
23166
|
module.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
|
|
23115
23167
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
|
@@ -2,36 +2,6 @@
|
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
4
|
|
|
5
|
-
let cachedUint8ArrayMemory0 = null;
|
|
6
|
-
|
|
7
|
-
function getUint8ArrayMemory0() {
|
|
8
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
9
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
10
|
-
}
|
|
11
|
-
return cachedUint8ArrayMemory0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
|
-
|
|
16
|
-
cachedTextDecoder.decode();
|
|
17
|
-
|
|
18
|
-
function decodeText(ptr, len) {
|
|
19
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getStringFromWasm0(ptr, len) {
|
|
23
|
-
ptr = ptr >>> 0;
|
|
24
|
-
return decodeText(ptr, len);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let heap = new Array(128).fill(undefined);
|
|
28
|
-
|
|
29
|
-
heap.push(undefined, null, true, false);
|
|
30
|
-
|
|
31
|
-
function getObject(idx) { return heap[idx]; }
|
|
32
|
-
|
|
33
|
-
let heap_next = heap.length;
|
|
34
|
-
|
|
35
5
|
function addHeapObject(obj) {
|
|
36
6
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
37
7
|
const idx = heap_next;
|
|
@@ -41,28 +11,46 @@ function addHeapObject(obj) {
|
|
|
41
11
|
return idx;
|
|
42
12
|
}
|
|
43
13
|
|
|
14
|
+
function dropObject(idx) {
|
|
15
|
+
if (idx < 132) return;
|
|
16
|
+
heap[idx] = heap_next;
|
|
17
|
+
heap_next = idx;
|
|
18
|
+
}
|
|
19
|
+
|
|
44
20
|
function getArrayU8FromWasm0(ptr, len) {
|
|
45
21
|
ptr = ptr >>> 0;
|
|
46
22
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
47
23
|
}
|
|
48
24
|
|
|
49
|
-
let
|
|
25
|
+
let cachedDataViewMemory0 = null;
|
|
26
|
+
function getDataViewMemory0() {
|
|
27
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
28
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
29
|
+
}
|
|
30
|
+
return cachedDataViewMemory0;
|
|
31
|
+
}
|
|
50
32
|
|
|
51
|
-
|
|
33
|
+
function getStringFromWasm0(ptr, len) {
|
|
34
|
+
ptr = ptr >>> 0;
|
|
35
|
+
return decodeText(ptr, len);
|
|
36
|
+
}
|
|
52
37
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
read: arg.length,
|
|
59
|
-
written: buf.length
|
|
60
|
-
};
|
|
38
|
+
let cachedUint8ArrayMemory0 = null;
|
|
39
|
+
function getUint8ArrayMemory0() {
|
|
40
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
41
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
61
42
|
}
|
|
43
|
+
return cachedUint8ArrayMemory0;
|
|
62
44
|
}
|
|
63
45
|
|
|
64
|
-
function
|
|
46
|
+
function getObject(idx) { return heap[idx]; }
|
|
47
|
+
|
|
48
|
+
let heap = new Array(128).fill(undefined);
|
|
49
|
+
heap.push(undefined, null, true, false);
|
|
50
|
+
|
|
51
|
+
let heap_next = heap.length;
|
|
65
52
|
|
|
53
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
66
54
|
if (realloc === undefined) {
|
|
67
55
|
const buf = cachedTextEncoder.encode(arg);
|
|
68
56
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
@@ -83,7 +71,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
83
71
|
if (code > 0x7F) break;
|
|
84
72
|
mem[ptr + offset] = code;
|
|
85
73
|
}
|
|
86
|
-
|
|
87
74
|
if (offset !== len) {
|
|
88
75
|
if (offset !== 0) {
|
|
89
76
|
arg = arg.slice(offset);
|
|
@@ -100,33 +87,40 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
100
87
|
return ptr;
|
|
101
88
|
}
|
|
102
89
|
|
|
103
|
-
let cachedDataViewMemory0 = null;
|
|
104
|
-
|
|
105
|
-
function getDataViewMemory0() {
|
|
106
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
107
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
108
|
-
}
|
|
109
|
-
return cachedDataViewMemory0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function dropObject(idx) {
|
|
113
|
-
if (idx < 132) return;
|
|
114
|
-
heap[idx] = heap_next;
|
|
115
|
-
heap_next = idx;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
90
|
function takeObject(idx) {
|
|
119
91
|
const ret = getObject(idx);
|
|
120
92
|
dropObject(idx);
|
|
121
93
|
return ret;
|
|
122
94
|
}
|
|
95
|
+
|
|
96
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
97
|
+
cachedTextDecoder.decode();
|
|
98
|
+
function decodeText(ptr, len) {
|
|
99
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const cachedTextEncoder = new TextEncoder();
|
|
103
|
+
|
|
104
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
105
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
106
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
107
|
+
view.set(buf);
|
|
108
|
+
return {
|
|
109
|
+
read: arg.length,
|
|
110
|
+
written: buf.length
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let WASM_VECTOR_LEN = 0;
|
|
116
|
+
|
|
123
117
|
/**
|
|
124
118
|
* @param {string} code
|
|
125
119
|
* @param {boolean} allow_return_outside_function
|
|
126
120
|
* @param {boolean} jsx
|
|
127
121
|
* @returns {Uint8Array}
|
|
128
122
|
*/
|
|
129
|
-
|
|
123
|
+
function parse(code, allow_return_outside_function, jsx) {
|
|
130
124
|
try {
|
|
131
125
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
132
126
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
@@ -140,18 +134,19 @@ exports.parse = function(code, allow_return_outside_function, jsx) {
|
|
|
140
134
|
} finally {
|
|
141
135
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
142
136
|
}
|
|
143
|
-
}
|
|
137
|
+
}
|
|
138
|
+
exports.parse = parse;
|
|
144
139
|
|
|
145
140
|
/**
|
|
146
141
|
* @param {Uint8Array} input
|
|
147
142
|
* @returns {string}
|
|
148
143
|
*/
|
|
149
|
-
|
|
144
|
+
function xxhashBase16(input) {
|
|
150
145
|
let deferred1_0;
|
|
151
146
|
let deferred1_1;
|
|
152
147
|
try {
|
|
153
148
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
154
|
-
wasm.
|
|
149
|
+
wasm.xxhashBase16(retptr, addHeapObject(input));
|
|
155
150
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
156
151
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
157
152
|
deferred1_0 = r0;
|
|
@@ -161,13 +156,14 @@ exports.xxhashBase64Url = function(input) {
|
|
|
161
156
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
162
157
|
wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
|
|
163
158
|
}
|
|
164
|
-
}
|
|
159
|
+
}
|
|
160
|
+
exports.xxhashBase16 = xxhashBase16;
|
|
165
161
|
|
|
166
162
|
/**
|
|
167
163
|
* @param {Uint8Array} input
|
|
168
164
|
* @returns {string}
|
|
169
165
|
*/
|
|
170
|
-
|
|
166
|
+
function xxhashBase36(input) {
|
|
171
167
|
let deferred1_0;
|
|
172
168
|
let deferred1_1;
|
|
173
169
|
try {
|
|
@@ -182,18 +178,19 @@ exports.xxhashBase36 = function(input) {
|
|
|
182
178
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
183
179
|
wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
|
|
184
180
|
}
|
|
185
|
-
}
|
|
181
|
+
}
|
|
182
|
+
exports.xxhashBase36 = xxhashBase36;
|
|
186
183
|
|
|
187
184
|
/**
|
|
188
185
|
* @param {Uint8Array} input
|
|
189
186
|
* @returns {string}
|
|
190
187
|
*/
|
|
191
|
-
|
|
188
|
+
function xxhashBase64Url(input) {
|
|
192
189
|
let deferred1_0;
|
|
193
190
|
let deferred1_1;
|
|
194
191
|
try {
|
|
195
192
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
196
|
-
wasm.
|
|
193
|
+
wasm.xxhashBase64Url(retptr, addHeapObject(input));
|
|
197
194
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
198
195
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
199
196
|
deferred1_0 = r0;
|
|
@@ -203,9 +200,10 @@ exports.xxhashBase16 = function(input) {
|
|
|
203
200
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
204
201
|
wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
|
|
205
202
|
}
|
|
206
|
-
}
|
|
203
|
+
}
|
|
204
|
+
exports.xxhashBase64Url = xxhashBase64Url;
|
|
207
205
|
|
|
208
|
-
exports.
|
|
206
|
+
exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
209
207
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
210
208
|
};
|
|
211
209
|
|
|
@@ -221,7 +219,7 @@ exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
|
221
219
|
}
|
|
222
220
|
};
|
|
223
221
|
|
|
224
|
-
exports.
|
|
222
|
+
exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
225
223
|
const ret = getObject(arg0).length;
|
|
226
224
|
return ret;
|
|
227
225
|
};
|
|
@@ -231,7 +229,7 @@ exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
|
231
229
|
return addHeapObject(ret);
|
|
232
230
|
};
|
|
233
231
|
|
|
234
|
-
exports.
|
|
232
|
+
exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
235
233
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
236
234
|
};
|
|
237
235
|
|
|
@@ -251,4 +249,3 @@ const wasmPath = `${__dirname}/bindings_wasm_bg.wasm`;
|
|
|
251
249
|
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
252
250
|
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
253
251
|
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
254
|
-
|
|
Binary file
|