rollup 2.64.0 → 2.67.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/dist/rollup.d.ts CHANGED
@@ -156,22 +156,24 @@ export type EmitChunk = (id: string, options?: { name?: string }) => string;
156
156
 
157
157
  export type EmitFile = (emittedFile: EmittedFile) => string;
158
158
 
159
- interface ModuleInfo {
159
+ interface ModuleInfo extends ModuleOptions {
160
160
  ast: AcornNode | null;
161
161
  code: string | null;
162
162
  dynamicImporters: readonly string[];
163
+ dynamicallyImportedIdResolutions: readonly ResolvedId[];
163
164
  dynamicallyImportedIds: readonly string[];
165
+ hasDefaultExport: boolean | null;
166
+ /** @deprecated Use `moduleSideEffects` instead */
164
167
  hasModuleSideEffects: boolean | 'no-treeshake';
165
168
  id: string;
166
169
  implicitlyLoadedAfterOneOf: readonly string[];
167
170
  implicitlyLoadedBefore: readonly string[];
171
+ importedIdResolutions: readonly ResolvedId[];
168
172
  importedIds: readonly string[];
169
173
  importers: readonly string[];
170
174
  isEntry: boolean;
171
175
  isExternal: boolean;
172
176
  isIncluded: boolean | null;
173
- meta: CustomPluginOptions;
174
- syntheticNamedExports: boolean | string;
175
177
  }
176
178
 
177
179
  export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
@@ -199,7 +201,9 @@ export interface PluginContext extends MinimalPluginContext {
199
201
  getWatchFiles: () => string[];
200
202
  /** @deprecated Use `this.resolve` instead */
201
203
  isExternal: IsExternal;
202
- load: (options: { id: string } & Partial<PartialNull<ModuleOptions>>) => Promise<ModuleInfo>;
204
+ load: (
205
+ options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
206
+ ) => Promise<ModuleInfo>;
203
207
  /** @deprecated Use `this.getModuleIds` instead */
204
208
  moduleIds: IterableIterator<string>;
205
209
  parse: (input: string, options?: any) => AcornNode;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.64.0
4
- Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
3
+ Rollup.js v2.67.0
4
+ Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.64.0
4
- Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
3
+ Rollup.js v2.67.0
4
+ Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,9 +10,9 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- const require$$0$2 = require('events');
14
- const fs$4 = require('fs');
15
- const require$$0$1 = require('path');
13
+ const require$$0$3 = require('events');
14
+ const require$$0$1 = require('fs');
15
+ const require$$0$2 = require('path');
16
16
  const require$$2 = require('util');
17
17
  const require$$1 = require('stream');
18
18
  const rollup = require('./rollup.js');
@@ -20,9 +20,9 @@ const require$$2$1 = require('os');
20
20
 
21
21
  var chokidar$1 = {};
22
22
 
23
- const fs$3 = fs$4;
23
+ const fs$3 = require$$0$1;
24
24
  const { Readable } = require$$1;
25
- const sysPath$3 = require$$0$1;
25
+ const sysPath$3 = require$$0$2;
26
26
  const { promisify: promisify$3 } = require$$2;
27
27
  const picomatch$1 = rollup.picomatch;
28
28
 
@@ -620,7 +620,7 @@ var isGlob$2 = function isGlob(str, options) {
620
620
  };
621
621
 
622
622
  var isGlob$1 = isGlob$2;
623
- var pathPosixDirname = require$$0$1.posix.dirname;
623
+ var pathPosixDirname = require$$0$2.posix.dirname;
624
624
  var isWin32 = require$$2$1.platform() === 'win32';
625
625
 
626
626
  var slash = '/';
@@ -2343,7 +2343,7 @@ const require$$0 = [
2343
2343
 
2344
2344
  var binaryExtensions$1 = require$$0;
2345
2345
 
2346
- const path = require$$0$1;
2346
+ const path = require$$0$2;
2347
2347
  const binaryExtensions = binaryExtensions$1;
2348
2348
 
2349
2349
  const extensions = new Set(binaryExtensions);
@@ -2354,7 +2354,7 @@ var constants = {};
2354
2354
 
2355
2355
  (function (exports) {
2356
2356
 
2357
- const {sep} = require$$0$1;
2357
+ const {sep} = require$$0$2;
2358
2358
  const {platform} = process;
2359
2359
  const os = require$$2$1;
2360
2360
 
@@ -2419,8 +2419,8 @@ exports.isLinux = platform === 'linux';
2419
2419
  exports.isIBMi = os.type() === 'OS400';
2420
2420
  }(constants));
2421
2421
 
2422
- const fs$2 = fs$4;
2423
- const sysPath$2 = require$$0$1;
2422
+ const fs$2 = require$$0$1;
2423
+ const sysPath$2 = require$$0$2;
2424
2424
  const { promisify: promisify$2 } = require$$2;
2425
2425
  const isBinaryPath = isBinaryPath$1;
2426
2426
  const {
@@ -2830,7 +2830,15 @@ async _handleSymlink(entry, directory, path, item) {
2830
2830
  if (!this.fsw.options.followSymlinks) {
2831
2831
  // watch symlink directly (don't follow) and detect changes
2832
2832
  this.fsw._incrReadyCount();
2833
- const linkPath = await fsrealpath(path);
2833
+
2834
+ let linkPath;
2835
+ try {
2836
+ linkPath = await fsrealpath(path);
2837
+ } catch (e) {
2838
+ this.fsw._emitReady();
2839
+ return true;
2840
+ }
2841
+
2834
2842
  if (this.fsw.closed) return;
2835
2843
  if (dir.has(item)) {
2836
2844
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
@@ -3058,8 +3066,8 @@ var fseventsHandler = {exports: {}};
3058
3066
 
3059
3067
  const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
3060
3068
 
3061
- const fs$1 = fs$4;
3062
- const sysPath$1 = require$$0$1;
3069
+ const fs$1 = require$$0$1;
3070
+ const sysPath$1 = require$$0$2;
3063
3071
  const { promisify: promisify$1 } = require$$2;
3064
3072
 
3065
3073
  let fsevents;
@@ -3581,9 +3589,9 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
3581
3589
  fseventsHandler.exports = FsEventsHandler$1;
3582
3590
  fseventsHandler.exports.canUse = canUse;
3583
3591
 
3584
- const { EventEmitter } = require$$0$2;
3585
- const fs = fs$4;
3586
- const sysPath = require$$0$1;
3592
+ const { EventEmitter } = require$$0$3;
3593
+ const fs = require$$0$1;
3594
+ const sysPath = require$$0$2;
3587
3595
  const { promisify } = require$$2;
3588
3596
  const readdirp = readdirp_1;
3589
3597
  const anymatch = anymatch$2.exports.default;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.64.0
4
- Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
3
+ Rollup.js v2.67.0
4
+ Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,7 +10,7 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- const fs = require('fs');
13
+ const require$$0$1 = require('fs');
14
14
  const require$$0 = require('path');
15
15
  const url = require('url');
16
16
  const process$1 = require('process');
@@ -610,7 +610,7 @@ async function getDefaultFromTranspiledConfigFile(fileName, commandOptions) {
610
610
  return loadConfigFromBundledFile(fileName, code);
611
611
  }
612
612
  async function loadConfigFromBundledFile(fileName, bundledCode) {
613
- const resolvedFileName = fs.realpathSync(fileName);
613
+ const resolvedFileName = await require$$0$1.promises.realpath(fileName);
614
614
  const extension = require$$0.extname(resolvedFileName);
615
615
  const defaultLoader = require.extensions[extension];
616
616
  require.extensions[extension] = (module, requiredFileName) => {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.64.0
4
- Fri, 14 Jan 2022 14:02:32 GMT - commit 82a3e2634a9d51b5040752e4fb2fd264651d504e
3
+ Rollup.js v2.67.0
4
+ Wed, 02 Feb 2022 06:19:08 GMT - commit 61d772ba59be605e53e72613ae51cee4b72aee64
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup