rollup 4.60.0 → 4.60.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 +3 -3
- 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 +358 -17
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +614 -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 +614 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +358 -17
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +32 -32
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.60.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.60.1
|
|
4
|
+
Mon, 30 Mar 2026 04:32:12 GMT - commit ae871d762f6bbeb4320d28fe179211168f27a434
|
|
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.60.
|
|
45
|
+
var version = "4.60.1";
|
|
46
46
|
|
|
47
47
|
function ensureArray$1(items) {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
@@ -980,6 +980,8 @@ function requireConstants () {
|
|
|
980
980
|
const WIN_SLASH = '\\\\/';
|
|
981
981
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
982
982
|
|
|
983
|
+
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
984
|
+
|
|
983
985
|
/**
|
|
984
986
|
* Posix glob regex
|
|
985
987
|
*/
|
|
@@ -1046,6 +1048,7 @@ function requireConstants () {
|
|
|
1046
1048
|
*/
|
|
1047
1049
|
|
|
1048
1050
|
const POSIX_REGEX_SOURCE = {
|
|
1051
|
+
__proto__: null,
|
|
1049
1052
|
alnum: 'a-zA-Z0-9',
|
|
1050
1053
|
alpha: 'a-zA-Z',
|
|
1051
1054
|
ascii: '\\x00-\\x7F',
|
|
@@ -1063,6 +1066,7 @@ function requireConstants () {
|
|
|
1063
1066
|
};
|
|
1064
1067
|
|
|
1065
1068
|
constants = {
|
|
1069
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
1066
1070
|
MAX_LENGTH: 1024 * 64,
|
|
1067
1071
|
POSIX_REGEX_SOURCE,
|
|
1068
1072
|
|
|
@@ -1684,6 +1688,277 @@ function requireParse () {
|
|
|
1684
1688
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
1685
1689
|
};
|
|
1686
1690
|
|
|
1691
|
+
const splitTopLevel = input => {
|
|
1692
|
+
const parts = [];
|
|
1693
|
+
let bracket = 0;
|
|
1694
|
+
let paren = 0;
|
|
1695
|
+
let quote = 0;
|
|
1696
|
+
let value = '';
|
|
1697
|
+
let escaped = false;
|
|
1698
|
+
|
|
1699
|
+
for (const ch of input) {
|
|
1700
|
+
if (escaped === true) {
|
|
1701
|
+
value += ch;
|
|
1702
|
+
escaped = false;
|
|
1703
|
+
continue;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
if (ch === '\\') {
|
|
1707
|
+
value += ch;
|
|
1708
|
+
escaped = true;
|
|
1709
|
+
continue;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
if (ch === '"') {
|
|
1713
|
+
quote = quote === 1 ? 0 : 1;
|
|
1714
|
+
value += ch;
|
|
1715
|
+
continue;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
if (quote === 0) {
|
|
1719
|
+
if (ch === '[') {
|
|
1720
|
+
bracket++;
|
|
1721
|
+
} else if (ch === ']' && bracket > 0) {
|
|
1722
|
+
bracket--;
|
|
1723
|
+
} else if (bracket === 0) {
|
|
1724
|
+
if (ch === '(') {
|
|
1725
|
+
paren++;
|
|
1726
|
+
} else if (ch === ')' && paren > 0) {
|
|
1727
|
+
paren--;
|
|
1728
|
+
} else if (ch === '|' && paren === 0) {
|
|
1729
|
+
parts.push(value);
|
|
1730
|
+
value = '';
|
|
1731
|
+
continue;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
value += ch;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
parts.push(value);
|
|
1740
|
+
return parts;
|
|
1741
|
+
};
|
|
1742
|
+
|
|
1743
|
+
const isPlainBranch = branch => {
|
|
1744
|
+
let escaped = false;
|
|
1745
|
+
|
|
1746
|
+
for (const ch of branch) {
|
|
1747
|
+
if (escaped === true) {
|
|
1748
|
+
escaped = false;
|
|
1749
|
+
continue;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
if (ch === '\\') {
|
|
1753
|
+
escaped = true;
|
|
1754
|
+
continue;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
if (/[?*+@!()[\]{}]/.test(ch)) {
|
|
1758
|
+
return false;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
return true;
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
const normalizeSimpleBranch = branch => {
|
|
1766
|
+
let value = branch.trim();
|
|
1767
|
+
let changed = true;
|
|
1768
|
+
|
|
1769
|
+
while (changed === true) {
|
|
1770
|
+
changed = false;
|
|
1771
|
+
|
|
1772
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
1773
|
+
value = value.slice(2, -1);
|
|
1774
|
+
changed = true;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
if (!isPlainBranch(value)) {
|
|
1779
|
+
return;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
return value.replace(/\\(.)/g, '$1');
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
const hasRepeatedCharPrefixOverlap = branches => {
|
|
1786
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
1787
|
+
|
|
1788
|
+
for (let i = 0; i < values.length; i++) {
|
|
1789
|
+
for (let j = i + 1; j < values.length; j++) {
|
|
1790
|
+
const a = values[i];
|
|
1791
|
+
const b = values[j];
|
|
1792
|
+
const char = a[0];
|
|
1793
|
+
|
|
1794
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) {
|
|
1799
|
+
return true;
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
return false;
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
const parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
1808
|
+
if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
let bracket = 0;
|
|
1813
|
+
let paren = 0;
|
|
1814
|
+
let quote = 0;
|
|
1815
|
+
let escaped = false;
|
|
1816
|
+
|
|
1817
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
1818
|
+
const ch = pattern[i];
|
|
1819
|
+
|
|
1820
|
+
if (escaped === true) {
|
|
1821
|
+
escaped = false;
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
if (ch === '\\') {
|
|
1826
|
+
escaped = true;
|
|
1827
|
+
continue;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
if (ch === '"') {
|
|
1831
|
+
quote = quote === 1 ? 0 : 1;
|
|
1832
|
+
continue;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
if (quote === 1) {
|
|
1836
|
+
continue;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
if (ch === '[') {
|
|
1840
|
+
bracket++;
|
|
1841
|
+
continue;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
if (ch === ']' && bracket > 0) {
|
|
1845
|
+
bracket--;
|
|
1846
|
+
continue;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
if (bracket > 0) {
|
|
1850
|
+
continue;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
if (ch === '(') {
|
|
1854
|
+
paren++;
|
|
1855
|
+
continue;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
if (ch === ')') {
|
|
1859
|
+
paren--;
|
|
1860
|
+
|
|
1861
|
+
if (paren === 0) {
|
|
1862
|
+
if (requireEnd === true && i !== pattern.length - 1) {
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
return {
|
|
1867
|
+
type: pattern[0],
|
|
1868
|
+
body: pattern.slice(2, i),
|
|
1869
|
+
end: i
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
const getStarExtglobSequenceOutput = pattern => {
|
|
1877
|
+
let index = 0;
|
|
1878
|
+
const chars = [];
|
|
1879
|
+
|
|
1880
|
+
while (index < pattern.length) {
|
|
1881
|
+
const match = parseRepeatedExtglob(pattern.slice(index), false);
|
|
1882
|
+
|
|
1883
|
+
if (!match || match.type !== '*') {
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
const branches = splitTopLevel(match.body).map(branch => branch.trim());
|
|
1888
|
+
if (branches.length !== 1) {
|
|
1889
|
+
return;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
1893
|
+
if (!branch || branch.length !== 1) {
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
chars.push(branch);
|
|
1898
|
+
index += match.end + 1;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
if (chars.length < 1) {
|
|
1902
|
+
return;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
const source = chars.length === 1
|
|
1906
|
+
? utils.escapeRegex(chars[0])
|
|
1907
|
+
: `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`;
|
|
1908
|
+
|
|
1909
|
+
return `${source}*`;
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1912
|
+
const repeatedExtglobRecursion = pattern => {
|
|
1913
|
+
let depth = 0;
|
|
1914
|
+
let value = pattern.trim();
|
|
1915
|
+
let match = parseRepeatedExtglob(value);
|
|
1916
|
+
|
|
1917
|
+
while (match) {
|
|
1918
|
+
depth++;
|
|
1919
|
+
value = match.body.trim();
|
|
1920
|
+
match = parseRepeatedExtglob(value);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
return depth;
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
const analyzeRepeatedExtglob = (body, options) => {
|
|
1927
|
+
if (options.maxExtglobRecursion === false) {
|
|
1928
|
+
return { risky: false };
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
const max =
|
|
1932
|
+
typeof options.maxExtglobRecursion === 'number'
|
|
1933
|
+
? options.maxExtglobRecursion
|
|
1934
|
+
: constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
1935
|
+
|
|
1936
|
+
const branches = splitTopLevel(body).map(branch => branch.trim());
|
|
1937
|
+
|
|
1938
|
+
if (branches.length > 1) {
|
|
1939
|
+
if (
|
|
1940
|
+
branches.some(branch => branch === '') ||
|
|
1941
|
+
branches.some(branch => /^[*?]+$/.test(branch)) ||
|
|
1942
|
+
hasRepeatedCharPrefixOverlap(branches)
|
|
1943
|
+
) {
|
|
1944
|
+
return { risky: true };
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
for (const branch of branches) {
|
|
1949
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
1950
|
+
if (safeOutput) {
|
|
1951
|
+
return { risky: true, safeOutput };
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
if (repeatedExtglobRecursion(branch) > max) {
|
|
1955
|
+
return { risky: true };
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
return { risky: false };
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1687
1962
|
/**
|
|
1688
1963
|
* Parse the given input string.
|
|
1689
1964
|
* @param {String} input
|
|
@@ -1864,6 +2139,8 @@ function requireParse () {
|
|
|
1864
2139
|
token.prev = prev;
|
|
1865
2140
|
token.parens = state.parens;
|
|
1866
2141
|
token.output = state.output;
|
|
2142
|
+
token.startIndex = state.index;
|
|
2143
|
+
token.tokensIndex = tokens.length;
|
|
1867
2144
|
const output = (opts.capture ? '(' : '') + token.open;
|
|
1868
2145
|
|
|
1869
2146
|
increment('parens');
|
|
@@ -1873,6 +2150,34 @@ function requireParse () {
|
|
|
1873
2150
|
};
|
|
1874
2151
|
|
|
1875
2152
|
const extglobClose = token => {
|
|
2153
|
+
const literal = input.slice(token.startIndex, state.index + 1);
|
|
2154
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
2155
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
2156
|
+
|
|
2157
|
+
if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {
|
|
2158
|
+
const safeOutput = analysis.safeOutput
|
|
2159
|
+
? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)
|
|
2160
|
+
: undefined;
|
|
2161
|
+
const open = tokens[token.tokensIndex];
|
|
2162
|
+
|
|
2163
|
+
open.type = 'text';
|
|
2164
|
+
open.value = literal;
|
|
2165
|
+
open.output = safeOutput || utils.escapeRegex(literal);
|
|
2166
|
+
|
|
2167
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
2168
|
+
tokens[i].value = '';
|
|
2169
|
+
tokens[i].output = '';
|
|
2170
|
+
delete tokens[i].suffix;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
state.output = token.output + open.output;
|
|
2174
|
+
state.backtrack = true;
|
|
2175
|
+
|
|
2176
|
+
push({ type: 'paren', extglob: true, value, output: '' });
|
|
2177
|
+
decrement('parens');
|
|
2178
|
+
return;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
1876
2181
|
let output = token.close + (opts.capture ? ')' : '');
|
|
1877
2182
|
let rest;
|
|
1878
2183
|
|
|
@@ -2965,6 +3270,14 @@ function requirePicomatch$1 () {
|
|
|
2965
3270
|
* Compile a regular expression from the `state` object returned by the
|
|
2966
3271
|
* [parse()](#parse) method.
|
|
2967
3272
|
*
|
|
3273
|
+
* ```js
|
|
3274
|
+
* const picomatch = require('picomatch');
|
|
3275
|
+
* const state = picomatch.parse('*.js');
|
|
3276
|
+
* // picomatch.compileRe(state[, options]);
|
|
3277
|
+
*
|
|
3278
|
+
* console.log(picomatch.compileRe(state));
|
|
3279
|
+
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
|
3280
|
+
* ```
|
|
2968
3281
|
* @param {Object} `state`
|
|
2969
3282
|
* @param {Object} `options`
|
|
2970
3283
|
* @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
|
|
@@ -3000,10 +3313,10 @@ function requirePicomatch$1 () {
|
|
|
3000
3313
|
*
|
|
3001
3314
|
* ```js
|
|
3002
3315
|
* const picomatch = require('picomatch');
|
|
3003
|
-
*
|
|
3004
|
-
* // picomatch.compileRe(state[, options]);
|
|
3316
|
+
* // picomatch.makeRe(state[, options]);
|
|
3005
3317
|
*
|
|
3006
|
-
*
|
|
3318
|
+
* const result = picomatch.makeRe('*.js');
|
|
3319
|
+
* console.log(result);
|
|
3007
3320
|
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
|
3008
3321
|
* ```
|
|
3009
3322
|
* @param {String} `state` The object returned from the `.parse` method.
|
|
@@ -18471,7 +18784,7 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
|
|
|
18471
18784
|
identifier: null,
|
|
18472
18785
|
localName: MISSING_EXPORT_SHIM_VARIABLE
|
|
18473
18786
|
};
|
|
18474
|
-
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain) {
|
|
18787
|
+
function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain, sideEffectModules, exportOrReexportModules) {
|
|
18475
18788
|
const searchedModules = searchedNamesAndModules.get(name);
|
|
18476
18789
|
if (searchedModules) {
|
|
18477
18790
|
if (searchedModules.has(target)) {
|
|
@@ -18483,10 +18796,12 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
|
|
|
18483
18796
|
searchedNamesAndModules.set(name, new Set([target]));
|
|
18484
18797
|
}
|
|
18485
18798
|
return target.getVariableForExportName(name, {
|
|
18799
|
+
exportOrReexportModules,
|
|
18486
18800
|
importChain,
|
|
18487
18801
|
importerForSideEffects,
|
|
18488
18802
|
isExportAllSearch,
|
|
18489
|
-
searchedNamesAndModules
|
|
18803
|
+
searchedNamesAndModules,
|
|
18804
|
+
sideEffectModules
|
|
18490
18805
|
});
|
|
18491
18806
|
}
|
|
18492
18807
|
function getAndExtendSideEffectModules(variable, module) {
|
|
@@ -18807,7 +19122,7 @@ class Module {
|
|
|
18807
19122
|
}
|
|
18808
19123
|
return this.syntheticNamespace;
|
|
18809
19124
|
}
|
|
18810
|
-
getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
|
|
19125
|
+
getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules, sideEffectModules, exportOrReexportModules } = parseAst_js.EMPTY_OBJECT) {
|
|
18811
19126
|
if (name[0] === '*') {
|
|
18812
19127
|
if (name.length === 1) {
|
|
18813
19128
|
// export * from './other'
|
|
@@ -18822,7 +19137,7 @@ class Module {
|
|
|
18822
19137
|
// export { foo } from './other'
|
|
18823
19138
|
const reexportDeclaration = this.reexportDescriptions.get(name);
|
|
18824
19139
|
if (reexportDeclaration) {
|
|
18825
|
-
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id]);
|
|
19140
|
+
const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id], sideEffectModules, exportOrReexportModules);
|
|
18826
19141
|
if (!variable) {
|
|
18827
19142
|
return this.error(parseAst_js.logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
|
|
18828
19143
|
}
|
|
@@ -18832,6 +19147,10 @@ class Module {
|
|
|
18832
19147
|
getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, variable, (getNewSet)).add(this);
|
|
18833
19148
|
}
|
|
18834
19149
|
}
|
|
19150
|
+
if (this.info.moduleSideEffects) {
|
|
19151
|
+
sideEffectModules?.add(this);
|
|
19152
|
+
}
|
|
19153
|
+
exportOrReexportModules?.add(this);
|
|
18835
19154
|
return [variable];
|
|
18836
19155
|
}
|
|
18837
19156
|
const exportDeclaration = this.exportDescriptions.get(name);
|
|
@@ -18841,8 +19160,10 @@ class Module {
|
|
|
18841
19160
|
}
|
|
18842
19161
|
const name = exportDeclaration.localName;
|
|
18843
19162
|
const variable = this.traceVariable(name, {
|
|
19163
|
+
exportOrReexportModules,
|
|
18844
19164
|
importerForSideEffects,
|
|
18845
|
-
searchedNamesAndModules
|
|
19165
|
+
searchedNamesAndModules,
|
|
19166
|
+
sideEffectModules
|
|
18846
19167
|
});
|
|
18847
19168
|
if (!variable) {
|
|
18848
19169
|
return [null, { missingButExportExists: true }];
|
|
@@ -18851,6 +19172,8 @@ class Module {
|
|
|
18851
19172
|
setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
|
|
18852
19173
|
getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, variable, (getNewSet)).add(this);
|
|
18853
19174
|
}
|
|
19175
|
+
sideEffectModules?.add(this);
|
|
19176
|
+
exportOrReexportModules?.add(this);
|
|
18854
19177
|
return [variable];
|
|
18855
19178
|
}
|
|
18856
19179
|
if (onlyExplicit) {
|
|
@@ -18861,6 +19184,19 @@ class Module {
|
|
|
18861
19184
|
this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, [...importChain, this.id]);
|
|
18862
19185
|
this.namespaceReexportsByName.set(name, foundNamespaceReexport);
|
|
18863
19186
|
if (foundNamespaceReexport[0]) {
|
|
19187
|
+
const [namespaceReexportVariable, namespaceReexportOptions] = foundNamespaceReexport;
|
|
19188
|
+
if (importerForSideEffects) {
|
|
19189
|
+
const { exportOrReexportModules, sideEffectModules } = namespaceReexportOptions;
|
|
19190
|
+
for (const module of exportOrReexportModules) {
|
|
19191
|
+
if (importerForSideEffects.alternativeReexportModules.has(namespaceReexportVariable)) {
|
|
19192
|
+
continue;
|
|
19193
|
+
}
|
|
19194
|
+
setAlternativeExporterIfCyclic(namespaceReexportVariable, importerForSideEffects, module);
|
|
19195
|
+
}
|
|
19196
|
+
for (const module of sideEffectModules) {
|
|
19197
|
+
getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, namespaceReexportVariable, (getNewSet)).add(module);
|
|
19198
|
+
}
|
|
19199
|
+
}
|
|
18864
19200
|
return foundNamespaceReexport;
|
|
18865
19201
|
}
|
|
18866
19202
|
}
|
|
@@ -19064,7 +19400,7 @@ class Module {
|
|
|
19064
19400
|
transformFiles: this.transformFiles
|
|
19065
19401
|
};
|
|
19066
19402
|
}
|
|
19067
|
-
traceVariable(name, { importerForSideEffects, isExportAllSearch, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
|
|
19403
|
+
traceVariable(name, { importerForSideEffects, isExportAllSearch, searchedNamesAndModules, sideEffectModules, exportOrReexportModules } = parseAst_js.EMPTY_OBJECT) {
|
|
19068
19404
|
const localVariable = this.scope.variables.get(name);
|
|
19069
19405
|
if (localVariable) {
|
|
19070
19406
|
return localVariable;
|
|
@@ -19075,7 +19411,7 @@ class Module {
|
|
|
19075
19411
|
if (otherModule instanceof Module && importDescription.name === '*') {
|
|
19076
19412
|
return otherModule.namespace;
|
|
19077
19413
|
}
|
|
19078
|
-
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id]);
|
|
19414
|
+
const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id], sideEffectModules, exportOrReexportModules);
|
|
19079
19415
|
if (!declaration) {
|
|
19080
19416
|
return this.error(parseAst_js.logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
|
|
19081
19417
|
}
|
|
@@ -19296,6 +19632,8 @@ class Module {
|
|
|
19296
19632
|
let foundSyntheticDeclaration = null;
|
|
19297
19633
|
const foundInternalDeclarations = new Map();
|
|
19298
19634
|
const foundExternalDeclarations = new Set();
|
|
19635
|
+
const sideEffectModules = new Set();
|
|
19636
|
+
const exportOrReexportModules = new Set();
|
|
19299
19637
|
for (const module of this.exportAllModules) {
|
|
19300
19638
|
// Synthetic namespaces should not hide "regular" exports of the same name
|
|
19301
19639
|
if (module.info.syntheticNamedExports === name) {
|
|
@@ -19304,7 +19642,7 @@ class Module {
|
|
|
19304
19642
|
const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
|
|
19305
19643
|
// We are creating a copy to handle the case where the same binding is
|
|
19306
19644
|
// imported through different namespace reexports gracefully
|
|
19307
|
-
copyNameToModulesMap(searchedNamesAndModules), importChain);
|
|
19645
|
+
copyNameToModulesMap(searchedNamesAndModules), importChain, sideEffectModules, exportOrReexportModules);
|
|
19308
19646
|
if (module instanceof ExternalModule || options?.indirectExternal) {
|
|
19309
19647
|
foundExternalDeclarations.add(variable);
|
|
19310
19648
|
}
|
|
@@ -19321,7 +19659,7 @@ class Module {
|
|
|
19321
19659
|
const foundDeclarationList = [...foundInternalDeclarations];
|
|
19322
19660
|
const usedDeclaration = foundDeclarationList[0][0];
|
|
19323
19661
|
if (foundDeclarationList.length === 1) {
|
|
19324
|
-
return [usedDeclaration];
|
|
19662
|
+
return [usedDeclaration, { exportOrReexportModules, sideEffectModules }];
|
|
19325
19663
|
}
|
|
19326
19664
|
this.options.onLog(parseAst_js.LOGLEVEL_WARN, parseAst_js.logNamespaceConflict(name, this.id, foundDeclarationList.map(([, module]) => module.id)));
|
|
19327
19665
|
// TODO we are pretending it was not found while it should behave like "undefined"
|
|
@@ -19333,10 +19671,13 @@ class Module {
|
|
|
19333
19671
|
if (foundDeclarationList.length > 1) {
|
|
19334
19672
|
this.options.onLog(parseAst_js.LOGLEVEL_WARN, parseAst_js.logAmbiguousExternalNamespaces(name, this.id, usedDeclaration.module.id, foundDeclarationList.map(declaration => declaration.module.id)));
|
|
19335
19673
|
}
|
|
19336
|
-
return [
|
|
19674
|
+
return [
|
|
19675
|
+
usedDeclaration,
|
|
19676
|
+
{ exportOrReexportModules, indirectExternal: true, sideEffectModules }
|
|
19677
|
+
];
|
|
19337
19678
|
}
|
|
19338
19679
|
if (foundSyntheticDeclaration) {
|
|
19339
|
-
return [foundSyntheticDeclaration];
|
|
19680
|
+
return [foundSyntheticDeclaration, { exportOrReexportModules, sideEffectModules }];
|
|
19340
19681
|
}
|
|
19341
19682
|
return [null];
|
|
19342
19683
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -114,31 +114,31 @@
|
|
|
114
114
|
"homepage": "https://rollupjs.org/",
|
|
115
115
|
"optionalDependencies": {
|
|
116
116
|
"fsevents": "~2.3.2",
|
|
117
|
-
"@rollup/rollup-darwin-arm64": "4.60.
|
|
118
|
-
"@rollup/rollup-android-arm64": "4.60.
|
|
119
|
-
"@rollup/rollup-win32-arm64-msvc": "4.60.
|
|
120
|
-
"@rollup/rollup-freebsd-arm64": "4.60.
|
|
121
|
-
"@rollup/rollup-linux-arm64-gnu": "4.60.
|
|
122
|
-
"@rollup/rollup-linux-arm64-musl": "4.60.
|
|
123
|
-
"@rollup/rollup-android-arm-eabi": "4.60.
|
|
124
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.60.
|
|
125
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.60.
|
|
126
|
-
"@rollup/rollup-win32-ia32-msvc": "4.60.
|
|
127
|
-
"@rollup/rollup-linux-loong64-gnu": "4.60.
|
|
128
|
-
"@rollup/rollup-linux-loong64-musl": "4.60.
|
|
129
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.60.
|
|
130
|
-
"@rollup/rollup-linux-riscv64-musl": "4.60.
|
|
131
|
-
"@rollup/rollup-linux-ppc64-gnu": "4.60.
|
|
132
|
-
"@rollup/rollup-linux-ppc64-musl": "4.60.
|
|
133
|
-
"@rollup/rollup-linux-s390x-gnu": "4.60.
|
|
134
|
-
"@rollup/rollup-darwin-x64": "4.60.
|
|
135
|
-
"@rollup/rollup-win32-x64-gnu": "4.60.
|
|
136
|
-
"@rollup/rollup-win32-x64-msvc": "4.60.
|
|
137
|
-
"@rollup/rollup-freebsd-x64": "4.60.
|
|
138
|
-
"@rollup/rollup-linux-x64-gnu": "4.60.
|
|
139
|
-
"@rollup/rollup-linux-x64-musl": "4.60.
|
|
140
|
-
"@rollup/rollup-openbsd-x64": "4.60.
|
|
141
|
-
"@rollup/rollup-openharmony-arm64": "4.60.
|
|
117
|
+
"@rollup/rollup-darwin-arm64": "4.60.1",
|
|
118
|
+
"@rollup/rollup-android-arm64": "4.60.1",
|
|
119
|
+
"@rollup/rollup-win32-arm64-msvc": "4.60.1",
|
|
120
|
+
"@rollup/rollup-freebsd-arm64": "4.60.1",
|
|
121
|
+
"@rollup/rollup-linux-arm64-gnu": "4.60.1",
|
|
122
|
+
"@rollup/rollup-linux-arm64-musl": "4.60.1",
|
|
123
|
+
"@rollup/rollup-android-arm-eabi": "4.60.1",
|
|
124
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.60.1",
|
|
125
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.60.1",
|
|
126
|
+
"@rollup/rollup-win32-ia32-msvc": "4.60.1",
|
|
127
|
+
"@rollup/rollup-linux-loong64-gnu": "4.60.1",
|
|
128
|
+
"@rollup/rollup-linux-loong64-musl": "4.60.1",
|
|
129
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.60.1",
|
|
130
|
+
"@rollup/rollup-linux-riscv64-musl": "4.60.1",
|
|
131
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.60.1",
|
|
132
|
+
"@rollup/rollup-linux-ppc64-musl": "4.60.1",
|
|
133
|
+
"@rollup/rollup-linux-s390x-gnu": "4.60.1",
|
|
134
|
+
"@rollup/rollup-darwin-x64": "4.60.1",
|
|
135
|
+
"@rollup/rollup-win32-x64-gnu": "4.60.1",
|
|
136
|
+
"@rollup/rollup-win32-x64-msvc": "4.60.1",
|
|
137
|
+
"@rollup/rollup-freebsd-x64": "4.60.1",
|
|
138
|
+
"@rollup/rollup-linux-x64-gnu": "4.60.1",
|
|
139
|
+
"@rollup/rollup-linux-x64-musl": "4.60.1",
|
|
140
|
+
"@rollup/rollup-openbsd-x64": "4.60.1",
|
|
141
|
+
"@rollup/rollup-openharmony-arm64": "4.60.1"
|
|
142
142
|
},
|
|
143
143
|
"dependencies": {
|
|
144
144
|
"@types/estree": "1.0.8"
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"@types/picomatch": "^4.0.2",
|
|
174
174
|
"@types/semver": "^7.7.1",
|
|
175
175
|
"@types/yargs-parser": "^21.0.3",
|
|
176
|
-
"@vue/language-server": "^3.2.
|
|
176
|
+
"@vue/language-server": "^3.2.6",
|
|
177
177
|
"acorn": "^8.16.0",
|
|
178
178
|
"acorn-import-assertions": "^1.9.0",
|
|
179
179
|
"acorn-import-phases": "^1.0.4",
|
|
@@ -202,21 +202,21 @@
|
|
|
202
202
|
"lint-staged": "^16.4.0",
|
|
203
203
|
"locate-character": "^3.0.0",
|
|
204
204
|
"magic-string": "^0.30.21",
|
|
205
|
-
"memfs": "^4.
|
|
205
|
+
"memfs": "^4.57.1",
|
|
206
206
|
"mocha": "11.7.5",
|
|
207
207
|
"nodemon": "^3.1.14",
|
|
208
208
|
"npm-audit-resolver": "^3.0.0-RC.0",
|
|
209
209
|
"nyc": "^18.0.0",
|
|
210
210
|
"patch-package": "^8.0.1",
|
|
211
211
|
"picocolors": "^1.1.1",
|
|
212
|
-
"picomatch": "^4.0.
|
|
212
|
+
"picomatch": "^4.0.4",
|
|
213
213
|
"pinia": "^3.0.4",
|
|
214
214
|
"prettier": "^3.8.1",
|
|
215
215
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
216
216
|
"pretty-bytes": "^7.1.0",
|
|
217
217
|
"pretty-ms": "^9.3.0",
|
|
218
218
|
"requirejs": "^2.3.8",
|
|
219
|
-
"rollup": "^4.
|
|
219
|
+
"rollup": "^4.60.0",
|
|
220
220
|
"rollup-plugin-license": "^3.7.0",
|
|
221
221
|
"semver": "^7.7.4",
|
|
222
222
|
"shx": "^0.4.0",
|
|
@@ -227,12 +227,12 @@
|
|
|
227
227
|
"terser": "^5.46.1",
|
|
228
228
|
"tslib": "^2.8.1",
|
|
229
229
|
"typescript": "^5.9.3",
|
|
230
|
-
"typescript-eslint": "^8.57.
|
|
230
|
+
"typescript-eslint": "^8.57.2",
|
|
231
231
|
"vite": "^7.3.1",
|
|
232
232
|
"vitepress": "^1.6.4",
|
|
233
233
|
"vue": "^3.5.30",
|
|
234
234
|
"vue-eslint-parser": "^10.4.0",
|
|
235
|
-
"vue-tsc": "^3.2.
|
|
235
|
+
"vue-tsc": "^3.2.6",
|
|
236
236
|
"wasm-pack": "^0.14.0",
|
|
237
237
|
"yargs-parser": "^21.1.1"
|
|
238
238
|
},
|