rollup 2.60.0 → 2.60.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/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.60.0
4
- Fri, 12 Nov 2021 05:12:41 GMT - commit 8d98341bf746d4baa57bbd730b1fa6449555cfca
3
+ Rollup.js v2.60.1
4
+ Mon, 22 Nov 2021 07:50:11 GMT - commit 649074e14131b490ff9dfe26e94632ff458c4970
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.60.0
4
- Fri, 12 Nov 2021 05:12:41 GMT - commit 8d98341bf746d4baa57bbd730b1fa6449555cfca
3
+ Rollup.js v2.60.1
4
+ Mon, 22 Nov 2021 07:50:11 GMT - commit 649074e14131b490ff9dfe26e94632ff458c4970
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -13,7 +13,7 @@ import { createHash as createHash$1 } from 'crypto';
13
13
  import fs, { lstatSync, realpathSync, readdirSync } from 'fs';
14
14
  import { EventEmitter } from 'events';
15
15
 
16
- var version$1 = "2.60.0";
16
+ var version$1 = "2.60.1";
17
17
 
18
18
  var charToInteger = {};
19
19
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -14454,13 +14454,14 @@ class Chunk {
14454
14454
  const id = this.orderedModules[0].id;
14455
14455
  const sanitizedId = this.outputOptions.sanitizeFileName(id);
14456
14456
  let path;
14457
+ const patternOpt = unsetOptions.has('entryFileNames')
14458
+ ? '[name][assetExtname].js'
14459
+ : options.entryFileNames;
14460
+ const pattern = typeof patternOpt === 'function' ? patternOpt(this.getChunkInfo()) : patternOpt;
14457
14461
  if (isAbsolute(id)) {
14458
- const extension = extname(id);
14459
- const pattern = unsetOptions.has('entryFileNames')
14460
- ? '[name][assetExtname].js'
14461
- : options.entryFileNames;
14462
14462
  const currentDir = dirname(sanitizedId);
14463
- const fileName = renderNamePattern(typeof pattern === 'function' ? pattern(this.getChunkInfo()) : pattern, 'output.entryFileNames', {
14463
+ const extension = extname(id);
14464
+ const fileName = renderNamePattern(pattern, 'output.entryFileNames', {
14464
14465
  assetExtname: () => (NON_ASSET_EXTENSIONS.includes(extension) ? '' : extension),
14465
14466
  ext: () => extension.substr(1),
14466
14467
  extname: () => extension,
@@ -14477,7 +14478,15 @@ class Chunk {
14477
14478
  }
14478
14479
  }
14479
14480
  else {
14480
- path = `_virtual/${basename(sanitizedId)}`;
14481
+ const extension = extname(sanitizedId);
14482
+ const fileName = renderNamePattern(pattern, 'output.entryFileNames', {
14483
+ assetExtname: () => (NON_ASSET_EXTENSIONS.includes(extension) ? '' : extension),
14484
+ ext: () => extension.substr(1),
14485
+ extname: () => extension,
14486
+ format: () => options.format,
14487
+ name: () => getAliasName(sanitizedId)
14488
+ });
14489
+ path = `_virtual/${fileName}`;
14481
14490
  }
14482
14491
  return makeUnique(normalize(path), existingNames);
14483
14492
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.60.0
4
- Fri, 12 Nov 2021 05:12:41 GMT - commit 8d98341bf746d4baa57bbd730b1fa6449555cfca
3
+ Rollup.js v2.60.1
4
+ Mon, 22 Nov 2021 07:50:11 GMT - commit 649074e14131b490ff9dfe26e94632ff458c4970
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.60.0
4
- Fri, 12 Nov 2021 05:12:41 GMT - commit 8d98341bf746d4baa57bbd730b1fa6449555cfca
3
+ Rollup.js v2.60.1
4
+ Mon, 22 Nov 2021 07:50:11 GMT - commit 649074e14131b490ff9dfe26e94632ff458c4970
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup