memfs 3.5.1 → 3.5.2

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.
Files changed (2) hide show
  1. package/lib/volume.js +7 -1
  2. package/package.json +1 -1
package/lib/volume.js CHANGED
@@ -2279,7 +2279,13 @@ var FSWatcher = /** @class */ (function (_super) {
2279
2279
  var _a;
2280
2280
  var filepath = link.getPath();
2281
2281
  var node = link.getNode();
2282
- var onNodeChange = function () { return _this.emit('change', 'change', relative(_this._filename, filepath)); };
2282
+ var onNodeChange = function () {
2283
+ var filename = relative(_this._filename, filepath);
2284
+ if (!filename) {
2285
+ filename = _this._getName();
2286
+ }
2287
+ return _this.emit('change', 'change', filename);
2288
+ };
2283
2289
  node.on('change', onNodeChange);
2284
2290
  var removers = (_a = _this._listenerRemovers.get(node.ino)) !== null && _a !== void 0 ? _a : [];
2285
2291
  removers.push(function () { return node.removeListener('change', onNodeChange); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memfs",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "In-memory file-system with Node's fs API.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",