memfs 3.4.7 → 3.4.9

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/lib/node.js CHANGED
@@ -138,9 +138,10 @@ var Node = /** @class */ (function (_super) {
138
138
  this.buf = this.buf.slice(0, len);
139
139
  }
140
140
  else {
141
- var buf = (0, buffer_1.bufferAllocUnsafe)(0);
141
+ var buf = (0, buffer_1.bufferAllocUnsafe)(len);
142
142
  this.buf.copy(buf);
143
- buf.fill(0, len);
143
+ buf.fill(0, this.buf.length);
144
+ this.buf = buf;
144
145
  }
145
146
  }
146
147
  this.touch();
package/lib/volume.js CHANGED
@@ -1535,7 +1535,7 @@ var Volume = /** @class */ (function () {
1535
1535
  this.wrapAsync(this.futimesBase, [fd, toUnixTimestamp(atime), toUnixTimestamp(mtime)], callback);
1536
1536
  };
1537
1537
  Volume.prototype.utimesBase = function (filename, atime, mtime) {
1538
- var fd = this.openSync(filename, 'r+');
1538
+ var fd = this.openSync(filename, 'r');
1539
1539
  try {
1540
1540
  this.futimesBase(fd, atime, mtime);
1541
1541
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memfs",
3
- "version": "3.4.7",
3
+ "version": "3.4.9",
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",
@@ -16,7 +16,8 @@
16
16
  "watch": "watch \"npm run build\" ./src",
17
17
  "prettier": "prettier --ignore-path .gitignore --write \"src/**/*.{ts,js}\"",
18
18
  "prettier:diff": "prettier -l \"src/**/*.{ts,js}\"",
19
- "tslint": "tslint \"src/**/*.ts\" -t verbose"
19
+ "tslint": "tslint \"src/**/*.ts\" -t verbose",
20
+ "typecheck": "tsc -p ."
20
21
  },
21
22
  "repository": {
22
23
  "type": "git",
@@ -48,6 +49,11 @@
48
49
  "path": "git-cz"
49
50
  }
50
51
  },
52
+ "commitlint": {
53
+ "extends": [
54
+ "@commitlint/config-conventional"
55
+ ]
56
+ },
51
57
  "jest": {
52
58
  "moduleFileExtensions": [
53
59
  "ts",