rollup 2.64.0 → 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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # rollup changelog
2
2
 
3
+ ## 2.65.0
4
+
5
+ _2022-01-21_
6
+
7
+ ### Features
8
+
9
+ - Add complete import resolution objects to ModuleInfo for use in `this.load` (#4354)
10
+
11
+ ### Bug Fixes
12
+
13
+ - Use correct context in plugin hooks with `perf: true` (#4357)
14
+
15
+ ### Pull Requests
16
+
17
+ - [#4351](https://github.com/rollup/rollup/pull/4351): refactor: re-use source mapping url (@dnalborczyk)
18
+ - [#4352](https://github.com/rollup/rollup/pull/4352): refactor: replace require-relative with built-in require.resolve (@dnalborczyk)
19
+ - [#4353](https://github.com/rollup/rollup/pull/4353): chore: bump deps (@dnalborczyk)
20
+ - [#4354](https://github.com/rollup/rollup/pull/4354): Add importedIdResolutions to moduleInfo (@lukastaegert)
21
+ - [#4355](https://github.com/rollup/rollup/pull/4355): chore: remove external from config (@dnalborczyk)
22
+ - [#4357](https://github.com/rollup/rollup/pull/4357): fix: timed plugin context (@dnalborczyk)
23
+
3
24
  ## 2.64.0
4
25
 
5
26
  _2022-01-14_
package/LICENSE.md CHANGED
@@ -583,13 +583,6 @@ Repository: git://github.com/paulmillr/readdirp.git
583
583
 
584
584
  ---------------------------------------
585
585
 
586
- ## require-relative
587
- License: MIT
588
- By: Valerio Proietti
589
- Repository: git://github.com/kamicane/require-relative.git
590
-
591
- ---------------------------------------
592
-
593
586
  ## signal-exit
594
587
  License: ISC
595
588
  By: Ben Coe
package/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v2.64.0
6
- Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
5
+ Rollup.js v2.65.0
6
+ Fri, 21 Jan 2022 07:42:35 GMT - commit bebc50ddb613d240a03988d51787fd71b1a3914f
7
7
 
8
8
 
9
9
  https://github.com/rollup/rollup
@@ -20,8 +20,7 @@ const fs = require('fs');
20
20
  const require$$0 = require('path');
21
21
  const mergeOptions = require('../shared/mergeOptions.js');
22
22
  const loadConfigFile_js = require('../shared/loadConfigFile.js');
23
- const require$$1 = require('module');
24
- require('process');
23
+ const process$1 = require('process');
25
24
  require('perf_hooks');
26
25
  require('crypto');
27
26
  require('events');
@@ -1382,10 +1381,6 @@ var prettyMs = (milliseconds, options = {}) => {
1382
1381
 
1383
1382
  const ms = prettyMs;
1384
1383
 
1385
- let SOURCEMAPPING_URL = 'sourceMa';
1386
- SOURCEMAPPING_URL += 'ppingURL';
1387
- const SOURCEMAPPING_URL$1 = SOURCEMAPPING_URL;
1388
-
1389
1384
  const BYTE_UNITS = [
1390
1385
  'B',
1391
1386
  'kB',
@@ -1550,7 +1545,7 @@ async function build(inputOptions, warnings, silent = false) {
1550
1545
  else {
1551
1546
  source = file.code;
1552
1547
  if (output.sourcemap === 'inline') {
1553
- source += `\n//# ${SOURCEMAPPING_URL$1}=${file.map.toUrl()}\n`;
1548
+ source += `\n//# ${rollup.SOURCEMAPPING_URL}=${file.map.toUrl()}\n`;
1554
1549
  }
1555
1550
  }
1556
1551
  if (outputs.length > 1)
@@ -1573,56 +1568,19 @@ async function build(inputOptions, warnings, silent = false) {
1573
1568
  }
1574
1569
  }
1575
1570
 
1576
- /*
1577
- relative require
1578
- */
1579
-
1580
- var path = require$$0;
1581
- var Module = require$$1;
1582
-
1583
- var modules = {};
1584
-
1585
- var getModule = function(dir) {
1586
- var rootPath = dir ? path.resolve(dir) : process.cwd();
1587
- var rootName = path.join(rootPath, '@root');
1588
- var root = modules[rootName];
1589
- if (!root) {
1590
- root = new Module(rootName);
1591
- root.filename = rootName;
1592
- root.paths = Module._nodeModulePaths(rootPath);
1593
- modules[rootName] = root;
1594
- }
1595
- return root;
1596
- };
1597
-
1598
- var requireRelative = function(requested, relativeTo) {
1599
- var root = getModule(relativeTo);
1600
- return root.require(requested);
1601
- };
1602
-
1603
- requireRelative.resolve = function(requested, relativeTo) {
1604
- var root = getModule(relativeTo);
1605
- return Module._resolveFilename(requested, root);
1606
- };
1607
-
1608
- var requireRelative_1 = requireRelative;
1609
-
1610
- const relative = requireRelative_1;
1611
-
1612
1571
  const DEFAULT_CONFIG_BASE = 'rollup.config';
1613
1572
  function getConfigPath(commandConfig) {
1614
- const cwd = process.cwd();
1615
1573
  if (commandConfig === true) {
1616
1574
  return require$$0.resolve(findConfigFileNameInCwd());
1617
1575
  }
1618
1576
  if (commandConfig.slice(0, 5) === 'node:') {
1619
1577
  const pkgName = commandConfig.slice(5);
1620
1578
  try {
1621
- return relative.resolve(`rollup-config-${pkgName}`, cwd);
1579
+ return require.resolve(`rollup-config-${pkgName}`, { paths: [process$1.cwd()] });
1622
1580
  }
1623
1581
  catch (_a) {
1624
1582
  try {
1625
- return relative.resolve(pkgName, cwd);
1583
+ return require.resolve(pkgName, { paths: [process$1.cwd()] });
1626
1584
  }
1627
1585
  catch (err) {
1628
1586
  if (err.code === 'MODULE_NOT_FOUND') {
@@ -1638,7 +1596,7 @@ function getConfigPath(commandConfig) {
1638
1596
  return require$$0.resolve(commandConfig);
1639
1597
  }
1640
1598
  function findConfigFileNameInCwd() {
1641
- const filesInWorkingDir = new Set(fs.readdirSync(process.cwd()));
1599
+ const filesInWorkingDir = new Set(fs.readdirSync(process$1.cwd()));
1642
1600
  for (const extension of ['mjs', 'cjs', 'ts']) {
1643
1601
  const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
1644
1602
  if (filesInWorkingDir.has(fileName))