rollup 2.61.1 → 2.65.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 +96 -0
- package/LICENSE.md +0 -7
- package/dist/bin/rollup +14 -68
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +4 -2
- package/dist/es/shared/rollup.js +453 -294
- package/dist/es/shared/watch.js +31 -19
- package/dist/loadConfigFile.js +3 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +21 -3
- package/dist/rollup.js +4 -2
- package/dist/shared/index.js +24 -14
- package/dist/shared/loadConfigFile.js +10 -11
- package/dist/shared/mergeOptions.js +12 -5
- package/dist/shared/rollup.js +502 -340
- package/dist/shared/watch-cli.js +21 -30
- package/dist/shared/watch.js +8 -18
- package/package.json +18 -20
package/dist/es/shared/watch.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.65.0
|
|
4
|
+
Fri, 21 Jan 2022 07:42:35 GMT - commit bebc50ddb613d240a03988d51787fd71b1a3914f
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
|
9
9
|
Released under the MIT License.
|
|
10
10
|
*/
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { defaultOnWarn, ensureArray, warnUnknownOptions, objectifyOptionWithPresets, treeshakePresets, generatedCodePresets, picomatch as picomatch$2, createFilter, rollupInternal } from './rollup.js';
|
|
11
|
+
import require$$0$1, { resolve } from 'path';
|
|
12
|
+
import { defaultOnWarn, ensureArray, warnUnknownOptions, objectifyOptionWithPresets, treeshakePresets, objectifyOption, generatedCodePresets, picomatch as picomatch$2, getAugmentedNamespace, fseventsImporter, createFilter, rollupInternal } from './rollup.js';
|
|
14
13
|
import require$$2$1, { platform } from 'os';
|
|
15
14
|
import require$$0$2 from 'events';
|
|
16
15
|
import fs$4 from 'fs';
|
|
17
16
|
import require$$2 from 'util';
|
|
18
17
|
import require$$1 from 'stream';
|
|
18
|
+
import 'process';
|
|
19
|
+
import 'perf_hooks';
|
|
19
20
|
import 'crypto';
|
|
20
21
|
|
|
21
22
|
const commandAliases = {
|
|
@@ -91,7 +92,7 @@ function mergeInputOptions(config, overrides, defaultOnWarnHandler) {
|
|
|
91
92
|
shimMissingExports: getOption('shimMissingExports'),
|
|
92
93
|
strictDeprecations: getOption('strictDeprecations'),
|
|
93
94
|
treeshake: getObjectOption(config, overrides, 'treeshake', objectifyOptionWithPresets(treeshakePresets, 'treeshake', 'false, true, ')),
|
|
94
|
-
watch: getWatch(config, overrides
|
|
95
|
+
watch: getWatch(config, overrides)
|
|
95
96
|
};
|
|
96
97
|
warnUnknownOptions(config, Object.keys(inputOptions), 'input options', inputOptions.onwarn, /^output$/);
|
|
97
98
|
return inputOptions;
|
|
@@ -105,7 +106,7 @@ const getExternal = (config, overrides) => {
|
|
|
105
106
|
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn
|
|
106
107
|
? warning => config.onwarn(warning, defaultOnWarnHandler)
|
|
107
108
|
: defaultOnWarnHandler;
|
|
108
|
-
const getObjectOption = (config, overrides, name, objectifyValue =
|
|
109
|
+
const getObjectOption = (config, overrides, name, objectifyValue = objectifyOption) => {
|
|
109
110
|
const commandOption = normalizeObjectOptionValue(overrides[name], objectifyValue);
|
|
110
111
|
const configOption = normalizeObjectOptionValue(config[name], objectifyValue);
|
|
111
112
|
if (commandOption !== undefined) {
|
|
@@ -113,7 +114,7 @@ const getObjectOption = (config, overrides, name, objectifyValue = value => (typ
|
|
|
113
114
|
}
|
|
114
115
|
return configOption;
|
|
115
116
|
};
|
|
116
|
-
const getWatch = (config, overrides
|
|
117
|
+
const getWatch = (config, overrides) => config.watch !== false && getObjectOption(config, overrides, 'watch');
|
|
117
118
|
const normalizeObjectOptionValue = (optionValue, objectifyValue) => {
|
|
118
119
|
if (!optionValue) {
|
|
119
120
|
return optionValue;
|
|
@@ -177,7 +178,7 @@ var chokidar$1 = {};
|
|
|
177
178
|
|
|
178
179
|
const fs$3 = fs$4;
|
|
179
180
|
const { Readable } = require$$1;
|
|
180
|
-
const sysPath$3 = require$$
|
|
181
|
+
const sysPath$3 = require$$0$1;
|
|
181
182
|
const { promisify: promisify$3 } = require$$2;
|
|
182
183
|
const picomatch$1 = picomatch$2;
|
|
183
184
|
|
|
@@ -775,7 +776,7 @@ var isGlob$2 = function isGlob(str, options) {
|
|
|
775
776
|
};
|
|
776
777
|
|
|
777
778
|
var isGlob$1 = isGlob$2;
|
|
778
|
-
var pathPosixDirname = require$$
|
|
779
|
+
var pathPosixDirname = require$$0$1.posix.dirname;
|
|
779
780
|
var isWin32 = require$$2$1.platform() === 'win32';
|
|
780
781
|
|
|
781
782
|
var slash = '/';
|
|
@@ -2498,7 +2499,7 @@ const require$$0 = [
|
|
|
2498
2499
|
|
|
2499
2500
|
var binaryExtensions$1 = require$$0;
|
|
2500
2501
|
|
|
2501
|
-
const path = require$$
|
|
2502
|
+
const path = require$$0$1;
|
|
2502
2503
|
const binaryExtensions = binaryExtensions$1;
|
|
2503
2504
|
|
|
2504
2505
|
const extensions = new Set(binaryExtensions);
|
|
@@ -2509,7 +2510,7 @@ var constants = {};
|
|
|
2509
2510
|
|
|
2510
2511
|
(function (exports) {
|
|
2511
2512
|
|
|
2512
|
-
const {sep} = require$$
|
|
2513
|
+
const {sep} = require$$0$1;
|
|
2513
2514
|
const {platform} = process;
|
|
2514
2515
|
const os = require$$2$1;
|
|
2515
2516
|
|
|
@@ -2575,7 +2576,7 @@ exports.isIBMi = os.type() === 'OS400';
|
|
|
2575
2576
|
}(constants));
|
|
2576
2577
|
|
|
2577
2578
|
const fs$2 = fs$4;
|
|
2578
|
-
const sysPath$2 = require$$
|
|
2579
|
+
const sysPath$2 = require$$0$1;
|
|
2579
2580
|
const { promisify: promisify$2 } = require$$2;
|
|
2580
2581
|
const isBinaryPath = isBinaryPath$1;
|
|
2581
2582
|
const {
|
|
@@ -2985,7 +2986,15 @@ async _handleSymlink(entry, directory, path, item) {
|
|
|
2985
2986
|
if (!this.fsw.options.followSymlinks) {
|
|
2986
2987
|
// watch symlink directly (don't follow) and detect changes
|
|
2987
2988
|
this.fsw._incrReadyCount();
|
|
2988
|
-
|
|
2989
|
+
|
|
2990
|
+
let linkPath;
|
|
2991
|
+
try {
|
|
2992
|
+
linkPath = await fsrealpath(path);
|
|
2993
|
+
} catch (e) {
|
|
2994
|
+
this.fsw._emitReady();
|
|
2995
|
+
return true;
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2989
2998
|
if (this.fsw.closed) return;
|
|
2990
2999
|
if (dir.has(item)) {
|
|
2991
3000
|
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
@@ -3211,13 +3220,15 @@ var nodefsHandler = NodeFsHandler$1;
|
|
|
3211
3220
|
|
|
3212
3221
|
var fseventsHandler = {exports: {}};
|
|
3213
3222
|
|
|
3223
|
+
const require$$3 = /*@__PURE__*/getAugmentedNamespace(fseventsImporter);
|
|
3224
|
+
|
|
3214
3225
|
const fs$1 = fs$4;
|
|
3215
|
-
const sysPath$1 = require$$
|
|
3226
|
+
const sysPath$1 = require$$0$1;
|
|
3216
3227
|
const { promisify: promisify$1 } = require$$2;
|
|
3217
3228
|
|
|
3218
3229
|
let fsevents;
|
|
3219
3230
|
try {
|
|
3220
|
-
fsevents = require
|
|
3231
|
+
fsevents = require$$3.getFsEvents();
|
|
3221
3232
|
} catch (error) {
|
|
3222
3233
|
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
|
|
3223
3234
|
}
|
|
@@ -3736,7 +3747,7 @@ fseventsHandler.exports.canUse = canUse;
|
|
|
3736
3747
|
|
|
3737
3748
|
const { EventEmitter } = require$$0$2;
|
|
3738
3749
|
const fs = fs$4;
|
|
3739
|
-
const sysPath = require$$
|
|
3750
|
+
const sysPath = require$$0$1;
|
|
3740
3751
|
const { promisify } = require$$2;
|
|
3741
3752
|
const readdirp = readdirp_1;
|
|
3742
3753
|
const anymatch = anymatch$2.exports.default;
|
|
@@ -4730,8 +4741,9 @@ class FileWatcher {
|
|
|
4730
4741
|
}
|
|
4731
4742
|
}
|
|
4732
4743
|
watch(id, isTransformDependency) {
|
|
4744
|
+
var _a;
|
|
4733
4745
|
if (isTransformDependency) {
|
|
4734
|
-
const watcher = this.transformWatchers.get(id)
|
|
4746
|
+
const watcher = (_a = this.transformWatchers.get(id)) !== null && _a !== void 0 ? _a : this.createWatcher(id);
|
|
4735
4747
|
watcher.add(id);
|
|
4736
4748
|
this.transformWatchers.set(id, watcher);
|
|
4737
4749
|
}
|
|
@@ -4866,7 +4878,7 @@ class Task {
|
|
|
4866
4878
|
this.outputs = this.options.output;
|
|
4867
4879
|
this.outputFiles = this.outputs.map(output => {
|
|
4868
4880
|
if (output.file || output.dir)
|
|
4869
|
-
return
|
|
4881
|
+
return resolve(output.file || output.dir);
|
|
4870
4882
|
return undefined;
|
|
4871
4883
|
});
|
|
4872
4884
|
const watchOptions = this.options.watch || {};
|
package/dist/loadConfigFile.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.65.0
|
|
4
|
+
Fri, 21 Jan 2022 07:42:35 GMT - commit bebc50ddb613d240a03988d51787fd71b1a3914f
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -18,6 +18,7 @@ require('./shared/rollup.js');
|
|
|
18
18
|
require('./shared/mergeOptions.js');
|
|
19
19
|
require('process');
|
|
20
20
|
require('tty');
|
|
21
|
+
require('perf_hooks');
|
|
21
22
|
require('crypto');
|
|
22
23
|
require('events');
|
|
23
24
|
|