rollup 2.38.0 → 2.38.4

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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.38.0
4
- Fri, 22 Jan 2021 16:26:00 GMT - commit 889fa5267ad93cc706fdbff2024e9c4d4f273749
3
+ Rollup.js v2.38.4
4
+ Tue, 02 Feb 2021 05:54:38 GMT - commit 991bb98fad1f3f76226bfe6243fd6cc45a19a39b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.38.0
4
- Fri, 22 Jan 2021 16:26:00 GMT - commit 889fa5267ad93cc706fdbff2024e9c4d4f273749
3
+ Rollup.js v2.38.4
4
+ Tue, 02 Feb 2021 05:54:38 GMT - commit 991bb98fad1f3f76226bfe6243fd6cc45a19a39b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -4887,13 +4887,14 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
4887
4887
  const follow = this.fsw.options.followSymlinks && !path.includes(STAR$1) && !path.includes(BRACE_START);
4888
4888
  let closer;
4889
4889
  if (stats.isDirectory()) {
4890
+ const absPath = sysPath.resolve(path);
4890
4891
  const targetPath = follow ? await fsrealpath(path) : path;
4891
4892
  if (this.fsw.closed) return;
4892
4893
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
4893
4894
  if (this.fsw.closed) return;
4894
4895
  // preserve this symlink's target path
4895
- if (path !== targetPath && targetPath !== undefined) {
4896
- this.fsw._symlinkPaths.set(targetPath, true);
4896
+ if (absPath !== targetPath && targetPath !== undefined) {
4897
+ this.fsw._symlinkPaths.set(absPath, targetPath);
4897
4898
  }
4898
4899
  } else if (stats.isSymbolicLink()) {
4899
4900
  const targetPath = follow ? await fsrealpath(path) : path;
@@ -5227,8 +5228,7 @@ handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opt
5227
5228
  * @returns {Function} closer for the watcher instance
5228
5229
  */
5229
5230
  _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
5230
- if (this.fsw.closed) return;
5231
- if (this.fsw._isIgnored(watchPath)) return;
5231
+ if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
5232
5232
  const opts = this.fsw.options;
5233
5233
  const watchCallback = async (fullPath, flags, info) => {
5234
5234
  if (this.fsw.closed) return;
@@ -6316,6 +6316,15 @@ _remove(directory, item, isDirectory) {
6316
6316
  const wasTracked = parent.has(item);
6317
6317
  parent.remove(item);
6318
6318
 
6319
+ // Fixes issue #1042 -> Relative paths were detected and added as symlinks
6320
+ // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
6321
+ // but never removed from the map in case the path was deleted.
6322
+ // This leads to an incorrect state if the path was recreated:
6323
+ // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
6324
+ if (this._symlinkPaths.has(fullPath)) {
6325
+ this._symlinkPaths.delete(fullPath);
6326
+ }
6327
+
6319
6328
  // If we wait for this file to be fully written, cancel the wait.
6320
6329
  let relPath = path;
6321
6330
  if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.38.0
4
- Fri, 22 Jan 2021 16:26:00 GMT - commit 889fa5267ad93cc706fdbff2024e9c4d4f273749
3
+ Rollup.js v2.38.4
4
+ Tue, 02 Feb 2021 05:54:38 GMT - commit 991bb98fad1f3f76226bfe6243fd6cc45a19a39b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.38.0
4
- Fri, 22 Jan 2021 16:26:00 GMT - commit 889fa5267ad93cc706fdbff2024e9c4d4f273749
3
+ Rollup.js v2.38.4
4
+ Tue, 02 Feb 2021 05:54:38 GMT - commit 991bb98fad1f3f76226bfe6243fd6cc45a19a39b
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup