rollup 1.27.13 → 1.29.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/CHANGELOG.md +60 -0
- package/README.md +2 -2
- package/dist/bin/rollup +59 -26
- package/dist/rollup.browser.es.js +3 -3
- package/dist/rollup.browser.js +5 -4
- package/dist/rollup.d.ts +44 -6
- package/dist/rollup.es.js +360 -252
- package/dist/rollup.js +356 -290
- package/dist/shared/index.js +52 -8
- package/package.json +16 -16
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v1.
|
|
4
|
-
|
|
3
|
+
Rollup.js v1.29.1
|
|
4
|
+
Tue, 21 Jan 2020 06:50:03 GMT - commit 21a1775a019b45bebfc608c8f58f3691080106e5
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -13,7 +13,40 @@
|
|
|
13
13
|
var path = require('path');
|
|
14
14
|
var module$1 = require('module');
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
/*! *****************************************************************************
|
|
17
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
19
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
20
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
|
|
22
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
23
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
24
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
25
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
26
|
+
|
|
27
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
28
|
+
and limitations under the License.
|
|
29
|
+
***************************************************************************** */
|
|
30
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
31
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
32
|
+
function fulfilled(value) { try {
|
|
33
|
+
step(generator.next(value));
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
reject(e);
|
|
37
|
+
} }
|
|
38
|
+
function rejected(value) { try {
|
|
39
|
+
step(generator["throw"](value));
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
} }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var version = "1.29.1";
|
|
17
50
|
|
|
18
51
|
function createCommonjsModule(fn, module) {
|
|
19
52
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -75,6 +108,15 @@ const getObjectOption = (config, command, name) => {
|
|
|
75
108
|
}
|
|
76
109
|
return configOption;
|
|
77
110
|
};
|
|
111
|
+
function ensureArray(items) {
|
|
112
|
+
if (Array.isArray(items)) {
|
|
113
|
+
return items.filter(Boolean);
|
|
114
|
+
}
|
|
115
|
+
if (items) {
|
|
116
|
+
return [items];
|
|
117
|
+
}
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
78
120
|
const defaultOnWarn = warning => {
|
|
79
121
|
if (typeof warning === 'string') {
|
|
80
122
|
console.warn(warning);
|
|
@@ -127,7 +169,7 @@ function mergeOptions({ config = {}, command: rawCommandOptions = {}, defaultOnW
|
|
|
127
169
|
const validOutputOptions = Object.keys(outputOptions[0]);
|
|
128
170
|
addUnknownOptionErrors(unknownOptionErrors, outputOptions.reduce((allKeys, options) => allKeys.concat(Object.keys(options)), []), validOutputOptions, 'output option');
|
|
129
171
|
const validCliOutputOptions = validOutputOptions.filter(option => option !== 'sourcemapPathTransform');
|
|
130
|
-
addUnknownOptionErrors(unknownOptionErrors, Object.keys(command), validInputOptions.concat(validCliOutputOptions, Object.keys(commandAliases), 'config', 'environment', 'silent'), 'CLI flag', /^_|output|(config.*)$/);
|
|
172
|
+
addUnknownOptionErrors(unknownOptionErrors, Object.keys(command), validInputOptions.concat(validCliOutputOptions, Object.keys(commandAliases), 'config', 'environment', 'silent', 'stdin'), 'CLI flag', /^_|output|(config.*)$/);
|
|
131
173
|
return {
|
|
132
174
|
inputOptions,
|
|
133
175
|
optionError: unknownOptionErrors.length > 0 ? unknownOptionErrors.join('\n') : null,
|
|
@@ -167,7 +209,6 @@ function getInputOptions(config, command = { external: [], globals: undefined },
|
|
|
167
209
|
context: getOption('context'),
|
|
168
210
|
experimentalCacheExpiry: getOption('experimentalCacheExpiry', 10),
|
|
169
211
|
experimentalOptimizeChunks: getOption('experimentalOptimizeChunks'),
|
|
170
|
-
experimentalTopLevelAwait: getOption('experimentalTopLevelAwait'),
|
|
171
212
|
external: getExternal(config, command),
|
|
172
213
|
inlineDynamicImports: getOption('inlineDynamicImports', false),
|
|
173
214
|
input: getOption('input', []),
|
|
@@ -175,7 +216,7 @@ function getInputOptions(config, command = { external: [], globals: undefined },
|
|
|
175
216
|
moduleContext: config.moduleContext,
|
|
176
217
|
onwarn: getOnWarn(config, defaultOnWarnHandler),
|
|
177
218
|
perf: getOption('perf', false),
|
|
178
|
-
plugins: config.plugins,
|
|
219
|
+
plugins: ensureArray(config.plugins),
|
|
179
220
|
preserveModules: getOption('preserveModules'),
|
|
180
221
|
preserveSymlinks: getOption('preserveSymlinks'),
|
|
181
222
|
shimMissingExports: getOption('shimMissingExports'),
|
|
@@ -193,6 +234,7 @@ function getOutputOptions(config, command = {}) {
|
|
|
193
234
|
let format = getOption('format');
|
|
194
235
|
// Handle format aliases
|
|
195
236
|
switch (format) {
|
|
237
|
+
case undefined:
|
|
196
238
|
case 'esm':
|
|
197
239
|
case 'module':
|
|
198
240
|
format = 'es';
|
|
@@ -215,7 +257,7 @@ function getOutputOptions(config, command = {}) {
|
|
|
215
257
|
externalLiveBindings: getOption('externalLiveBindings', true),
|
|
216
258
|
file: getOption('file'),
|
|
217
259
|
footer: getOption('footer'),
|
|
218
|
-
format
|
|
260
|
+
format,
|
|
219
261
|
freeze: getOption('freeze', true),
|
|
220
262
|
globals: getOption('globals'),
|
|
221
263
|
indent: getOption('indent', true),
|
|
@@ -226,7 +268,7 @@ function getOutputOptions(config, command = {}) {
|
|
|
226
268
|
noConflict: getOption('noConflict'),
|
|
227
269
|
outro: getOption('outro'),
|
|
228
270
|
paths: getOption('paths'),
|
|
229
|
-
plugins: config.plugins,
|
|
271
|
+
plugins: ensureArray(config.plugins),
|
|
230
272
|
preferConst: getOption('preferConst'),
|
|
231
273
|
sourcemap: getOption('sourcemap'),
|
|
232
274
|
sourcemapExcludeSources: getOption('sourcemapExcludeSources'),
|
|
@@ -259,8 +301,10 @@ requireRelative.resolve = function (requested, relativeTo) {
|
|
|
259
301
|
};
|
|
260
302
|
var requireRelative_1 = requireRelative;
|
|
261
303
|
|
|
304
|
+
exports.__awaiter = __awaiter;
|
|
262
305
|
exports.commandAliases = commandAliases;
|
|
263
306
|
exports.createCommonjsModule = createCommonjsModule;
|
|
307
|
+
exports.ensureArray = ensureArray;
|
|
264
308
|
exports.getAliasName = getAliasName;
|
|
265
309
|
exports.isAbsolute = isAbsolute;
|
|
266
310
|
exports.isPlainPathFragment = isPlainPathFragment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/rollup.es.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/chokidar": "^2.1.3",
|
|
73
|
-
"@types/micromatch": "^
|
|
73
|
+
"@types/micromatch": "^4.0.0",
|
|
74
74
|
"@types/minimist": "^1.2.0",
|
|
75
75
|
"acorn-export-ns-from": "^0.1.0",
|
|
76
76
|
"acorn-import-meta": "^1.0.0",
|
|
@@ -80,32 +80,32 @@
|
|
|
80
80
|
"chokidar": "^2.1.8",
|
|
81
81
|
"codecov": "^3.6.1",
|
|
82
82
|
"console-group": "^0.3.3",
|
|
83
|
-
"core-js": "^3.4
|
|
83
|
+
"core-js": "^3.6.4",
|
|
84
84
|
"cross-os": "^1.3.0",
|
|
85
85
|
"date-time": "^3.1.0",
|
|
86
86
|
"es5-shim": "^4.5.13",
|
|
87
87
|
"es6-shim": "^0.35.5",
|
|
88
|
-
"eslint": "^6.
|
|
89
|
-
"eslint-plugin-import": "^2.
|
|
90
|
-
"execa": "^
|
|
88
|
+
"eslint": "^6.8.0",
|
|
89
|
+
"eslint-plugin-import": "^2.20.0",
|
|
90
|
+
"execa": "^4.0.0",
|
|
91
91
|
"fixturify": "^1.2.0",
|
|
92
92
|
"hash.js": "^1.1.7",
|
|
93
|
-
"husky": "^
|
|
93
|
+
"husky": "^4.0.10",
|
|
94
94
|
"is-reference": "^1.1.4",
|
|
95
95
|
"lint-staged": "^9.5.0",
|
|
96
96
|
"locate-character": "^2.0.5",
|
|
97
|
-
"magic-string": "^0.25.
|
|
98
|
-
"markdownlint-cli": "^0.
|
|
97
|
+
"magic-string": "^0.25.6",
|
|
98
|
+
"markdownlint-cli": "^0.21.0",
|
|
99
99
|
"micromatch": "^4.0.2",
|
|
100
100
|
"minimist": "^1.2.0",
|
|
101
101
|
"mocha": "^6.2.2",
|
|
102
|
-
"nyc": "^
|
|
102
|
+
"nyc": "^15.0.0",
|
|
103
103
|
"prettier": "^1.19.1",
|
|
104
104
|
"pretty-bytes": "^5.3.0",
|
|
105
105
|
"pretty-ms": "^5.1.0",
|
|
106
106
|
"require-relative": "^0.8.7",
|
|
107
107
|
"requirejs": "^2.3.6",
|
|
108
|
-
"rollup": "^1.
|
|
108
|
+
"rollup": "^1.29.0",
|
|
109
109
|
"rollup-plugin-alias": "^2.2.0",
|
|
110
110
|
"rollup-plugin-buble": "^0.19.8",
|
|
111
111
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
115
115
|
"rollup-plugin-replace": "^2.2.0",
|
|
116
116
|
"rollup-plugin-string": "^3.0.0",
|
|
117
|
-
"rollup-plugin-terser": "^5.
|
|
117
|
+
"rollup-plugin-terser": "^5.2.0",
|
|
118
118
|
"rollup-plugin-typescript": "^1.0.1",
|
|
119
119
|
"rollup-pluginutils": "^2.8.2",
|
|
120
120
|
"sander": "^0.6.0",
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
"signal-exit": "^3.0.2",
|
|
123
123
|
"source-map": "^0.6.1",
|
|
124
124
|
"source-map-support": "^0.5.16",
|
|
125
|
-
"sourcemap-codec": "^1.4.
|
|
126
|
-
"systemjs": "^6.1.
|
|
127
|
-
"terser": "^4.
|
|
125
|
+
"sourcemap-codec": "^1.4.8",
|
|
126
|
+
"systemjs": "^6.1.9",
|
|
127
|
+
"terser": "^4.6.3",
|
|
128
128
|
"tslib": "^1.10.0",
|
|
129
129
|
"tslint": "^5.20.1",
|
|
130
130
|
"turbocolor": "^2.6.1",
|
|
131
|
-
"typescript": "^3.7.
|
|
131
|
+
"typescript": "^3.7.5",
|
|
132
132
|
"url-parse": "^1.4.7"
|
|
133
133
|
},
|
|
134
134
|
"files": [
|