rollup 2.18.0 → 2.18.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 +12 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +12 -5
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +17 -4
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +12 -5
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +2 -2
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.18.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.18.1
|
|
4
|
+
Fri, 26 Jun 2020 19:42:28 GMT - commit 1aeb23b23ef1aafe2edcbfd5c4062dd97186f700
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -475,17 +475,30 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
475
475
|
plugin = require(pluginText);
|
|
476
476
|
}
|
|
477
477
|
catch (ex) {
|
|
478
|
-
throw new Error(`Cannot load plugin "${pluginText}"
|
|
478
|
+
throw new Error(`Cannot load plugin "${pluginText}": ${ex.message}.`);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
// some plugins do not use `module.exports` for their entry point,
|
|
483
483
|
// in which case we try the named default export and the plugin name
|
|
484
484
|
if (typeof plugin === 'object') {
|
|
485
|
-
plugin = plugin.default || plugin[pluginText];
|
|
485
|
+
plugin = plugin.default || plugin[getCamelizedPluginBaseName(pluginText)];
|
|
486
|
+
}
|
|
487
|
+
if (!plugin) {
|
|
488
|
+
throw new Error(`Cannot find entry for plugin "${pluginText}". The plugin needs to export a function either as "default" or "${getCamelizedPluginBaseName(pluginText)}" for Rollup to recognize it.`);
|
|
486
489
|
}
|
|
487
490
|
inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArg) : plugin);
|
|
488
491
|
}
|
|
492
|
+
function getCamelizedPluginBaseName(pluginText) {
|
|
493
|
+
var _a;
|
|
494
|
+
return (((_a = pluginText.match(/(@rollup\/plugin-|rollup-plugin-)(.+)$/)) === null || _a === void 0 ? void 0 : _a[2]) || pluginText)
|
|
495
|
+
.split(/[\\/]/)
|
|
496
|
+
.slice(-1)[0]
|
|
497
|
+
.split('.')[0]
|
|
498
|
+
.split('-')
|
|
499
|
+
.map((part, index) => (index === 0 || !part ? part : part[0].toUpperCase() + part.slice(1)))
|
|
500
|
+
.join('');
|
|
501
|
+
}
|
|
489
502
|
|
|
490
503
|
function supportsNativeESM() {
|
|
491
504
|
return Number(/^v(\d+)/.exec(process.version)[1]) >= 13;
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.18.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.18.1
|
|
4
|
+
Fri, 26 Jun 2020 19:42:28 GMT - commit 1aeb23b23ef1aafe2edcbfd5c4062dd97186f700
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -28,7 +28,7 @@ var crypto = require('crypto');
|
|
|
28
28
|
var fs = require('fs');
|
|
29
29
|
var events = require('events');
|
|
30
30
|
|
|
31
|
-
var version = "2.18.
|
|
31
|
+
var version = "2.18.1";
|
|
32
32
|
|
|
33
33
|
function createCommonjsModule(fn, basedir, module) {
|
|
34
34
|
return module = {
|
|
@@ -7342,7 +7342,7 @@ class Import extends NodeBase {
|
|
|
7342
7342
|
if (namespaceExportName) {
|
|
7343
7343
|
const _ = options.compact ? '' : ' ';
|
|
7344
7344
|
const s = options.compact ? '' : ';';
|
|
7345
|
-
code.
|
|
7345
|
+
code.prependLeft(this.end, `.then(function${_}(n)${_}{${_}return n.${namespaceExportName}${s}${_}})`);
|
|
7346
7346
|
}
|
|
7347
7347
|
}
|
|
7348
7348
|
setExternalResolution(exportMode, resolution) {
|
|
@@ -9623,7 +9623,7 @@ class Module {
|
|
|
9623
9623
|
return error({
|
|
9624
9624
|
code: Errors.SYNTHETIC_NAMED_EXPORTS_NEED_DEFAULT,
|
|
9625
9625
|
id: this.id,
|
|
9626
|
-
message: `
|
|
9626
|
+
message: `Module "${relativeId(this.id)}" that is marked to have "syntheticNamedExports" needs a default export.`
|
|
9627
9627
|
});
|
|
9628
9628
|
}
|
|
9629
9629
|
return this.defaultExport;
|
|
@@ -10708,6 +10708,11 @@ class Chunk$1 {
|
|
|
10708
10708
|
for (const importer of module.includedDynamicImporters) {
|
|
10709
10709
|
if (!chunkModules.has(importer)) {
|
|
10710
10710
|
this.dynamicEntryModules.push(module);
|
|
10711
|
+
// Modules with synthetic exports need an artifical namespace for dynamic imports
|
|
10712
|
+
if (module.syntheticNamedExports) {
|
|
10713
|
+
module.namespace.include();
|
|
10714
|
+
this.exports.add(module.namespace);
|
|
10715
|
+
}
|
|
10711
10716
|
}
|
|
10712
10717
|
}
|
|
10713
10718
|
if (module.implicitlyLoadedAfter.size > 0) {
|
|
@@ -10825,6 +10830,8 @@ class Chunk$1 {
|
|
|
10825
10830
|
}
|
|
10826
10831
|
}
|
|
10827
10832
|
for (const module of this.dynamicEntryModules) {
|
|
10833
|
+
if (module.syntheticNamedExports)
|
|
10834
|
+
continue;
|
|
10828
10835
|
if (!this.facadeModule && this.canModuleBeFacade(module, exposedVariables)) {
|
|
10829
10836
|
this.facadeModule = module;
|
|
10830
10837
|
this.facadeChunkByModule.set(module, this);
|
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": "2.18.
|
|
3
|
+
"version": "2.18.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"pretty-ms": "^7.0.0",
|
|
111
111
|
"require-relative": "^0.8.7",
|
|
112
112
|
"requirejs": "^2.3.6",
|
|
113
|
-
"rollup": "^2.
|
|
113
|
+
"rollup": "^2.18.0",
|
|
114
114
|
"rollup-plugin-license": "^2.1.0",
|
|
115
115
|
"rollup-plugin-string": "^3.0.0",
|
|
116
116
|
"rollup-plugin-terser": "^6.1.0",
|