rollup 2.63.0 → 2.64.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # rollup changelog
2
2
 
3
+ ## 2.64.0
4
+
5
+ _2022-01-14_
6
+
7
+ ### Features
8
+
9
+ - Allow inspecting cached modules and forcing them to be transformed again via shouldTransformCachedModule (#4320)
10
+ - Do not wait for the config file to be parsed in watch mode if it is updated before that (#4344)
11
+
12
+ ### Bug Fixes
13
+
14
+ - Do not mutate objects returned as `meta` from the resolveId hook (#4347)
15
+
16
+ ### Pull Requests
17
+
18
+ - [#4326](https://github.com/rollup/rollup/pull/4326): refactor: type fixes (@dnalborczyk)
19
+ - [#4339](https://github.com/rollup/rollup/pull/4339): More watch test stabilization (@lukastaegert)
20
+ - [#4340](https://github.com/rollup/rollup/pull/4340): refactor: performance timers for node.js and browser (@dnalborczyk)
21
+ - [#4341](https://github.com/rollup/rollup/pull/4341): Implement shouldTransformCachedModule hook (@lukastaegert)
22
+ - [#4344](https://github.com/rollup/rollup/pull/4344): Directly restart Rollup when config file change is detected in watch mode (@lukastaegert)
23
+ - [#4347](https://github.com/rollup/rollup/pull/4347): Create a shallow copy when returning meta from resolveId (@lukastaegert)
24
+
3
25
  ## 2.63.0
4
26
 
5
27
  _2022-01-04_
package/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v2.63.0
6
- Tue, 04 Jan 2022 07:30:25 GMT - commit ae674c9edde5efb8ce6d8ef845598a805938178c
5
+ Rollup.js v2.64.0
6
+ Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
7
7
 
8
8
 
9
9
  https://github.com/rollup/rollup
@@ -17,29 +17,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
17
17
  const rollup = require('../shared/rollup.js');
18
18
  const require$$2 = require('util');
19
19
  const fs = require('fs');
20
- const path$1 = require('path');
20
+ const require$$0 = require('path');
21
21
  const mergeOptions = require('../shared/mergeOptions.js');
22
22
  const loadConfigFile_js = require('../shared/loadConfigFile.js');
23
23
  const require$$1 = require('module');
24
+ require('process');
25
+ require('perf_hooks');
24
26
  require('crypto');
25
27
  require('events');
26
28
  require('url');
27
- require('process');
28
29
  require('tty');
29
30
 
30
- function _interopNamespaceDefault(e) {
31
- const n = Object.create(null);
32
- if (e) {
33
- for (const k in e) {
34
- n[k] = e[k];
35
- }
36
- }
37
- n.default = e;
38
- return n;
39
- }
40
-
41
- const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path$1);
42
-
43
31
  const 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--no-sanitizeFileName Do not replace invalid characters in file names\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--validate Validate output\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";
44
32
 
45
33
  /**
@@ -1221,8 +1209,8 @@ const parser = new YargsParser({
1221
1209
  return env;
1222
1210
  },
1223
1211
  format: require$$2.format,
1224
- normalize: path$1.normalize,
1225
- resolve: path$1.resolve,
1212
+ normalize: require$$0.normalize,
1213
+ resolve: require$$0.resolve,
1226
1214
  // TODO: figure out a way to combine ESM and CJS coverage, such that
1227
1215
  // we can exercise all the lines below:
1228
1216
  require: (path) => {
@@ -1589,7 +1577,7 @@ async function build(inputOptions, warnings, silent = false) {
1589
1577
  relative require
1590
1578
  */
1591
1579
 
1592
- var path = path$1;
1580
+ var path = require$$0;
1593
1581
  var Module = require$$1;
1594
1582
 
1595
1583
  var modules = {};
@@ -1625,7 +1613,7 @@ const DEFAULT_CONFIG_BASE = 'rollup.config';
1625
1613
  function getConfigPath(commandConfig) {
1626
1614
  const cwd = process.cwd();
1627
1615
  if (commandConfig === true) {
1628
- return path__namespace.resolve(findConfigFileNameInCwd());
1616
+ return require$$0.resolve(findConfigFileNameInCwd());
1629
1617
  }
1630
1618
  if (commandConfig.slice(0, 5) === 'node:') {
1631
1619
  const pkgName = commandConfig.slice(5);
@@ -1647,7 +1635,7 @@ function getConfigPath(commandConfig) {
1647
1635
  }
1648
1636
  }
1649
1637
  }
1650
- return path__namespace.resolve(commandConfig);
1638
+ return require$$0.resolve(commandConfig);
1651
1639
  }
1652
1640
  function findConfigFileNameInCwd() {
1653
1641
  const filesInWorkingDir = new Set(fs.readdirSync(process.cwd()));