@pnpm/exe 11.9.0 → 11.10.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.
@@ -143,12 +143,36 @@ const parseKVLine = (set, line) => {
143
143
  return set;
144
144
  }
145
145
  const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1');
146
- const v = kv.join('=');
147
- set[k] =
148
- /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ?
149
- new Date(Number(v) * 1000)
150
- : /^[0-9]+$/.test(v) ? +v
151
- : v;
146
+ const v = kv.join('=').replace(/\0.*/, '');
147
+ switch (k) {
148
+ case 'path':
149
+ case 'linkpath':
150
+ case 'type':
151
+ case 'charset':
152
+ case 'comment':
153
+ case 'gname':
154
+ case 'uname':
155
+ set[k] = v;
156
+ break;
157
+ case 'ctime':
158
+ case 'atime':
159
+ case 'mtime':
160
+ set[k] = new Date(Number(v) * 1000);
161
+ break;
162
+ case 'size':
163
+ const s = +v;
164
+ if (s >= 0)
165
+ set[k] = s;
166
+ break;
167
+ case 'gid':
168
+ case 'uid':
169
+ case 'dev':
170
+ case 'ino':
171
+ case 'nlink':
172
+ case 'mode':
173
+ set[k] = +v;
174
+ break;
175
+ }
152
176
  return set;
153
177
  };
154
178
  //# sourceMappingURL=pax.js.map
@@ -146,7 +146,7 @@ export class Unpack extends Parser {
146
146
  // default true for root
147
147
  this.preserveOwner =
148
148
  opt.preserveOwner === undefined && typeof opt.uid !== 'number' ?
149
- !!(process.getuid && process.getuid() === 0)
149
+ !!(process.getuid?.() === 0)
150
150
  : !!opt.preserveOwner;
151
151
  this.processUid =
152
152
  (this.preserveOwner || this.setOwner) && process.getuid ?
@@ -367,7 +367,7 @@ export class Unpack extends Parser {
367
367
  }
368
368
  }
369
369
  [MKDIR](dir, mode, cb) {
370
- mkdir(normalizeWindowsPath(dir), {
370
+ void mkdir(normalizeWindowsPath(dir), {
371
371
  uid: this.uid,
372
372
  gid: this.gid,
373
373
  processUid: this.processUid,
@@ -2,7 +2,7 @@
2
2
  "author": "Isaac Z. Schlueter",
3
3
  "name": "tar",
4
4
  "description": "tar for node",
5
- "version": "7.5.16",
5
+ "version": "7.5.19",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/isaacs/node-tar.git"