@dbmx/toasts 0.0.38 → 0.0.40

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 (199) hide show
  1. package/cjs/components/SdmxDatagrid/index.cjs +1 -1
  2. package/cjs/components/SdmxDatagrid/utils/index.cjs +7 -9
  3. package/cjs/fake-ZW05emqw.js +35 -0
  4. package/cjs/fake-ZW05emqw.js.map +1 -0
  5. package/cjs/index.cjs.map +1 -0
  6. package/esm/fake-JHdVf8lQ.js +14 -0
  7. package/esm/fake-JHdVf8lQ.js.map +1 -0
  8. package/esm/index-lo-MKsEb.js +556 -0
  9. package/esm/index-lo-MKsEb.js.map +1 -0
  10. package/esm/index.js +1 -1
  11. package/package.json +3 -3
  12. package/yarn-error.log +7136 -0
  13. package/cjs/_virtual/_commonjsHelpers.cjs +0 -33
  14. package/cjs/_virtual/artefacts.cjs +0 -5
  15. package/cjs/_virtual/core.cjs +0 -5
  16. package/cjs/_virtual/dependencyResolver.cjs +0 -5
  17. package/cjs/_virtual/index.esm.cjs +0 -8
  18. package/cjs/_virtual/items.cjs +0 -5
  19. package/cjs/_virtual/sdmx.cjs +0 -5
  20. package/cjs/node_modules/@dbmx/sdmx/cjs/core.cjs +0 -940
  21. package/cjs/node_modules/@dbmx/sdmx/cjs/data.cjs +0 -140
  22. package/cjs/node_modules/@dbmx/sdmx/cjs/dependencyResolver.cjs +0 -73
  23. package/cjs/node_modules/@dbmx/sdmx/cjs/items.cjs +0 -100
  24. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/assoc.cjs +0 -38
  25. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/assocPath.cjs +0 -55
  26. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/bind.cjs +0 -41
  27. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/compose.cjs +0 -43
  28. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/concat.cjs +0 -69
  29. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/curryN.cjs +0 -66
  30. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/defaultTo.cjs +0 -38
  31. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/dissoc.cjs +0 -33
  32. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/dissocPath.cjs +0 -79
  33. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/equals.cjs +0 -42
  34. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/filter.cjs +0 -63
  35. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/forEach.cjs +0 -58
  36. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/identity.cjs +0 -34
  37. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arity.cjs +0 -56
  38. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arrayFromIterator.cjs +0 -13
  39. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arrayReduce.cjs +0 -14
  40. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_assoc.cjs +0 -37
  41. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_checkForMethod.cjs +0 -30
  42. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_complement.cjs +0 -10
  43. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_createReduce.cjs +0 -32
  44. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry1.cjs +0 -27
  45. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry2.cjs +0 -38
  46. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curry3.cjs +0 -56
  47. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_curryN.cjs +0 -48
  48. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_dispatchable.cjs +0 -49
  49. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_dissoc.cjs +0 -36
  50. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_equals.cjs +0 -143
  51. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_filter.cjs +0 -17
  52. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_functionName.cjs +0 -10
  53. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_has.cjs +0 -8
  54. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_identity.cjs +0 -8
  55. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includes.cjs +0 -11
  56. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includesWith.cjs +0 -16
  57. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_indexOf.cjs +0 -61
  58. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArguments.cjs +0 -18
  59. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArray.cjs +0 -20
  60. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isArrayLike.cjs +0 -55
  61. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isFunction.cjs +0 -9
  62. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isInteger.cjs +0 -16
  63. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isObject.cjs +0 -8
  64. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isPlaceholder.cjs +0 -8
  65. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isString.cjs +0 -8
  66. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isTransformer.cjs +0 -8
  67. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_map.cjs +0 -15
  68. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_objectIs.cjs +0 -18
  69. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_pipe.cjs +0 -10
  70. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_quote.cjs +0 -10
  71. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toISOString.cjs +0 -17
  72. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toString.cjs +0 -62
  73. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xArrayReduce.cjs +0 -18
  74. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xReduce.cjs +0 -30
  75. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xfBase.cjs +0 -13
  76. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xfilter.cjs +0 -26
  77. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xmap.cjs +0 -27
  78. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xwrap.cjs +0 -24
  79. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/is.cjs +0 -39
  80. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/isNil.cjs +0 -32
  81. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/keys.cjs +0 -80
  82. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/map.cjs +0 -75
  83. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/nth.cjs +0 -44
  84. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/path.cjs +0 -41
  85. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pathOr.cjs +0 -38
  86. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/paths.cjs +0 -50
  87. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pick.cjs +0 -41
  88. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/pipe.cjs +0 -46
  89. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/prop.cjs +0 -43
  90. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/propOr.cjs +0 -46
  91. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reduce.cjs +0 -71
  92. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reject.cjs +0 -43
  93. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/remove.cjs +0 -37
  94. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reverse.cjs +0 -41
  95. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/slice.cjs +0 -42
  96. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/tail.cjs +0 -46
  97. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/times.cjs +0 -49
  98. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/toString.cjs +0 -53
  99. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/type.cjs +0 -41
  100. package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/values.cjs +0 -42
  101. package/cjs/node_modules/@dbmx/sdmx/cjs/types/artefacts.cjs +0 -40
  102. package/cjs/node_modules/@dbmx/sdmx/cjs/types/categorisation.cjs +0 -32
  103. package/cjs/node_modules/@dbmx/sdmx/cjs/types/categoryscheme.cjs +0 -16
  104. package/cjs/node_modules/@dbmx/sdmx/cjs/types/codelist.cjs +0 -31
  105. package/cjs/node_modules/@dbmx/sdmx/cjs/types/conceptscheme.cjs +0 -41
  106. package/cjs/node_modules/@dbmx/sdmx/cjs/types/contentconstraint.cjs +0 -40
  107. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataconstraint.cjs +0 -39
  108. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataflow.cjs +0 -32
  109. package/cjs/node_modules/@dbmx/sdmx/cjs/types/dataproviderscheme.cjs +0 -16
  110. package/cjs/node_modules/@dbmx/sdmx/cjs/types/datastructure.cjs +0 -73
  111. package/cjs/node_modules/@dbmx/sdmx/cjs/types/hierarchicalcodelist.cjs +0 -38
  112. package/cjs/node_modules/@dbmx/sdmx/cjs/types/metadatastructure.cjs +0 -62
  113. package/cjs/node_modules/@dbmx/sdmx/cjs/types/provisionagreement.cjs +0 -32
  114. package/cjs/node_modules/@dbmx/sdmx/cjs/types/sdmx.cjs +0 -71
  115. package/cjs/node_modules/@dbmx/sdmx/cjs/utils/url-regexp.cjs +0 -30
  116. package/cjs/node_modules/@dbmx/sdmx/esm/_virtual/_commonjsHelpers.cjs +0 -10
  117. package/cjs/node_modules/@dbmx/sdmx/esm/_virtual/url-join.cjs +0 -5
  118. package/cjs/node_modules/@dbmx/sdmx/esm/core.cjs +0 -554
  119. package/cjs/node_modules/@dbmx/sdmx/esm/datastructures.cjs +0 -73
  120. package/cjs/node_modules/@dbmx/sdmx/esm/dependencyResolver.cjs +0 -65
  121. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/bind.cjs +0 -39
  122. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/compose.cjs +0 -40
  123. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/curryN.cjs +0 -63
  124. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/defaultTo.cjs +0 -37
  125. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/forEach.cjs +0 -59
  126. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/identity.cjs +0 -32
  127. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_arity.cjs +0 -66
  128. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_arrayReduce.cjs +0 -15
  129. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_checkForMethod.cjs +0 -29
  130. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_createReduce.cjs +0 -36
  131. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry1.cjs +0 -24
  132. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry2.cjs +0 -36
  133. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curry3.cjs +0 -54
  134. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_curryN.cjs +0 -50
  135. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_dispatchable.cjs +0 -51
  136. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_has.cjs +0 -7
  137. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_identity.cjs +0 -7
  138. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArguments.cjs +0 -19
  139. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArray.cjs +0 -19
  140. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isArrayLike.cjs +0 -58
  141. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isInteger.cjs +0 -15
  142. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isPlaceholder.cjs +0 -7
  143. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isString.cjs +0 -7
  144. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_isTransformer.cjs +0 -7
  145. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_map.cjs +0 -16
  146. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_pipe.cjs +0 -9
  147. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xArrayReduce.cjs +0 -21
  148. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xReduce.cjs +0 -34
  149. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xfBase.cjs +0 -12
  150. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xmap.cjs +0 -31
  151. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/internal/_xwrap.cjs +0 -29
  152. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/is.cjs +0 -38
  153. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/keys.cjs +0 -94
  154. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/map.cjs +0 -71
  155. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/nth.cjs +0 -42
  156. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/path.cjs +0 -39
  157. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pathOr.cjs +0 -35
  158. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/paths.cjs +0 -50
  159. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pick.cjs +0 -43
  160. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/pipe.cjs +0 -41
  161. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/prop.cjs +0 -41
  162. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/propOr.cjs +0 -43
  163. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/reduce.cjs +0 -68
  164. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/reverse.cjs +0 -39
  165. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/slice.cjs +0 -41
  166. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/tail.cjs +0 -45
  167. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/ramda/es/values.cjs +0 -42
  168. package/cjs/node_modules/@dbmx/sdmx/esm/node_modules/url-join/lib/url-join.cjs +0 -89
  169. package/cjs/node_modules/@dbmx/sdmx/esm/query.cjs +0 -85
  170. package/cjs/node_modules/@dbmx/sdmx/esm/types/artefacts.cjs +0 -31
  171. package/cjs/node_modules/@dbmx/sdmx/esm/types/categorisation.cjs +0 -19
  172. package/cjs/node_modules/@dbmx/sdmx/esm/types/categoryscheme.cjs +0 -13
  173. package/cjs/node_modules/@dbmx/sdmx/esm/types/codelist.cjs +0 -19
  174. package/cjs/node_modules/@dbmx/sdmx/esm/types/conceptscheme.cjs +0 -29
  175. package/cjs/node_modules/@dbmx/sdmx/esm/types/contentconstraint.cjs +0 -23
  176. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataconstraint.cjs +0 -22
  177. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataflow.cjs +0 -20
  178. package/cjs/node_modules/@dbmx/sdmx/esm/types/dataproviderscheme.cjs +0 -13
  179. package/cjs/node_modules/@dbmx/sdmx/esm/types/datastructure.cjs +0 -74
  180. package/cjs/node_modules/@dbmx/sdmx/esm/types/hierarchicalcodelist.cjs +0 -22
  181. package/cjs/node_modules/@dbmx/sdmx/esm/types/metadatastructure.cjs +0 -58
  182. package/cjs/node_modules/@dbmx/sdmx/esm/types/provisionagreement.cjs +0 -19
  183. package/cjs/node_modules/@dbmx/sdmx/esm/types/sdmx.cjs +0 -51
  184. package/cjs/node_modules/@dbmx/semver/dist/index.esm.cjs +0 -584
  185. package/cjs/node_modules/lru-cache/index.cjs +0 -281
  186. package/cjs/node_modules/yallist/iterator.cjs +0 -20
  187. package/cjs/node_modules/yallist/yallist.cjs +0 -370
  188. package/esm/index-FCPRKLj2.js +0 -720
  189. package/esm/index-FCPRKLj2.js.map +0 -1
  190. package/esm/index-Mh78z9aW.js +0 -562
  191. package/esm/index-Mh78z9aW.js.map +0 -1
  192. package/esm/index-T2bcfyHI.js +0 -8510
  193. package/esm/index-T2bcfyHI.js.map +0 -1
  194. package/esm/index-W7MLRHBf.js +0 -87
  195. package/esm/index-W7MLRHBf.js.map +0 -1
  196. package/esm/index-gBe37Ynf.js +0 -8438
  197. package/esm/index-gBe37Ynf.js.map +0 -1
  198. package/esm/index-ndYjFD6I.js +0 -8438
  199. package/esm/index-ndYjFD6I.js.map +0 -1
@@ -1,584 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('../../../lru-cache/index.cjs');
4
-
5
- const MAX_LENGTH = 256;
6
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
7
- const numeric = /^[0-9]+$/;
8
- const compareIdentifiers = (a, b) => {
9
- const anum = numeric.test(a);
10
- const bnum = numeric.test(b);
11
- if (anum && bnum) {
12
- a = +a;
13
- b = +b;
14
- }
15
- return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
16
- };
17
- class SemVerError extends Error {
18
- constructor(message) {
19
- super(message);
20
- this.name = this.constructor.name;
21
- }
22
- }
23
- const re = [];
24
- const src = [];
25
- const t = {};
26
- let R = 0;
27
- const createToken = (name, value, isGlobal) => {
28
- const index = R++;
29
- t[name] = index;
30
- src[index] = value;
31
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
32
- };
33
-
34
- // The following Regular Expressions can be used for tokenizing,
35
- // validating, and parsing SemVer version strings.
36
-
37
- // ## Numeric Identifier
38
- // A single `0`, or a non-zero digit followed by zero or more digits.
39
-
40
- createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
41
-
42
- // ## Non-numeric Identifier
43
- // Zero or more digits, followed by a letter or hyphen, and then zero or
44
- // more letters, digits, or hyphens.
45
-
46
- createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
47
-
48
- // ## Main Version
49
- // Three dot-separated numeric identifiers.
50
-
51
- createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})(?:\\.` + `(${src[t.NUMERICIDENTIFIER]}))?`);
52
-
53
- // ## Pre-release Version Identifier
54
- // A numeric identifier, or a non-numeric identifier.
55
-
56
- createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
57
-
58
- // ## Pre-release Version
59
- // Hyphen, followed by one or more dot-separated pre-release version
60
- // identifiers.
61
-
62
- createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
63
-
64
- // ## Build Metadata Identifier
65
- // Any combination of digits, letters, or hyphens.
66
-
67
- createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
68
-
69
- // ## Build Metadata
70
- // Plus sign, followed by one or more period-separated build metadata
71
- // identifiers.
72
-
73
- createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
74
-
75
- // ## Full Version String
76
- // A main version, followed optionally by a pre-release version and
77
- // build metadata.
78
-
79
- // Note that the only major, minor, patch, and pre-release sections of
80
- // the version string are capturing groups. The build metadata is not a
81
- // capturing group, because it should not ever be used in version
82
- // comparison.
83
-
84
- createToken('FULLPLAIN', `${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
85
- createToken('FULL', `^${src[t.FULLPLAIN]}$`);
86
- createToken('GTLT', '((?:<|>)?=?)');
87
-
88
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
89
- createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
90
- class SemVer {
91
- constructor(version) {
92
- if (version instanceof SemVer) {
93
- version = version.version;
94
- } else if (typeof version !== 'string') {
95
- throw new SemVerError(`Invalid Version: ${JSON.stringify(version, null, 4)}`);
96
- }
97
- if (version.length > MAX_LENGTH) {
98
- throw new SemVerError(`version is longer than ${MAX_LENGTH} characters`);
99
- }
100
- const m = version.trim().match(re[t.FULL]);
101
- if (!m) {
102
- throw new SemVerError(`Invalid Version: ${version}`);
103
- }
104
-
105
- // these are actually numbers
106
- this.major = +m[1];
107
- this.minor = +m[2];
108
- this.patch = m[3] ? +m[3] : null;
109
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
110
- throw new SemVerError('Invalid major version');
111
- }
112
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
113
- throw new SemVerError('Invalid minor version');
114
- }
115
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
116
- throw new SemVerError('Invalid patch version');
117
- }
118
- this.extension = m[4] || null;
119
- if (this.patch === null && this.extension) {
120
- throw new SemVerError('Invalid version');
121
- }
122
- this.format();
123
- }
124
- is2Parts() {
125
- return this.patch === null;
126
- }
127
- parts() {
128
- return this.extension === null ? this.patch === null ? 2 : 3 : 4;
129
- }
130
- isNonVersioned() {
131
- return this.parts() === 2;
132
- }
133
- isStable() {
134
- return !this.extension && this.major > 0 && !this.is2Parts();
135
- }
136
- format() {
137
- this.version = this.is2Parts() ? `${this.major}.${this.minor}` : `${this.major}.${this.minor}.${this.patch}`;
138
- if (this.extension) this.version += `-${this.extension}`;
139
- return this.version;
140
- }
141
- toString() {
142
- return this.version;
143
- }
144
- compare(other) {
145
- if (!(other instanceof SemVer)) {
146
- if (typeof other === 'string' && other === this.version) {
147
- return 0;
148
- }
149
- other = new SemVer(other);
150
- }
151
- if (other.version === this.version) {
152
- return 0;
153
- }
154
- return this.compareMain(other) || this.comparePre(other);
155
- }
156
- compareMain(other) {
157
- if (!(other instanceof SemVer)) {
158
- other = new SemVer(other);
159
- }
160
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || this.comparePatch(other);
161
- }
162
- comparePatch(other) {
163
- if (this.patch === other.patch) return 0;
164
- // if (this.is2Parts() && other.patch === 0) return 0
165
- if (this.is2Parts()) return -1;
166
- if (other.is2Parts()) return 1;
167
- return compareIdentifiers(this.patch, other.patch);
168
- }
169
- comparePre(other) {
170
- if (!(other instanceof SemVer)) {
171
- other = new SemVer(other);
172
- }
173
-
174
- // NOT having a extension is > having one
175
- if (this.extension && !other.extension) {
176
- return -1;
177
- } else if (!this.extension && other.extension) {
178
- return 1;
179
- } else if (!this.extension && !other.extension) {
180
- return 0;
181
- }
182
- let i = 0;
183
- do {
184
- const a = this.extension[i];
185
- const b = other.extension[i];
186
- if (a === undefined && b === undefined) {
187
- return 0;
188
- } else if (b === undefined) {
189
- return 1;
190
- } else if (a === undefined) {
191
- return -1;
192
- } else if (a === b) {
193
- continue;
194
- } else {
195
- return compareIdentifiers(a, b);
196
- }
197
- } while (++i);
198
- }
199
- }
200
- var SemVer$1 = version => new SemVer(version);
201
- const compare = (a, b) => SemVer$1(a).compare(SemVer$1(b));
202
- const eq = (a, b) => compare(a, b) === 0;
203
- const neq = (a, b) => compare(a, b) !== 0;
204
- const gt = (a, b) => compare(a, b) > 0;
205
- const gte = (a, b) => compare(a, b) >= 0;
206
- const lt = (a, b) => compare(a, b) < 0;
207
- const lte = (a, b) => compare(a, b) <= 0;
208
- var cmp = (a, op, b) => {
209
- switch (op) {
210
- case '===':
211
- if (typeof a === 'object') a = a.version;
212
- if (typeof b === 'object') b = b.version;
213
- return a === b;
214
- case '!==':
215
- if (typeof a === 'object') a = a.version;
216
- if (typeof b === 'object') b = b.version;
217
- return a !== b;
218
- case '':
219
- case '=':
220
- case '==':
221
- return eq(a, b);
222
- case '!=':
223
- return neq(a, b);
224
- case '>':
225
- return gt(a, b);
226
- case '>=':
227
- return gte(a, b);
228
- case '<':
229
- return lt(a, b);
230
- case '<=':
231
- return lte(a, b);
232
- default:
233
- throw new SemVerError(`Invalid operator: ${op}`);
234
- }
235
- };
236
- const ANY = Symbol('SemVer ANY');
237
- class Comparator {
238
- static get ANY() {
239
- return ANY;
240
- }
241
- constructor(comp) {
242
- if (comp instanceof Comparator) {
243
- comp = comp.value;
244
- }
245
- this.parse(comp);
246
- if (this.semver === ANY) {
247
- this.value = '';
248
- } else {
249
- this.value = this.operator + this.semver.version;
250
- }
251
- }
252
- parse(comp) {
253
- const r = re[t.COMPARATOR];
254
- const m = comp.match(r);
255
- if (!m) {
256
- throw new SemVerError(`Invalid comparator: ${comp}`);
257
- }
258
- this.operator = m[1] !== undefined ? m[1] : '';
259
- if (this.operator === '=') {
260
- this.operator = '';
261
- }
262
- this.semver = SemVer$1(m[2]);
263
- }
264
- toString() {
265
- return this.value;
266
- }
267
- test(version) {
268
- // if (this.semver === ANY || version === ANY) {
269
- // return true
270
- // }
271
-
272
- if (typeof version === 'string') {
273
- try {
274
- version = SemVer$1(version);
275
- } catch (err) {
276
- return false;
277
- }
278
- }
279
- return cmp(version, this.operator, this.semver);
280
- }
281
- intersects(comp) {
282
- if (!(comp instanceof Comparator)) {
283
- throw new SemVerError('a Comparator is required');
284
- }
285
- if (this.operator === '') {
286
- if (this.value === '') {
287
- return true;
288
- }
289
- return Range$1(comp.value).test(this.value);
290
- } else if (comp.operator === '') {
291
- if (comp.value === '') {
292
- return true;
293
- }
294
- return Range$1(this.value).test(comp.semver);
295
- }
296
- const sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
297
- const sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
298
- const sameSemVer = this.semver.version === comp.semver.version;
299
- const differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
300
- const oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
301
- const oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
302
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
303
- }
304
- }
305
- var Comparator$1 = comp => new Comparator(comp);
306
- const cache = new index({
307
- max: 1000
308
- });
309
- const NUM = '0|[1-9]\\d*';
310
- const RANGE_TYPE = {
311
- ONE: 'one',
312
- MANY: 'many',
313
- LATEST: 'latest'
314
- };
315
- const matchSemVer = (string, map) => regexp => {
316
- const res = string.match(regexp);
317
- if (!res) return () => false;
318
- const result = () => true;
319
- for (const [key, pos, def = 0] of map) {
320
- result[key] = res[pos] || def;
321
- }
322
- return result;
323
- };
324
-
325
- // take a set of comparators and determine whether there
326
- // exists a version which can satisfy it
327
- const isSatisfiable = comparators => {
328
- let result = true;
329
- const remainingComparators = comparators.slice();
330
- let testComparator = remainingComparators.pop();
331
- while (result && remainingComparators.length) {
332
- result = remainingComparators.every(otherComparator => {
333
- return testComparator.intersects(otherComparator);
334
- });
335
- testComparator = remainingComparators.pop();
336
- }
337
- return result;
338
- };
339
- class Range {
340
- constructor(range) {
341
- if (range instanceof Range) return new Range(range.raw);
342
- if (range instanceof Comparator) {
343
- this.raw = range.value;
344
- this.set = [[range]];
345
- this.format();
346
- return this;
347
- }
348
- this.raw = range;
349
- const [type, set, subType] = this.makeRangeSet(range);
350
- this.set = set;
351
- this.type = type;
352
- this.subType = subType;
353
- if (!this.set.length) {
354
- throw new SemVerError(`Invalid SemVer Range: ${range}`);
355
- }
356
- this.format();
357
- }
358
- get comparators() {
359
- const res = [];
360
- for (const a of this.set) {
361
- for (const b of a) {
362
- res.push(b);
363
- }
364
- }
365
- return res;
366
- }
367
- isMonoVersion() {
368
- return this.type === RANGE_TYPE.ONE;
369
- }
370
- isResolved() {
371
- return this.isMonoVersion();
372
- }
373
- format() {
374
- this.range = this.set.map(comps => {
375
- return comps.join(' ').trim();
376
- }).join('||').trim();
377
- return this.range;
378
- }
379
- toString() {
380
- return this.range;
381
- }
382
- makeRangeSet(range) {
383
- range = range.trim();
384
- const memoKey = `parseRange:${range}`;
385
- const cached = cache.get(memoKey);
386
- if (cached) return cached;
387
- range = range.replace(/\s+/, '');
388
- const [type, comparators, subType] = makeComparators(range);
389
- if (!comparators) return [null, []];
390
- const set = comparators.map(comp => comp.split(/\s+/).map(comp => Comparator$1(comp)));
391
- cache.set(memoKey, [type, set, subType]);
392
- return [type, set, subType];
393
- }
394
- intersects(range) {
395
- if (!(range instanceof Range)) {
396
- throw new SemVerError('a Range is required');
397
- }
398
- return this.set.some(thisComparators => {
399
- return isSatisfiable(thisComparators) && range.set.some(rangeComparators => {
400
- return isSatisfiable(rangeComparators) && thisComparators.every(thisComparator => {
401
- return rangeComparators.every(rangeComparator => {
402
- return thisComparator.intersects(rangeComparator);
403
- });
404
- });
405
- });
406
- });
407
- }
408
-
409
- // if ANY of the sets match ALL of its comparators, then pass
410
- test(version) {
411
- if (!version) {
412
- return false;
413
- }
414
- if (typeof version === 'string') {
415
- try {
416
- version = SemVer$1(version);
417
- } catch (er) {
418
- return false;
419
- }
420
- }
421
- for (let i = 0; i < this.set.length; i++) {
422
- if (testSet(this.set[i], version)) return true;
423
- }
424
- return false;
425
- }
426
- }
427
- const RANGE_SUB_TYPE = {
428
- RESOLVED: 'resolved',
429
- STABLE: 'stable',
430
- LATEST_STABLE: 'latest_stable',
431
- LATEST_UNSTABLE: 'latest_unstable',
432
- UNSTABLE: 'unstable',
433
- ALL: 'all',
434
- ABOVE: 'above'
435
- };
436
- const makeComparators = comp => {
437
- let newComp;
438
- newComp = checkSpecific(comp);
439
- if (newComp) return [RANGE_TYPE.ONE, [newComp], RANGE_SUB_TYPE.RESOLVED];
440
- newComp = checkOnlyStable(comp);
441
- if (newComp) return [RANGE_TYPE.LATEST, [newComp], RANGE_SUB_TYPE.STABLE];
442
- newComp = checkLatestStable(comp);
443
- if (newComp) return [RANGE_TYPE.LATEST, [newComp], RANGE_SUB_TYPE.LATEST_STABLE];
444
- newComp = checkLatestUnStable(comp);
445
- if (newComp) return [RANGE_TYPE.LATEST, [newComp], RANGE_SUB_TYPE.LATEST_UNSTABLE];
446
- newComp = checkPossibleUnstable(comp);
447
- if (newComp) return [RANGE_TYPE.LATEST, [newComp], RANGE_SUB_TYPE.UNSTABLE];
448
- newComp = checkAllVersions(comp);
449
- if (newComp) return [RANGE_TYPE.MANY, newComp, RANGE_SUB_TYPE.ALL];
450
- newComp = checkAllAboveVersions(comp);
451
- if (newComp) return [RANGE_TYPE.MANY, newComp, RANGE_SUB_TYPE.ABOVE];
452
- return [];
453
- };
454
- const checkSpecific = comp => {
455
- const res = comp.match(re[t.FULL]);
456
- if (res) return comp;
457
- };
458
- const checkAllVersions = comp => {
459
- if (comp === '*') return ['>=0.0.0-0', '>=0.0'];
460
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
461
- let r;
462
- r = match(`^(${NUM})[.]([*])$`);
463
- if (r()) return [`>=${r.M}.0 <${+r.M + 1}.0`];
464
- r = match(`^(${NUM})[.]([*])[.](${NUM})$`);
465
- if (r()) return [`>=${r.M}.0.0-0 <${+r.M + 1}.0.0-0`];
466
- r = match(`^(${NUM})[.](${NUM})[.]([*])$`);
467
- if (r()) return [`>=${r.M}.${r.m}.0-0 <${r.M}.${+r.m + 1}.0-0`];
468
- };
469
- const checkAllAboveVersions = comp => {
470
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
471
- let r;
472
- r = match(`^(${NUM})[.](${NUM})[*]$`);
473
- if (r()) return [`>=${r.M}.${r.m} <${+r.M + 1}.0`];
474
- r = match(`^(${NUM})[.](${NUM})[*][.](${NUM})$`);
475
- if (r()) return [`>=${r.M}.${r.m}.0-0 <${+r.M + 1}.0.0-0`];
476
- r = match(`^(${NUM})[.](${NUM})[.](${NUM})[*]$`);
477
- if (r()) return [`>=${r.M}.${r.m}.${r.p}-0 <${r.M}.${+r.m + 1}.0-0`];
478
- };
479
- const checkPossibleUnstable = comp => {
480
- if (comp === '~') return `>=0.0.0-0`;
481
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
482
- let r;
483
- r = match(`^(${NUM})[.]([~])$`);
484
- if (r()) return `>=${r.M}.0 <${+r.M + 1}.0`;
485
- r = match(`^(${NUM})[.]([~])[.](${NUM})$`);
486
- if (r()) return `>=${r.M}.0.0-0 <${+r.M + 1}.0.0-0`;
487
- r = match(`^(${NUM})[.](${NUM})[.]([~])$`);
488
- if (r()) return `>=${r.M}.${r.m}.0-0 <${r.M}.${+r.m + 1}.0-0`;
489
- };
490
- const checkOnlyStable = comp => {
491
- if (comp === '+') return `>=1.0.0`;
492
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
493
- let r;
494
- r = match(`^(${NUM})[.]([+])(?:[.](${NUM}))?$`);
495
- if (r()) return `>=${r.M}.0.0 <${+r.M + 1}.0.0`;
496
- r = match(`^(${NUM})[.](${NUM})[.]([+])$`);
497
- if (r()) return `>=${r.M}.${r.m}.0 <${r.M}.${+r.m + 1}.0`;
498
- };
499
- const checkLatestStable = comp => {
500
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
501
- let r;
502
- r = match(`^(${NUM})[+][.](${NUM})[.](${NUM})$`);
503
- if (r()) return `>=${r.M}.${r.m}.${r.p}`;
504
- r = match(`^(${NUM})[.](${NUM})[+][.](${NUM})$`);
505
- if (r()) return `>=${r.M}.${r.m}.${r.p} <${+r.M + 1}.0.0`;
506
- r = match(`^(${NUM})[.](${NUM})[.](${NUM})[+]$`);
507
- if (r()) return `>=${r.M}.${r.m}.${r.p} <${r.M}.${+r.m + 1}.0`;
508
- };
509
- const checkLatestUnStable = comp => {
510
- const match = matchSemVer(comp, [['M', 1], ['m', 2], ['p', 3]]);
511
- let r;
512
- r = match(`^(${NUM})[~][.](${NUM})[.](${NUM})$`);
513
- if (r()) return `>=${r.M}.${r.m}.${r.p}-0`;
514
- r = match(`^(${NUM})[.](${NUM})[~][.](${NUM})$`);
515
- if (r()) return `>=${r.M}.${r.m}.${r.p}-0 <${+r.M + 1}.0.0-0`;
516
- r = match(`^(${NUM})[.](${NUM})[.](${NUM})[~]$`);
517
- if (r()) return `>=${r.M}.${r.m}.${r.p}-0 <${r.M}.${+r.m + 1}.0-0`;
518
- };
519
- const testSet = (set, version) => {
520
- for (let i = 0; i < set.length; i++) {
521
- if (!set[i].test(version)) return false;
522
- if (set[i].semver.isStable() && !version.isStable()) return false;
523
- if (set[i].semver.is2Parts() && !version.is2Parts()) return false;
524
- }
525
- return true;
526
- };
527
- var Range$1 = range => new Range(range);
528
- class Matcher {
529
- constructor(value) {
530
- this.raw = value;
531
- this.range = Range$1(value);
532
- if (this.range.type !== RANGE_TYPE.ONE && this.range.type !== RANGE_TYPE.LATEST) throw new SemVerError(`Wrong version for matcher ${value}`);
533
- }
534
- isMonoType() {
535
- return this.range.type === RANGE_TYPE.ONE;
536
- }
537
- isResolved() {
538
- return this.isMonoType();
539
- }
540
- isLatestType() {
541
- return this.range.type === RANGE_TYPE.LATEST;
542
- }
543
- }
544
- var matcher = value => new Matcher(value);
545
- class Dependency {
546
- constructor(source, value) {
547
- if (!value) throw new SemVerError(`Dependency version must be defined`);
548
- if (!source?.version) throw new SemVerError(`Dependency source cannot be undefined`);
549
- this.raw = value;
550
- this.source = source;
551
- this.range = Range$1(value);
552
- const sVersion = SemVer$1(source.version);
553
- if (!this.range.isResolved()) {
554
- if (this.range.subType !== RANGE_SUB_TYPE.LATEST_STABLE) throw new SemVerError(`Wrong dependency ${value}`);
555
- if (!sVersion.isStable()) {
556
- this.range = Range$1(value.replace('+', '~'));
557
- }
558
- } else {
559
- const tVersion = SemVer$1(value);
560
- if (sVersion.isStable() && !tVersion.isStable()) throw new SemVerError(`Wrong dependency: Semantically versioned artefacts MUST only reference another semantically versioned artefacts`);
561
- }
562
- }
563
- isResolved() {
564
- return this.range.type === RANGE_TYPE.ONE;
565
- }
566
- }
567
- var dependency = (source, value) => new Dependency(source, value);
568
- const isValidDependency = (source, targetVersion) => {
569
- try {
570
- new Dependency(source, targetVersion);
571
- return true;
572
- } catch (err) {
573
- return false;
574
- }
575
- };
576
-
577
- exports.Comparator = Comparator$1;
578
- exports.Dependency = dependency;
579
- exports.Matcher = matcher;
580
- exports.RANGE_TYPE = RANGE_TYPE;
581
- exports.Range = Range$1;
582
- exports.SemVer = SemVer$1;
583
- exports.SemVerError = SemVerError;
584
- exports.isValidDependency = isValidDependency;