rollup 2.45.1 → 2.48.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/CHANGELOG.md +52 -0
- package/LICENSE.md +1 -109
- package/README.md +9 -10
- package/dist/bin/rollup +37 -12
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +538 -632
- package/dist/es/shared/watch.js +42 -21
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +2 -0
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +30 -10
- package/dist/shared/loadConfigFile.js +8 -18
- package/dist/shared/mergeOptions.js +3 -2
- package/dist/shared/rollup.js +527 -621
- package/dist/shared/watch-cli.js +19 -32
- package/dist/shared/watch.js +13 -13
- package/package.json +24 -30
package/dist/rollup.d.ts
CHANGED
|
@@ -649,6 +649,7 @@ export interface OutputOptions {
|
|
|
649
649
|
preferConst?: boolean;
|
|
650
650
|
preserveModules?: boolean;
|
|
651
651
|
preserveModulesRoot?: string;
|
|
652
|
+
sanitizeFileName?: boolean | ((fileName: string) => string);
|
|
652
653
|
sourcemap?: boolean | 'inline' | 'hidden';
|
|
653
654
|
sourcemapExcludeSources?: boolean;
|
|
654
655
|
sourcemapFile?: string;
|
|
@@ -693,6 +694,7 @@ export interface NormalizedOutputOptions {
|
|
|
693
694
|
preferConst: boolean;
|
|
694
695
|
preserveModules: boolean;
|
|
695
696
|
preserveModulesRoot: string | undefined;
|
|
697
|
+
sanitizeFileName: (fileName: string) => string;
|
|
696
698
|
sourcemap: boolean | 'inline' | 'hidden';
|
|
697
699
|
sourcemapExcludeSources: boolean;
|
|
698
700
|
sourcemapFile: string | undefined;
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
Sat,
|
|
3
|
+
Rollup.js v2.48.0
|
|
4
|
+
Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -18,6 +18,21 @@ var require$$1 = require('stream');
|
|
|
18
18
|
var require$$2 = require('os');
|
|
19
19
|
var rollup = require('./rollup.js');
|
|
20
20
|
|
|
21
|
+
function getAugmentedNamespace(n) {
|
|
22
|
+
if (n.__esModule) return n;
|
|
23
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
24
|
+
Object.keys(n).forEach(function (k) {
|
|
25
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
26
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return n[k];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return a;
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
var utils$7 = {};
|
|
22
37
|
|
|
23
38
|
(function (exports) {
|
|
@@ -1915,13 +1930,15 @@ const scan$1 = (input, options) => {
|
|
|
1915
1930
|
isBracket = token.isBracket = true;
|
|
1916
1931
|
isGlob = token.isGlob = true;
|
|
1917
1932
|
finished = true;
|
|
1918
|
-
|
|
1919
|
-
if (scanToEnd === true) {
|
|
1920
|
-
continue;
|
|
1921
|
-
}
|
|
1922
1933
|
break;
|
|
1923
1934
|
}
|
|
1924
1935
|
}
|
|
1936
|
+
|
|
1937
|
+
if (scanToEnd === true) {
|
|
1938
|
+
continue;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
break;
|
|
1925
1942
|
}
|
|
1926
1943
|
|
|
1927
1944
|
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
|
|
@@ -2306,7 +2323,7 @@ const parse$1 = (input, options) => {
|
|
|
2306
2323
|
output = token.close = `)$))${extglobStar}`;
|
|
2307
2324
|
}
|
|
2308
2325
|
|
|
2309
|
-
if (token.prev.type === 'bos'
|
|
2326
|
+
if (token.prev.type === 'bos') {
|
|
2310
2327
|
state.negatedExtglob = true;
|
|
2311
2328
|
}
|
|
2312
2329
|
}
|
|
@@ -3883,7 +3900,9 @@ const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
|
|
|
3883
3900
|
.filter(item => typeof item === 'string' && item.charAt(0) === BANG$1)
|
|
3884
3901
|
.map(item => item.slice(1))
|
|
3885
3902
|
.map(item => picomatch(item, opts));
|
|
3886
|
-
const patterns = mtchers
|
|
3903
|
+
const patterns = mtchers
|
|
3904
|
+
.filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG$1))
|
|
3905
|
+
.map(matcher => createPattern(matcher, opts));
|
|
3887
3906
|
|
|
3888
3907
|
if (testString == null) {
|
|
3889
3908
|
return (testString, ri = false) => {
|
|
@@ -3974,7 +3993,7 @@ var isWin32 = require$$2.platform() === 'win32';
|
|
|
3974
3993
|
|
|
3975
3994
|
var slash = '/';
|
|
3976
3995
|
var backslash = /\\/g;
|
|
3977
|
-
var enclosure = /[\{\[].*[
|
|
3996
|
+
var enclosure = /[\{\[].*[\}\]]$/;
|
|
3978
3997
|
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
|
|
3979
3998
|
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
3980
3999
|
|
|
@@ -3982,6 +4001,7 @@ var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
|
3982
4001
|
* @param {string} str
|
|
3983
4002
|
* @param {Object} opts
|
|
3984
4003
|
* @param {boolean} [opts.flipBackslashes=true]
|
|
4004
|
+
* @returns {string}
|
|
3985
4005
|
*/
|
|
3986
4006
|
var globParent$1 = function globParent(str, opts) {
|
|
3987
4007
|
var options = Object.assign({ flipBackslashes: true }, opts);
|
|
@@ -4982,7 +5002,7 @@ var nodefsHandler = NodeFsHandler$1;
|
|
|
4982
5002
|
|
|
4983
5003
|
var fseventsHandler = {exports: {}};
|
|
4984
5004
|
|
|
4985
|
-
var require$$3 = /*@__PURE__*/
|
|
5005
|
+
var require$$3 = /*@__PURE__*/getAugmentedNamespace(rollup.fseventsImporter);
|
|
4986
5006
|
|
|
4987
5007
|
const fs$1 = fs$4;
|
|
4988
5008
|
const sysPath$1 = path$3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
Sat,
|
|
3
|
+
Rollup.js v2.48.0
|
|
4
|
+
Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -157,13 +157,7 @@ const immediateHandlers = {
|
|
|
157
157
|
},
|
|
158
158
|
MISSING_NODE_BUILTINS: warning => {
|
|
159
159
|
title(`Missing shims for Node.js built-ins`);
|
|
160
|
-
|
|
161
|
-
? `'${warning.modules[0]}'`
|
|
162
|
-
: `${warning
|
|
163
|
-
.modules.slice(0, -1)
|
|
164
|
-
.map((name) => `'${name}'`)
|
|
165
|
-
.join(', ')} and '${warning.modules.slice(-1)}'`;
|
|
166
|
-
stderr(`Creating a browser bundle that depends on ${detail}. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`);
|
|
160
|
+
stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.modules)}. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`);
|
|
167
161
|
}
|
|
168
162
|
};
|
|
169
163
|
const deferredHandlers = {
|
|
@@ -218,7 +212,7 @@ const deferredHandlers = {
|
|
|
218
212
|
NAMESPACE_CONFLICT(warnings) {
|
|
219
213
|
title(`Conflicting re-exports`);
|
|
220
214
|
for (const warning of warnings) {
|
|
221
|
-
stderr(
|
|
215
|
+
stderr(`"${bold(rollup.relativeId(warning.reexporter))}" re-exports "${warning.name}" from both "${rollup.relativeId(warning.sources[0])}" and "${rollup.relativeId(warning.sources[1])}" (will be ignored)`);
|
|
222
216
|
}
|
|
223
217
|
},
|
|
224
218
|
NON_EXISTENT_EXPORT(warnings) {
|
|
@@ -253,14 +247,10 @@ const deferredHandlers = {
|
|
|
253
247
|
SOURCEMAP_BROKEN(warnings) {
|
|
254
248
|
title(`Broken sourcemap`);
|
|
255
249
|
info('https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect');
|
|
256
|
-
const plugins =
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
.map(p => `'${p}'`)
|
|
261
|
-
.join(', ')} and '${plugins.slice(-1)}')`
|
|
262
|
-
: ` (such as '${plugins[0]}')`;
|
|
263
|
-
stderr(`Plugins that transform code${detail} should generate accompanying sourcemaps`);
|
|
250
|
+
const plugins = [
|
|
251
|
+
...new Set(warnings.map(warning => warning.plugin).filter(Boolean))
|
|
252
|
+
];
|
|
253
|
+
stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps`);
|
|
264
254
|
},
|
|
265
255
|
THIS_IS_UNDEFINED(warnings) {
|
|
266
256
|
title('`this` has been rewritten to `undefined`');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
Sat,
|
|
3
|
+
Rollup.js v2.48.0
|
|
4
|
+
Sat, 15 May 2021 04:50:11 GMT - commit 07b3a02069594147665daa95d3fa3e041a82b2d0
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -155,6 +155,7 @@ function mergeOutputOptions(config, overrides, warn) {
|
|
|
155
155
|
preferConst: getOption('preferConst'),
|
|
156
156
|
preserveModules: getOption('preserveModules'),
|
|
157
157
|
preserveModulesRoot: getOption('preserveModulesRoot'),
|
|
158
|
+
sanitizeFileName: getOption('sanitizeFileName'),
|
|
158
159
|
sourcemap: getOption('sourcemap'),
|
|
159
160
|
sourcemapExcludeSources: getOption('sourcemapExcludeSources'),
|
|
160
161
|
sourcemapFile: getOption('sourcemapFile'),
|