@rollup/wasm-node 4.18.1 → 4.19.0
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 +183 -118
- package/dist/es/shared/parseAst.js +25 -13
- 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 +19 -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 +25 -13
- package/dist/shared/rollup.js +183 -118
- 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 +18 -17
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.19.0
|
|
4
|
+
Sat, 20 Jul 2024 05:45:44 GMT - commit 28546b5821efcb72c2eb05f422d986524647a0e3
|
|
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.19.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -1500,6 +1500,42 @@ for (let i = 0; i < chars.length; i++) {
|
|
|
1500
1500
|
intToChar[i] = c;
|
|
1501
1501
|
charToInt[c] = i;
|
|
1502
1502
|
}
|
|
1503
|
+
function decodeInteger(reader, relative) {
|
|
1504
|
+
let value = 0;
|
|
1505
|
+
let shift = 0;
|
|
1506
|
+
let integer = 0;
|
|
1507
|
+
do {
|
|
1508
|
+
const c = reader.next();
|
|
1509
|
+
integer = charToInt[c];
|
|
1510
|
+
value |= (integer & 31) << shift;
|
|
1511
|
+
shift += 5;
|
|
1512
|
+
} while (integer & 32);
|
|
1513
|
+
const shouldNegate = value & 1;
|
|
1514
|
+
value >>>= 1;
|
|
1515
|
+
if (shouldNegate) {
|
|
1516
|
+
value = -0x80000000 | -value;
|
|
1517
|
+
}
|
|
1518
|
+
return relative + value;
|
|
1519
|
+
}
|
|
1520
|
+
function encodeInteger(builder, num, relative) {
|
|
1521
|
+
let delta = num - relative;
|
|
1522
|
+
delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;
|
|
1523
|
+
do {
|
|
1524
|
+
let clamped = delta & 0b011111;
|
|
1525
|
+
delta >>>= 5;
|
|
1526
|
+
if (delta > 0)
|
|
1527
|
+
clamped |= 0b100000;
|
|
1528
|
+
builder.write(intToChar[clamped]);
|
|
1529
|
+
} while (delta > 0);
|
|
1530
|
+
return num;
|
|
1531
|
+
}
|
|
1532
|
+
function hasMoreVlq(reader, max) {
|
|
1533
|
+
if (reader.pos >= max)
|
|
1534
|
+
return false;
|
|
1535
|
+
return reader.peek() !== comma;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
const bufLength = 1024 * 16;
|
|
1503
1539
|
// Provide a fallback for older environments.
|
|
1504
1540
|
const td = typeof TextDecoder !== 'undefined'
|
|
1505
1541
|
? /* #__PURE__ */ new TextDecoder()
|
|
@@ -1519,74 +1555,89 @@ const td = typeof TextDecoder !== 'undefined'
|
|
|
1519
1555
|
return out;
|
|
1520
1556
|
},
|
|
1521
1557
|
};
|
|
1558
|
+
class StringWriter {
|
|
1559
|
+
constructor() {
|
|
1560
|
+
this.pos = 0;
|
|
1561
|
+
this.out = '';
|
|
1562
|
+
this.buffer = new Uint8Array(bufLength);
|
|
1563
|
+
}
|
|
1564
|
+
write(v) {
|
|
1565
|
+
const { buffer } = this;
|
|
1566
|
+
buffer[this.pos++] = v;
|
|
1567
|
+
if (this.pos === bufLength) {
|
|
1568
|
+
this.out += td.decode(buffer);
|
|
1569
|
+
this.pos = 0;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
flush() {
|
|
1573
|
+
const { buffer, out, pos } = this;
|
|
1574
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
class StringReader {
|
|
1578
|
+
constructor(buffer) {
|
|
1579
|
+
this.pos = 0;
|
|
1580
|
+
this.buffer = buffer;
|
|
1581
|
+
}
|
|
1582
|
+
next() {
|
|
1583
|
+
return this.buffer.charCodeAt(this.pos++);
|
|
1584
|
+
}
|
|
1585
|
+
peek() {
|
|
1586
|
+
return this.buffer.charCodeAt(this.pos);
|
|
1587
|
+
}
|
|
1588
|
+
indexOf(char) {
|
|
1589
|
+
const { buffer, pos } = this;
|
|
1590
|
+
const idx = buffer.indexOf(char, pos);
|
|
1591
|
+
return idx === -1 ? buffer.length : idx;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1522
1595
|
function decode(mappings) {
|
|
1523
|
-
const
|
|
1596
|
+
const { length } = mappings;
|
|
1597
|
+
const reader = new StringReader(mappings);
|
|
1524
1598
|
const decoded = [];
|
|
1525
|
-
let
|
|
1599
|
+
let genColumn = 0;
|
|
1600
|
+
let sourcesIndex = 0;
|
|
1601
|
+
let sourceLine = 0;
|
|
1602
|
+
let sourceColumn = 0;
|
|
1603
|
+
let namesIndex = 0;
|
|
1526
1604
|
do {
|
|
1527
|
-
const semi = indexOf(
|
|
1605
|
+
const semi = reader.indexOf(';');
|
|
1528
1606
|
const line = [];
|
|
1529
1607
|
let sorted = true;
|
|
1530
1608
|
let lastCol = 0;
|
|
1531
|
-
|
|
1532
|
-
|
|
1609
|
+
genColumn = 0;
|
|
1610
|
+
while (reader.pos < semi) {
|
|
1533
1611
|
let seg;
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
if (col < lastCol)
|
|
1612
|
+
genColumn = decodeInteger(reader, genColumn);
|
|
1613
|
+
if (genColumn < lastCol)
|
|
1537
1614
|
sorted = false;
|
|
1538
|
-
lastCol =
|
|
1539
|
-
if (hasMoreVlq(
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
if (hasMoreVlq(
|
|
1544
|
-
|
|
1545
|
-
seg = [
|
|
1615
|
+
lastCol = genColumn;
|
|
1616
|
+
if (hasMoreVlq(reader, semi)) {
|
|
1617
|
+
sourcesIndex = decodeInteger(reader, sourcesIndex);
|
|
1618
|
+
sourceLine = decodeInteger(reader, sourceLine);
|
|
1619
|
+
sourceColumn = decodeInteger(reader, sourceColumn);
|
|
1620
|
+
if (hasMoreVlq(reader, semi)) {
|
|
1621
|
+
namesIndex = decodeInteger(reader, namesIndex);
|
|
1622
|
+
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
|
|
1546
1623
|
}
|
|
1547
1624
|
else {
|
|
1548
|
-
seg = [
|
|
1625
|
+
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
|
|
1549
1626
|
}
|
|
1550
1627
|
}
|
|
1551
1628
|
else {
|
|
1552
|
-
seg = [
|
|
1629
|
+
seg = [genColumn];
|
|
1553
1630
|
}
|
|
1554
1631
|
line.push(seg);
|
|
1632
|
+
reader.pos++;
|
|
1555
1633
|
}
|
|
1556
1634
|
if (!sorted)
|
|
1557
1635
|
sort(line);
|
|
1558
1636
|
decoded.push(line);
|
|
1559
|
-
|
|
1560
|
-
} while (
|
|
1637
|
+
reader.pos = semi + 1;
|
|
1638
|
+
} while (reader.pos <= length);
|
|
1561
1639
|
return decoded;
|
|
1562
1640
|
}
|
|
1563
|
-
function indexOf(mappings, index) {
|
|
1564
|
-
const idx = mappings.indexOf(';', index);
|
|
1565
|
-
return idx === -1 ? mappings.length : idx;
|
|
1566
|
-
}
|
|
1567
|
-
function decodeInteger(mappings, pos, state, j) {
|
|
1568
|
-
let value = 0;
|
|
1569
|
-
let shift = 0;
|
|
1570
|
-
let integer = 0;
|
|
1571
|
-
do {
|
|
1572
|
-
const c = mappings.charCodeAt(pos++);
|
|
1573
|
-
integer = charToInt[c];
|
|
1574
|
-
value |= (integer & 31) << shift;
|
|
1575
|
-
shift += 5;
|
|
1576
|
-
} while (integer & 32);
|
|
1577
|
-
const shouldNegate = value & 1;
|
|
1578
|
-
value >>>= 1;
|
|
1579
|
-
if (shouldNegate) {
|
|
1580
|
-
value = -0x80000000 | -value;
|
|
1581
|
-
}
|
|
1582
|
-
state[j] += value;
|
|
1583
|
-
return pos;
|
|
1584
|
-
}
|
|
1585
|
-
function hasMoreVlq(mappings, i, length) {
|
|
1586
|
-
if (i >= length)
|
|
1587
|
-
return false;
|
|
1588
|
-
return mappings.charCodeAt(i) !== comma;
|
|
1589
|
-
}
|
|
1590
1641
|
function sort(line) {
|
|
1591
1642
|
line.sort(sortComparator);
|
|
1592
1643
|
}
|
|
@@ -1594,62 +1645,34 @@ function sortComparator(a, b) {
|
|
|
1594
1645
|
return a[0] - b[0];
|
|
1595
1646
|
}
|
|
1596
1647
|
function encode(decoded) {
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
let pos = 0;
|
|
1603
|
-
let out = '';
|
|
1648
|
+
const writer = new StringWriter();
|
|
1649
|
+
let sourcesIndex = 0;
|
|
1650
|
+
let sourceLine = 0;
|
|
1651
|
+
let sourceColumn = 0;
|
|
1652
|
+
let namesIndex = 0;
|
|
1604
1653
|
for (let i = 0; i < decoded.length; i++) {
|
|
1605
1654
|
const line = decoded[i];
|
|
1606
|
-
if (i > 0)
|
|
1607
|
-
|
|
1608
|
-
out += td.decode(buf);
|
|
1609
|
-
pos = 0;
|
|
1610
|
-
}
|
|
1611
|
-
buf[pos++] = semicolon;
|
|
1612
|
-
}
|
|
1655
|
+
if (i > 0)
|
|
1656
|
+
writer.write(semicolon);
|
|
1613
1657
|
if (line.length === 0)
|
|
1614
1658
|
continue;
|
|
1615
|
-
|
|
1659
|
+
let genColumn = 0;
|
|
1616
1660
|
for (let j = 0; j < line.length; j++) {
|
|
1617
1661
|
const segment = line[j];
|
|
1618
|
-
// We can push up to 5 ints, each int can take at most 7 chars, and we
|
|
1619
|
-
// may push a comma.
|
|
1620
|
-
if (pos > subLength) {
|
|
1621
|
-
out += td.decode(sub);
|
|
1622
|
-
buf.copyWithin(0, subLength, pos);
|
|
1623
|
-
pos -= subLength;
|
|
1624
|
-
}
|
|
1625
1662
|
if (j > 0)
|
|
1626
|
-
|
|
1627
|
-
|
|
1663
|
+
writer.write(comma);
|
|
1664
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
1628
1665
|
if (segment.length === 1)
|
|
1629
1666
|
continue;
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1667
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
1668
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
1669
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
1633
1670
|
if (segment.length === 4)
|
|
1634
1671
|
continue;
|
|
1635
|
-
|
|
1672
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
1636
1673
|
}
|
|
1637
1674
|
}
|
|
1638
|
-
return
|
|
1639
|
-
}
|
|
1640
|
-
function encodeInteger(buf, pos, state, segment, j) {
|
|
1641
|
-
const next = segment[j];
|
|
1642
|
-
let num = next - state[j];
|
|
1643
|
-
state[j] = next;
|
|
1644
|
-
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
|
1645
|
-
do {
|
|
1646
|
-
let clamped = num & 0b011111;
|
|
1647
|
-
num >>>= 5;
|
|
1648
|
-
if (num > 0)
|
|
1649
|
-
clamped |= 0b100000;
|
|
1650
|
-
buf[pos++] = intToChar[clamped];
|
|
1651
|
-
} while (num > 0);
|
|
1652
|
-
return pos;
|
|
1675
|
+
return writer.flush();
|
|
1653
1676
|
}
|
|
1654
1677
|
|
|
1655
1678
|
class BitSet {
|
|
@@ -6132,11 +6155,12 @@ const childNodeKeys = {
|
|
|
6132
6155
|
CatchClause: ['param', 'body'],
|
|
6133
6156
|
ChainExpression: ['expression'],
|
|
6134
6157
|
ClassBody: ['body'],
|
|
6135
|
-
ClassDeclaration: ['id', 'superClass', 'body'],
|
|
6136
|
-
ClassExpression: ['id', 'superClass', 'body'],
|
|
6158
|
+
ClassDeclaration: ['decorators', 'id', 'superClass', 'body'],
|
|
6159
|
+
ClassExpression: ['decorators', 'id', 'superClass', 'body'],
|
|
6137
6160
|
ConditionalExpression: ['test', 'consequent', 'alternate'],
|
|
6138
6161
|
ContinueStatement: ['label'],
|
|
6139
6162
|
DebuggerStatement: [],
|
|
6163
|
+
Decorator: ['expression'],
|
|
6140
6164
|
DoWhileStatement: ['body', 'test'],
|
|
6141
6165
|
EmptyStatement: [],
|
|
6142
6166
|
ExportAllDeclaration: ['exported', 'source', 'attributes'],
|
|
@@ -6162,7 +6186,7 @@ const childNodeKeys = {
|
|
|
6162
6186
|
LogicalExpression: ['left', 'right'],
|
|
6163
6187
|
MemberExpression: ['object', 'property'],
|
|
6164
6188
|
MetaProperty: ['meta', 'property'],
|
|
6165
|
-
MethodDefinition: ['key', 'value'],
|
|
6189
|
+
MethodDefinition: ['decorators', 'key', 'value'],
|
|
6166
6190
|
NewExpression: ['callee', 'arguments'],
|
|
6167
6191
|
ObjectExpression: ['properties'],
|
|
6168
6192
|
ObjectPattern: ['properties'],
|
|
@@ -6171,7 +6195,7 @@ const childNodeKeys = {
|
|
|
6171
6195
|
PrivateIdentifier: [],
|
|
6172
6196
|
Program: ['body'],
|
|
6173
6197
|
Property: ['key', 'value'],
|
|
6174
|
-
PropertyDefinition: ['key', 'value'],
|
|
6198
|
+
PropertyDefinition: ['decorators', 'key', 'value'],
|
|
6175
6199
|
RestElement: ['argument'],
|
|
6176
6200
|
ReturnStatement: ['argument'],
|
|
6177
6201
|
SequenceExpression: ['expressions'],
|
|
@@ -10727,6 +10751,15 @@ class ClassBody extends NodeBase {
|
|
|
10727
10751
|
applyDeoptimizations() { }
|
|
10728
10752
|
}
|
|
10729
10753
|
|
|
10754
|
+
function checkEffectForNodes(nodes, context) {
|
|
10755
|
+
for (const node of nodes) {
|
|
10756
|
+
if (node.hasEffects(context)) {
|
|
10757
|
+
return true;
|
|
10758
|
+
}
|
|
10759
|
+
}
|
|
10760
|
+
return false;
|
|
10761
|
+
}
|
|
10762
|
+
|
|
10730
10763
|
class MethodBase extends NodeBase {
|
|
10731
10764
|
constructor() {
|
|
10732
10765
|
super(...arguments);
|
|
@@ -10804,6 +10837,9 @@ class MethodBase extends NodeBase {
|
|
|
10804
10837
|
}
|
|
10805
10838
|
|
|
10806
10839
|
class MethodDefinition extends MethodBase {
|
|
10840
|
+
hasEffects(context) {
|
|
10841
|
+
return super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
|
|
10842
|
+
}
|
|
10807
10843
|
applyDeoptimizations() { }
|
|
10808
10844
|
}
|
|
10809
10845
|
|
|
@@ -10890,7 +10926,7 @@ class ClassNode extends NodeBase {
|
|
|
10890
10926
|
this.applyDeoptimizations();
|
|
10891
10927
|
const initEffect = this.superClass?.hasEffects(context) || this.body.hasEffects(context);
|
|
10892
10928
|
this.id?.markDeclarationReached();
|
|
10893
|
-
return initEffect || super.hasEffects(context);
|
|
10929
|
+
return initEffect || super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
|
|
10894
10930
|
}
|
|
10895
10931
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
10896
10932
|
return interaction.type === INTERACTION_CALLED && path.length === 0
|
|
@@ -10907,6 +10943,8 @@ class ClassNode extends NodeBase {
|
|
|
10907
10943
|
this.included = true;
|
|
10908
10944
|
this.superClass?.include(context, includeChildrenRecursively);
|
|
10909
10945
|
this.body.include(context, includeChildrenRecursively);
|
|
10946
|
+
for (const decorator of this.decorators)
|
|
10947
|
+
decorator.include(context, includeChildrenRecursively);
|
|
10910
10948
|
if (this.id) {
|
|
10911
10949
|
this.id.markDeclarationReached();
|
|
10912
10950
|
this.id.include();
|
|
@@ -11000,6 +11038,7 @@ class ClassDeclaration extends ClassNode {
|
|
|
11000
11038
|
}
|
|
11001
11039
|
const renderedVariable = variable.getName(getPropertyAccess);
|
|
11002
11040
|
if (renderedVariable !== name) {
|
|
11041
|
+
this.decorators.map(decorator => decorator.render(code, options));
|
|
11003
11042
|
this.superClass?.render(code, options);
|
|
11004
11043
|
this.body.render(code, {
|
|
11005
11044
|
...options,
|
|
@@ -11235,6 +11274,13 @@ class DebuggerStatement extends NodeBase {
|
|
|
11235
11274
|
}
|
|
11236
11275
|
}
|
|
11237
11276
|
|
|
11277
|
+
class Decorator extends NodeBase {
|
|
11278
|
+
hasEffects(context) {
|
|
11279
|
+
return (this.expression.hasEffects(context) ||
|
|
11280
|
+
this.expression.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, context));
|
|
11281
|
+
}
|
|
11282
|
+
}
|
|
11283
|
+
|
|
11238
11284
|
function hasLoopBodyEffects(context, body) {
|
|
11239
11285
|
const { brokenFlow, hasBreak, hasContinue, ignore } = context;
|
|
11240
11286
|
const { breaks, continues } = ignore;
|
|
@@ -12487,8 +12533,8 @@ class LogicalExpression extends NodeBase {
|
|
|
12487
12533
|
}
|
|
12488
12534
|
render(code, options, { isCalleeOfRenderedParent, preventASI, renderedParentType, renderedSurroundingElement } = parseAst_js.BLANK) {
|
|
12489
12535
|
if (!this.left.included || !this.right.included) {
|
|
12490
|
-
const operatorPos = findFirstOccurrenceOutsideComment(code.original, this.operator, this.left.end);
|
|
12491
12536
|
if (this.right.included) {
|
|
12537
|
+
const operatorPos = findFirstOccurrenceOutsideComment(code.original, this.operator, this.left.end);
|
|
12492
12538
|
const removePos = findNonWhiteSpace(code.original, operatorPos + 2);
|
|
12493
12539
|
code.remove(this.start, removePos);
|
|
12494
12540
|
if (preventASI) {
|
|
@@ -12497,7 +12543,7 @@ class LogicalExpression extends NodeBase {
|
|
|
12497
12543
|
this.left.removeAnnotations(code);
|
|
12498
12544
|
}
|
|
12499
12545
|
else {
|
|
12500
|
-
code.remove(
|
|
12546
|
+
code.remove(this.left.end, this.end);
|
|
12501
12547
|
}
|
|
12502
12548
|
this.getUsedBranch().render(code, options, {
|
|
12503
12549
|
isCalleeOfRenderedParent,
|
|
@@ -12957,7 +13003,9 @@ class PropertyDefinition extends NodeBase {
|
|
|
12957
13003
|
: UNKNOWN_RETURN_EXPRESSION;
|
|
12958
13004
|
}
|
|
12959
13005
|
hasEffects(context) {
|
|
12960
|
-
return this.key.hasEffects(context) ||
|
|
13006
|
+
return (this.key.hasEffects(context) ||
|
|
13007
|
+
(this.static && !!this.value?.hasEffects(context)) ||
|
|
13008
|
+
checkEffectForNodes(this.decorators, context));
|
|
12961
13009
|
}
|
|
12962
13010
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
12963
13011
|
return !this.value || this.value.hasEffectsOnInteractionAtPath(path, interaction, context);
|
|
@@ -13867,6 +13915,7 @@ const nodeTypeStrings = [
|
|
|
13867
13915
|
'ConditionalExpression',
|
|
13868
13916
|
'ContinueStatement',
|
|
13869
13917
|
'DebuggerStatement',
|
|
13918
|
+
'Decorator',
|
|
13870
13919
|
'ExpressionStatement',
|
|
13871
13920
|
'DoWhileStatement',
|
|
13872
13921
|
'EmptyStatement',
|
|
@@ -13948,6 +13997,7 @@ const nodeConstructors$1 = [
|
|
|
13948
13997
|
ConditionalExpression,
|
|
13949
13998
|
ContinueStatement,
|
|
13950
13999
|
DebuggerStatement,
|
|
14000
|
+
Decorator,
|
|
13951
14001
|
ExpressionStatement,
|
|
13952
14002
|
DoWhileStatement,
|
|
13953
14003
|
EmptyStatement,
|
|
@@ -14099,22 +14149,24 @@ const bufferParsers = [
|
|
|
14099
14149
|
},
|
|
14100
14150
|
function classDeclaration(node, position, buffer) {
|
|
14101
14151
|
const { scope } = node;
|
|
14102
|
-
|
|
14152
|
+
node.decorators = convertNodeList(node, scope, buffer[position], buffer);
|
|
14153
|
+
const idPosition = buffer[position + 1];
|
|
14103
14154
|
node.id =
|
|
14104
14155
|
idPosition === 0 ? null : convertNode(node, scope.parent, idPosition, buffer);
|
|
14105
|
-
const superClassPosition = buffer[position +
|
|
14156
|
+
const superClassPosition = buffer[position + 2];
|
|
14106
14157
|
node.superClass =
|
|
14107
14158
|
superClassPosition === 0 ? null : convertNode(node, scope, superClassPosition, buffer);
|
|
14108
|
-
node.body = convertNode(node, scope, buffer[position +
|
|
14159
|
+
node.body = convertNode(node, scope, buffer[position + 3], buffer);
|
|
14109
14160
|
},
|
|
14110
14161
|
function classExpression(node, position, buffer) {
|
|
14111
14162
|
const { scope } = node;
|
|
14112
|
-
|
|
14163
|
+
node.decorators = convertNodeList(node, scope, buffer[position], buffer);
|
|
14164
|
+
const idPosition = buffer[position + 1];
|
|
14113
14165
|
node.id = idPosition === 0 ? null : convertNode(node, scope, idPosition, buffer);
|
|
14114
|
-
const superClassPosition = buffer[position +
|
|
14166
|
+
const superClassPosition = buffer[position + 2];
|
|
14115
14167
|
node.superClass =
|
|
14116
14168
|
superClassPosition === 0 ? null : convertNode(node, scope, superClassPosition, buffer);
|
|
14117
|
-
node.body = convertNode(node, scope, buffer[position +
|
|
14169
|
+
node.body = convertNode(node, scope, buffer[position + 3], buffer);
|
|
14118
14170
|
},
|
|
14119
14171
|
function conditionalExpression(node, position, buffer) {
|
|
14120
14172
|
const { scope } = node;
|
|
@@ -14128,6 +14180,10 @@ const bufferParsers = [
|
|
|
14128
14180
|
node.label = labelPosition === 0 ? null : convertNode(node, scope, labelPosition, buffer);
|
|
14129
14181
|
},
|
|
14130
14182
|
function debuggerStatement() { },
|
|
14183
|
+
function decorator(node, position, buffer) {
|
|
14184
|
+
const { scope } = node;
|
|
14185
|
+
node.expression = convertNode(node, scope, buffer[position], buffer);
|
|
14186
|
+
},
|
|
14131
14187
|
function directive(node, position, buffer) {
|
|
14132
14188
|
const { scope } = node;
|
|
14133
14189
|
node.directive = buffer.convertString(buffer[position]);
|
|
@@ -14328,9 +14384,10 @@ const bufferParsers = [
|
|
|
14328
14384
|
const flags = buffer[position];
|
|
14329
14385
|
node.static = (flags & 1) === 1;
|
|
14330
14386
|
node.computed = (flags & 2) === 2;
|
|
14331
|
-
node.
|
|
14332
|
-
node.
|
|
14333
|
-
node.
|
|
14387
|
+
node.decorators = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
14388
|
+
node.key = convertNode(node, scope, buffer[position + 2], buffer);
|
|
14389
|
+
node.value = convertNode(node, scope, buffer[position + 3], buffer);
|
|
14390
|
+
node.kind = parseAst_js.FIXED_STRINGS[buffer[position + 4]];
|
|
14334
14391
|
},
|
|
14335
14392
|
function newExpression(node, position, buffer) {
|
|
14336
14393
|
const { scope } = node;
|
|
@@ -14370,8 +14427,9 @@ const bufferParsers = [
|
|
|
14370
14427
|
const flags = buffer[position];
|
|
14371
14428
|
node.static = (flags & 1) === 1;
|
|
14372
14429
|
node.computed = (flags & 2) === 2;
|
|
14373
|
-
node.
|
|
14374
|
-
|
|
14430
|
+
node.decorators = convertNodeList(node, scope, buffer[position + 1], buffer);
|
|
14431
|
+
node.key = convertNode(node, scope, buffer[position + 2], buffer);
|
|
14432
|
+
const valuePosition = buffer[position + 3];
|
|
14375
14433
|
node.value = valuePosition === 0 ? null : convertNode(node, scope, valuePosition, buffer);
|
|
14376
14434
|
},
|
|
14377
14435
|
function restElement(node, position, buffer) {
|
|
@@ -14535,6 +14593,7 @@ const nodeConstructors = {
|
|
|
14535
14593
|
ConditionalExpression,
|
|
14536
14594
|
ContinueStatement,
|
|
14537
14595
|
DebuggerStatement,
|
|
14596
|
+
Decorator,
|
|
14538
14597
|
DoWhileStatement,
|
|
14539
14598
|
EmptyStatement,
|
|
14540
14599
|
ExportAllDeclaration,
|
|
@@ -16067,8 +16126,11 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
16067
16126
|
return `${n}${n}${mechanism}${getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess)};`;
|
|
16068
16127
|
}
|
|
16069
16128
|
let exportBlock = '';
|
|
16070
|
-
|
|
16071
|
-
|
|
16129
|
+
if (namedExportsMode) {
|
|
16130
|
+
for (const { defaultVariableName, importPath, isChunk, name, namedExportsMode: depNamedExportsMode, namespaceVariableName, reexports } of dependencies) {
|
|
16131
|
+
if (!reexports) {
|
|
16132
|
+
continue;
|
|
16133
|
+
}
|
|
16072
16134
|
for (const specifier of reexports) {
|
|
16073
16135
|
if (specifier.reexported !== '*') {
|
|
16074
16136
|
const importName = getReexportedImportName(name, specifier.imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, importPath, externalLiveBindings, getPropertyAccess);
|
|
@@ -16112,8 +16174,11 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
16112
16174
|
: `${lhs}${_}=${_}${rhs};`;
|
|
16113
16175
|
}
|
|
16114
16176
|
}
|
|
16115
|
-
|
|
16116
|
-
|
|
16177
|
+
if (namedExportsMode) {
|
|
16178
|
+
for (const { name, reexports } of dependencies) {
|
|
16179
|
+
if (!reexports) {
|
|
16180
|
+
continue;
|
|
16181
|
+
}
|
|
16117
16182
|
for (const specifier of reexports) {
|
|
16118
16183
|
if (specifier.reexported === '*') {
|
|
16119
16184
|
if (exportBlock)
|
|
@@ -19567,7 +19632,7 @@ function addModuleToManualChunk(alias, module, manualChunkAliasByEntry) {
|
|
|
19567
19632
|
|
|
19568
19633
|
function flru (max) {
|
|
19569
19634
|
var num, curr, prev;
|
|
19570
|
-
var limit = max
|
|
19635
|
+
var limit = max;
|
|
19571
19636
|
|
|
19572
19637
|
function keep(key, value) {
|
|
19573
19638
|
if (++num > limit) {
|
|
@@ -20891,7 +20956,7 @@ const getIndent = (config, compact) => {
|
|
|
20891
20956
|
return '';
|
|
20892
20957
|
}
|
|
20893
20958
|
const configIndent = config.indent;
|
|
20894
|
-
return configIndent === false ? '' : configIndent ?? true;
|
|
20959
|
+
return configIndent === false ? '' : (configIndent ?? true);
|
|
20895
20960
|
};
|
|
20896
20961
|
const ALLOWED_INTEROP_TYPES = new Set([
|
|
20897
20962
|
'compat',
|
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.19.0",
|
|
4
4
|
"description": "Next-generation ES module bundler with Node wasm",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@codemirror/language": "^6.10.2",
|
|
39
39
|
"@codemirror/search": "^6.5.6",
|
|
40
40
|
"@codemirror/state": "^6.4.1",
|
|
41
|
-
"@codemirror/view": "^6.28.
|
|
42
|
-
"@jridgewell/sourcemap-codec": "^1.
|
|
41
|
+
"@codemirror/view": "^6.28.4",
|
|
42
|
+
"@jridgewell/sourcemap-codec": "^1.5.0",
|
|
43
43
|
"@mermaid-js/mermaid-cli": "^10.9.1",
|
|
44
44
|
"@napi-rs/cli": "^2.18.4",
|
|
45
45
|
"@rollup/plugin-alias": "^5.1.0",
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@rollup/plugin-terser": "^0.4.4",
|
|
52
52
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
53
53
|
"@rollup/pluginutils": "^5.1.0",
|
|
54
|
-
"@shikijs/vitepress-twoslash": "^1.10.
|
|
54
|
+
"@shikijs/vitepress-twoslash": "^1.10.3",
|
|
55
55
|
"@types/eslint": "^8.56.10",
|
|
56
56
|
"@types/inquirer": "^9.0.7",
|
|
57
57
|
"@types/mocha": "^10.0.7",
|
|
58
58
|
"@types/node": "~18.18.14",
|
|
59
59
|
"@types/semver": "^7.5.8",
|
|
60
60
|
"@types/yargs-parser": "^21.0.3",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
62
|
-
"@typescript-eslint/parser": "^7.
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
62
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
63
63
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
64
64
|
"@vue/eslint-config-typescript": "^13.0.0",
|
|
65
|
-
"acorn": "^8.12.
|
|
65
|
+
"acorn": "^8.12.1",
|
|
66
66
|
"acorn-import-assertions": "^1.9.0",
|
|
67
67
|
"buble": "^0.20.0",
|
|
68
68
|
"builtin-modules": "^4.0.0",
|
|
@@ -79,27 +79,28 @@
|
|
|
79
79
|
"eslint-plugin-import": "^2.29.1",
|
|
80
80
|
"eslint-plugin-prettier": "^5.1.3",
|
|
81
81
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
82
|
-
"eslint-plugin-vue": "^9.
|
|
82
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
83
83
|
"fixturify": "^3.0.0",
|
|
84
84
|
"flru": "^1.0.2",
|
|
85
85
|
"fs-extra": "^11.2.0",
|
|
86
86
|
"github-api": "^3.4.0",
|
|
87
87
|
"husky": "^9.0.11",
|
|
88
|
-
"inquirer": "^
|
|
88
|
+
"inquirer": "^10.0.1",
|
|
89
89
|
"is-reference": "^3.0.2",
|
|
90
90
|
"lint-staged": "^15.2.7",
|
|
91
91
|
"locate-character": "^3.0.0",
|
|
92
92
|
"magic-string": "^0.30.10",
|
|
93
|
-
"mocha": "^10.
|
|
93
|
+
"mocha": "^10.6.0",
|
|
94
94
|
"nodemon": "^3.1.4",
|
|
95
|
+
"npm-audit-resolver": "^3.0.0-RC.0",
|
|
95
96
|
"nyc": "^17.0.0",
|
|
96
97
|
"pinia": "^2.1.7",
|
|
97
|
-
"prettier": "^3.3.
|
|
98
|
+
"prettier": "^3.3.3",
|
|
98
99
|
"pretty-bytes": "^6.1.1",
|
|
99
100
|
"pretty-ms": "^9.0.0",
|
|
100
101
|
"requirejs": "^2.3.6",
|
|
101
|
-
"rollup": "^4.18.
|
|
102
|
-
"rollup-plugin-license": "^3.5.
|
|
102
|
+
"rollup": "^4.18.1",
|
|
103
|
+
"rollup-plugin-license": "^3.5.2",
|
|
103
104
|
"rollup-plugin-string": "^3.0.0",
|
|
104
105
|
"semver": "^7.6.2",
|
|
105
106
|
"shx": "^0.3.4",
|
|
@@ -107,11 +108,11 @@
|
|
|
107
108
|
"source-map": "^0.7.4",
|
|
108
109
|
"source-map-support": "^0.5.21",
|
|
109
110
|
"systemjs": "^6.15.1",
|
|
110
|
-
"terser": "^5.31.
|
|
111
|
+
"terser": "^5.31.2",
|
|
111
112
|
"tslib": "^2.6.3",
|
|
112
113
|
"typescript": "^5.5.3",
|
|
113
|
-
"vite": "^5.3.
|
|
114
|
-
"vitepress": "^1.
|
|
114
|
+
"vite": "^5.3.4",
|
|
115
|
+
"vitepress": "^1.3.1",
|
|
115
116
|
"vue": "^3.4.31",
|
|
116
117
|
"wasm-pack": "^0.13.0",
|
|
117
118
|
"yargs-parser": "^21.1.1"
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"overrides": {
|
|
120
121
|
"axios": "^1.7.2",
|
|
121
122
|
"semver": "^7.6.2",
|
|
122
|
-
"ws": "^8.
|
|
123
|
+
"ws": "^8.18.0"
|
|
123
124
|
},
|
|
124
125
|
"overrides_comments": {
|
|
125
126
|
"ws": "mermaid requires an older 8.13.0 version via puppeteer with vulnerabilities"
|