rollup 0.45.1 → 0.45.2
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 +6 -0
- package/LICENSE.md +1 -1
- package/bin/rollup +5 -1
- package/dist/rollup.browser.js +16 -11
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.es.js +16 -11
- package/dist/rollup.es.js.map +1 -1
- package/dist/rollup.js +16 -11
- package/dist/rollup.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.45.2
|
|
4
|
+
|
|
5
|
+
* Fix interop when import is a string ([#1486](https://github.com/rollup/rollup/issues/1486))
|
|
6
|
+
* Separate `resolvedIds` from `resolvedExternalIds` ([#1490](https://github.com/rollup/rollup/pull/1490))
|
|
7
|
+
* Add `--extend` flag to CLI ([#1482](https://github.com/rollup/rollup/pull/1482))
|
|
8
|
+
|
|
3
9
|
## 0.45.1
|
|
4
10
|
|
|
5
11
|
* Remove `weak` from `optionalDependencies` ([#1483](https://github.com/rollup/rollup/issues/1483))
|
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/bin/rollup
CHANGED
|
@@ -247,7 +247,7 @@ function isNumber (x) {
|
|
|
247
247
|
|
|
248
248
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output <output> Output (if absent, prints to stdout)\n-f, --format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-u, --id ID for AMD module (default is anonymous)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://github.com/rollup/rollup/wiki\n";
|
|
249
249
|
|
|
250
|
-
var version = "0.45.
|
|
250
|
+
var version = "0.45.2";
|
|
251
251
|
|
|
252
252
|
var modules = {};
|
|
253
253
|
|
|
@@ -751,6 +751,10 @@ function execute ( options, command ) {
|
|
|
751
751
|
external = ( optionsExternal || [] ).concat( commandExternal );
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
+
if (typeof command.extend !== 'undefined') {
|
|
755
|
+
options.extend = command.extend;
|
|
756
|
+
}
|
|
757
|
+
|
|
754
758
|
if ( command.silent ) {
|
|
755
759
|
options.onwarn = function () {};
|
|
756
760
|
}
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.45.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.45.2
|
|
3
|
+
Wed Jul 12 2017 22:25:07 GMT-0400 (EDT) - commit b7a4edf2b7c26f58c8201a63c820541d9b37186d
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -8198,6 +8198,7 @@ var Module = function Module (ref) {
|
|
|
8198
8198
|
var ast = ref.ast;
|
|
8199
8199
|
var sourceMapChain = ref.sourceMapChain;
|
|
8200
8200
|
var resolvedIds = ref.resolvedIds;
|
|
8201
|
+
var resolvedExternalIds = ref.resolvedExternalIds;
|
|
8201
8202
|
var bundle = ref.bundle;
|
|
8202
8203
|
|
|
8203
8204
|
this.code = code;
|
|
@@ -8230,6 +8231,7 @@ var Module = function Module (ref) {
|
|
|
8230
8231
|
this.sources = [];
|
|
8231
8232
|
this.dependencies = [];
|
|
8232
8233
|
this.resolvedIds = resolvedIds || blank();
|
|
8234
|
+
this.resolvedExternalIds = resolvedExternalIds || blank();
|
|
8233
8235
|
|
|
8234
8236
|
// imports and exports, indexed by local name
|
|
8235
8237
|
this.imports = blank();
|
|
@@ -8434,21 +8436,23 @@ Module.prototype.bindImportSpecifiers = function bindImportSpecifiers () {
|
|
|
8434
8436
|
keys( specifiers ).forEach( function (name) {
|
|
8435
8437
|
var specifier = specifiers[ name ];
|
|
8436
8438
|
|
|
8437
|
-
var id = this$1.resolvedIds[ specifier.source ];
|
|
8439
|
+
var id = this$1.resolvedIds[ specifier.source ] || this$1.resolvedExternalIds[ specifier.source ];
|
|
8438
8440
|
specifier.module = this$1.bundle.moduleById.get( id );
|
|
8439
8441
|
});
|
|
8440
8442
|
});
|
|
8441
8443
|
|
|
8442
8444
|
this.exportAllModules = this.exportAllSources.map( function (source) {
|
|
8443
|
-
var id = this$1.resolvedIds[ source ];
|
|
8445
|
+
var id = this$1.resolvedIds[ source ] || this$1.resolvedExternalIds[ source ];
|
|
8444
8446
|
return this$1.bundle.moduleById.get( id );
|
|
8445
8447
|
});
|
|
8446
8448
|
|
|
8447
8449
|
this.sources.forEach( function (source) {
|
|
8448
8450
|
var id = this$1.resolvedIds[ source ];
|
|
8449
|
-
var module = this$1.bundle.moduleById.get( id );
|
|
8450
8451
|
|
|
8451
|
-
if (
|
|
8452
|
+
if ( id ) {
|
|
8453
|
+
var module = this$1.bundle.moduleById.get( id );
|
|
8454
|
+
this$1.dependencies.push( module );
|
|
8455
|
+
}
|
|
8452
8456
|
});
|
|
8453
8457
|
};
|
|
8454
8458
|
|
|
@@ -8559,7 +8563,8 @@ Module.prototype.toJSON = function toJSON () {
|
|
|
8559
8563
|
originalSourceMap: this.originalSourceMap,
|
|
8560
8564
|
ast: this.astClone,
|
|
8561
8565
|
sourceMapChain: this.sourceMapChain,
|
|
8562
|
-
resolvedIds: this.resolvedIds
|
|
8566
|
+
resolvedIds: this.resolvedIds,
|
|
8567
|
+
resolvedExternalIds: this.resolvedExternalIds
|
|
8563
8568
|
};
|
|
8564
8569
|
};
|
|
8565
8570
|
|
|
@@ -8711,7 +8716,7 @@ function getInteropBlock ( bundle, options ) {
|
|
|
8711
8716
|
return ((bundle.varOrConst) + " " + (module.name) + "__default = 'default' in " + (module.name) + " ? " + (module.name) + "['default'] : " + (module.name) + ";");
|
|
8712
8717
|
}
|
|
8713
8718
|
|
|
8714
|
-
return ((module.name) + " = " + (module.name) + " &&
|
|
8719
|
+
return ((module.name) + " = " + (module.name) + " && " + (module.name) + ".hasOwnProperty('default') ? " + (module.name) + "['default'] : " + (module.name) + ";");
|
|
8715
8720
|
})
|
|
8716
8721
|
.filter( Boolean )
|
|
8717
8722
|
.join( '\n' );
|
|
@@ -10075,7 +10080,7 @@ Bundle.prototype.fetchModule = function fetchModule ( id, importer ) {
|
|
|
10075
10080
|
}
|
|
10076
10081
|
});
|
|
10077
10082
|
module.exportAllSources.forEach( function (source) {
|
|
10078
|
-
var id = module.resolvedIds[ source ];
|
|
10083
|
+
var id = module.resolvedIds[ source ] || module.resolvedExternalIds[ source ];
|
|
10079
10084
|
var exportAllModule = this$1.moduleById.get( id );
|
|
10080
10085
|
if ( exportAllModule.isExternal ) { return; }
|
|
10081
10086
|
|
|
@@ -10125,7 +10130,7 @@ Bundle.prototype.fetchAllDependencies = function fetchAllDependencies ( module )
|
|
|
10125
10130
|
}
|
|
10126
10131
|
|
|
10127
10132
|
if ( isExternal ) {
|
|
10128
|
-
module.
|
|
10133
|
+
module.resolvedExternalIds[ source ] = externalId;
|
|
10129
10134
|
|
|
10130
10135
|
if ( !this$1.moduleById.has( externalId ) ) {
|
|
10131
10136
|
var module$1 = new ExternalModule( externalId, this$1.getPath( externalId ) );
|
|
@@ -10397,7 +10402,7 @@ Bundle.prototype.warn = function warn ( warning ) {
|
|
|
10397
10402
|
this.onwarn( warning );
|
|
10398
10403
|
};
|
|
10399
10404
|
|
|
10400
|
-
var VERSION = '0.45.
|
|
10405
|
+
var VERSION = '0.45.2';
|
|
10401
10406
|
|
|
10402
10407
|
var ALLOWED_KEYS = [
|
|
10403
10408
|
'acorn',
|