@oneblink/release-cli 1.2.0-beta.2 → 1.2.0-beta.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 (429) hide show
  1. package/node_modules/@yarnpkg/lockfile/README.md +22 -0
  2. package/node_modules/@yarnpkg/lockfile/index.js +10273 -0
  3. package/node_modules/@yarnpkg/lockfile/package.json +19 -0
  4. package/node_modules/ansi-styles/index.js +165 -0
  5. package/node_modules/ansi-styles/license +9 -0
  6. package/node_modules/ansi-styles/package.json +60 -0
  7. package/node_modules/ansi-styles/readme.md +147 -0
  8. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  9. package/node_modules/balanced-match/LICENSE.md +21 -0
  10. package/node_modules/balanced-match/README.md +97 -0
  11. package/node_modules/balanced-match/index.js +62 -0
  12. package/node_modules/balanced-match/package.json +52 -0
  13. package/node_modules/brace-expansion/LICENSE +21 -0
  14. package/node_modules/brace-expansion/README.md +129 -0
  15. package/node_modules/brace-expansion/index.js +201 -0
  16. package/node_modules/brace-expansion/package.json +51 -0
  17. package/node_modules/braces/CHANGELOG.md +184 -0
  18. package/node_modules/braces/LICENSE +21 -0
  19. package/node_modules/braces/README.md +593 -0
  20. package/node_modules/braces/index.js +170 -0
  21. package/node_modules/braces/lib/compile.js +57 -0
  22. package/node_modules/braces/lib/constants.js +57 -0
  23. package/node_modules/braces/lib/expand.js +113 -0
  24. package/node_modules/braces/lib/parse.js +333 -0
  25. package/node_modules/braces/lib/stringify.js +32 -0
  26. package/node_modules/braces/lib/utils.js +112 -0
  27. package/node_modules/braces/package.json +81 -0
  28. package/node_modules/chalk/index.js +228 -0
  29. package/node_modules/chalk/index.js.flow +93 -0
  30. package/node_modules/chalk/license +9 -0
  31. package/node_modules/chalk/package.json +75 -0
  32. package/node_modules/chalk/readme.md +314 -0
  33. package/node_modules/chalk/templates.js +128 -0
  34. package/node_modules/chalk/types/index.d.ts +97 -0
  35. package/node_modules/changelog-parser/.DS_Store +0 -0
  36. package/node_modules/changelog-parser/.travis.yml +7 -0
  37. package/node_modules/changelog-parser/CHANGELOG.md +128 -0
  38. package/node_modules/changelog-parser/CONTRIBUTING.md +55 -0
  39. package/node_modules/changelog-parser/LICENSE.md +15 -0
  40. package/node_modules/changelog-parser/README.md +247 -0
  41. package/node_modules/changelog-parser/bin/cli.js +19 -0
  42. package/node_modules/changelog-parser/index.js +201 -0
  43. package/node_modules/changelog-parser/package.json +54 -0
  44. package/node_modules/changelog-parser/test/fixtures/CHANGELOG.md +44 -0
  45. package/node_modules/changelog-parser/test/fixtures/expected.js +113 -0
  46. package/node_modules/changelog-parser/test/fixtures/remove-markdown-expected.js +113 -0
  47. package/node_modules/changelog-parser/test/index.js +105 -0
  48. package/node_modules/ci-info/CHANGELOG.md +78 -0
  49. package/node_modules/ci-info/LICENSE +21 -0
  50. package/node_modules/ci-info/README.md +108 -0
  51. package/node_modules/ci-info/index.js +66 -0
  52. package/node_modules/ci-info/package.json +40 -0
  53. package/node_modules/ci-info/vendors.json +153 -0
  54. package/node_modules/color-convert/CHANGELOG.md +54 -0
  55. package/node_modules/color-convert/LICENSE +21 -0
  56. package/node_modules/color-convert/README.md +68 -0
  57. package/node_modules/color-convert/conversions.js +868 -0
  58. package/node_modules/color-convert/index.js +78 -0
  59. package/node_modules/color-convert/package.json +50 -0
  60. package/node_modules/color-convert/route.js +97 -0
  61. package/node_modules/color-name/.eslintrc.json +43 -0
  62. package/node_modules/color-name/.npmignore +107 -0
  63. package/node_modules/color-name/LICENSE +8 -0
  64. package/node_modules/color-name/README.md +11 -0
  65. package/node_modules/color-name/index.js +152 -0
  66. package/node_modules/color-name/package.json +29 -0
  67. package/node_modules/color-name/test.js +7 -0
  68. package/node_modules/concat-map/.travis.yml +4 -0
  69. package/node_modules/concat-map/LICENSE +18 -0
  70. package/node_modules/concat-map/README.markdown +62 -0
  71. package/node_modules/concat-map/example/map.js +6 -0
  72. package/node_modules/concat-map/index.js +13 -0
  73. package/node_modules/concat-map/package.json +47 -0
  74. package/node_modules/concat-map/test/map.js +39 -0
  75. package/node_modules/escape-string-regexp/index.js +11 -0
  76. package/node_modules/escape-string-regexp/license +21 -0
  77. package/node_modules/escape-string-regexp/package.json +45 -0
  78. package/node_modules/escape-string-regexp/readme.md +27 -0
  79. package/node_modules/fill-range/LICENSE +21 -0
  80. package/node_modules/fill-range/README.md +237 -0
  81. package/node_modules/fill-range/index.js +249 -0
  82. package/node_modules/fill-range/package.json +73 -0
  83. package/node_modules/find-yarn-workspace-root/CHANGELOG.md +53 -0
  84. package/node_modules/find-yarn-workspace-root/LICENSE +201 -0
  85. package/node_modules/find-yarn-workspace-root/README.md +56 -0
  86. package/node_modules/find-yarn-workspace-root/index.d.ts +3 -0
  87. package/node_modules/find-yarn-workspace-root/index.js +53 -0
  88. package/node_modules/find-yarn-workspace-root/package.json +38 -0
  89. package/node_modules/fs-extra/CHANGELOG.md +842 -0
  90. package/node_modules/fs-extra/LICENSE +15 -0
  91. package/node_modules/fs-extra/README.md +261 -0
  92. package/node_modules/fs-extra/lib/copy/copy.js +246 -0
  93. package/node_modules/fs-extra/lib/copy/index.js +6 -0
  94. package/node_modules/fs-extra/lib/copy-sync/copy-sync.js +193 -0
  95. package/node_modules/fs-extra/lib/copy-sync/index.js +5 -0
  96. package/node_modules/fs-extra/lib/empty/index.js +48 -0
  97. package/node_modules/fs-extra/lib/ensure/file.js +49 -0
  98. package/node_modules/fs-extra/lib/ensure/index.js +23 -0
  99. package/node_modules/fs-extra/lib/ensure/link.js +61 -0
  100. package/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
  101. package/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
  102. package/node_modules/fs-extra/lib/ensure/symlink.js +63 -0
  103. package/node_modules/fs-extra/lib/fs/index.js +104 -0
  104. package/node_modules/fs-extra/lib/index.js +28 -0
  105. package/node_modules/fs-extra/lib/json/index.js +16 -0
  106. package/node_modules/fs-extra/lib/json/jsonfile.js +12 -0
  107. package/node_modules/fs-extra/lib/json/output-json-sync.js +18 -0
  108. package/node_modules/fs-extra/lib/json/output-json.js +27 -0
  109. package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  110. package/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +54 -0
  111. package/node_modules/fs-extra/lib/mkdirs/mkdirs.js +63 -0
  112. package/node_modules/fs-extra/lib/mkdirs/win32.js +25 -0
  113. package/node_modules/fs-extra/lib/move/index.js +82 -0
  114. package/node_modules/fs-extra/lib/move-sync/index.js +117 -0
  115. package/node_modules/fs-extra/lib/output/index.js +40 -0
  116. package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  117. package/node_modules/fs-extra/lib/remove/index.js +9 -0
  118. package/node_modules/fs-extra/lib/remove/rimraf.js +314 -0
  119. package/node_modules/fs-extra/lib/util/buffer.js +12 -0
  120. package/node_modules/fs-extra/lib/util/utimes.js +79 -0
  121. package/node_modules/fs-extra/package.json +72 -0
  122. package/node_modules/fs.realpath/LICENSE +43 -0
  123. package/node_modules/fs.realpath/README.md +33 -0
  124. package/node_modules/fs.realpath/index.js +66 -0
  125. package/node_modules/fs.realpath/old.js +303 -0
  126. package/node_modules/fs.realpath/package.json +30 -0
  127. package/node_modules/glob/LICENSE +21 -0
  128. package/node_modules/glob/README.md +375 -0
  129. package/node_modules/glob/changelog.md +67 -0
  130. package/node_modules/glob/common.js +240 -0
  131. package/node_modules/glob/glob.js +790 -0
  132. package/node_modules/glob/package.json +50 -0
  133. package/node_modules/glob/sync.js +486 -0
  134. package/node_modules/graceful-fs/LICENSE +15 -0
  135. package/node_modules/graceful-fs/README.md +133 -0
  136. package/node_modules/graceful-fs/clone.js +23 -0
  137. package/node_modules/graceful-fs/graceful-fs.js +373 -0
  138. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  139. package/node_modules/graceful-fs/package.json +54 -0
  140. package/node_modules/graceful-fs/polyfills.js +346 -0
  141. package/node_modules/has-flag/index.js +8 -0
  142. package/node_modules/has-flag/license +9 -0
  143. package/node_modules/has-flag/package.json +48 -0
  144. package/node_modules/has-flag/readme.md +70 -0
  145. package/node_modules/inflight/LICENSE +15 -0
  146. package/node_modules/inflight/README.md +37 -0
  147. package/node_modules/inflight/inflight.js +54 -0
  148. package/node_modules/inflight/package.json +33 -0
  149. package/node_modules/inherits/LICENSE +16 -0
  150. package/node_modules/inherits/README.md +42 -0
  151. package/node_modules/inherits/inherits.js +9 -0
  152. package/node_modules/inherits/inherits_browser.js +27 -0
  153. package/node_modules/inherits/package.json +33 -0
  154. package/node_modules/is-ci/CHANGELOG.md +14 -0
  155. package/node_modules/is-ci/LICENSE +21 -0
  156. package/node_modules/is-ci/README.md +50 -0
  157. package/node_modules/is-ci/bin.js +4 -0
  158. package/node_modules/is-ci/index.js +3 -0
  159. package/node_modules/is-ci/package.json +42 -0
  160. package/node_modules/is-docker/cli.js +5 -0
  161. package/node_modules/is-docker/index.d.ts +15 -0
  162. package/node_modules/is-docker/index.js +29 -0
  163. package/node_modules/is-docker/license +9 -0
  164. package/node_modules/is-docker/package.json +46 -0
  165. package/node_modules/is-docker/readme.md +27 -0
  166. package/node_modules/is-number/LICENSE +21 -0
  167. package/node_modules/is-number/README.md +187 -0
  168. package/node_modules/is-number/index.js +18 -0
  169. package/node_modules/is-number/package.json +86 -0
  170. package/node_modules/is-wsl/index.d.ts +15 -0
  171. package/node_modules/is-wsl/index.js +31 -0
  172. package/node_modules/is-wsl/license +9 -0
  173. package/node_modules/is-wsl/package.json +49 -0
  174. package/node_modules/is-wsl/readme.md +36 -0
  175. package/node_modules/isexe/.npmignore +2 -0
  176. package/node_modules/isexe/LICENSE +15 -0
  177. package/node_modules/isexe/README.md +51 -0
  178. package/node_modules/isexe/index.js +57 -0
  179. package/node_modules/isexe/mode.js +41 -0
  180. package/node_modules/isexe/package.json +35 -0
  181. package/node_modules/isexe/test/basic.js +221 -0
  182. package/node_modules/isexe/windows.js +42 -0
  183. package/node_modules/jsonfile/CHANGELOG.md +145 -0
  184. package/node_modules/jsonfile/LICENSE +15 -0
  185. package/node_modules/jsonfile/README.md +168 -0
  186. package/node_modules/jsonfile/index.js +134 -0
  187. package/node_modules/jsonfile/package.json +41 -0
  188. package/node_modules/klaw-sync/CHANGELOG.md +73 -0
  189. package/node_modules/klaw-sync/LICENSE +20 -0
  190. package/node_modules/klaw-sync/README.md +164 -0
  191. package/node_modules/klaw-sync/klaw-sync.js +29 -0
  192. package/node_modules/klaw-sync/package.json +51 -0
  193. package/node_modules/line-reader/LICENSE +20 -0
  194. package/node_modules/line-reader/README.md +75 -0
  195. package/node_modules/line-reader/lib/line_reader.js +174 -0
  196. package/node_modules/line-reader/package.json +18 -0
  197. package/node_modules/line-reader/test/data/empty_file.txt +0 -0
  198. package/node_modules/line-reader/test/data/multi_separator_file.txt +2 -0
  199. package/node_modules/line-reader/test/data/multibyte_file.txt +2 -0
  200. package/node_modules/line-reader/test/data/normal_file.txt +6 -0
  201. package/node_modules/line-reader/test/data/one_line_file.txt +1 -0
  202. package/node_modules/line-reader/test/data/separator_file.txt +2 -0
  203. package/node_modules/line-reader/test/data/three_line_file.txt +3 -0
  204. package/node_modules/line-reader/test/line_reader.js +222 -0
  205. package/node_modules/lru-cache/LICENSE +15 -0
  206. package/node_modules/lru-cache/README.md +166 -0
  207. package/node_modules/lru-cache/index.js +334 -0
  208. package/node_modules/lru-cache/package.json +38 -0
  209. package/node_modules/micromatch/CHANGELOG.md +109 -0
  210. package/node_modules/micromatch/LICENSE +21 -0
  211. package/node_modules/micromatch/README.md +1008 -0
  212. package/node_modules/micromatch/index.js +467 -0
  213. package/node_modules/micromatch/package.json +123 -0
  214. package/node_modules/minimatch/LICENSE +15 -0
  215. package/node_modules/minimatch/README.md +209 -0
  216. package/node_modules/minimatch/minimatch.js +923 -0
  217. package/node_modules/minimatch/package.json +34 -0
  218. package/node_modules/minimist/.travis.yml +8 -0
  219. package/node_modules/minimist/LICENSE +18 -0
  220. package/node_modules/minimist/example/parse.js +2 -0
  221. package/node_modules/minimist/index.js +245 -0
  222. package/node_modules/minimist/package.json +49 -0
  223. package/node_modules/minimist/readme.markdown +95 -0
  224. package/node_modules/minimist/test/all_bool.js +32 -0
  225. package/node_modules/minimist/test/bool.js +178 -0
  226. package/node_modules/minimist/test/dash.js +31 -0
  227. package/node_modules/minimist/test/default_bool.js +35 -0
  228. package/node_modules/minimist/test/dotted.js +22 -0
  229. package/node_modules/minimist/test/kv_short.js +16 -0
  230. package/node_modules/minimist/test/long.js +31 -0
  231. package/node_modules/minimist/test/num.js +36 -0
  232. package/node_modules/minimist/test/parse.js +197 -0
  233. package/node_modules/minimist/test/parse_modified.js +9 -0
  234. package/node_modules/minimist/test/proto.js +44 -0
  235. package/node_modules/minimist/test/short.js +67 -0
  236. package/node_modules/minimist/test/stop_early.js +15 -0
  237. package/node_modules/minimist/test/unknown.js +102 -0
  238. package/node_modules/minimist/test/whitespace.js +8 -0
  239. package/node_modules/nice-try/CHANGELOG.md +21 -0
  240. package/node_modules/nice-try/LICENSE +21 -0
  241. package/node_modules/nice-try/README.md +32 -0
  242. package/node_modules/nice-try/package.json +37 -0
  243. package/node_modules/nice-try/src/index.js +12 -0
  244. package/node_modules/once/LICENSE +15 -0
  245. package/node_modules/once/README.md +79 -0
  246. package/node_modules/once/once.js +42 -0
  247. package/node_modules/once/package.json +37 -0
  248. package/node_modules/open/index.d.ts +88 -0
  249. package/node_modules/open/index.js +195 -0
  250. package/node_modules/open/license +9 -0
  251. package/node_modules/open/package.json +64 -0
  252. package/node_modules/open/readme.md +154 -0
  253. package/node_modules/open/xdg-open +1066 -0
  254. package/node_modules/os-tmpdir/index.js +25 -0
  255. package/node_modules/os-tmpdir/license +21 -0
  256. package/node_modules/os-tmpdir/package.json +45 -0
  257. package/node_modules/os-tmpdir/readme.md +32 -0
  258. package/node_modules/patch-package/CHANGELOG.md +389 -0
  259. package/node_modules/patch-package/LICENSE +19 -0
  260. package/node_modules/patch-package/README.md +269 -0
  261. package/node_modules/patch-package/dist/PackageDetails.js +102 -0
  262. package/node_modules/patch-package/dist/PackageDetails.test.js +228 -0
  263. package/node_modules/patch-package/dist/applyPatches.js +261 -0
  264. package/node_modules/patch-package/dist/assertNever.js +8 -0
  265. package/node_modules/patch-package/dist/createIssue.js +83 -0
  266. package/node_modules/patch-package/dist/detectPackageManager.js +64 -0
  267. package/node_modules/patch-package/dist/filterFiles.js +17 -0
  268. package/node_modules/patch-package/dist/getAppRootPath.js +22 -0
  269. package/node_modules/patch-package/dist/getPackageResolution.js +85 -0
  270. package/node_modules/patch-package/dist/getPackageVersion.js +9 -0
  271. package/node_modules/patch-package/dist/index.js +161 -0
  272. package/node_modules/patch-package/dist/makePatch.js +231 -0
  273. package/node_modules/patch-package/dist/makeRegExp.js +28 -0
  274. package/node_modules/patch-package/dist/packageIsDevDependency.js +15 -0
  275. package/node_modules/patch-package/dist/packageIsDevDependency.test.js +32 -0
  276. package/node_modules/patch-package/dist/patch/apply.js +197 -0
  277. package/node_modules/patch-package/dist/patch/parse.js +330 -0
  278. package/node_modules/patch-package/dist/patch/read.js +49 -0
  279. package/node_modules/patch-package/dist/patch/reverse.js +96 -0
  280. package/node_modules/patch-package/dist/patchFs.js +20 -0
  281. package/node_modules/patch-package/dist/path.js +17 -0
  282. package/node_modules/patch-package/dist/resolveRelativeFileDependencies.js +21 -0
  283. package/node_modules/patch-package/dist/resolveRelativeFileDependencies.test.js +22 -0
  284. package/node_modules/patch-package/dist/spawnSafe.js +28 -0
  285. package/node_modules/patch-package/index.js +3 -0
  286. package/node_modules/patch-package/node_modules/cross-spawn/CHANGELOG.md +100 -0
  287. package/node_modules/patch-package/node_modules/cross-spawn/LICENSE +21 -0
  288. package/node_modules/patch-package/node_modules/cross-spawn/README.md +94 -0
  289. package/node_modules/patch-package/node_modules/cross-spawn/index.js +39 -0
  290. package/node_modules/patch-package/node_modules/cross-spawn/lib/enoent.js +59 -0
  291. package/node_modules/patch-package/node_modules/cross-spawn/lib/parse.js +125 -0
  292. package/node_modules/patch-package/node_modules/cross-spawn/lib/util/escape.js +45 -0
  293. package/node_modules/patch-package/node_modules/cross-spawn/lib/util/readShebang.js +32 -0
  294. package/node_modules/patch-package/node_modules/cross-spawn/lib/util/resolveCommand.js +47 -0
  295. package/node_modules/patch-package/node_modules/cross-spawn/package.json +80 -0
  296. package/node_modules/patch-package/node_modules/path-key/index.js +13 -0
  297. package/node_modules/patch-package/node_modules/path-key/license +21 -0
  298. package/node_modules/patch-package/node_modules/path-key/package.json +43 -0
  299. package/node_modules/patch-package/node_modules/path-key/readme.md +51 -0
  300. package/node_modules/patch-package/node_modules/rimraf/LICENSE +15 -0
  301. package/node_modules/patch-package/node_modules/rimraf/README.md +101 -0
  302. package/node_modules/patch-package/node_modules/rimraf/bin.js +50 -0
  303. package/node_modules/patch-package/node_modules/rimraf/package.json +33 -0
  304. package/node_modules/patch-package/node_modules/rimraf/rimraf.js +372 -0
  305. package/node_modules/patch-package/node_modules/semver/CHANGELOG.md +39 -0
  306. package/node_modules/patch-package/node_modules/semver/LICENSE +15 -0
  307. package/node_modules/patch-package/node_modules/semver/README.md +412 -0
  308. package/node_modules/patch-package/node_modules/semver/bin/semver +160 -0
  309. package/node_modules/patch-package/node_modules/semver/package.json +32 -0
  310. package/node_modules/patch-package/node_modules/semver/range.bnf +16 -0
  311. package/node_modules/patch-package/node_modules/semver/semver.js +1483 -0
  312. package/node_modules/patch-package/node_modules/shebang-command/index.js +19 -0
  313. package/node_modules/patch-package/node_modules/shebang-command/license +21 -0
  314. package/node_modules/patch-package/node_modules/shebang-command/package.json +43 -0
  315. package/node_modules/patch-package/node_modules/shebang-command/readme.md +39 -0
  316. package/node_modules/patch-package/node_modules/shebang-regex/index.js +2 -0
  317. package/node_modules/patch-package/node_modules/shebang-regex/license +21 -0
  318. package/node_modules/patch-package/node_modules/shebang-regex/package.json +36 -0
  319. package/node_modules/patch-package/node_modules/shebang-regex/readme.md +29 -0
  320. package/node_modules/patch-package/node_modules/slash/index.js +11 -0
  321. package/node_modules/patch-package/node_modules/slash/license +9 -0
  322. package/node_modules/patch-package/node_modules/slash/package.json +38 -0
  323. package/node_modules/patch-package/node_modules/slash/readme.md +44 -0
  324. package/node_modules/patch-package/node_modules/which/CHANGELOG.md +152 -0
  325. package/node_modules/patch-package/node_modules/which/LICENSE +15 -0
  326. package/node_modules/patch-package/node_modules/which/README.md +51 -0
  327. package/node_modules/patch-package/node_modules/which/bin/which +52 -0
  328. package/node_modules/patch-package/node_modules/which/package.json +34 -0
  329. package/node_modules/patch-package/node_modules/which/which.js +135 -0
  330. package/node_modules/patch-package/package.json +100 -0
  331. package/node_modules/path-is-absolute/index.js +20 -0
  332. package/node_modules/path-is-absolute/license +21 -0
  333. package/node_modules/path-is-absolute/package.json +47 -0
  334. package/node_modules/path-is-absolute/readme.md +59 -0
  335. package/node_modules/picomatch/CHANGELOG.md +120 -0
  336. package/node_modules/picomatch/LICENSE +21 -0
  337. package/node_modules/picomatch/README.md +691 -0
  338. package/node_modules/picomatch/index.js +3 -0
  339. package/node_modules/picomatch/lib/constants.js +179 -0
  340. package/node_modules/picomatch/lib/parse.js +1078 -0
  341. package/node_modules/picomatch/lib/picomatch.js +339 -0
  342. package/node_modules/picomatch/lib/scan.js +385 -0
  343. package/node_modules/picomatch/lib/utils.js +64 -0
  344. package/node_modules/picomatch/package.json +85 -0
  345. package/node_modules/remove-markdown/.npmignore +1 -0
  346. package/node_modules/remove-markdown/LICENSE +21 -0
  347. package/node_modules/remove-markdown/README.md +44 -0
  348. package/node_modules/remove-markdown/index.js +60 -0
  349. package/node_modules/remove-markdown/package.json +31 -0
  350. package/node_modules/remove-markdown/test/remove-markdown.js +139 -0
  351. package/node_modules/semver/CHANGELOG.md +111 -0
  352. package/node_modules/semver/LICENSE +15 -0
  353. package/node_modules/semver/README.md +566 -0
  354. package/node_modules/semver/bin/semver.js +173 -0
  355. package/node_modules/semver/classes/comparator.js +135 -0
  356. package/node_modules/semver/classes/index.js +5 -0
  357. package/node_modules/semver/classes/range.js +510 -0
  358. package/node_modules/semver/classes/semver.js +287 -0
  359. package/node_modules/semver/functions/clean.js +6 -0
  360. package/node_modules/semver/functions/cmp.js +48 -0
  361. package/node_modules/semver/functions/coerce.js +51 -0
  362. package/node_modules/semver/functions/compare-build.js +7 -0
  363. package/node_modules/semver/functions/compare-loose.js +3 -0
  364. package/node_modules/semver/functions/compare.js +5 -0
  365. package/node_modules/semver/functions/diff.js +23 -0
  366. package/node_modules/semver/functions/eq.js +3 -0
  367. package/node_modules/semver/functions/gt.js +3 -0
  368. package/node_modules/semver/functions/gte.js +3 -0
  369. package/node_modules/semver/functions/inc.js +15 -0
  370. package/node_modules/semver/functions/lt.js +3 -0
  371. package/node_modules/semver/functions/lte.js +3 -0
  372. package/node_modules/semver/functions/major.js +3 -0
  373. package/node_modules/semver/functions/minor.js +3 -0
  374. package/node_modules/semver/functions/neq.js +3 -0
  375. package/node_modules/semver/functions/parse.js +33 -0
  376. package/node_modules/semver/functions/patch.js +3 -0
  377. package/node_modules/semver/functions/prerelease.js +6 -0
  378. package/node_modules/semver/functions/rcompare.js +3 -0
  379. package/node_modules/semver/functions/rsort.js +3 -0
  380. package/node_modules/semver/functions/satisfies.js +10 -0
  381. package/node_modules/semver/functions/sort.js +3 -0
  382. package/node_modules/semver/functions/valid.js +6 -0
  383. package/node_modules/semver/index.js +48 -0
  384. package/node_modules/semver/internal/constants.js +17 -0
  385. package/node_modules/semver/internal/debug.js +9 -0
  386. package/node_modules/semver/internal/identifiers.js +23 -0
  387. package/node_modules/semver/internal/parse-options.js +11 -0
  388. package/node_modules/semver/internal/re.js +182 -0
  389. package/node_modules/semver/package.json +45 -0
  390. package/node_modules/semver/preload.js +2 -0
  391. package/node_modules/semver/range.bnf +16 -0
  392. package/node_modules/semver/ranges/gtr.js +4 -0
  393. package/node_modules/semver/ranges/intersects.js +7 -0
  394. package/node_modules/semver/ranges/ltr.js +4 -0
  395. package/node_modules/semver/ranges/max-satisfying.js +25 -0
  396. package/node_modules/semver/ranges/min-satisfying.js +24 -0
  397. package/node_modules/semver/ranges/min-version.js +60 -0
  398. package/node_modules/semver/ranges/outside.js +80 -0
  399. package/node_modules/semver/ranges/simplify.js +44 -0
  400. package/node_modules/semver/ranges/subset.js +222 -0
  401. package/node_modules/semver/ranges/to-comparators.js +8 -0
  402. package/node_modules/semver/ranges/valid.js +11 -0
  403. package/node_modules/supports-color/browser.js +5 -0
  404. package/node_modules/supports-color/index.js +131 -0
  405. package/node_modules/supports-color/license +9 -0
  406. package/node_modules/supports-color/package.json +57 -0
  407. package/node_modules/supports-color/readme.md +66 -0
  408. package/node_modules/tmp/LICENSE +21 -0
  409. package/node_modules/tmp/README.md +314 -0
  410. package/node_modules/tmp/lib/tmp.js +611 -0
  411. package/node_modules/tmp/package.json +42 -0
  412. package/node_modules/to-regex-range/LICENSE +21 -0
  413. package/node_modules/to-regex-range/README.md +305 -0
  414. package/node_modules/to-regex-range/index.js +288 -0
  415. package/node_modules/to-regex-range/package.json +92 -0
  416. package/node_modules/universalify/LICENSE +20 -0
  417. package/node_modules/universalify/README.md +76 -0
  418. package/node_modules/universalify/index.js +25 -0
  419. package/node_modules/universalify/package.json +38 -0
  420. package/node_modules/wrappy/LICENSE +15 -0
  421. package/node_modules/wrappy/README.md +36 -0
  422. package/node_modules/wrappy/package.json +33 -0
  423. package/node_modules/wrappy/wrappy.js +33 -0
  424. package/node_modules/yallist/LICENSE +15 -0
  425. package/node_modules/yallist/README.md +204 -0
  426. package/node_modules/yallist/iterator.js +8 -0
  427. package/node_modules/yallist/package.json +33 -0
  428. package/node_modules/yallist/yallist.js +426 -0
  429. package/package.json +5 -1
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@yarnpkg/lockfile",
3
+ "version": "1.1.0",
4
+ "description": "The parser/stringifier for Yarn lockfiles.",
5
+ "main": "index.js",
6
+ "repository": "https://github.com/yarnpkg/yarn/blob/master/packages/lockfile",
7
+ "keywords": [
8
+ "yarn",
9
+ "yarnpkg",
10
+ "lockfile",
11
+ "dependency",
12
+ "npm"
13
+ ],
14
+ "license": "BSD-2-Clause"
15
+
16
+ ,"_resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz"
17
+ ,"_integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
18
+ ,"_from": "@yarnpkg/lockfile@1.1.0"
19
+ }
@@ -0,0 +1,165 @@
1
+ 'use strict';
2
+ const colorConvert = require('color-convert');
3
+
4
+ const wrapAnsi16 = (fn, offset) => function () {
5
+ const code = fn.apply(colorConvert, arguments);
6
+ return `\u001B[${code + offset}m`;
7
+ };
8
+
9
+ const wrapAnsi256 = (fn, offset) => function () {
10
+ const code = fn.apply(colorConvert, arguments);
11
+ return `\u001B[${38 + offset};5;${code}m`;
12
+ };
13
+
14
+ const wrapAnsi16m = (fn, offset) => function () {
15
+ const rgb = fn.apply(colorConvert, arguments);
16
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
17
+ };
18
+
19
+ function assembleStyles() {
20
+ const codes = new Map();
21
+ const styles = {
22
+ modifier: {
23
+ reset: [0, 0],
24
+ // 21 isn't widely supported and 22 does the same thing
25
+ bold: [1, 22],
26
+ dim: [2, 22],
27
+ italic: [3, 23],
28
+ underline: [4, 24],
29
+ inverse: [7, 27],
30
+ hidden: [8, 28],
31
+ strikethrough: [9, 29]
32
+ },
33
+ color: {
34
+ black: [30, 39],
35
+ red: [31, 39],
36
+ green: [32, 39],
37
+ yellow: [33, 39],
38
+ blue: [34, 39],
39
+ magenta: [35, 39],
40
+ cyan: [36, 39],
41
+ white: [37, 39],
42
+ gray: [90, 39],
43
+
44
+ // Bright color
45
+ redBright: [91, 39],
46
+ greenBright: [92, 39],
47
+ yellowBright: [93, 39],
48
+ blueBright: [94, 39],
49
+ magentaBright: [95, 39],
50
+ cyanBright: [96, 39],
51
+ whiteBright: [97, 39]
52
+ },
53
+ bgColor: {
54
+ bgBlack: [40, 49],
55
+ bgRed: [41, 49],
56
+ bgGreen: [42, 49],
57
+ bgYellow: [43, 49],
58
+ bgBlue: [44, 49],
59
+ bgMagenta: [45, 49],
60
+ bgCyan: [46, 49],
61
+ bgWhite: [47, 49],
62
+
63
+ // Bright color
64
+ bgBlackBright: [100, 49],
65
+ bgRedBright: [101, 49],
66
+ bgGreenBright: [102, 49],
67
+ bgYellowBright: [103, 49],
68
+ bgBlueBright: [104, 49],
69
+ bgMagentaBright: [105, 49],
70
+ bgCyanBright: [106, 49],
71
+ bgWhiteBright: [107, 49]
72
+ }
73
+ };
74
+
75
+ // Fix humans
76
+ styles.color.grey = styles.color.gray;
77
+
78
+ for (const groupName of Object.keys(styles)) {
79
+ const group = styles[groupName];
80
+
81
+ for (const styleName of Object.keys(group)) {
82
+ const style = group[styleName];
83
+
84
+ styles[styleName] = {
85
+ open: `\u001B[${style[0]}m`,
86
+ close: `\u001B[${style[1]}m`
87
+ };
88
+
89
+ group[styleName] = styles[styleName];
90
+
91
+ codes.set(style[0], style[1]);
92
+ }
93
+
94
+ Object.defineProperty(styles, groupName, {
95
+ value: group,
96
+ enumerable: false
97
+ });
98
+
99
+ Object.defineProperty(styles, 'codes', {
100
+ value: codes,
101
+ enumerable: false
102
+ });
103
+ }
104
+
105
+ const ansi2ansi = n => n;
106
+ const rgb2rgb = (r, g, b) => [r, g, b];
107
+
108
+ styles.color.close = '\u001B[39m';
109
+ styles.bgColor.close = '\u001B[49m';
110
+
111
+ styles.color.ansi = {
112
+ ansi: wrapAnsi16(ansi2ansi, 0)
113
+ };
114
+ styles.color.ansi256 = {
115
+ ansi256: wrapAnsi256(ansi2ansi, 0)
116
+ };
117
+ styles.color.ansi16m = {
118
+ rgb: wrapAnsi16m(rgb2rgb, 0)
119
+ };
120
+
121
+ styles.bgColor.ansi = {
122
+ ansi: wrapAnsi16(ansi2ansi, 10)
123
+ };
124
+ styles.bgColor.ansi256 = {
125
+ ansi256: wrapAnsi256(ansi2ansi, 10)
126
+ };
127
+ styles.bgColor.ansi16m = {
128
+ rgb: wrapAnsi16m(rgb2rgb, 10)
129
+ };
130
+
131
+ for (let key of Object.keys(colorConvert)) {
132
+ if (typeof colorConvert[key] !== 'object') {
133
+ continue;
134
+ }
135
+
136
+ const suite = colorConvert[key];
137
+
138
+ if (key === 'ansi16') {
139
+ key = 'ansi';
140
+ }
141
+
142
+ if ('ansi16' in suite) {
143
+ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
144
+ styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
145
+ }
146
+
147
+ if ('ansi256' in suite) {
148
+ styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
149
+ styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
150
+ }
151
+
152
+ if ('rgb' in suite) {
153
+ styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
154
+ styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
155
+ }
156
+ }
157
+
158
+ return styles;
159
+ }
160
+
161
+ // Make the export immutable
162
+ Object.defineProperty(module, 'exports', {
163
+ enumerable: true,
164
+ get: assembleStyles
165
+ });
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "ansi-styles",
3
+ "version": "3.2.1",
4
+ "description": "ANSI escape codes for styling strings in the terminal",
5
+ "license": "MIT",
6
+ "repository": "chalk/ansi-styles",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=4"
14
+ },
15
+ "scripts": {
16
+ "test": "xo && ava",
17
+ "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
18
+ },
19
+ "files": [
20
+ "index.js"
21
+ ],
22
+ "keywords": [
23
+ "ansi",
24
+ "styles",
25
+ "color",
26
+ "colour",
27
+ "colors",
28
+ "terminal",
29
+ "console",
30
+ "cli",
31
+ "string",
32
+ "tty",
33
+ "escape",
34
+ "formatting",
35
+ "rgb",
36
+ "256",
37
+ "shell",
38
+ "xterm",
39
+ "log",
40
+ "logging",
41
+ "command-line",
42
+ "text"
43
+ ],
44
+ "dependencies": {
45
+ "color-convert": "^1.9.0"
46
+ },
47
+ "devDependencies": {
48
+ "ava": "*",
49
+ "babel-polyfill": "^6.23.0",
50
+ "svg-term-cli": "^2.1.1",
51
+ "xo": "*"
52
+ },
53
+ "ava": {
54
+ "require": "babel-polyfill"
55
+ }
56
+
57
+ ,"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz"
58
+ ,"_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="
59
+ ,"_from": "ansi-styles@3.2.1"
60
+ }
@@ -0,0 +1,147 @@
1
+ # ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
2
+
3
+ > [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
4
+
5
+ You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
6
+
7
+ <img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
8
+
9
+
10
+ ## Install
11
+
12
+ ```
13
+ $ npm install ansi-styles
14
+ ```
15
+
16
+
17
+ ## Usage
18
+
19
+ ```js
20
+ const style = require('ansi-styles');
21
+
22
+ console.log(`${style.green.open}Hello world!${style.green.close}`);
23
+
24
+
25
+ // Color conversion between 16/256/truecolor
26
+ // NOTE: If conversion goes to 16 colors or 256 colors, the original color
27
+ // may be degraded to fit that color palette. This means terminals
28
+ // that do not support 16 million colors will best-match the
29
+ // original color.
30
+ console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
31
+ console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
32
+ console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
33
+ ```
34
+
35
+ ## API
36
+
37
+ Each style has an `open` and `close` property.
38
+
39
+
40
+ ## Styles
41
+
42
+ ### Modifiers
43
+
44
+ - `reset`
45
+ - `bold`
46
+ - `dim`
47
+ - `italic` *(Not widely supported)*
48
+ - `underline`
49
+ - `inverse`
50
+ - `hidden`
51
+ - `strikethrough` *(Not widely supported)*
52
+
53
+ ### Colors
54
+
55
+ - `black`
56
+ - `red`
57
+ - `green`
58
+ - `yellow`
59
+ - `blue`
60
+ - `magenta`
61
+ - `cyan`
62
+ - `white`
63
+ - `gray` ("bright black")
64
+ - `redBright`
65
+ - `greenBright`
66
+ - `yellowBright`
67
+ - `blueBright`
68
+ - `magentaBright`
69
+ - `cyanBright`
70
+ - `whiteBright`
71
+
72
+ ### Background colors
73
+
74
+ - `bgBlack`
75
+ - `bgRed`
76
+ - `bgGreen`
77
+ - `bgYellow`
78
+ - `bgBlue`
79
+ - `bgMagenta`
80
+ - `bgCyan`
81
+ - `bgWhite`
82
+ - `bgBlackBright`
83
+ - `bgRedBright`
84
+ - `bgGreenBright`
85
+ - `bgYellowBright`
86
+ - `bgBlueBright`
87
+ - `bgMagentaBright`
88
+ - `bgCyanBright`
89
+ - `bgWhiteBright`
90
+
91
+
92
+ ## Advanced usage
93
+
94
+ By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
95
+
96
+ - `style.modifier`
97
+ - `style.color`
98
+ - `style.bgColor`
99
+
100
+ ###### Example
101
+
102
+ ```js
103
+ console.log(style.color.green.open);
104
+ ```
105
+
106
+ Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
107
+
108
+ ###### Example
109
+
110
+ ```js
111
+ console.log(style.codes.get(36));
112
+ //=> 39
113
+ ```
114
+
115
+
116
+ ## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
117
+
118
+ `ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
119
+
120
+ To use these, call the associated conversion function with the intended output, for example:
121
+
122
+ ```js
123
+ style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
124
+ style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
125
+
126
+ style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
127
+ style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
128
+
129
+ style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
130
+ style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
131
+ ```
132
+
133
+
134
+ ## Related
135
+
136
+ - [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
137
+
138
+
139
+ ## Maintainers
140
+
141
+ - [Sindre Sorhus](https://github.com/sindresorhus)
142
+ - [Josh Junon](https://github.com/qix-)
143
+
144
+
145
+ ## License
146
+
147
+ MIT
@@ -0,0 +1,2 @@
1
+ tidelift: "npm/balanced-match"
2
+ patreon: juliangruber
@@ -0,0 +1,21 @@
1
+ (MIT)
2
+
3
+ Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,97 @@
1
+ # balanced-match
2
+
3
+ Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
4
+
5
+ [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
6
+ [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
7
+
8
+ [![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
9
+
10
+ ## Example
11
+
12
+ Get the first matching pair of braces:
13
+
14
+ ```js
15
+ var balanced = require('balanced-match');
16
+
17
+ console.log(balanced('{', '}', 'pre{in{nested}}post'));
18
+ console.log(balanced('{', '}', 'pre{first}between{second}post'));
19
+ console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
20
+ ```
21
+
22
+ The matches are:
23
+
24
+ ```bash
25
+ $ node example.js
26
+ { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
27
+ { start: 3,
28
+ end: 9,
29
+ pre: 'pre',
30
+ body: 'first',
31
+ post: 'between{second}post' }
32
+ { start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
33
+ ```
34
+
35
+ ## API
36
+
37
+ ### var m = balanced(a, b, str)
38
+
39
+ For the first non-nested matching pair of `a` and `b` in `str`, return an
40
+ object with those keys:
41
+
42
+ * **start** the index of the first match of `a`
43
+ * **end** the index of the matching `b`
44
+ * **pre** the preamble, `a` and `b` not included
45
+ * **body** the match, `a` and `b` not included
46
+ * **post** the postscript, `a` and `b` not included
47
+
48
+ If there's no match, `undefined` will be returned.
49
+
50
+ If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
51
+
52
+ ### var r = balanced.range(a, b, str)
53
+
54
+ For the first non-nested matching pair of `a` and `b` in `str`, return an
55
+ array with indexes: `[ <a index>, <b index> ]`.
56
+
57
+ If there's no match, `undefined` will be returned.
58
+
59
+ If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
60
+
61
+ ## Installation
62
+
63
+ With [npm](https://npmjs.org) do:
64
+
65
+ ```bash
66
+ npm install balanced-match
67
+ ```
68
+
69
+ ## Security contact information
70
+
71
+ To report a security vulnerability, please use the
72
+ [Tidelift security contact](https://tidelift.com/security).
73
+ Tidelift will coordinate the fix and disclosure.
74
+
75
+ ## License
76
+
77
+ (MIT)
78
+
79
+ Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
80
+
81
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
82
+ this software and associated documentation files (the "Software"), to deal in
83
+ the Software without restriction, including without limitation the rights to
84
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
85
+ of the Software, and to permit persons to whom the Software is furnished to do
86
+ so, subject to the following conditions:
87
+
88
+ The above copyright notice and this permission notice shall be included in all
89
+ copies or substantial portions of the Software.
90
+
91
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
94
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
95
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
96
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
97
+ SOFTWARE.
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+ module.exports = balanced;
3
+ function balanced(a, b, str) {
4
+ if (a instanceof RegExp) a = maybeMatch(a, str);
5
+ if (b instanceof RegExp) b = maybeMatch(b, str);
6
+
7
+ var r = range(a, b, str);
8
+
9
+ return r && {
10
+ start: r[0],
11
+ end: r[1],
12
+ pre: str.slice(0, r[0]),
13
+ body: str.slice(r[0] + a.length, r[1]),
14
+ post: str.slice(r[1] + b.length)
15
+ };
16
+ }
17
+
18
+ function maybeMatch(reg, str) {
19
+ var m = str.match(reg);
20
+ return m ? m[0] : null;
21
+ }
22
+
23
+ balanced.range = range;
24
+ function range(a, b, str) {
25
+ var begs, beg, left, right, result;
26
+ var ai = str.indexOf(a);
27
+ var bi = str.indexOf(b, ai + 1);
28
+ var i = ai;
29
+
30
+ if (ai >= 0 && bi > 0) {
31
+ if(a===b) {
32
+ return [ai, bi];
33
+ }
34
+ begs = [];
35
+ left = str.length;
36
+
37
+ while (i >= 0 && !result) {
38
+ if (i == ai) {
39
+ begs.push(i);
40
+ ai = str.indexOf(a, i + 1);
41
+ } else if (begs.length == 1) {
42
+ result = [ begs.pop(), bi ];
43
+ } else {
44
+ beg = begs.pop();
45
+ if (beg < left) {
46
+ left = beg;
47
+ right = bi;
48
+ }
49
+
50
+ bi = str.indexOf(b, i + 1);
51
+ }
52
+
53
+ i = ai < bi && ai >= 0 ? ai : bi;
54
+ }
55
+
56
+ if (begs.length) {
57
+ result = [ left, right ];
58
+ }
59
+ }
60
+
61
+ return result;
62
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "balanced-match",
3
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
4
+ "version": "1.0.2",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/juliangruber/balanced-match.git"
8
+ },
9
+ "homepage": "https://github.com/juliangruber/balanced-match",
10
+ "main": "index.js",
11
+ "scripts": {
12
+ "test": "tape test/test.js",
13
+ "bench": "matcha test/bench.js"
14
+ },
15
+ "devDependencies": {
16
+ "matcha": "^0.7.0",
17
+ "tape": "^4.6.0"
18
+ },
19
+ "keywords": [
20
+ "match",
21
+ "regexp",
22
+ "test",
23
+ "balanced",
24
+ "parse"
25
+ ],
26
+ "author": {
27
+ "name": "Julian Gruber",
28
+ "email": "mail@juliangruber.com",
29
+ "url": "http://juliangruber.com"
30
+ },
31
+ "license": "MIT",
32
+ "testling": {
33
+ "files": "test/*.js",
34
+ "browsers": [
35
+ "ie/8..latest",
36
+ "firefox/20..latest",
37
+ "firefox/nightly",
38
+ "chrome/25..latest",
39
+ "chrome/canary",
40
+ "opera/12..latest",
41
+ "opera/next",
42
+ "safari/5.1..latest",
43
+ "ipad/6.0..latest",
44
+ "iphone/6.0..latest",
45
+ "android-browser/4.2..latest"
46
+ ]
47
+ }
48
+
49
+ ,"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
50
+ ,"_integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
51
+ ,"_from": "balanced-match@1.0.2"
52
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.