pnpm 10.6.5 → 10.7.1

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 (137) hide show
  1. package/dist/node_modules/.modules.yaml +7 -7
  2. package/dist/node_modules/.pnpm/lock.yaml +5 -15
  3. package/dist/node_modules/.pnpm-workspace-state.json +1 -1
  4. package/dist/node_modules/minipass-flush/node_modules/yallist/package.json +29 -0
  5. package/dist/node_modules/{rimraf → minipass-pipeline/node_modules/yallist}/LICENSE +1 -1
  6. package/dist/node_modules/minipass-pipeline/node_modules/yallist/iterator.js +8 -0
  7. package/dist/node_modules/minipass-pipeline/node_modules/yallist/package.json +29 -0
  8. package/dist/node_modules/minipass-pipeline/node_modules/yallist/yallist.js +426 -0
  9. package/dist/node_modules/minipass-sized/node_modules/yallist/LICENSE +15 -0
  10. package/dist/node_modules/minipass-sized/node_modules/yallist/iterator.js +8 -0
  11. package/dist/node_modules/minipass-sized/node_modules/yallist/package.json +29 -0
  12. package/dist/node_modules/minipass-sized/node_modules/yallist/yallist.js +426 -0
  13. package/dist/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -1
  14. package/dist/node_modules/minizlib/dist/commonjs/index.js +45 -5
  15. package/dist/node_modules/minizlib/dist/commonjs/index.js.map +1 -1
  16. package/dist/node_modules/minizlib/dist/esm/index.d.ts.map +1 -1
  17. package/dist/node_modules/minizlib/dist/esm/index.js +11 -4
  18. package/dist/node_modules/minizlib/dist/esm/index.js.map +1 -1
  19. package/dist/node_modules/minizlib/package.json +8 -9
  20. package/dist/node_modules/yallist/package.json +51 -12
  21. package/dist/pnpm.cjs +3049 -2518
  22. package/package.json +3 -3
  23. package/dist/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +0 -1
  24. package/dist/node_modules/rimraf/dist/commonjs/default-tmp.js +0 -61
  25. package/dist/node_modules/rimraf/dist/commonjs/default-tmp.js.map +0 -1
  26. package/dist/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +0 -1
  27. package/dist/node_modules/rimraf/dist/commonjs/fix-eperm.js +0 -58
  28. package/dist/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +0 -1
  29. package/dist/node_modules/rimraf/dist/commonjs/fs.d.ts.map +0 -1
  30. package/dist/node_modules/rimraf/dist/commonjs/fs.js +0 -46
  31. package/dist/node_modules/rimraf/dist/commonjs/fs.js.map +0 -1
  32. package/dist/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +0 -1
  33. package/dist/node_modules/rimraf/dist/commonjs/ignore-enoent.js +0 -21
  34. package/dist/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +0 -1
  35. package/dist/node_modules/rimraf/dist/commonjs/index.d.ts.map +0 -1
  36. package/dist/node_modules/rimraf/dist/commonjs/index.js +0 -78
  37. package/dist/node_modules/rimraf/dist/commonjs/index.js.map +0 -1
  38. package/dist/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +0 -1
  39. package/dist/node_modules/rimraf/dist/commonjs/opt-arg.js +0 -53
  40. package/dist/node_modules/rimraf/dist/commonjs/opt-arg.js.map +0 -1
  41. package/dist/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +0 -1
  42. package/dist/node_modules/rimraf/dist/commonjs/path-arg.js +0 -52
  43. package/dist/node_modules/rimraf/dist/commonjs/path-arg.js.map +0 -1
  44. package/dist/node_modules/rimraf/dist/commonjs/platform.d.ts.map +0 -1
  45. package/dist/node_modules/rimraf/dist/commonjs/platform.js +0 -4
  46. package/dist/node_modules/rimraf/dist/commonjs/platform.js.map +0 -1
  47. package/dist/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +0 -1
  48. package/dist/node_modules/rimraf/dist/commonjs/readdir-or-error.js +0 -19
  49. package/dist/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +0 -1
  50. package/dist/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +0 -1
  51. package/dist/node_modules/rimraf/dist/commonjs/retry-busy.js +0 -68
  52. package/dist/node_modules/rimraf/dist/commonjs/retry-busy.js.map +0 -1
  53. package/dist/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +0 -1
  54. package/dist/node_modules/rimraf/dist/commonjs/rimraf-manual.js +0 -12
  55. package/dist/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +0 -1
  56. package/dist/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +0 -1
  57. package/dist/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +0 -192
  58. package/dist/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +0 -1
  59. package/dist/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +0 -1
  60. package/dist/node_modules/rimraf/dist/commonjs/rimraf-native.js +0 -24
  61. package/dist/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +0 -1
  62. package/dist/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +0 -1
  63. package/dist/node_modules/rimraf/dist/commonjs/rimraf-posix.js +0 -123
  64. package/dist/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +0 -1
  65. package/dist/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +0 -1
  66. package/dist/node_modules/rimraf/dist/commonjs/rimraf-windows.js +0 -182
  67. package/dist/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +0 -1
  68. package/dist/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +0 -1
  69. package/dist/node_modules/rimraf/dist/commonjs/use-native.js +0 -22
  70. package/dist/node_modules/rimraf/dist/commonjs/use-native.js.map +0 -1
  71. package/dist/node_modules/rimraf/dist/esm/bin.d.mts +0 -8
  72. package/dist/node_modules/rimraf/dist/esm/bin.d.mts.map +0 -1
  73. package/dist/node_modules/rimraf/dist/esm/bin.mjs +0 -256
  74. package/dist/node_modules/rimraf/dist/esm/bin.mjs.map +0 -1
  75. package/dist/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +0 -1
  76. package/dist/node_modules/rimraf/dist/esm/default-tmp.js +0 -55
  77. package/dist/node_modules/rimraf/dist/esm/default-tmp.js.map +0 -1
  78. package/dist/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +0 -1
  79. package/dist/node_modules/rimraf/dist/esm/fix-eperm.js +0 -53
  80. package/dist/node_modules/rimraf/dist/esm/fix-eperm.js.map +0 -1
  81. package/dist/node_modules/rimraf/dist/esm/fs.d.ts.map +0 -1
  82. package/dist/node_modules/rimraf/dist/esm/fs.js +0 -31
  83. package/dist/node_modules/rimraf/dist/esm/fs.js.map +0 -1
  84. package/dist/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +0 -1
  85. package/dist/node_modules/rimraf/dist/esm/ignore-enoent.js +0 -16
  86. package/dist/node_modules/rimraf/dist/esm/ignore-enoent.js.map +0 -1
  87. package/dist/node_modules/rimraf/dist/esm/index.d.ts.map +0 -1
  88. package/dist/node_modules/rimraf/dist/esm/index.js +0 -70
  89. package/dist/node_modules/rimraf/dist/esm/index.js.map +0 -1
  90. package/dist/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +0 -1
  91. package/dist/node_modules/rimraf/dist/esm/opt-arg.js +0 -46
  92. package/dist/node_modules/rimraf/dist/esm/opt-arg.js.map +0 -1
  93. package/dist/node_modules/rimraf/dist/esm/path-arg.d.ts.map +0 -1
  94. package/dist/node_modules/rimraf/dist/esm/path-arg.js +0 -47
  95. package/dist/node_modules/rimraf/dist/esm/path-arg.js.map +0 -1
  96. package/dist/node_modules/rimraf/dist/esm/platform.d.ts.map +0 -1
  97. package/dist/node_modules/rimraf/dist/esm/platform.js +0 -2
  98. package/dist/node_modules/rimraf/dist/esm/platform.js.map +0 -1
  99. package/dist/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +0 -1
  100. package/dist/node_modules/rimraf/dist/esm/readdir-or-error.js +0 -14
  101. package/dist/node_modules/rimraf/dist/esm/readdir-or-error.js.map +0 -1
  102. package/dist/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +0 -1
  103. package/dist/node_modules/rimraf/dist/esm/retry-busy.js +0 -63
  104. package/dist/node_modules/rimraf/dist/esm/retry-busy.js.map +0 -1
  105. package/dist/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +0 -1
  106. package/dist/node_modules/rimraf/dist/esm/rimraf-manual.js +0 -6
  107. package/dist/node_modules/rimraf/dist/esm/rimraf-manual.js.map +0 -1
  108. package/dist/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +0 -1
  109. package/dist/node_modules/rimraf/dist/esm/rimraf-move-remove.js +0 -187
  110. package/dist/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +0 -1
  111. package/dist/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +0 -1
  112. package/dist/node_modules/rimraf/dist/esm/rimraf-native.js +0 -19
  113. package/dist/node_modules/rimraf/dist/esm/rimraf-native.js.map +0 -1
  114. package/dist/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +0 -1
  115. package/dist/node_modules/rimraf/dist/esm/rimraf-posix.js +0 -118
  116. package/dist/node_modules/rimraf/dist/esm/rimraf-posix.js.map +0 -1
  117. package/dist/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +0 -1
  118. package/dist/node_modules/rimraf/dist/esm/rimraf-windows.js +0 -177
  119. package/dist/node_modules/rimraf/dist/esm/rimraf-windows.js.map +0 -1
  120. package/dist/node_modules/rimraf/dist/esm/use-native.d.ts.map +0 -1
  121. package/dist/node_modules/rimraf/dist/esm/use-native.js +0 -16
  122. package/dist/node_modules/rimraf/dist/esm/use-native.js.map +0 -1
  123. package/dist/node_modules/rimraf/package.json +0 -89
  124. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +0 -3
  125. package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +0 -3
  126. package/dist/node_modules/tar/node_modules/yallist/package.json +0 -68
  127. /package/dist/node_modules/{yallist → minipass-flush/node_modules/yallist}/LICENSE +0 -0
  128. /package/dist/node_modules/{yallist → minipass-flush/node_modules/yallist}/iterator.js +0 -0
  129. /package/dist/node_modules/{yallist → minipass-flush/node_modules/yallist}/yallist.js +0 -0
  130. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/commonjs/index.d.ts.map +0 -0
  131. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/commonjs/index.js +0 -0
  132. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/commonjs/index.js.map +0 -0
  133. /package/dist/node_modules/{rimraf → yallist}/dist/commonjs/package.json +0 -0
  134. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/esm/index.d.ts.map +0 -0
  135. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/esm/index.js +0 -0
  136. /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/esm/index.js.map +0 -0
  137. /package/dist/node_modules/{rimraf → yallist}/dist/esm/package.json +0 -0
@@ -108,7 +108,7 @@ hoistedLocations:
108
108
  - node_modules/minipass-sized/node_modules/minipass
109
109
  minipass@7.1.2:
110
110
  - node_modules/minipass
111
- minizlib@3.0.1:
111
+ minizlib@3.0.2:
112
112
  - node_modules/minizlib
113
113
  mkdirp@3.0.1:
114
114
  - node_modules/mkdirp
@@ -134,8 +134,6 @@ hoistedLocations:
134
134
  - node_modules/promise-retry
135
135
  retry@0.12.0:
136
136
  - node_modules/retry
137
- rimraf@5.0.10:
138
- - node_modules/rimraf
139
137
  safer-buffer@2.1.2:
140
138
  - node_modules/safer-buffer
141
139
  semver@7.7.1:
@@ -184,9 +182,11 @@ hoistedLocations:
184
182
  wrap-ansi@8.1.0:
185
183
  - node_modules/wrap-ansi
186
184
  yallist@4.0.0:
187
- - node_modules/yallist
185
+ - node_modules/minipass-pipeline/node_modules/yallist
186
+ - node_modules/minipass-flush/node_modules/yallist
187
+ - node_modules/minipass-sized/node_modules/yallist
188
188
  yallist@5.0.0:
189
- - node_modules/tar/node_modules/yallist
189
+ - node_modules/yallist
190
190
  included:
191
191
  dependencies: true
192
192
  devDependencies: true
@@ -194,9 +194,9 @@ included:
194
194
  injectedDeps: {}
195
195
  layoutVersion: 5
196
196
  nodeLinker: hoisted
197
- packageManager: pnpm@10.6.2
197
+ packageManager: pnpm@10.6.5
198
198
  pendingBuilds: []
199
- prunedAt: Wed, 19 Mar 2025 13:38:51 GMT
199
+ prunedAt: Tue, 01 Apr 2025 12:11:46 GMT
200
200
  publicHoistPattern: []
201
201
  registries:
202
202
  default: https://registry.npmjs.org/
@@ -241,8 +241,8 @@ packages:
241
241
  resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
242
242
  engines: {node: '>=16 || 14 >=14.17'}
243
243
 
244
- minizlib@3.0.1:
245
- resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==}
244
+ minizlib@3.0.2:
245
+ resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==}
246
246
  engines: {node: '>= 18'}
247
247
 
248
248
  mkdirp@3.0.1:
@@ -294,10 +294,6 @@ packages:
294
294
  resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}
295
295
  engines: {node: '>= 4'}
296
296
 
297
- rimraf@5.0.10:
298
- resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==}
299
- hasBin: true
300
-
301
297
  safer-buffer@2.1.2:
302
298
  resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
303
299
 
@@ -629,7 +625,7 @@ snapshots:
629
625
  dependencies:
630
626
  minipass: 7.1.2
631
627
  minipass-sized: 1.0.3
632
- minizlib: 3.0.1
628
+ minizlib: 3.0.2
633
629
  optionalDependencies:
634
630
  encoding: 0.1.13
635
631
  optional: true
@@ -657,10 +653,9 @@ snapshots:
657
653
  minipass@7.1.2:
658
654
  optional: true
659
655
 
660
- minizlib@3.0.1:
656
+ minizlib@3.0.2:
661
657
  dependencies:
662
658
  minipass: 7.1.2
663
- rimraf: 5.0.10
664
659
  optional: true
665
660
 
666
661
  mkdirp@3.0.1:
@@ -720,11 +715,6 @@ snapshots:
720
715
  retry@0.12.0:
721
716
  optional: true
722
717
 
723
- rimraf@5.0.10:
724
- dependencies:
725
- glob: 10.4.5
726
- optional: true
727
-
728
718
  safer-buffer@2.1.2:
729
719
  optional: true
730
720
 
@@ -797,7 +787,7 @@ snapshots:
797
787
  '@isaacs/fs-minipass': 4.0.1
798
788
  chownr: 3.0.0
799
789
  minipass: 7.1.2
800
- minizlib: 3.0.1
790
+ minizlib: 3.0.2
801
791
  mkdirp: 3.0.1
802
792
  yallist: 5.0.0
803
793
  optional: true
@@ -1,5 +1,5 @@
1
1
  {
2
- "lastValidatedTimestamp": 1742391531448,
2
+ "lastValidatedTimestamp": 1743509506100,
3
3
  "projects": {},
4
4
  "pnpmfileExists": false,
5
5
  "settings": {
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "4.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "main": "yallist.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "files": [
10
+ "yallist.js",
11
+ "iterator.js"
12
+ ],
13
+ "dependencies": {},
14
+ "devDependencies": {
15
+ "tap": "^12.1.0"
16
+ },
17
+ "scripts": {
18
+ "test": "tap test/*.js --100",
19
+ "preversion": "npm test",
20
+ "postversion": "npm publish",
21
+ "postpublish": "git push origin --all; git push origin --tags"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/isaacs/yallist.git"
26
+ },
27
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
28
+ "license": "ISC"
29
+ }
@@ -1,6 +1,6 @@
1
1
  The ISC License
2
2
 
3
- Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+ module.exports = function (Yallist) {
3
+ Yallist.prototype[Symbol.iterator] = function* () {
4
+ for (let walker = this.head; walker; walker = walker.next) {
5
+ yield walker.value
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "4.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "main": "yallist.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "files": [
10
+ "yallist.js",
11
+ "iterator.js"
12
+ ],
13
+ "dependencies": {},
14
+ "devDependencies": {
15
+ "tap": "^12.1.0"
16
+ },
17
+ "scripts": {
18
+ "test": "tap test/*.js --100",
19
+ "preversion": "npm test",
20
+ "postversion": "npm publish",
21
+ "postpublish": "git push origin --all; git push origin --tags"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/isaacs/yallist.git"
26
+ },
27
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
28
+ "license": "ISC"
29
+ }
@@ -0,0 +1,426 @@
1
+ 'use strict'
2
+ module.exports = Yallist
3
+
4
+ Yallist.Node = Node
5
+ Yallist.create = Yallist
6
+
7
+ function Yallist (list) {
8
+ var self = this
9
+ if (!(self instanceof Yallist)) {
10
+ self = new Yallist()
11
+ }
12
+
13
+ self.tail = null
14
+ self.head = null
15
+ self.length = 0
16
+
17
+ if (list && typeof list.forEach === 'function') {
18
+ list.forEach(function (item) {
19
+ self.push(item)
20
+ })
21
+ } else if (arguments.length > 0) {
22
+ for (var i = 0, l = arguments.length; i < l; i++) {
23
+ self.push(arguments[i])
24
+ }
25
+ }
26
+
27
+ return self
28
+ }
29
+
30
+ Yallist.prototype.removeNode = function (node) {
31
+ if (node.list !== this) {
32
+ throw new Error('removing node which does not belong to this list')
33
+ }
34
+
35
+ var next = node.next
36
+ var prev = node.prev
37
+
38
+ if (next) {
39
+ next.prev = prev
40
+ }
41
+
42
+ if (prev) {
43
+ prev.next = next
44
+ }
45
+
46
+ if (node === this.head) {
47
+ this.head = next
48
+ }
49
+ if (node === this.tail) {
50
+ this.tail = prev
51
+ }
52
+
53
+ node.list.length--
54
+ node.next = null
55
+ node.prev = null
56
+ node.list = null
57
+
58
+ return next
59
+ }
60
+
61
+ Yallist.prototype.unshiftNode = function (node) {
62
+ if (node === this.head) {
63
+ return
64
+ }
65
+
66
+ if (node.list) {
67
+ node.list.removeNode(node)
68
+ }
69
+
70
+ var head = this.head
71
+ node.list = this
72
+ node.next = head
73
+ if (head) {
74
+ head.prev = node
75
+ }
76
+
77
+ this.head = node
78
+ if (!this.tail) {
79
+ this.tail = node
80
+ }
81
+ this.length++
82
+ }
83
+
84
+ Yallist.prototype.pushNode = function (node) {
85
+ if (node === this.tail) {
86
+ return
87
+ }
88
+
89
+ if (node.list) {
90
+ node.list.removeNode(node)
91
+ }
92
+
93
+ var tail = this.tail
94
+ node.list = this
95
+ node.prev = tail
96
+ if (tail) {
97
+ tail.next = node
98
+ }
99
+
100
+ this.tail = node
101
+ if (!this.head) {
102
+ this.head = node
103
+ }
104
+ this.length++
105
+ }
106
+
107
+ Yallist.prototype.push = function () {
108
+ for (var i = 0, l = arguments.length; i < l; i++) {
109
+ push(this, arguments[i])
110
+ }
111
+ return this.length
112
+ }
113
+
114
+ Yallist.prototype.unshift = function () {
115
+ for (var i = 0, l = arguments.length; i < l; i++) {
116
+ unshift(this, arguments[i])
117
+ }
118
+ return this.length
119
+ }
120
+
121
+ Yallist.prototype.pop = function () {
122
+ if (!this.tail) {
123
+ return undefined
124
+ }
125
+
126
+ var res = this.tail.value
127
+ this.tail = this.tail.prev
128
+ if (this.tail) {
129
+ this.tail.next = null
130
+ } else {
131
+ this.head = null
132
+ }
133
+ this.length--
134
+ return res
135
+ }
136
+
137
+ Yallist.prototype.shift = function () {
138
+ if (!this.head) {
139
+ return undefined
140
+ }
141
+
142
+ var res = this.head.value
143
+ this.head = this.head.next
144
+ if (this.head) {
145
+ this.head.prev = null
146
+ } else {
147
+ this.tail = null
148
+ }
149
+ this.length--
150
+ return res
151
+ }
152
+
153
+ Yallist.prototype.forEach = function (fn, thisp) {
154
+ thisp = thisp || this
155
+ for (var walker = this.head, i = 0; walker !== null; i++) {
156
+ fn.call(thisp, walker.value, i, this)
157
+ walker = walker.next
158
+ }
159
+ }
160
+
161
+ Yallist.prototype.forEachReverse = function (fn, thisp) {
162
+ thisp = thisp || this
163
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
164
+ fn.call(thisp, walker.value, i, this)
165
+ walker = walker.prev
166
+ }
167
+ }
168
+
169
+ Yallist.prototype.get = function (n) {
170
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
171
+ // abort out of the list early if we hit a cycle
172
+ walker = walker.next
173
+ }
174
+ if (i === n && walker !== null) {
175
+ return walker.value
176
+ }
177
+ }
178
+
179
+ Yallist.prototype.getReverse = function (n) {
180
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
181
+ // abort out of the list early if we hit a cycle
182
+ walker = walker.prev
183
+ }
184
+ if (i === n && walker !== null) {
185
+ return walker.value
186
+ }
187
+ }
188
+
189
+ Yallist.prototype.map = function (fn, thisp) {
190
+ thisp = thisp || this
191
+ var res = new Yallist()
192
+ for (var walker = this.head; walker !== null;) {
193
+ res.push(fn.call(thisp, walker.value, this))
194
+ walker = walker.next
195
+ }
196
+ return res
197
+ }
198
+
199
+ Yallist.prototype.mapReverse = function (fn, thisp) {
200
+ thisp = thisp || this
201
+ var res = new Yallist()
202
+ for (var walker = this.tail; walker !== null;) {
203
+ res.push(fn.call(thisp, walker.value, this))
204
+ walker = walker.prev
205
+ }
206
+ return res
207
+ }
208
+
209
+ Yallist.prototype.reduce = function (fn, initial) {
210
+ var acc
211
+ var walker = this.head
212
+ if (arguments.length > 1) {
213
+ acc = initial
214
+ } else if (this.head) {
215
+ walker = this.head.next
216
+ acc = this.head.value
217
+ } else {
218
+ throw new TypeError('Reduce of empty list with no initial value')
219
+ }
220
+
221
+ for (var i = 0; walker !== null; i++) {
222
+ acc = fn(acc, walker.value, i)
223
+ walker = walker.next
224
+ }
225
+
226
+ return acc
227
+ }
228
+
229
+ Yallist.prototype.reduceReverse = function (fn, initial) {
230
+ var acc
231
+ var walker = this.tail
232
+ if (arguments.length > 1) {
233
+ acc = initial
234
+ } else if (this.tail) {
235
+ walker = this.tail.prev
236
+ acc = this.tail.value
237
+ } else {
238
+ throw new TypeError('Reduce of empty list with no initial value')
239
+ }
240
+
241
+ for (var i = this.length - 1; walker !== null; i--) {
242
+ acc = fn(acc, walker.value, i)
243
+ walker = walker.prev
244
+ }
245
+
246
+ return acc
247
+ }
248
+
249
+ Yallist.prototype.toArray = function () {
250
+ var arr = new Array(this.length)
251
+ for (var i = 0, walker = this.head; walker !== null; i++) {
252
+ arr[i] = walker.value
253
+ walker = walker.next
254
+ }
255
+ return arr
256
+ }
257
+
258
+ Yallist.prototype.toArrayReverse = function () {
259
+ var arr = new Array(this.length)
260
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
261
+ arr[i] = walker.value
262
+ walker = walker.prev
263
+ }
264
+ return arr
265
+ }
266
+
267
+ Yallist.prototype.slice = function (from, to) {
268
+ to = to || this.length
269
+ if (to < 0) {
270
+ to += this.length
271
+ }
272
+ from = from || 0
273
+ if (from < 0) {
274
+ from += this.length
275
+ }
276
+ var ret = new Yallist()
277
+ if (to < from || to < 0) {
278
+ return ret
279
+ }
280
+ if (from < 0) {
281
+ from = 0
282
+ }
283
+ if (to > this.length) {
284
+ to = this.length
285
+ }
286
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
287
+ walker = walker.next
288
+ }
289
+ for (; walker !== null && i < to; i++, walker = walker.next) {
290
+ ret.push(walker.value)
291
+ }
292
+ return ret
293
+ }
294
+
295
+ Yallist.prototype.sliceReverse = function (from, to) {
296
+ to = to || this.length
297
+ if (to < 0) {
298
+ to += this.length
299
+ }
300
+ from = from || 0
301
+ if (from < 0) {
302
+ from += this.length
303
+ }
304
+ var ret = new Yallist()
305
+ if (to < from || to < 0) {
306
+ return ret
307
+ }
308
+ if (from < 0) {
309
+ from = 0
310
+ }
311
+ if (to > this.length) {
312
+ to = this.length
313
+ }
314
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
315
+ walker = walker.prev
316
+ }
317
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
318
+ ret.push(walker.value)
319
+ }
320
+ return ret
321
+ }
322
+
323
+ Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
324
+ if (start > this.length) {
325
+ start = this.length - 1
326
+ }
327
+ if (start < 0) {
328
+ start = this.length + start;
329
+ }
330
+
331
+ for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
332
+ walker = walker.next
333
+ }
334
+
335
+ var ret = []
336
+ for (var i = 0; walker && i < deleteCount; i++) {
337
+ ret.push(walker.value)
338
+ walker = this.removeNode(walker)
339
+ }
340
+ if (walker === null) {
341
+ walker = this.tail
342
+ }
343
+
344
+ if (walker !== this.head && walker !== this.tail) {
345
+ walker = walker.prev
346
+ }
347
+
348
+ for (var i = 0; i < nodes.length; i++) {
349
+ walker = insert(this, walker, nodes[i])
350
+ }
351
+ return ret;
352
+ }
353
+
354
+ Yallist.prototype.reverse = function () {
355
+ var head = this.head
356
+ var tail = this.tail
357
+ for (var walker = head; walker !== null; walker = walker.prev) {
358
+ var p = walker.prev
359
+ walker.prev = walker.next
360
+ walker.next = p
361
+ }
362
+ this.head = tail
363
+ this.tail = head
364
+ return this
365
+ }
366
+
367
+ function insert (self, node, value) {
368
+ var inserted = node === self.head ?
369
+ new Node(value, null, node, self) :
370
+ new Node(value, node, node.next, self)
371
+
372
+ if (inserted.next === null) {
373
+ self.tail = inserted
374
+ }
375
+ if (inserted.prev === null) {
376
+ self.head = inserted
377
+ }
378
+
379
+ self.length++
380
+
381
+ return inserted
382
+ }
383
+
384
+ function push (self, item) {
385
+ self.tail = new Node(item, self.tail, null, self)
386
+ if (!self.head) {
387
+ self.head = self.tail
388
+ }
389
+ self.length++
390
+ }
391
+
392
+ function unshift (self, item) {
393
+ self.head = new Node(item, null, self.head, self)
394
+ if (!self.tail) {
395
+ self.tail = self.head
396
+ }
397
+ self.length++
398
+ }
399
+
400
+ function Node (value, prev, next, list) {
401
+ if (!(this instanceof Node)) {
402
+ return new Node(value, prev, next, list)
403
+ }
404
+
405
+ this.list = list
406
+ this.value = value
407
+
408
+ if (prev) {
409
+ prev.next = this
410
+ this.prev = prev
411
+ } else {
412
+ this.prev = null
413
+ }
414
+
415
+ if (next) {
416
+ next.prev = this
417
+ this.next = next
418
+ } else {
419
+ this.next = null
420
+ }
421
+ }
422
+
423
+ try {
424
+ // add if support for Symbol.iterator is present
425
+ require('./iterator.js')(Yallist)
426
+ } catch (er) {}
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+ module.exports = function (Yallist) {
3
+ Yallist.prototype[Symbol.iterator] = function* () {
4
+ for (let walker = this.head; walker; walker = walker.next) {
5
+ yield walker.value
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "4.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "main": "yallist.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "files": [
10
+ "yallist.js",
11
+ "iterator.js"
12
+ ],
13
+ "dependencies": {},
14
+ "devDependencies": {
15
+ "tap": "^12.1.0"
16
+ },
17
+ "scripts": {
18
+ "test": "tap test/*.js --100",
19
+ "preversion": "npm test",
20
+ "postversion": "npm publish",
21
+ "postpublish": "git push origin --all; git push origin --tags"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/isaacs/yallist.git"
26
+ },
27
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
28
+ "license": "ISC"
29
+ }