@donmahallem/lerna2codecov 0.2.2 → 0.2.3

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 (236) hide show
  1. package/dist/cjs/_virtual/git-host-info.cjs +8 -0
  2. package/dist/cjs/_virtual/git-host-info.cjs.map +1 -0
  3. package/dist/cjs/_virtual/index3.cjs +2 -2
  4. package/dist/cjs/_virtual/index4.cjs +2 -2
  5. package/dist/cjs/node_modules/@lerna/package/index.cjs +3 -4
  6. package/dist/cjs/node_modules/@lerna/package/index.cjs.map +1 -1
  7. package/dist/cjs/node_modules/hosted-git-info/git-host-info.cjs +89 -183
  8. package/dist/cjs/node_modules/hosted-git-info/git-host-info.cjs.map +1 -1
  9. package/dist/cjs/node_modules/hosted-git-info/git-host.cjs +165 -109
  10. package/dist/cjs/node_modules/hosted-git-info/git-host.cjs.map +1 -1
  11. package/dist/cjs/node_modules/hosted-git-info/index.cjs +157 -238
  12. package/dist/cjs/node_modules/hosted-git-info/index.cjs.map +1 -1
  13. package/dist/cjs/node_modules/load-json-file/index.cjs +7 -7
  14. package/dist/cjs/node_modules/lru-cache/index.cjs +343 -332
  15. package/dist/cjs/node_modules/lru-cache/index.cjs.map +1 -1
  16. package/dist/cjs/node_modules/npm-package-arg/npa.cjs +95 -141
  17. package/dist/cjs/node_modules/npm-package-arg/npa.cjs.map +1 -1
  18. package/dist/cjs/node_modules/semver/classes/comparator.cjs +6 -7
  19. package/dist/cjs/node_modules/semver/classes/comparator.cjs.map +1 -1
  20. package/dist/cjs/node_modules/semver/classes/range.cjs +6 -7
  21. package/dist/cjs/node_modules/semver/classes/range.cjs.map +1 -1
  22. package/dist/cjs/node_modules/semver/classes/semver.cjs +301 -292
  23. package/dist/cjs/node_modules/semver/classes/semver.cjs.map +1 -1
  24. package/dist/cjs/node_modules/semver/functions/clean.cjs +18 -8
  25. package/dist/cjs/node_modules/semver/functions/clean.cjs.map +1 -1
  26. package/dist/cjs/node_modules/semver/functions/cmp.cjs +60 -50
  27. package/dist/cjs/node_modules/semver/functions/cmp.cjs.map +1 -1
  28. package/dist/cjs/node_modules/semver/functions/coerce.cjs +67 -58
  29. package/dist/cjs/node_modules/semver/functions/coerce.cjs.map +1 -1
  30. package/dist/cjs/node_modules/semver/functions/compare-build.cjs +18 -8
  31. package/dist/cjs/node_modules/semver/functions/compare-build.cjs.map +1 -1
  32. package/dist/cjs/node_modules/semver/functions/compare-loose.cjs +15 -5
  33. package/dist/cjs/node_modules/semver/functions/compare-loose.cjs.map +1 -1
  34. package/dist/cjs/node_modules/semver/functions/compare.cjs +15 -5
  35. package/dist/cjs/node_modules/semver/functions/compare.cjs.map +1 -1
  36. package/dist/cjs/node_modules/semver/functions/diff.cjs +35 -25
  37. package/dist/cjs/node_modules/semver/functions/diff.cjs.map +1 -1
  38. package/dist/cjs/node_modules/semver/functions/eq.cjs +15 -5
  39. package/dist/cjs/node_modules/semver/functions/eq.cjs.map +1 -1
  40. package/dist/cjs/node_modules/semver/functions/gt.cjs +15 -5
  41. package/dist/cjs/node_modules/semver/functions/gt.cjs.map +1 -1
  42. package/dist/cjs/node_modules/semver/functions/gte.cjs +15 -5
  43. package/dist/cjs/node_modules/semver/functions/gte.cjs.map +1 -1
  44. package/dist/cjs/node_modules/semver/functions/inc.cjs +27 -17
  45. package/dist/cjs/node_modules/semver/functions/inc.cjs.map +1 -1
  46. package/dist/cjs/node_modules/semver/functions/lt.cjs +15 -5
  47. package/dist/cjs/node_modules/semver/functions/lt.cjs.map +1 -1
  48. package/dist/cjs/node_modules/semver/functions/lte.cjs +15 -5
  49. package/dist/cjs/node_modules/semver/functions/lte.cjs.map +1 -1
  50. package/dist/cjs/node_modules/semver/functions/major.cjs +14 -4
  51. package/dist/cjs/node_modules/semver/functions/major.cjs.map +1 -1
  52. package/dist/cjs/node_modules/semver/functions/minor.cjs +14 -4
  53. package/dist/cjs/node_modules/semver/functions/minor.cjs.map +1 -1
  54. package/dist/cjs/node_modules/semver/functions/neq.cjs +15 -5
  55. package/dist/cjs/node_modules/semver/functions/neq.cjs.map +1 -1
  56. package/dist/cjs/node_modules/semver/functions/parse.cjs +48 -39
  57. package/dist/cjs/node_modules/semver/functions/parse.cjs.map +1 -1
  58. package/dist/cjs/node_modules/semver/functions/patch.cjs +14 -4
  59. package/dist/cjs/node_modules/semver/functions/patch.cjs.map +1 -1
  60. package/dist/cjs/node_modules/semver/functions/prerelease.cjs +18 -8
  61. package/dist/cjs/node_modules/semver/functions/prerelease.cjs.map +1 -1
  62. package/dist/cjs/node_modules/semver/functions/rcompare.cjs +15 -5
  63. package/dist/cjs/node_modules/semver/functions/rcompare.cjs.map +1 -1
  64. package/dist/cjs/node_modules/semver/functions/rsort.cjs +15 -5
  65. package/dist/cjs/node_modules/semver/functions/rsort.cjs.map +1 -1
  66. package/dist/cjs/node_modules/semver/functions/satisfies.cjs +21 -11
  67. package/dist/cjs/node_modules/semver/functions/satisfies.cjs.map +1 -1
  68. package/dist/cjs/node_modules/semver/functions/sort.cjs +15 -5
  69. package/dist/cjs/node_modules/semver/functions/sort.cjs.map +1 -1
  70. package/dist/cjs/node_modules/semver/functions/valid.cjs +18 -8
  71. package/dist/cjs/node_modules/semver/functions/valid.cjs.map +1 -1
  72. package/dist/cjs/node_modules/semver/index.cjs +60 -51
  73. package/dist/cjs/node_modules/semver/index.cjs.map +1 -1
  74. package/dist/cjs/node_modules/semver/internal/constants.cjs +25 -15
  75. package/dist/cjs/node_modules/semver/internal/constants.cjs.map +1 -1
  76. package/dist/cjs/node_modules/semver/internal/debug.cjs +19 -9
  77. package/dist/cjs/node_modules/semver/internal/debug.cjs.map +1 -1
  78. package/dist/cjs/node_modules/semver/internal/identifiers.cjs +35 -25
  79. package/dist/cjs/node_modules/semver/internal/identifiers.cjs.map +1 -1
  80. package/dist/cjs/node_modules/semver/internal/parse-options.cjs +22 -12
  81. package/dist/cjs/node_modules/semver/internal/parse-options.cjs.map +1 -1
  82. package/dist/cjs/node_modules/semver/internal/re.cjs +172 -161
  83. package/dist/cjs/node_modules/semver/internal/re.cjs.map +1 -1
  84. package/dist/cjs/node_modules/semver/ranges/gtr.cjs +16 -6
  85. package/dist/cjs/node_modules/semver/ranges/gtr.cjs.map +1 -1
  86. package/dist/cjs/node_modules/semver/ranges/intersects.cjs +18 -8
  87. package/dist/cjs/node_modules/semver/ranges/intersects.cjs.map +1 -1
  88. package/dist/cjs/node_modules/semver/ranges/ltr.cjs +16 -6
  89. package/dist/cjs/node_modules/semver/ranges/ltr.cjs.map +1 -1
  90. package/dist/cjs/node_modules/semver/ranges/max-satisfying.cjs +35 -25
  91. package/dist/cjs/node_modules/semver/ranges/max-satisfying.cjs.map +1 -1
  92. package/dist/cjs/node_modules/semver/ranges/min-satisfying.cjs +35 -25
  93. package/dist/cjs/node_modules/semver/ranges/min-satisfying.cjs.map +1 -1
  94. package/dist/cjs/node_modules/semver/ranges/min-version.cjs +66 -56
  95. package/dist/cjs/node_modules/semver/ranges/min-version.cjs.map +1 -1
  96. package/dist/cjs/node_modules/semver/ranges/outside.cjs +86 -76
  97. package/dist/cjs/node_modules/semver/ranges/outside.cjs.map +1 -1
  98. package/dist/cjs/node_modules/semver/ranges/simplify.cjs +59 -49
  99. package/dist/cjs/node_modules/semver/ranges/simplify.cjs.map +1 -1
  100. package/dist/cjs/node_modules/semver/ranges/subset.cjs +259 -249
  101. package/dist/cjs/node_modules/semver/ranges/subset.cjs.map +1 -1
  102. package/dist/cjs/node_modules/semver/ranges/to-comparators.cjs +17 -7
  103. package/dist/cjs/node_modules/semver/ranges/to-comparators.cjs.map +1 -1
  104. package/dist/cjs/node_modules/semver/ranges/valid.cjs +22 -12
  105. package/dist/cjs/node_modules/semver/ranges/valid.cjs.map +1 -1
  106. package/dist/cjs/node_modules/supports-color/index.cjs +3 -3
  107. package/dist/cjs/node_modules/validate-npm-package-name/index.cjs +118 -108
  108. package/dist/cjs/node_modules/validate-npm-package-name/index.cjs.map +1 -1
  109. package/dist/cjs/node_modules/write-pkg/index.cjs +3 -3
  110. package/dist/cjs/node_modules/write-pkg/node_modules/make-dir/index.cjs +3 -3
  111. package/dist/cjs/node_modules/write-pkg/node_modules/make-dir/index.cjs.map +1 -1
  112. package/dist/cjs/node_modules/write-pkg/node_modules/write-file-atomic/index.cjs +3 -3
  113. package/dist/cjs/node_modules/write-pkg/node_modules/write-json-file/index.cjs +3 -3
  114. package/dist/cjs/node_modules/yallist/yallist.cjs +435 -425
  115. package/dist/cjs/node_modules/yallist/yallist.cjs.map +1 -1
  116. package/dist/cjs/update-config.cjs +2 -2
  117. package/dist/esm/_virtual/git-host-info.mjs +4 -0
  118. package/dist/esm/_virtual/git-host-info.mjs.map +1 -0
  119. package/dist/esm/_virtual/index3.mjs +2 -2
  120. package/dist/esm/_virtual/index4.mjs +2 -2
  121. package/dist/esm/node_modules/@lerna/package/index.mjs +2 -3
  122. package/dist/esm/node_modules/@lerna/package/index.mjs.map +1 -1
  123. package/dist/esm/node_modules/hosted-git-info/git-host-info.mjs +87 -183
  124. package/dist/esm/node_modules/hosted-git-info/git-host-info.mjs.map +1 -1
  125. package/dist/esm/node_modules/hosted-git-info/git-host.mjs +165 -111
  126. package/dist/esm/node_modules/hosted-git-info/git-host.mjs.map +1 -1
  127. package/dist/esm/node_modules/hosted-git-info/index.mjs +159 -242
  128. package/dist/esm/node_modules/hosted-git-info/index.mjs.map +1 -1
  129. package/dist/esm/node_modules/load-json-file/index.mjs +2 -2
  130. package/dist/esm/node_modules/load-json-file/index.mjs.map +1 -1
  131. package/dist/esm/node_modules/lru-cache/index.mjs +343 -334
  132. package/dist/esm/node_modules/lru-cache/index.mjs.map +1 -1
  133. package/dist/esm/node_modules/npm-package-arg/npa.mjs +93 -139
  134. package/dist/esm/node_modules/npm-package-arg/npa.mjs.map +1 -1
  135. package/dist/esm/node_modules/semver/classes/comparator.mjs +11 -12
  136. package/dist/esm/node_modules/semver/classes/comparator.mjs.map +1 -1
  137. package/dist/esm/node_modules/semver/classes/range.mjs +21 -22
  138. package/dist/esm/node_modules/semver/classes/range.mjs.map +1 -1
  139. package/dist/esm/node_modules/semver/classes/semver.mjs +301 -294
  140. package/dist/esm/node_modules/semver/classes/semver.mjs.map +1 -1
  141. package/dist/esm/node_modules/semver/functions/clean.mjs +16 -8
  142. package/dist/esm/node_modules/semver/functions/clean.mjs.map +1 -1
  143. package/dist/esm/node_modules/semver/functions/cmp.mjs +69 -61
  144. package/dist/esm/node_modules/semver/functions/cmp.mjs.map +1 -1
  145. package/dist/esm/node_modules/semver/functions/coerce.mjs +66 -59
  146. package/dist/esm/node_modules/semver/functions/coerce.mjs.map +1 -1
  147. package/dist/esm/node_modules/semver/functions/compare-build.mjs +17 -9
  148. package/dist/esm/node_modules/semver/functions/compare-build.mjs.map +1 -1
  149. package/dist/esm/node_modules/semver/functions/compare-loose.mjs +13 -5
  150. package/dist/esm/node_modules/semver/functions/compare-loose.mjs.map +1 -1
  151. package/dist/esm/node_modules/semver/functions/compare.mjs +14 -6
  152. package/dist/esm/node_modules/semver/functions/compare.mjs.map +1 -1
  153. package/dist/esm/node_modules/semver/functions/diff.mjs +33 -25
  154. package/dist/esm/node_modules/semver/functions/diff.mjs.map +1 -1
  155. package/dist/esm/node_modules/semver/functions/eq.mjs +13 -5
  156. package/dist/esm/node_modules/semver/functions/eq.mjs.map +1 -1
  157. package/dist/esm/node_modules/semver/functions/gt.mjs +13 -5
  158. package/dist/esm/node_modules/semver/functions/gt.mjs.map +1 -1
  159. package/dist/esm/node_modules/semver/functions/gte.mjs +13 -5
  160. package/dist/esm/node_modules/semver/functions/gte.mjs.map +1 -1
  161. package/dist/esm/node_modules/semver/functions/inc.mjs +26 -18
  162. package/dist/esm/node_modules/semver/functions/inc.mjs.map +1 -1
  163. package/dist/esm/node_modules/semver/functions/lt.mjs +13 -5
  164. package/dist/esm/node_modules/semver/functions/lt.mjs.map +1 -1
  165. package/dist/esm/node_modules/semver/functions/lte.mjs +13 -5
  166. package/dist/esm/node_modules/semver/functions/lte.mjs.map +1 -1
  167. package/dist/esm/node_modules/semver/functions/major.mjs +13 -5
  168. package/dist/esm/node_modules/semver/functions/major.mjs.map +1 -1
  169. package/dist/esm/node_modules/semver/functions/minor.mjs +13 -5
  170. package/dist/esm/node_modules/semver/functions/minor.mjs.map +1 -1
  171. package/dist/esm/node_modules/semver/functions/neq.mjs +13 -5
  172. package/dist/esm/node_modules/semver/functions/neq.mjs.map +1 -1
  173. package/dist/esm/node_modules/semver/functions/parse.mjs +48 -41
  174. package/dist/esm/node_modules/semver/functions/parse.mjs.map +1 -1
  175. package/dist/esm/node_modules/semver/functions/patch.mjs +13 -5
  176. package/dist/esm/node_modules/semver/functions/patch.mjs.map +1 -1
  177. package/dist/esm/node_modules/semver/functions/prerelease.mjs +16 -8
  178. package/dist/esm/node_modules/semver/functions/prerelease.mjs.map +1 -1
  179. package/dist/esm/node_modules/semver/functions/rcompare.mjs +13 -5
  180. package/dist/esm/node_modules/semver/functions/rcompare.mjs.map +1 -1
  181. package/dist/esm/node_modules/semver/functions/rsort.mjs +13 -5
  182. package/dist/esm/node_modules/semver/functions/rsort.mjs.map +1 -1
  183. package/dist/esm/node_modules/semver/functions/satisfies.mjs +19 -11
  184. package/dist/esm/node_modules/semver/functions/satisfies.mjs.map +1 -1
  185. package/dist/esm/node_modules/semver/functions/sort.mjs +13 -5
  186. package/dist/esm/node_modules/semver/functions/sort.mjs.map +1 -1
  187. package/dist/esm/node_modules/semver/functions/valid.mjs +16 -8
  188. package/dist/esm/node_modules/semver/functions/valid.mjs.map +1 -1
  189. package/dist/esm/node_modules/semver/index.mjs +96 -89
  190. package/dist/esm/node_modules/semver/index.mjs.map +1 -1
  191. package/dist/esm/node_modules/semver/internal/constants.mjs +23 -15
  192. package/dist/esm/node_modules/semver/internal/constants.mjs.map +1 -1
  193. package/dist/esm/node_modules/semver/internal/debug.mjs +17 -9
  194. package/dist/esm/node_modules/semver/internal/debug.mjs.map +1 -1
  195. package/dist/esm/node_modules/semver/internal/identifiers.mjs +28 -20
  196. package/dist/esm/node_modules/semver/internal/identifiers.mjs.map +1 -1
  197. package/dist/esm/node_modules/semver/internal/parse-options.mjs +20 -12
  198. package/dist/esm/node_modules/semver/internal/parse-options.mjs.map +1 -1
  199. package/dist/esm/node_modules/semver/internal/re.mjs +175 -166
  200. package/dist/esm/node_modules/semver/internal/re.mjs.map +1 -1
  201. package/dist/esm/node_modules/semver/ranges/gtr.mjs +14 -6
  202. package/dist/esm/node_modules/semver/ranges/gtr.mjs.map +1 -1
  203. package/dist/esm/node_modules/semver/ranges/intersects.mjs +16 -8
  204. package/dist/esm/node_modules/semver/ranges/intersects.mjs.map +1 -1
  205. package/dist/esm/node_modules/semver/ranges/ltr.mjs +14 -6
  206. package/dist/esm/node_modules/semver/ranges/ltr.mjs.map +1 -1
  207. package/dist/esm/node_modules/semver/ranges/max-satisfying.mjs +34 -26
  208. package/dist/esm/node_modules/semver/ranges/max-satisfying.mjs.map +1 -1
  209. package/dist/esm/node_modules/semver/ranges/min-satisfying.mjs +34 -26
  210. package/dist/esm/node_modules/semver/ranges/min-satisfying.mjs.map +1 -1
  211. package/dist/esm/node_modules/semver/ranges/min-version.mjs +65 -57
  212. package/dist/esm/node_modules/semver/ranges/min-version.mjs.map +1 -1
  213. package/dist/esm/node_modules/semver/ranges/outside.mjs +85 -77
  214. package/dist/esm/node_modules/semver/ranges/outside.mjs.map +1 -1
  215. package/dist/esm/node_modules/semver/ranges/simplify.mjs +57 -49
  216. package/dist/esm/node_modules/semver/ranges/simplify.mjs.map +1 -1
  217. package/dist/esm/node_modules/semver/ranges/subset.mjs +257 -249
  218. package/dist/esm/node_modules/semver/ranges/subset.mjs.map +1 -1
  219. package/dist/esm/node_modules/semver/ranges/to-comparators.mjs +15 -7
  220. package/dist/esm/node_modules/semver/ranges/to-comparators.mjs.map +1 -1
  221. package/dist/esm/node_modules/semver/ranges/valid.mjs +20 -12
  222. package/dist/esm/node_modules/semver/ranges/valid.mjs.map +1 -1
  223. package/dist/esm/node_modules/supports-color/index.mjs +2 -2
  224. package/dist/esm/node_modules/validate-npm-package-name/index.mjs +114 -107
  225. package/dist/esm/node_modules/validate-npm-package-name/index.mjs.map +1 -1
  226. package/dist/esm/node_modules/write-pkg/index.mjs +2 -2
  227. package/dist/esm/node_modules/write-pkg/index.mjs.map +1 -1
  228. package/dist/esm/node_modules/write-pkg/node_modules/make-dir/index.mjs +2 -2
  229. package/dist/esm/node_modules/write-pkg/node_modules/make-dir/index.mjs.map +1 -1
  230. package/dist/esm/node_modules/write-pkg/node_modules/write-file-atomic/index.mjs +2 -2
  231. package/dist/esm/node_modules/write-pkg/node_modules/write-file-atomic/index.mjs.map +1 -1
  232. package/dist/esm/node_modules/write-pkg/node_modules/write-json-file/index.mjs +2 -2
  233. package/dist/esm/node_modules/write-pkg/node_modules/write-json-file/index.mjs.map +1 -1
  234. package/dist/esm/node_modules/yallist/yallist.mjs +433 -425
  235. package/dist/esm/node_modules/yallist/yallist.mjs.map +1 -1
  236. package/package.json +4 -4
@@ -1,430 +1,438 @@
1
1
  import { __require as requireIterator } from './iterator.mjs';
2
2
 
3
- var yallist = Yallist;
4
-
5
- Yallist.Node = Node;
6
- Yallist.create = Yallist;
7
-
8
- function Yallist (list) {
9
- var self = this;
10
- if (!(self instanceof Yallist)) {
11
- self = new Yallist();
12
- }
13
-
14
- self.tail = null;
15
- self.head = null;
16
- self.length = 0;
17
-
18
- if (list && typeof list.forEach === 'function') {
19
- list.forEach(function (item) {
20
- self.push(item);
21
- });
22
- } else if (arguments.length > 0) {
23
- for (var i = 0, l = arguments.length; i < l; i++) {
24
- self.push(arguments[i]);
25
- }
26
- }
27
-
28
- return self
3
+ var yallist;
4
+ var hasRequiredYallist;
5
+
6
+ function requireYallist () {
7
+ if (hasRequiredYallist) return yallist;
8
+ hasRequiredYallist = 1;
9
+ yallist = Yallist;
10
+
11
+ Yallist.Node = Node;
12
+ Yallist.create = Yallist;
13
+
14
+ function Yallist (list) {
15
+ var self = this;
16
+ if (!(self instanceof Yallist)) {
17
+ self = new Yallist();
18
+ }
19
+
20
+ self.tail = null;
21
+ self.head = null;
22
+ self.length = 0;
23
+
24
+ if (list && typeof list.forEach === 'function') {
25
+ list.forEach(function (item) {
26
+ self.push(item);
27
+ });
28
+ } else if (arguments.length > 0) {
29
+ for (var i = 0, l = arguments.length; i < l; i++) {
30
+ self.push(arguments[i]);
31
+ }
32
+ }
33
+
34
+ return self
35
+ }
36
+
37
+ Yallist.prototype.removeNode = function (node) {
38
+ if (node.list !== this) {
39
+ throw new Error('removing node which does not belong to this list')
40
+ }
41
+
42
+ var next = node.next;
43
+ var prev = node.prev;
44
+
45
+ if (next) {
46
+ next.prev = prev;
47
+ }
48
+
49
+ if (prev) {
50
+ prev.next = next;
51
+ }
52
+
53
+ if (node === this.head) {
54
+ this.head = next;
55
+ }
56
+ if (node === this.tail) {
57
+ this.tail = prev;
58
+ }
59
+
60
+ node.list.length--;
61
+ node.next = null;
62
+ node.prev = null;
63
+ node.list = null;
64
+
65
+ return next
66
+ };
67
+
68
+ Yallist.prototype.unshiftNode = function (node) {
69
+ if (node === this.head) {
70
+ return
71
+ }
72
+
73
+ if (node.list) {
74
+ node.list.removeNode(node);
75
+ }
76
+
77
+ var head = this.head;
78
+ node.list = this;
79
+ node.next = head;
80
+ if (head) {
81
+ head.prev = node;
82
+ }
83
+
84
+ this.head = node;
85
+ if (!this.tail) {
86
+ this.tail = node;
87
+ }
88
+ this.length++;
89
+ };
90
+
91
+ Yallist.prototype.pushNode = function (node) {
92
+ if (node === this.tail) {
93
+ return
94
+ }
95
+
96
+ if (node.list) {
97
+ node.list.removeNode(node);
98
+ }
99
+
100
+ var tail = this.tail;
101
+ node.list = this;
102
+ node.prev = tail;
103
+ if (tail) {
104
+ tail.next = node;
105
+ }
106
+
107
+ this.tail = node;
108
+ if (!this.head) {
109
+ this.head = node;
110
+ }
111
+ this.length++;
112
+ };
113
+
114
+ Yallist.prototype.push = function () {
115
+ for (var i = 0, l = arguments.length; i < l; i++) {
116
+ push(this, arguments[i]);
117
+ }
118
+ return this.length
119
+ };
120
+
121
+ Yallist.prototype.unshift = function () {
122
+ for (var i = 0, l = arguments.length; i < l; i++) {
123
+ unshift(this, arguments[i]);
124
+ }
125
+ return this.length
126
+ };
127
+
128
+ Yallist.prototype.pop = function () {
129
+ if (!this.tail) {
130
+ return undefined
131
+ }
132
+
133
+ var res = this.tail.value;
134
+ this.tail = this.tail.prev;
135
+ if (this.tail) {
136
+ this.tail.next = null;
137
+ } else {
138
+ this.head = null;
139
+ }
140
+ this.length--;
141
+ return res
142
+ };
143
+
144
+ Yallist.prototype.shift = function () {
145
+ if (!this.head) {
146
+ return undefined
147
+ }
148
+
149
+ var res = this.head.value;
150
+ this.head = this.head.next;
151
+ if (this.head) {
152
+ this.head.prev = null;
153
+ } else {
154
+ this.tail = null;
155
+ }
156
+ this.length--;
157
+ return res
158
+ };
159
+
160
+ Yallist.prototype.forEach = function (fn, thisp) {
161
+ thisp = thisp || this;
162
+ for (var walker = this.head, i = 0; walker !== null; i++) {
163
+ fn.call(thisp, walker.value, i, this);
164
+ walker = walker.next;
165
+ }
166
+ };
167
+
168
+ Yallist.prototype.forEachReverse = function (fn, thisp) {
169
+ thisp = thisp || this;
170
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
171
+ fn.call(thisp, walker.value, i, this);
172
+ walker = walker.prev;
173
+ }
174
+ };
175
+
176
+ Yallist.prototype.get = function (n) {
177
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
178
+ // abort out of the list early if we hit a cycle
179
+ walker = walker.next;
180
+ }
181
+ if (i === n && walker !== null) {
182
+ return walker.value
183
+ }
184
+ };
185
+
186
+ Yallist.prototype.getReverse = function (n) {
187
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
188
+ // abort out of the list early if we hit a cycle
189
+ walker = walker.prev;
190
+ }
191
+ if (i === n && walker !== null) {
192
+ return walker.value
193
+ }
194
+ };
195
+
196
+ Yallist.prototype.map = function (fn, thisp) {
197
+ thisp = thisp || this;
198
+ var res = new Yallist();
199
+ for (var walker = this.head; walker !== null;) {
200
+ res.push(fn.call(thisp, walker.value, this));
201
+ walker = walker.next;
202
+ }
203
+ return res
204
+ };
205
+
206
+ Yallist.prototype.mapReverse = function (fn, thisp) {
207
+ thisp = thisp || this;
208
+ var res = new Yallist();
209
+ for (var walker = this.tail; walker !== null;) {
210
+ res.push(fn.call(thisp, walker.value, this));
211
+ walker = walker.prev;
212
+ }
213
+ return res
214
+ };
215
+
216
+ Yallist.prototype.reduce = function (fn, initial) {
217
+ var acc;
218
+ var walker = this.head;
219
+ if (arguments.length > 1) {
220
+ acc = initial;
221
+ } else if (this.head) {
222
+ walker = this.head.next;
223
+ acc = this.head.value;
224
+ } else {
225
+ throw new TypeError('Reduce of empty list with no initial value')
226
+ }
227
+
228
+ for (var i = 0; walker !== null; i++) {
229
+ acc = fn(acc, walker.value, i);
230
+ walker = walker.next;
231
+ }
232
+
233
+ return acc
234
+ };
235
+
236
+ Yallist.prototype.reduceReverse = function (fn, initial) {
237
+ var acc;
238
+ var walker = this.tail;
239
+ if (arguments.length > 1) {
240
+ acc = initial;
241
+ } else if (this.tail) {
242
+ walker = this.tail.prev;
243
+ acc = this.tail.value;
244
+ } else {
245
+ throw new TypeError('Reduce of empty list with no initial value')
246
+ }
247
+
248
+ for (var i = this.length - 1; walker !== null; i--) {
249
+ acc = fn(acc, walker.value, i);
250
+ walker = walker.prev;
251
+ }
252
+
253
+ return acc
254
+ };
255
+
256
+ Yallist.prototype.toArray = function () {
257
+ var arr = new Array(this.length);
258
+ for (var i = 0, walker = this.head; walker !== null; i++) {
259
+ arr[i] = walker.value;
260
+ walker = walker.next;
261
+ }
262
+ return arr
263
+ };
264
+
265
+ Yallist.prototype.toArrayReverse = function () {
266
+ var arr = new Array(this.length);
267
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
268
+ arr[i] = walker.value;
269
+ walker = walker.prev;
270
+ }
271
+ return arr
272
+ };
273
+
274
+ Yallist.prototype.slice = function (from, to) {
275
+ to = to || this.length;
276
+ if (to < 0) {
277
+ to += this.length;
278
+ }
279
+ from = from || 0;
280
+ if (from < 0) {
281
+ from += this.length;
282
+ }
283
+ var ret = new Yallist();
284
+ if (to < from || to < 0) {
285
+ return ret
286
+ }
287
+ if (from < 0) {
288
+ from = 0;
289
+ }
290
+ if (to > this.length) {
291
+ to = this.length;
292
+ }
293
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
294
+ walker = walker.next;
295
+ }
296
+ for (; walker !== null && i < to; i++, walker = walker.next) {
297
+ ret.push(walker.value);
298
+ }
299
+ return ret
300
+ };
301
+
302
+ Yallist.prototype.sliceReverse = function (from, to) {
303
+ to = to || this.length;
304
+ if (to < 0) {
305
+ to += this.length;
306
+ }
307
+ from = from || 0;
308
+ if (from < 0) {
309
+ from += this.length;
310
+ }
311
+ var ret = new Yallist();
312
+ if (to < from || to < 0) {
313
+ return ret
314
+ }
315
+ if (from < 0) {
316
+ from = 0;
317
+ }
318
+ if (to > this.length) {
319
+ to = this.length;
320
+ }
321
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
322
+ walker = walker.prev;
323
+ }
324
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
325
+ ret.push(walker.value);
326
+ }
327
+ return ret
328
+ };
329
+
330
+ Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
331
+ if (start > this.length) {
332
+ start = this.length - 1;
333
+ }
334
+ if (start < 0) {
335
+ start = this.length + start;
336
+ }
337
+
338
+ for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
339
+ walker = walker.next;
340
+ }
341
+
342
+ var ret = [];
343
+ for (var i = 0; walker && i < deleteCount; i++) {
344
+ ret.push(walker.value);
345
+ walker = this.removeNode(walker);
346
+ }
347
+ if (walker === null) {
348
+ walker = this.tail;
349
+ }
350
+
351
+ if (walker !== this.head && walker !== this.tail) {
352
+ walker = walker.prev;
353
+ }
354
+
355
+ for (var i = 0; i < nodes.length; i++) {
356
+ walker = insert(this, walker, nodes[i]);
357
+ }
358
+ return ret;
359
+ };
360
+
361
+ Yallist.prototype.reverse = function () {
362
+ var head = this.head;
363
+ var tail = this.tail;
364
+ for (var walker = head; walker !== null; walker = walker.prev) {
365
+ var p = walker.prev;
366
+ walker.prev = walker.next;
367
+ walker.next = p;
368
+ }
369
+ this.head = tail;
370
+ this.tail = head;
371
+ return this
372
+ };
373
+
374
+ function insert (self, node, value) {
375
+ var inserted = node === self.head ?
376
+ new Node(value, null, node, self) :
377
+ new Node(value, node, node.next, self);
378
+
379
+ if (inserted.next === null) {
380
+ self.tail = inserted;
381
+ }
382
+ if (inserted.prev === null) {
383
+ self.head = inserted;
384
+ }
385
+
386
+ self.length++;
387
+
388
+ return inserted
389
+ }
390
+
391
+ function push (self, item) {
392
+ self.tail = new Node(item, self.tail, null, self);
393
+ if (!self.head) {
394
+ self.head = self.tail;
395
+ }
396
+ self.length++;
397
+ }
398
+
399
+ function unshift (self, item) {
400
+ self.head = new Node(item, null, self.head, self);
401
+ if (!self.tail) {
402
+ self.tail = self.head;
403
+ }
404
+ self.length++;
405
+ }
406
+
407
+ function Node (value, prev, next, list) {
408
+ if (!(this instanceof Node)) {
409
+ return new Node(value, prev, next, list)
410
+ }
411
+
412
+ this.list = list;
413
+ this.value = value;
414
+
415
+ if (prev) {
416
+ prev.next = this;
417
+ this.prev = prev;
418
+ } else {
419
+ this.prev = null;
420
+ }
421
+
422
+ if (next) {
423
+ next.prev = this;
424
+ this.next = next;
425
+ } else {
426
+ this.next = null;
427
+ }
428
+ }
429
+
430
+ try {
431
+ // add if support for Symbol.iterator is present
432
+ requireIterator()(Yallist);
433
+ } catch (er) {}
434
+ return yallist;
29
435
  }
30
436
 
31
- Yallist.prototype.removeNode = function (node) {
32
- if (node.list !== this) {
33
- throw new Error('removing node which does not belong to this list')
34
- }
35
-
36
- var next = node.next;
37
- var prev = node.prev;
38
-
39
- if (next) {
40
- next.prev = prev;
41
- }
42
-
43
- if (prev) {
44
- prev.next = next;
45
- }
46
-
47
- if (node === this.head) {
48
- this.head = next;
49
- }
50
- if (node === this.tail) {
51
- this.tail = prev;
52
- }
53
-
54
- node.list.length--;
55
- node.next = null;
56
- node.prev = null;
57
- node.list = null;
58
-
59
- return next
60
- };
61
-
62
- Yallist.prototype.unshiftNode = function (node) {
63
- if (node === this.head) {
64
- return
65
- }
66
-
67
- if (node.list) {
68
- node.list.removeNode(node);
69
- }
70
-
71
- var head = this.head;
72
- node.list = this;
73
- node.next = head;
74
- if (head) {
75
- head.prev = node;
76
- }
77
-
78
- this.head = node;
79
- if (!this.tail) {
80
- this.tail = node;
81
- }
82
- this.length++;
83
- };
84
-
85
- Yallist.prototype.pushNode = function (node) {
86
- if (node === this.tail) {
87
- return
88
- }
89
-
90
- if (node.list) {
91
- node.list.removeNode(node);
92
- }
93
-
94
- var tail = this.tail;
95
- node.list = this;
96
- node.prev = tail;
97
- if (tail) {
98
- tail.next = node;
99
- }
100
-
101
- this.tail = node;
102
- if (!this.head) {
103
- this.head = node;
104
- }
105
- this.length++;
106
- };
107
-
108
- Yallist.prototype.push = function () {
109
- for (var i = 0, l = arguments.length; i < l; i++) {
110
- push(this, arguments[i]);
111
- }
112
- return this.length
113
- };
114
-
115
- Yallist.prototype.unshift = function () {
116
- for (var i = 0, l = arguments.length; i < l; i++) {
117
- unshift(this, arguments[i]);
118
- }
119
- return this.length
120
- };
121
-
122
- Yallist.prototype.pop = function () {
123
- if (!this.tail) {
124
- return undefined
125
- }
126
-
127
- var res = this.tail.value;
128
- this.tail = this.tail.prev;
129
- if (this.tail) {
130
- this.tail.next = null;
131
- } else {
132
- this.head = null;
133
- }
134
- this.length--;
135
- return res
136
- };
137
-
138
- Yallist.prototype.shift = function () {
139
- if (!this.head) {
140
- return undefined
141
- }
142
-
143
- var res = this.head.value;
144
- this.head = this.head.next;
145
- if (this.head) {
146
- this.head.prev = null;
147
- } else {
148
- this.tail = null;
149
- }
150
- this.length--;
151
- return res
152
- };
153
-
154
- Yallist.prototype.forEach = function (fn, thisp) {
155
- thisp = thisp || this;
156
- for (var walker = this.head, i = 0; walker !== null; i++) {
157
- fn.call(thisp, walker.value, i, this);
158
- walker = walker.next;
159
- }
160
- };
161
-
162
- Yallist.prototype.forEachReverse = function (fn, thisp) {
163
- thisp = thisp || this;
164
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
165
- fn.call(thisp, walker.value, i, this);
166
- walker = walker.prev;
167
- }
168
- };
169
-
170
- Yallist.prototype.get = function (n) {
171
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
172
- // abort out of the list early if we hit a cycle
173
- walker = walker.next;
174
- }
175
- if (i === n && walker !== null) {
176
- return walker.value
177
- }
178
- };
179
-
180
- Yallist.prototype.getReverse = function (n) {
181
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
182
- // abort out of the list early if we hit a cycle
183
- walker = walker.prev;
184
- }
185
- if (i === n && walker !== null) {
186
- return walker.value
187
- }
188
- };
189
-
190
- Yallist.prototype.map = function (fn, thisp) {
191
- thisp = thisp || this;
192
- var res = new Yallist();
193
- for (var walker = this.head; walker !== null;) {
194
- res.push(fn.call(thisp, walker.value, this));
195
- walker = walker.next;
196
- }
197
- return res
198
- };
199
-
200
- Yallist.prototype.mapReverse = function (fn, thisp) {
201
- thisp = thisp || this;
202
- var res = new Yallist();
203
- for (var walker = this.tail; walker !== null;) {
204
- res.push(fn.call(thisp, walker.value, this));
205
- walker = walker.prev;
206
- }
207
- return res
208
- };
209
-
210
- Yallist.prototype.reduce = function (fn, initial) {
211
- var acc;
212
- var walker = this.head;
213
- if (arguments.length > 1) {
214
- acc = initial;
215
- } else if (this.head) {
216
- walker = this.head.next;
217
- acc = this.head.value;
218
- } else {
219
- throw new TypeError('Reduce of empty list with no initial value')
220
- }
221
-
222
- for (var i = 0; walker !== null; i++) {
223
- acc = fn(acc, walker.value, i);
224
- walker = walker.next;
225
- }
226
-
227
- return acc
228
- };
229
-
230
- Yallist.prototype.reduceReverse = function (fn, initial) {
231
- var acc;
232
- var walker = this.tail;
233
- if (arguments.length > 1) {
234
- acc = initial;
235
- } else if (this.tail) {
236
- walker = this.tail.prev;
237
- acc = this.tail.value;
238
- } else {
239
- throw new TypeError('Reduce of empty list with no initial value')
240
- }
241
-
242
- for (var i = this.length - 1; walker !== null; i--) {
243
- acc = fn(acc, walker.value, i);
244
- walker = walker.prev;
245
- }
246
-
247
- return acc
248
- };
249
-
250
- Yallist.prototype.toArray = function () {
251
- var arr = new Array(this.length);
252
- for (var i = 0, walker = this.head; walker !== null; i++) {
253
- arr[i] = walker.value;
254
- walker = walker.next;
255
- }
256
- return arr
257
- };
258
-
259
- Yallist.prototype.toArrayReverse = function () {
260
- var arr = new Array(this.length);
261
- for (var i = 0, walker = this.tail; walker !== null; i++) {
262
- arr[i] = walker.value;
263
- walker = walker.prev;
264
- }
265
- return arr
266
- };
267
-
268
- Yallist.prototype.slice = function (from, to) {
269
- to = to || this.length;
270
- if (to < 0) {
271
- to += this.length;
272
- }
273
- from = from || 0;
274
- if (from < 0) {
275
- from += this.length;
276
- }
277
- var ret = new Yallist();
278
- if (to < from || to < 0) {
279
- return ret
280
- }
281
- if (from < 0) {
282
- from = 0;
283
- }
284
- if (to > this.length) {
285
- to = this.length;
286
- }
287
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
288
- walker = walker.next;
289
- }
290
- for (; walker !== null && i < to; i++, walker = walker.next) {
291
- ret.push(walker.value);
292
- }
293
- return ret
294
- };
295
-
296
- Yallist.prototype.sliceReverse = function (from, to) {
297
- to = to || this.length;
298
- if (to < 0) {
299
- to += this.length;
300
- }
301
- from = from || 0;
302
- if (from < 0) {
303
- from += this.length;
304
- }
305
- var ret = new Yallist();
306
- if (to < from || to < 0) {
307
- return ret
308
- }
309
- if (from < 0) {
310
- from = 0;
311
- }
312
- if (to > this.length) {
313
- to = this.length;
314
- }
315
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
316
- walker = walker.prev;
317
- }
318
- for (; walker !== null && i > from; i--, walker = walker.prev) {
319
- ret.push(walker.value);
320
- }
321
- return ret
322
- };
323
-
324
- Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
325
- if (start > this.length) {
326
- start = this.length - 1;
327
- }
328
- if (start < 0) {
329
- start = this.length + start;
330
- }
331
-
332
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
333
- walker = walker.next;
334
- }
335
-
336
- var ret = [];
337
- for (var i = 0; walker && i < deleteCount; i++) {
338
- ret.push(walker.value);
339
- walker = this.removeNode(walker);
340
- }
341
- if (walker === null) {
342
- walker = this.tail;
343
- }
344
-
345
- if (walker !== this.head && walker !== this.tail) {
346
- walker = walker.prev;
347
- }
348
-
349
- for (var i = 0; i < nodes.length; i++) {
350
- walker = insert(this, walker, nodes[i]);
351
- }
352
- return ret;
353
- };
354
-
355
- Yallist.prototype.reverse = function () {
356
- var head = this.head;
357
- var tail = this.tail;
358
- for (var walker = head; walker !== null; walker = walker.prev) {
359
- var p = walker.prev;
360
- walker.prev = walker.next;
361
- walker.next = p;
362
- }
363
- this.head = tail;
364
- this.tail = head;
365
- return this
366
- };
367
-
368
- function insert (self, node, value) {
369
- var inserted = node === self.head ?
370
- new Node(value, null, node, self) :
371
- new Node(value, node, node.next, self);
372
-
373
- if (inserted.next === null) {
374
- self.tail = inserted;
375
- }
376
- if (inserted.prev === null) {
377
- self.head = inserted;
378
- }
379
-
380
- self.length++;
381
-
382
- return inserted
383
- }
384
-
385
- function push (self, item) {
386
- self.tail = new Node(item, self.tail, null, self);
387
- if (!self.head) {
388
- self.head = self.tail;
389
- }
390
- self.length++;
391
- }
392
-
393
- function unshift (self, item) {
394
- self.head = new Node(item, null, self.head, self);
395
- if (!self.tail) {
396
- self.tail = self.head;
397
- }
398
- self.length++;
399
- }
400
-
401
- function Node (value, prev, next, list) {
402
- if (!(this instanceof Node)) {
403
- return new Node(value, prev, next, list)
404
- }
405
-
406
- this.list = list;
407
- this.value = value;
408
-
409
- if (prev) {
410
- prev.next = this;
411
- this.prev = prev;
412
- } else {
413
- this.prev = null;
414
- }
415
-
416
- if (next) {
417
- next.prev = this;
418
- this.next = next;
419
- } else {
420
- this.next = null;
421
- }
422
- }
423
-
424
- try {
425
- // add if support for Symbol.iterator is present
426
- requireIterator()(Yallist);
427
- } catch (er) {}
428
-
429
- export { yallist as default };
437
+ export { requireYallist as __require };
430
438
  //# sourceMappingURL=yallist.mjs.map