pnpm 7.21.0 → 7.23.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.
Files changed (34) hide show
  1. package/dist/node_modules/.modules.yaml +10 -8
  2. package/dist/node_modules/.pnpm/lock.yaml +39 -31
  3. package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +4 -4
  4. package/dist/node_modules/cacache/node_modules/minimatch/package.json +2 -2
  5. package/dist/node_modules/lru-cache/index.js +13 -3
  6. package/dist/node_modules/lru-cache/package.json +1 -1
  7. package/dist/node_modules/minipass/package.json +2 -2
  8. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +1 -1
  9. package/dist/node_modules/node-gyp/package.json +2 -2
  10. package/dist/node_modules/tar/lib/create.js +16 -9
  11. package/dist/node_modules/tar/lib/extract.js +16 -10
  12. package/dist/node_modules/tar/lib/header.js +50 -34
  13. package/dist/node_modules/tar/lib/large-numbers.js +22 -17
  14. package/dist/node_modules/tar/lib/list.js +20 -13
  15. package/dist/node_modules/tar/lib/mkdir.js +40 -24
  16. package/dist/node_modules/tar/lib/mode-fix.js +8 -4
  17. package/dist/node_modules/tar/lib/normalize-unicode.js +3 -2
  18. package/dist/node_modules/tar/lib/pack.js +54 -31
  19. package/dist/node_modules/tar/lib/parse.js +74 -46
  20. package/dist/node_modules/tar/lib/path-reservations.js +26 -18
  21. package/dist/node_modules/tar/lib/pax.js +15 -8
  22. package/dist/node_modules/tar/lib/read-entry.js +14 -7
  23. package/dist/node_modules/tar/lib/replace.js +50 -27
  24. package/dist/node_modules/tar/lib/strip-absolute-path.js +1 -1
  25. package/dist/node_modules/tar/lib/unpack.js +73 -44
  26. package/dist/node_modules/tar/lib/update.js +8 -4
  27. package/dist/node_modules/tar/lib/warn-mixin.js +7 -4
  28. package/dist/node_modules/tar/lib/write-entry.js +44 -23
  29. package/dist/node_modules/tar/node_modules/minipass/LICENSE +15 -0
  30. package/dist/node_modules/tar/node_modules/minipass/index.js +657 -0
  31. package/dist/node_modules/tar/node_modules/minipass/package.json +56 -0
  32. package/dist/node_modules/tar/package.json +44 -28
  33. package/dist/pnpm.cjs +28186 -19563
  34. package/package.json +5 -6
@@ -99,13 +99,13 @@ hoistedLocations:
99
99
  - node_modules/isexe
100
100
  /lru-cache/6.0.0:
101
101
  - node_modules/semver/node_modules/lru-cache
102
- /lru-cache/7.14.0:
102
+ /lru-cache/7.14.1:
103
103
  - node_modules/lru-cache
104
104
  /make-fetch-happen/10.2.1:
105
105
  - node_modules/make-fetch-happen
106
106
  /minimatch/3.1.2:
107
107
  - node_modules/minimatch
108
- /minimatch/5.1.0:
108
+ /minimatch/5.1.1:
109
109
  - node_modules/cacache/node_modules/minimatch
110
110
  /minipass-collect/1.0.2:
111
111
  - node_modules/minipass-collect
@@ -117,8 +117,10 @@ hoistedLocations:
117
117
  - node_modules/minipass-pipeline
118
118
  /minipass-sized/1.0.3:
119
119
  - node_modules/minipass-sized
120
- /minipass/3.3.5:
120
+ /minipass/3.3.6:
121
121
  - node_modules/minipass
122
+ /minipass/4.0.0:
123
+ - node_modules/tar/node_modules/minipass
122
124
  /minizlib/2.1.2:
123
125
  - node_modules/minizlib
124
126
  /mkdirp/1.0.4:
@@ -129,7 +131,7 @@ hoistedLocations:
129
131
  - node_modules/humanize-ms/node_modules/ms
130
132
  /negotiator/0.6.3:
131
133
  - node_modules/negotiator
132
- /node-gyp/9.3.0:
134
+ /node-gyp/9.3.1:
133
135
  - node_modules/node-gyp
134
136
  /nopt/6.0.0:
135
137
  - node_modules/nopt
@@ -175,7 +177,7 @@ hoistedLocations:
175
177
  - node_modules/string_decoder
176
178
  /strip-ansi/6.0.1:
177
179
  - node_modules/strip-ansi
178
- /tar/6.1.11:
180
+ /tar/6.1.13:
179
181
  - node_modules/tar
180
182
  /unique-filename/2.0.1:
181
183
  - node_modules/unique-filename
@@ -198,11 +200,11 @@ included:
198
200
  injectedDeps: {}
199
201
  layoutVersion: 5
200
202
  nodeLinker: hoisted
201
- packageManager: pnpm@7.20.0
203
+ packageManager: pnpm@7.22.0
202
204
  pendingBuilds:
203
- - /node-gyp/9.3.0
205
+ - /node-gyp/9.3.1
204
206
  - /encoding/0.1.13
205
- prunedAt: Wed, 28 Dec 2022 15:00:13 GMT
207
+ prunedAt: Thu, 05 Jan 2023 13:49:34 GMT
206
208
  publicHoistPattern:
207
209
  - '*eslint*'
208
210
  - '*prettier*'
@@ -1,10 +1,10 @@
1
1
  lockfileVersion: 5.4
2
2
 
3
3
  specifiers:
4
- node-gyp: ^9.3.0
4
+ node-gyp: ^9.3.1
5
5
 
6
6
  optionalDependencies:
7
- node-gyp: 9.3.0
7
+ node-gyp: 9.3.1
8
8
 
9
9
  packages:
10
10
 
@@ -124,8 +124,8 @@ packages:
124
124
  fs-minipass: 2.1.0
125
125
  glob: 8.0.3
126
126
  infer-owner: 1.0.4
127
- lru-cache: 7.14.0
128
- minipass: 3.3.5
127
+ lru-cache: 7.14.1
128
+ minipass: 3.3.6
129
129
  minipass-collect: 1.0.2
130
130
  minipass-flush: 1.0.5
131
131
  minipass-pipeline: 1.2.4
@@ -134,7 +134,7 @@ packages:
134
134
  promise-inflight: 1.0.1
135
135
  rimraf: 3.0.2
136
136
  ssri: 9.0.1
137
- tar: 6.1.11
137
+ tar: 6.1.13
138
138
  unique-filename: 2.0.1
139
139
  transitivePeerDependencies:
140
140
  - bluebird
@@ -221,7 +221,7 @@ packages:
221
221
  resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}
222
222
  engines: {node: '>= 8'}
223
223
  dependencies:
224
- minipass: 3.3.5
224
+ minipass: 3.3.6
225
225
  dev: false
226
226
  optional: true
227
227
 
@@ -264,7 +264,7 @@ packages:
264
264
  fs.realpath: 1.0.0
265
265
  inflight: 1.0.6
266
266
  inherits: 2.0.4
267
- minimatch: 5.1.0
267
+ minimatch: 5.1.1
268
268
  once: 1.4.0
269
269
  dev: false
270
270
  optional: true
@@ -381,8 +381,8 @@ packages:
381
381
  dev: false
382
382
  optional: true
383
383
 
384
- /lru-cache/7.14.0:
385
- resolution: {integrity: sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==}
384
+ /lru-cache/7.14.1:
385
+ resolution: {integrity: sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==}
386
386
  engines: {node: '>=12'}
387
387
  dev: false
388
388
  optional: true
@@ -397,8 +397,8 @@ packages:
397
397
  http-proxy-agent: 5.0.0
398
398
  https-proxy-agent: 5.0.1
399
399
  is-lambda: 1.0.1
400
- lru-cache: 7.14.0
401
- minipass: 3.3.5
400
+ lru-cache: 7.14.1
401
+ minipass: 3.3.6
402
402
  minipass-collect: 1.0.2
403
403
  minipass-fetch: 2.1.2
404
404
  minipass-flush: 1.0.5
@@ -420,8 +420,8 @@ packages:
420
420
  dev: false
421
421
  optional: true
422
422
 
423
- /minimatch/5.1.0:
424
- resolution: {integrity: sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==}
423
+ /minimatch/5.1.1:
424
+ resolution: {integrity: sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==}
425
425
  engines: {node: '>=10'}
426
426
  dependencies:
427
427
  brace-expansion: 2.0.1
@@ -432,7 +432,7 @@ packages:
432
432
  resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==}
433
433
  engines: {node: '>= 8'}
434
434
  dependencies:
435
- minipass: 3.3.5
435
+ minipass: 3.3.6
436
436
  dev: false
437
437
  optional: true
438
438
 
@@ -440,7 +440,7 @@ packages:
440
440
  resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==}
441
441
  engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
442
442
  dependencies:
443
- minipass: 3.3.5
443
+ minipass: 3.3.6
444
444
  minipass-sized: 1.0.3
445
445
  minizlib: 2.1.2
446
446
  optionalDependencies:
@@ -452,7 +452,7 @@ packages:
452
452
  resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==}
453
453
  engines: {node: '>= 8'}
454
454
  dependencies:
455
- minipass: 3.3.5
455
+ minipass: 3.3.6
456
456
  dev: false
457
457
  optional: true
458
458
 
@@ -460,7 +460,7 @@ packages:
460
460
  resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==}
461
461
  engines: {node: '>=8'}
462
462
  dependencies:
463
- minipass: 3.3.5
463
+ minipass: 3.3.6
464
464
  dev: false
465
465
  optional: true
466
466
 
@@ -468,12 +468,20 @@ packages:
468
468
  resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==}
469
469
  engines: {node: '>=8'}
470
470
  dependencies:
471
- minipass: 3.3.5
471
+ minipass: 3.3.6
472
472
  dev: false
473
473
  optional: true
474
474
 
475
- /minipass/3.3.5:
476
- resolution: {integrity: sha512-rQ/p+KfKBkeNwo04U15i+hOwoVBVmekmm/HcfTkTN2t9pbQKCMm4eN5gFeqgrrSp/kH/7BYYhTIHOxGqzbBPaA==}
475
+ /minipass/3.3.6:
476
+ resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}
477
+ engines: {node: '>=8'}
478
+ dependencies:
479
+ yallist: 4.0.0
480
+ dev: false
481
+ optional: true
482
+
483
+ /minipass/4.0.0:
484
+ resolution: {integrity: sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==}
477
485
  engines: {node: '>=8'}
478
486
  dependencies:
479
487
  yallist: 4.0.0
@@ -484,7 +492,7 @@ packages:
484
492
  resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}
485
493
  engines: {node: '>= 8'}
486
494
  dependencies:
487
- minipass: 3.3.5
495
+ minipass: 3.3.6
488
496
  yallist: 4.0.0
489
497
  dev: false
490
498
  optional: true
@@ -512,9 +520,9 @@ packages:
512
520
  dev: false
513
521
  optional: true
514
522
 
515
- /node-gyp/9.3.0:
516
- resolution: {integrity: sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q==}
517
- engines: {node: ^12.22 || ^14.13 || >=16}
523
+ /node-gyp/9.3.1:
524
+ resolution: {integrity: sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==}
525
+ engines: {node: ^12.13 || ^14.13 || >=16}
518
526
  hasBin: true
519
527
  requiresBuild: true
520
528
  dependencies:
@@ -526,7 +534,7 @@ packages:
526
534
  npmlog: 6.0.2
527
535
  rimraf: 3.0.2
528
536
  semver: 7.3.8
529
- tar: 6.1.11
537
+ tar: 6.1.13
530
538
  which: 2.0.2
531
539
  transitivePeerDependencies:
532
540
  - bluebird
@@ -678,7 +686,7 @@ packages:
678
686
  resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==}
679
687
  engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
680
688
  dependencies:
681
- minipass: 3.3.5
689
+ minipass: 3.3.6
682
690
  dev: false
683
691
  optional: true
684
692
 
@@ -707,13 +715,13 @@ packages:
707
715
  dev: false
708
716
  optional: true
709
717
 
710
- /tar/6.1.11:
711
- resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==}
712
- engines: {node: '>= 10'}
718
+ /tar/6.1.13:
719
+ resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==}
720
+ engines: {node: '>=10'}
713
721
  dependencies:
714
722
  chownr: 2.0.0
715
723
  fs-minipass: 2.1.0
716
- minipass: 3.3.5
724
+ minipass: 4.0.0
717
725
  minizlib: 2.1.2
718
726
  mkdirp: 1.0.4
719
727
  yallist: 4.0.0
@@ -768,4 +776,4 @@ packages:
768
776
  optional: true
769
777
 
770
778
  time:
771
- /node-gyp/9.3.0: '2022-10-11T04:54:21.968Z'
779
+ /node-gyp/9.3.1: '2022-12-19T22:43:10.187Z'
@@ -243,7 +243,7 @@ class Minimatch {
243
243
  negateOffset++
244
244
  }
245
245
 
246
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
246
+ if (negateOffset) this.pattern = pattern.slice(negateOffset)
247
247
  this.negate = negate
248
248
  }
249
249
 
@@ -619,7 +619,7 @@ class Minimatch {
619
619
  } catch (er) {
620
620
  // not a valid class!
621
621
  sp = this.parse(cs, SUBPARSE)
622
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
622
+ re = re.substring(0, reClassStart) + '\\[' + sp[0] + '\\]'
623
623
  hasMagic = hasMagic || sp[1]
624
624
  inClass = false
625
625
  continue
@@ -652,9 +652,9 @@ class Minimatch {
652
652
  // this is a huge pita. We now have to re-walk
653
653
  // the contents of the would-be class to re-translate
654
654
  // any characters that were passed through as-is
655
- cs = pattern.substr(classStart + 1)
655
+ cs = pattern.slice(classStart + 1)
656
656
  sp = this.parse(cs, SUBPARSE)
657
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
657
+ re = re.substring(0, reClassStart) + '\\[' + sp[0]
658
658
  hasMagic = hasMagic || sp[1]
659
659
  }
660
660
 
@@ -2,7 +2,7 @@
2
2
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
3
  "name": "minimatch",
4
4
  "description": "a glob matcher in javascript",
5
- "version": "5.1.0",
5
+ "version": "5.1.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git://github.com/isaacs/minimatch.git"
@@ -22,7 +22,7 @@
22
22
  "brace-expansion": "^2.0.1"
23
23
  },
24
24
  "devDependencies": {
25
- "tap": "^15.1.6"
25
+ "tap": "^16.3.2"
26
26
  },
27
27
  "license": "ISC",
28
28
  "files": [
@@ -379,6 +379,11 @@ class LRUCache {
379
379
  this.sizes[index] = 0
380
380
  }
381
381
  this.requireSize = (k, v, size, sizeCalculation) => {
382
+ // provisionally accept background fetches.
383
+ // actual value size will be checked when they return.
384
+ if (this.isBackgroundFetch(v)) {
385
+ return 0
386
+ }
382
387
  if (!isPosInt(size)) {
383
388
  if (sizeCalculation) {
384
389
  if (typeof sizeCalculation !== 'function') {
@@ -400,9 +405,11 @@ class LRUCache {
400
405
  }
401
406
  this.addItemSize = (index, size) => {
402
407
  this.sizes[index] = size
403
- const maxSize = this.maxSize - this.sizes[index]
404
- while (this.calculatedSize > maxSize) {
405
- this.evict(true)
408
+ if (this.maxSize) {
409
+ const maxSize = this.maxSize - this.sizes[index]
410
+ while (this.calculatedSize > maxSize) {
411
+ this.evict(true)
412
+ }
406
413
  }
407
414
  this.calculatedSize += this.sizes[index]
408
415
  }
@@ -586,6 +593,9 @@ class LRUCache {
586
593
  // if the item doesn't fit, don't do anything
587
594
  // NB: maxEntrySize set to maxSize by default
588
595
  if (this.maxEntrySize && size > this.maxEntrySize) {
596
+ // have to delete, in case a background fetch is there already.
597
+ // in non-async cases, this is a no-op
598
+ this.delete(k)
589
599
  return this
590
600
  }
591
601
  let index = this.size === 0 ? undefined : this.keyMap.get(k)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lru-cache",
3
3
  "description": "A cache object that deletes the least-recently-used items.",
4
- "version": "7.14.0",
4
+ "version": "7.14.1",
5
5
  "author": "Isaac Z. Schlueter <i@izs.me>",
6
6
  "keywords": [
7
7
  "mru",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minipass",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "description": "minimal implementation of a PassThrough stream",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "scripts": {
20
20
  "test": "tap",
21
21
  "preversion": "npm test",
22
- "postversion": "npm publish --tag=next",
22
+ "postversion": "npm publish",
23
23
  "postpublish": "git push origin --follow-tags"
24
24
  },
25
25
  "repository": {
@@ -14,7 +14,7 @@ jobs:
14
14
  max-parallel: 15
15
15
  matrix:
16
16
  node: [14.x, 16.x, 18.x]
17
- python: ["3.6", "3.8", "3.10"]
17
+ python: ["3.7", "3.9", "3.11"]
18
18
  os: [macos-latest, ubuntu-latest, windows-latest]
19
19
  runs-on: ${{ matrix.os }}
20
20
  steps:
@@ -11,7 +11,7 @@
11
11
  "bindings",
12
12
  "gyp"
13
13
  ],
14
- "version": "9.3.0",
14
+ "version": "9.3.1",
15
15
  "installVersion": 9,
16
16
  "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",
17
17
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "which": "^2.0.2"
35
35
  },
36
36
  "engines": {
37
- "node": "^12.22 || ^14.13 || >=16"
37
+ "node": "^12.13 || ^14.13 || >=16"
38
38
  },
39
39
  "devDependencies": {
40
40
  "bindings": "^1.5.0",
@@ -9,24 +9,29 @@ const t = require('./list.js')
9
9
  const path = require('path')
10
10
 
11
11
  module.exports = (opt_, files, cb) => {
12
- if (typeof files === 'function')
12
+ if (typeof files === 'function') {
13
13
  cb = files
14
+ }
14
15
 
15
- if (Array.isArray(opt_))
16
+ if (Array.isArray(opt_)) {
16
17
  files = opt_, opt_ = {}
18
+ }
17
19
 
18
- if (!files || !Array.isArray(files) || !files.length)
20
+ if (!files || !Array.isArray(files) || !files.length) {
19
21
  throw new TypeError('no files or directories specified')
22
+ }
20
23
 
21
24
  files = Array.from(files)
22
25
 
23
26
  const opt = hlo(opt_)
24
27
 
25
- if (opt.sync && typeof cb === 'function')
28
+ if (opt.sync && typeof cb === 'function') {
26
29
  throw new TypeError('callback not supported for sync tar functions')
30
+ }
27
31
 
28
- if (!opt.file && typeof cb === 'function')
32
+ if (!opt.file && typeof cb === 'function') {
29
33
  throw new TypeError('callback only supported with file option')
34
+ }
30
35
 
31
36
  return opt.file && opt.sync ? createFileSync(opt, files)
32
37
  : opt.file ? createFile(opt, files, cb)
@@ -65,13 +70,14 @@ const addFilesSync = (p, files) => {
65
70
  files.forEach(file => {
66
71
  if (file.charAt(0) === '@') {
67
72
  t({
68
- file: path.resolve(p.cwd, file.substr(1)),
73
+ file: path.resolve(p.cwd, file.slice(1)),
69
74
  sync: true,
70
75
  noResume: true,
71
76
  onentry: entry => p.add(entry),
72
77
  })
73
- } else
78
+ } else {
74
79
  p.add(file)
80
+ }
75
81
  })
76
82
  p.end()
77
83
  }
@@ -81,12 +87,13 @@ const addFilesAsync = (p, files) => {
81
87
  const file = files.shift()
82
88
  if (file.charAt(0) === '@') {
83
89
  return t({
84
- file: path.resolve(p.cwd, file.substr(1)),
90
+ file: path.resolve(p.cwd, file.slice(1)),
85
91
  noResume: true,
86
92
  onentry: entry => p.add(entry),
87
93
  }).then(_ => addFilesAsync(p, files))
88
- } else
94
+ } else {
89
95
  p.add(file)
96
+ }
90
97
  }
91
98
  p.end()
92
99
  }
@@ -9,29 +9,35 @@ const path = require('path')
9
9
  const stripSlash = require('./strip-trailing-slashes.js')
10
10
 
11
11
  module.exports = (opt_, files, cb) => {
12
- if (typeof opt_ === 'function')
12
+ if (typeof opt_ === 'function') {
13
13
  cb = opt_, files = null, opt_ = {}
14
- else if (Array.isArray(opt_))
14
+ } else if (Array.isArray(opt_)) {
15
15
  files = opt_, opt_ = {}
16
+ }
16
17
 
17
- if (typeof files === 'function')
18
+ if (typeof files === 'function') {
18
19
  cb = files, files = null
20
+ }
19
21
 
20
- if (!files)
22
+ if (!files) {
21
23
  files = []
22
- else
24
+ } else {
23
25
  files = Array.from(files)
26
+ }
24
27
 
25
28
  const opt = hlo(opt_)
26
29
 
27
- if (opt.sync && typeof cb === 'function')
30
+ if (opt.sync && typeof cb === 'function') {
28
31
  throw new TypeError('callback not supported for sync tar functions')
32
+ }
29
33
 
30
- if (!opt.file && typeof cb === 'function')
34
+ if (!opt.file && typeof cb === 'function') {
31
35
  throw new TypeError('callback only supported with file option')
36
+ }
32
37
 
33
- if (files.length)
38
+ if (files.length) {
34
39
  filesFilter(opt, files)
40
+ }
35
41
 
36
42
  return opt.file && opt.sync ? extractFileSync(opt)
37
43
  : opt.file ? extractFile(opt, cb)
@@ -87,9 +93,9 @@ const extractFile = (opt, cb) => {
87
93
  // This trades a zero-byte read() syscall for a stat
88
94
  // However, it will usually result in less memory allocation
89
95
  fs.stat(file, (er, stat) => {
90
- if (er)
96
+ if (er) {
91
97
  reject(er)
92
- else {
98
+ } else {
93
99
  const stream = new fsm.ReadStream(file, {
94
100
  readSize: readSize,
95
101
  size: stat.size,