rollup 2.36.0 → 2.37.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 +41 -0
- package/LICENSE.md +1 -28
- package/dist/bin/rollup +6 -5
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +1388 -1368
- package/dist/es/shared/watch.js +10 -6
- package/dist/loadConfigFile.js +5 -5
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.js +3 -3
- package/dist/shared/index.js +9 -5
- package/dist/shared/loadConfigFile.js +4 -4
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +1355 -1335
- package/dist/shared/watch-cli.js +12 -12
- package/dist/shared/watch.js +8 -8
- package/package.json +14 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 2.37.1
|
|
4
|
+
*2021-01-20*
|
|
5
|
+
|
|
6
|
+
### Pull Requests
|
|
7
|
+
* [#3929](https://github.com/rollup/rollup/pull/3929): Deduplicate acorn import (@lukastaegert)
|
|
8
|
+
|
|
9
|
+
## 2.37.0
|
|
10
|
+
*2021-01-19*
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
* Always check modules for side effects that only indirectly reexport a used variable (#3840)
|
|
14
|
+
* Warn if a circular dependency would cause wrong execution order when preserving modules (#3840)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Allow consuming synthetic exports via modules that reexport a namespace (#3894)
|
|
18
|
+
* Do not crash for circular default reexports (#3840)
|
|
19
|
+
* Do not crash for circular synthetic namespaces (#3840)
|
|
20
|
+
* Improve circular dependency execution order in certain scenarios (#3840)
|
|
21
|
+
|
|
22
|
+
### Pull Requests
|
|
23
|
+
* [#3840](https://github.com/rollup/rollup/pull/3840): Improve circular dependency execution order (@lukastaegert)
|
|
24
|
+
* [#3894](https://github.com/rollup/rollup/pull/3894): Always respect synthetic namespaces in namespace reexport (@lukastaegert)
|
|
25
|
+
|
|
26
|
+
## 2.36.2
|
|
27
|
+
*2021-01-16*
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
* Fix an issue where invalid code was generated for unused assignments with side effects (#3926)
|
|
31
|
+
|
|
32
|
+
### Pull Requests
|
|
33
|
+
* [#3926](https://github.com/rollup/rollup/pull/3926): Correctly simplify assignments with parentheses (@lukastaegert)
|
|
34
|
+
|
|
35
|
+
## 2.36.1
|
|
36
|
+
*2021-01-06*
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
* Solve issues that result in invalid code when partially removing assignments (#3921)
|
|
40
|
+
|
|
41
|
+
### Pull Requests
|
|
42
|
+
* [#3921](https://github.com/rollup/rollup/pull/3921): Prevent invalid code when removing assignment target of side-effectful object expression (@lukastaegert)
|
|
43
|
+
|
|
3
44
|
## 2.36.0
|
|
4
45
|
*2021-01-05*
|
|
5
46
|
|
package/LICENSE.md
CHANGED
|
@@ -84,33 +84,6 @@ Repository: https://github.com/acornjs/acorn-class-fields
|
|
|
84
84
|
|
|
85
85
|
---------------------------------------
|
|
86
86
|
|
|
87
|
-
## acorn-numeric-separator
|
|
88
|
-
License: MIT
|
|
89
|
-
By: Adrian Heine
|
|
90
|
-
Repository: https://github.com/acornjs/acorn-numeric-separator
|
|
91
|
-
|
|
92
|
-
> Copyright (C) 2017-2018 by Adrian Heine
|
|
93
|
-
>
|
|
94
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
95
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
96
|
-
> in the Software without restriction, including without limitation the rights
|
|
97
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
98
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
99
|
-
> furnished to do so, subject to the following conditions:
|
|
100
|
-
>
|
|
101
|
-
> The above copyright notice and this permission notice shall be included in
|
|
102
|
-
> all copies or substantial portions of the Software.
|
|
103
|
-
>
|
|
104
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
110
|
-
> THE SOFTWARE.
|
|
111
|
-
|
|
112
|
-
---------------------------------------
|
|
113
|
-
|
|
114
87
|
## acorn-private-class-elements
|
|
115
88
|
License: MIT
|
|
116
89
|
By: Adrian Heine
|
|
@@ -172,7 +145,7 @@ Repository: https://github.com/acornjs/acorn.git
|
|
|
172
145
|
|
|
173
146
|
> MIT License
|
|
174
147
|
>
|
|
175
|
-
> Copyright (C) 2012-
|
|
148
|
+
> Copyright (C) 2012-2020 by various contributors (see AUTHORS)
|
|
176
149
|
>
|
|
177
150
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
178
151
|
> of this software and associated documentation files (the "Software"), to deal
|
package/dist/bin/rollup
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
@license
|
|
5
|
-
Rollup.js v2.
|
|
6
|
-
|
|
5
|
+
Rollup.js v2.37.1
|
|
6
|
+
Wed, 20 Jan 2021 11:53:42 GMT - commit e23bb354cca08dbe32e3f6a3ba5c63d015e91ff9
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
https://github.com/rollup/rollup
|
|
@@ -20,9 +20,9 @@ var fs = require('fs');
|
|
|
20
20
|
var sysPath = require('path');
|
|
21
21
|
var mergeOptions = require('../shared/mergeOptions.js');
|
|
22
22
|
var loadConfigFile_js = require('../shared/loadConfigFile.js');
|
|
23
|
+
var Module = require('module');
|
|
23
24
|
require('crypto');
|
|
24
25
|
require('events');
|
|
25
|
-
var Module = require('module');
|
|
26
26
|
require('url');
|
|
27
27
|
|
|
28
28
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.id <id> ID for AMD module (default is anonymous)\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--no-freeze Do not freeze namespace objects\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--no-indent Don't indent result\n--no-interop Do not include interop block\n--inlineDynamicImports Create single bundle when using dynamic imports\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--minifyInternalExports Force or disable minification of internal exports\n--namespaceToStringTag Create proper `.toString` methods for namespaces\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--preferConst Use `const` instead of `var` for exports\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--systemNullSetters Replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--no-treeshake.moduleSideEffects Assume modules have no side-effects\n--no-treeshake.propertyReadSideEffects Ignore property access side-effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--waitForBundleInput Wait for bundle input files\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.skipWrite Do not write files to disk when watching\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\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 --file=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://rollupjs.org\n";
|
|
@@ -1387,7 +1387,7 @@ Formats the given number using `Number#toLocaleString`.
|
|
|
1387
1387
|
*/
|
|
1388
1388
|
const toLocaleString = (number, locale) => {
|
|
1389
1389
|
let result = number;
|
|
1390
|
-
if (typeof locale === 'string') {
|
|
1390
|
+
if (typeof locale === 'string' || Array.isArray(locale)) {
|
|
1391
1391
|
result = number.toLocaleString(locale);
|
|
1392
1392
|
} else if (locale === true) {
|
|
1393
1393
|
result = number.toLocaleString();
|
|
@@ -1402,12 +1402,13 @@ var prettyBytes = (number, options) => {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
options = Object.assign({bits: false, binary: false}, options);
|
|
1405
|
+
|
|
1405
1406
|
const UNITS = options.bits ?
|
|
1406
1407
|
(options.binary ? BIBIT_UNITS : BIT_UNITS) :
|
|
1407
1408
|
(options.binary ? BIBYTE_UNITS : BYTE_UNITS);
|
|
1408
1409
|
|
|
1409
1410
|
if (options.signed && number === 0) {
|
|
1410
|
-
return
|
|
1411
|
+
return ` 0 ${UNITS[0]}`;
|
|
1411
1412
|
}
|
|
1412
1413
|
|
|
1413
1414
|
const isNegative = number < 0;
|