projen 0.91.16 → 0.91.18

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 (493) hide show
  1. package/.jsii +62 -18
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/auto-queue.js +1 -1
  42. package/lib/github/dependabot.js +1 -1
  43. package/lib/github/github-credentials.js +1 -1
  44. package/lib/github/github-project.js +1 -1
  45. package/lib/github/github.js +1 -1
  46. package/lib/github/merge-queue.js +1 -1
  47. package/lib/github/mergify.js +1 -1
  48. package/lib/github/pr-template.js +1 -1
  49. package/lib/github/pull-request-backport.js +1 -1
  50. package/lib/github/pull-request-lint.js +1 -1
  51. package/lib/github/stale.js +1 -1
  52. package/lib/github/task-workflow-job.js +1 -1
  53. package/lib/github/task-workflow.js +1 -1
  54. package/lib/github/workflow-actions.js +1 -1
  55. package/lib/github/workflow-jobs.js +1 -1
  56. package/lib/github/workflow-steps.js +1 -1
  57. package/lib/github/workflows.d.ts +10 -0
  58. package/lib/github/workflows.js +4 -2
  59. package/lib/gitlab/configuration.js +1 -1
  60. package/lib/gitlab/gitlab-configuration.js +1 -1
  61. package/lib/gitlab/nested-configuration.js +1 -1
  62. package/lib/gitpod.js +1 -1
  63. package/lib/ignore-file.js +1 -1
  64. package/lib/ini.js +1 -1
  65. package/lib/java/java-project.js +1 -1
  66. package/lib/java/junit.js +1 -1
  67. package/lib/java/maven-compile.js +1 -1
  68. package/lib/java/maven-packaging.js +1 -1
  69. package/lib/java/maven-sample.js +1 -1
  70. package/lib/java/pom.js +2 -2
  71. package/lib/java/projenrc.js +1 -1
  72. package/lib/javascript/bundler.js +1 -1
  73. package/lib/javascript/eslint.js +1 -1
  74. package/lib/javascript/jest.js +4 -4
  75. package/lib/javascript/license-checker.js +1 -1
  76. package/lib/javascript/node-package.js +1 -1
  77. package/lib/javascript/node-project.js +1 -1
  78. package/lib/javascript/npm-config.js +1 -1
  79. package/lib/javascript/prettier.js +1 -1
  80. package/lib/javascript/projenrc.js +1 -1
  81. package/lib/javascript/typescript-config.js +2 -2
  82. package/lib/javascript/upgrade-dependencies.js +2 -2
  83. package/lib/javascript/yarnrc.js +1 -1
  84. package/lib/json-patch.js +1 -1
  85. package/lib/json.js +1 -1
  86. package/lib/license.js +1 -1
  87. package/lib/logger.js +1 -1
  88. package/lib/makefile.js +1 -1
  89. package/lib/object-file.js +1 -1
  90. package/lib/project-build.js +1 -1
  91. package/lib/project-tree.js +1 -1
  92. package/lib/project.js +1 -1
  93. package/lib/projects.js +1 -1
  94. package/lib/projenrc-json.js +2 -2
  95. package/lib/projenrc.js +1 -1
  96. package/lib/python/pip.js +1 -1
  97. package/lib/python/poetry.js +2 -2
  98. package/lib/python/projenrc.js +1 -1
  99. package/lib/python/pytest-sample.js +1 -1
  100. package/lib/python/pytest.js +1 -1
  101. package/lib/python/python-project.js +1 -1
  102. package/lib/python/python-sample.js +1 -1
  103. package/lib/python/requirements-file.js +1 -1
  104. package/lib/python/setuppy.js +1 -1
  105. package/lib/python/setuptools.js +1 -1
  106. package/lib/python/venv.js +1 -1
  107. package/lib/readme.js +1 -1
  108. package/lib/release/publisher.js +1 -1
  109. package/lib/release/release-trigger.js +1 -1
  110. package/lib/release/release.js +1 -1
  111. package/lib/renovatebot.js +1 -1
  112. package/lib/sample-file.js +2 -2
  113. package/lib/semver.js +1 -1
  114. package/lib/source-code.js +1 -1
  115. package/lib/task-runtime.js +1 -1
  116. package/lib/task.js +1 -1
  117. package/lib/tasks.js +1 -1
  118. package/lib/testing.js +1 -1
  119. package/lib/textfile.js +1 -1
  120. package/lib/toml.js +1 -1
  121. package/lib/typescript/projenrc-ts.js +1 -1
  122. package/lib/typescript/projenrc.js +1 -1
  123. package/lib/typescript/typescript-typedoc.js +1 -1
  124. package/lib/typescript/typescript.js +6 -6
  125. package/lib/version.js +2 -2
  126. package/lib/vscode/devcontainer.js +1 -1
  127. package/lib/vscode/extensions.js +1 -1
  128. package/lib/vscode/launch-config.js +1 -1
  129. package/lib/vscode/settings.js +1 -1
  130. package/lib/vscode/vscode.js +1 -1
  131. package/lib/web/next.js +3 -3
  132. package/lib/web/postcss.js +1 -1
  133. package/lib/web/react.js +4 -4
  134. package/lib/web/tailwind.js +1 -1
  135. package/lib/xmlfile.js +1 -1
  136. package/lib/yaml.js +1 -1
  137. package/node_modules/{minimatch/node_modules/brace-expansion → @nodelib/fs.scandir}/LICENSE +2 -2
  138. package/node_modules/@nodelib/fs.scandir/README.md +171 -0
  139. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  140. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
  141. package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
  142. package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
  143. package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
  144. package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
  145. package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  146. package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
  147. package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
  148. package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
  149. package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
  150. package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
  151. package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  152. package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
  153. package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  154. package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
  155. package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
  156. package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
  157. package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
  158. package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
  159. package/node_modules/@nodelib/fs.scandir/package.json +44 -0
  160. package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
  161. package/node_modules/@nodelib/fs.stat/README.md +126 -0
  162. package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  163. package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
  164. package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
  165. package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
  166. package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  167. package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
  168. package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
  169. package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
  170. package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
  171. package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
  172. package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  173. package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
  174. package/node_modules/@nodelib/fs.stat/package.json +37 -0
  175. package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
  176. package/node_modules/@nodelib/fs.walk/README.md +215 -0
  177. package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
  178. package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
  179. package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  180. package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
  181. package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
  182. package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
  183. package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
  184. package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
  185. package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
  186. package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
  187. package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  188. package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
  189. package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
  190. package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
  191. package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  192. package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
  193. package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
  194. package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
  195. package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
  196. package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
  197. package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  198. package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
  199. package/node_modules/@nodelib/fs.walk/package.json +44 -0
  200. package/node_modules/braces/LICENSE +21 -0
  201. package/node_modules/braces/README.md +586 -0
  202. package/node_modules/braces/index.js +170 -0
  203. package/node_modules/braces/lib/compile.js +60 -0
  204. package/node_modules/braces/lib/constants.js +57 -0
  205. package/node_modules/braces/lib/expand.js +113 -0
  206. package/node_modules/braces/lib/parse.js +331 -0
  207. package/node_modules/braces/lib/stringify.js +32 -0
  208. package/node_modules/braces/lib/utils.js +122 -0
  209. package/node_modules/braces/package.json +77 -0
  210. package/node_modules/end-of-stream/LICENSE +21 -0
  211. package/node_modules/end-of-stream/README.md +54 -0
  212. package/node_modules/end-of-stream/index.js +94 -0
  213. package/node_modules/end-of-stream/package.json +37 -0
  214. package/node_modules/execa/index.js +361 -0
  215. package/node_modules/execa/lib/errname.js +39 -0
  216. package/node_modules/execa/lib/stdio.js +41 -0
  217. package/node_modules/execa/license +9 -0
  218. package/node_modules/execa/node_modules/cross-spawn/LICENSE +21 -0
  219. package/node_modules/execa/node_modules/cross-spawn/README.md +94 -0
  220. package/node_modules/execa/node_modules/cross-spawn/index.js +39 -0
  221. package/node_modules/execa/node_modules/cross-spawn/lib/enoent.js +59 -0
  222. package/node_modules/execa/node_modules/cross-spawn/lib/parse.js +125 -0
  223. package/node_modules/execa/node_modules/cross-spawn/lib/util/escape.js +47 -0
  224. package/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js +32 -0
  225. package/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js +51 -0
  226. package/node_modules/execa/node_modules/cross-spawn/package.json +75 -0
  227. package/node_modules/execa/node_modules/semver/README.md +412 -0
  228. package/node_modules/execa/node_modules/semver/bin/semver +160 -0
  229. package/node_modules/execa/node_modules/semver/package.json +38 -0
  230. package/node_modules/execa/node_modules/semver/range.bnf +16 -0
  231. package/node_modules/execa/node_modules/semver/semver.js +1525 -0
  232. package/node_modules/execa/node_modules/shebang-command/index.js +19 -0
  233. package/node_modules/execa/node_modules/shebang-command/license +21 -0
  234. package/node_modules/execa/node_modules/shebang-command/package.json +39 -0
  235. package/node_modules/execa/node_modules/shebang-command/readme.md +39 -0
  236. package/node_modules/execa/node_modules/shebang-regex/index.js +2 -0
  237. package/node_modules/execa/node_modules/shebang-regex/package.json +32 -0
  238. package/node_modules/execa/node_modules/shebang-regex/readme.md +29 -0
  239. package/node_modules/{shelljs/node_modules/glob → execa/node_modules/which}/LICENSE +0 -6
  240. package/node_modules/execa/node_modules/which/README.md +51 -0
  241. package/node_modules/execa/node_modules/which/bin/which +52 -0
  242. package/node_modules/execa/node_modules/which/package.json +30 -0
  243. package/node_modules/execa/node_modules/which/which.js +135 -0
  244. package/node_modules/execa/package.json +69 -0
  245. package/node_modules/execa/readme.md +327 -0
  246. package/node_modules/fast-glob/LICENSE +21 -0
  247. package/node_modules/fast-glob/README.md +830 -0
  248. package/node_modules/fast-glob/node_modules/glob-parent/LICENSE +15 -0
  249. package/node_modules/fast-glob/node_modules/glob-parent/README.md +137 -0
  250. package/node_modules/fast-glob/node_modules/glob-parent/index.js +42 -0
  251. package/node_modules/fast-glob/node_modules/glob-parent/package.json +48 -0
  252. package/node_modules/fast-glob/out/index.d.ts +40 -0
  253. package/node_modules/fast-glob/out/index.js +102 -0
  254. package/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
  255. package/node_modules/fast-glob/out/managers/tasks.js +110 -0
  256. package/node_modules/fast-glob/out/providers/async.d.ts +9 -0
  257. package/node_modules/fast-glob/out/providers/async.js +23 -0
  258. package/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
  259. package/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
  260. package/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
  261. package/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
  262. package/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
  263. package/node_modules/fast-glob/out/providers/filters/error.js +15 -0
  264. package/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
  265. package/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
  266. package/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
  267. package/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
  268. package/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
  269. package/node_modules/fast-glob/out/providers/provider.js +48 -0
  270. package/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
  271. package/node_modules/fast-glob/out/providers/stream.js +31 -0
  272. package/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
  273. package/node_modules/fast-glob/out/providers/sync.js +23 -0
  274. package/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
  275. package/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
  276. package/node_modules/fast-glob/out/readers/async.d.ts +10 -0
  277. package/node_modules/fast-glob/out/readers/async.js +35 -0
  278. package/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
  279. package/node_modules/fast-glob/out/readers/reader.js +33 -0
  280. package/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
  281. package/node_modules/fast-glob/out/readers/stream.js +55 -0
  282. package/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
  283. package/node_modules/fast-glob/out/readers/sync.js +43 -0
  284. package/node_modules/fast-glob/out/settings.d.ts +164 -0
  285. package/node_modules/fast-glob/out/settings.js +59 -0
  286. package/node_modules/fast-glob/out/types/index.d.ts +31 -0
  287. package/node_modules/fast-glob/out/types/index.js +2 -0
  288. package/node_modules/fast-glob/out/utils/array.d.ts +2 -0
  289. package/node_modules/fast-glob/out/utils/array.js +22 -0
  290. package/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
  291. package/node_modules/fast-glob/out/utils/errno.js +7 -0
  292. package/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
  293. package/node_modules/fast-glob/out/utils/fs.js +19 -0
  294. package/node_modules/fast-glob/out/utils/index.d.ts +8 -0
  295. package/node_modules/fast-glob/out/utils/index.js +17 -0
  296. package/node_modules/fast-glob/out/utils/path.d.ts +13 -0
  297. package/node_modules/fast-glob/out/utils/path.js +68 -0
  298. package/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
  299. package/node_modules/fast-glob/out/utils/pattern.js +206 -0
  300. package/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
  301. package/node_modules/fast-glob/out/utils/stream.js +17 -0
  302. package/node_modules/fast-glob/out/utils/string.d.ts +2 -0
  303. package/node_modules/fast-glob/out/utils/string.js +11 -0
  304. package/node_modules/fast-glob/package.json +81 -0
  305. package/node_modules/fastq/.github/dependabot.yml +11 -0
  306. package/node_modules/fastq/.github/workflows/ci.yml +75 -0
  307. package/node_modules/fastq/LICENSE +13 -0
  308. package/node_modules/fastq/README.md +312 -0
  309. package/node_modules/fastq/SECURITY.md +15 -0
  310. package/node_modules/fastq/bench.js +66 -0
  311. package/node_modules/fastq/example.js +14 -0
  312. package/node_modules/fastq/example.mjs +11 -0
  313. package/node_modules/fastq/index.d.ts +57 -0
  314. package/node_modules/fastq/package.json +53 -0
  315. package/node_modules/fastq/queue.js +311 -0
  316. package/node_modules/fastq/test/example.ts +83 -0
  317. package/node_modules/fastq/test/promise.js +291 -0
  318. package/node_modules/fastq/test/test.js +653 -0
  319. package/node_modules/fastq/test/tsconfig.json +11 -0
  320. package/node_modules/fill-range/LICENSE +21 -0
  321. package/node_modules/fill-range/README.md +237 -0
  322. package/node_modules/fill-range/index.js +248 -0
  323. package/node_modules/fill-range/package.json +74 -0
  324. package/node_modules/get-stream/buffer-stream.js +51 -0
  325. package/node_modules/get-stream/index.js +50 -0
  326. package/node_modules/get-stream/license +9 -0
  327. package/node_modules/get-stream/package.json +46 -0
  328. package/node_modules/get-stream/readme.md +123 -0
  329. package/node_modules/is-extglob/LICENSE +21 -0
  330. package/node_modules/is-extglob/README.md +107 -0
  331. package/node_modules/is-extglob/index.js +20 -0
  332. package/node_modules/is-extglob/package.json +69 -0
  333. package/node_modules/is-glob/LICENSE +21 -0
  334. package/node_modules/is-glob/README.md +206 -0
  335. package/node_modules/is-glob/index.js +150 -0
  336. package/node_modules/is-glob/package.json +81 -0
  337. package/node_modules/is-number/LICENSE +21 -0
  338. package/node_modules/is-number/README.md +187 -0
  339. package/node_modules/is-number/index.js +18 -0
  340. package/node_modules/is-number/package.json +82 -0
  341. package/node_modules/is-stream/index.js +21 -0
  342. package/node_modules/is-stream/license +21 -0
  343. package/node_modules/is-stream/package.json +38 -0
  344. package/node_modules/is-stream/readme.md +42 -0
  345. package/node_modules/isexe/.npmignore +2 -0
  346. package/node_modules/isexe/LICENSE +15 -0
  347. package/node_modules/isexe/README.md +51 -0
  348. package/node_modules/isexe/index.js +57 -0
  349. package/node_modules/isexe/mode.js +41 -0
  350. package/node_modules/isexe/package.json +31 -0
  351. package/node_modules/isexe/test/basic.js +221 -0
  352. package/node_modules/isexe/windows.js +42 -0
  353. package/node_modules/merge2/LICENSE +21 -0
  354. package/node_modules/merge2/README.md +144 -0
  355. package/node_modules/merge2/index.js +144 -0
  356. package/node_modules/merge2/package.json +43 -0
  357. package/node_modules/micromatch/LICENSE +21 -0
  358. package/node_modules/micromatch/README.md +1024 -0
  359. package/node_modules/micromatch/index.js +474 -0
  360. package/node_modules/micromatch/package.json +119 -0
  361. package/node_modules/nice-try/LICENSE +21 -0
  362. package/node_modules/nice-try/README.md +32 -0
  363. package/node_modules/nice-try/package.json +33 -0
  364. package/node_modules/nice-try/src/index.js +12 -0
  365. package/node_modules/npm-run-path/index.js +39 -0
  366. package/node_modules/npm-run-path/license +21 -0
  367. package/node_modules/npm-run-path/package.json +45 -0
  368. package/node_modules/npm-run-path/readme.md +81 -0
  369. package/node_modules/p-finally/index.js +15 -0
  370. package/node_modules/p-finally/license +21 -0
  371. package/node_modules/p-finally/package.json +42 -0
  372. package/node_modules/p-finally/readme.md +47 -0
  373. package/node_modules/path-key/index.js +13 -0
  374. package/node_modules/path-key/license +21 -0
  375. package/node_modules/path-key/package.json +39 -0
  376. package/node_modules/path-key/readme.md +51 -0
  377. package/node_modules/picomatch/LICENSE +21 -0
  378. package/node_modules/picomatch/README.md +708 -0
  379. package/node_modules/picomatch/index.js +3 -0
  380. package/node_modules/picomatch/lib/constants.js +179 -0
  381. package/node_modules/picomatch/lib/parse.js +1091 -0
  382. package/node_modules/picomatch/lib/picomatch.js +342 -0
  383. package/node_modules/picomatch/lib/scan.js +391 -0
  384. package/node_modules/picomatch/lib/utils.js +64 -0
  385. package/node_modules/picomatch/package.json +81 -0
  386. package/node_modules/pump/.github/FUNDING.yml +2 -0
  387. package/node_modules/pump/.travis.yml +5 -0
  388. package/node_modules/pump/LICENSE +21 -0
  389. package/node_modules/pump/README.md +74 -0
  390. package/node_modules/pump/SECURITY.md +5 -0
  391. package/node_modules/pump/index.js +86 -0
  392. package/node_modules/pump/package.json +24 -0
  393. package/node_modules/pump/test-browser.js +66 -0
  394. package/node_modules/pump/test-node.js +53 -0
  395. package/node_modules/{concat-map → queue-microtask}/LICENSE +3 -1
  396. package/node_modules/queue-microtask/README.md +90 -0
  397. package/node_modules/queue-microtask/index.d.ts +2 -0
  398. package/node_modules/queue-microtask/index.js +9 -0
  399. package/node_modules/queue-microtask/package.json +55 -0
  400. package/node_modules/reusify/.github/dependabot.yml +7 -0
  401. package/node_modules/reusify/.github/workflows/ci.yml +96 -0
  402. package/node_modules/reusify/LICENSE +22 -0
  403. package/node_modules/reusify/README.md +139 -0
  404. package/node_modules/reusify/SECURITY.md +15 -0
  405. package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
  406. package/node_modules/reusify/benchmarks/fib.js +13 -0
  407. package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
  408. package/node_modules/reusify/eslint.config.js +14 -0
  409. package/node_modules/reusify/package.json +50 -0
  410. package/node_modules/reusify/reusify.d.ts +14 -0
  411. package/node_modules/reusify/reusify.js +33 -0
  412. package/node_modules/reusify/test.js +66 -0
  413. package/node_modules/reusify/tsconfig.json +11 -0
  414. package/node_modules/run-parallel/LICENSE +20 -0
  415. package/node_modules/run-parallel/README.md +85 -0
  416. package/node_modules/run-parallel/index.js +51 -0
  417. package/node_modules/run-parallel/package.json +58 -0
  418. package/node_modules/shelljs/LICENSE +23 -20
  419. package/node_modules/shelljs/README.md +173 -65
  420. package/node_modules/shelljs/package.json +38 -22
  421. package/node_modules/shelljs/plugin.js +1 -1
  422. package/node_modules/shelljs/shell.js +70 -12
  423. package/node_modules/shelljs/src/cat.js +3 -3
  424. package/node_modules/shelljs/src/cd.js +2 -1
  425. package/node_modules/shelljs/src/chmod.js +17 -11
  426. package/node_modules/shelljs/src/cmd.js +122 -0
  427. package/node_modules/shelljs/src/common.js +103 -29
  428. package/node_modules/shelljs/src/cp.js +24 -14
  429. package/node_modules/shelljs/src/dirs.js +7 -9
  430. package/node_modules/shelljs/src/echo.js +1 -2
  431. package/node_modules/shelljs/src/errorCode.js +10 -0
  432. package/node_modules/shelljs/src/exec-child.js +60 -28
  433. package/node_modules/shelljs/src/exec.js +39 -10
  434. package/node_modules/shelljs/src/find.js +8 -3
  435. package/node_modules/shelljs/src/grep.js +15 -4
  436. package/node_modules/shelljs/src/head.js +1 -1
  437. package/node_modules/shelljs/src/ln.js +3 -1
  438. package/node_modules/shelljs/src/ls.js +29 -15
  439. package/node_modules/shelljs/src/mkdir.js +13 -11
  440. package/node_modules/shelljs/src/mv.js +4 -3
  441. package/node_modules/shelljs/src/pwd.js +1 -1
  442. package/node_modules/shelljs/src/rm.js +11 -11
  443. package/node_modules/shelljs/src/sed.js +12 -4
  444. package/node_modules/shelljs/src/set.js +0 -1
  445. package/node_modules/shelljs/src/sort.js +3 -2
  446. package/node_modules/shelljs/src/tail.js +12 -2
  447. package/node_modules/shelljs/src/test.js +3 -2
  448. package/node_modules/shelljs/src/to.js +2 -1
  449. package/node_modules/shelljs/src/toEnd.js +2 -1
  450. package/node_modules/shelljs/src/touch.js +13 -7
  451. package/node_modules/shelljs/src/uniq.js +5 -4
  452. package/node_modules/shelljs/src/which.js +5 -4
  453. package/node_modules/shx/README.md +27 -15
  454. package/node_modules/shx/lib/help.js +1 -1
  455. package/node_modules/shx/lib/shx.js +13 -8
  456. package/node_modules/shx/package.json +17 -25
  457. package/node_modules/signal-exit/LICENSE.txt +16 -0
  458. package/node_modules/signal-exit/README.md +39 -0
  459. package/node_modules/signal-exit/index.js +202 -0
  460. package/node_modules/signal-exit/package.json +38 -0
  461. package/node_modules/signal-exit/signals.js +53 -0
  462. package/node_modules/strip-eof/index.js +15 -0
  463. package/node_modules/strip-eof/license +21 -0
  464. package/node_modules/strip-eof/package.json +39 -0
  465. package/node_modules/strip-eof/readme.md +28 -0
  466. package/node_modules/to-regex-range/LICENSE +21 -0
  467. package/node_modules/to-regex-range/README.md +305 -0
  468. package/node_modules/to-regex-range/index.js +288 -0
  469. package/node_modules/to-regex-range/package.json +88 -0
  470. package/package.json +2 -2
  471. package/node_modules/concat-map/.travis.yml +0 -4
  472. package/node_modules/concat-map/README.markdown +0 -62
  473. package/node_modules/concat-map/example/map.js +0 -6
  474. package/node_modules/concat-map/index.js +0 -13
  475. package/node_modules/concat-map/package.json +0 -43
  476. package/node_modules/concat-map/test/map.js +0 -39
  477. package/node_modules/minimatch/README.md +0 -230
  478. package/node_modules/minimatch/minimatch.js +0 -947
  479. package/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  480. package/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  481. package/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  482. package/node_modules/minimatch/package.json +0 -33
  483. package/node_modules/path-is-absolute/index.js +0 -20
  484. package/node_modules/path-is-absolute/package.json +0 -43
  485. package/node_modules/path-is-absolute/readme.md +0 -59
  486. package/node_modules/shelljs/commands.js +0 -29
  487. package/node_modules/shelljs/node_modules/glob/README.md +0 -378
  488. package/node_modules/shelljs/node_modules/glob/common.js +0 -238
  489. package/node_modules/shelljs/node_modules/glob/glob.js +0 -790
  490. package/node_modules/shelljs/node_modules/glob/package.json +0 -55
  491. package/node_modules/shelljs/node_modules/glob/sync.js +0 -486
  492. /package/node_modules/{minimatch → execa/node_modules/semver}/LICENSE +0 -0
  493. /package/node_modules/{path-is-absolute → execa/node_modules/shebang-regex}/license +0 -0
@@ -0,0 +1,86 @@
1
+ var once = require('once')
2
+ var eos = require('end-of-stream')
3
+ var fs
4
+
5
+ try {
6
+ fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
7
+ } catch (e) {}
8
+
9
+ var noop = function () {}
10
+ var ancient = /^v?\.0/.test(process.version)
11
+
12
+ var isFn = function (fn) {
13
+ return typeof fn === 'function'
14
+ }
15
+
16
+ var isFS = function (stream) {
17
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
18
+ if (!fs) return false // browser
19
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
20
+ }
21
+
22
+ var isRequest = function (stream) {
23
+ return stream.setHeader && isFn(stream.abort)
24
+ }
25
+
26
+ var destroyer = function (stream, reading, writing, callback) {
27
+ callback = once(callback)
28
+
29
+ var closed = false
30
+ stream.on('close', function () {
31
+ closed = true
32
+ })
33
+
34
+ eos(stream, {readable: reading, writable: writing}, function (err) {
35
+ if (err) return callback(err)
36
+ closed = true
37
+ callback()
38
+ })
39
+
40
+ var destroyed = false
41
+ return function (err) {
42
+ if (closed) return
43
+ if (destroyed) return
44
+ destroyed = true
45
+
46
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
47
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
48
+
49
+ if (isFn(stream.destroy)) return stream.destroy()
50
+
51
+ callback(err || new Error('stream was destroyed'))
52
+ }
53
+ }
54
+
55
+ var call = function (fn) {
56
+ fn()
57
+ }
58
+
59
+ var pipe = function (from, to) {
60
+ return from.pipe(to)
61
+ }
62
+
63
+ var pump = function () {
64
+ var streams = Array.prototype.slice.call(arguments)
65
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
66
+
67
+ if (Array.isArray(streams[0])) streams = streams[0]
68
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
69
+
70
+ var error
71
+ var destroys = streams.map(function (stream, i) {
72
+ var reading = i < streams.length - 1
73
+ var writing = i > 0
74
+ return destroyer(stream, reading, writing, function (err) {
75
+ if (!error) error = err
76
+ if (err) destroys.forEach(call)
77
+ if (reading) return
78
+ destroys.forEach(call)
79
+ callback(error)
80
+ })
81
+ })
82
+
83
+ return streams.reduce(pipe)
84
+ }
85
+
86
+ module.exports = pump
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "pump",
3
+ "version": "3.0.2",
4
+ "repository": "git://github.com/mafintosh/pump.git",
5
+ "license": "MIT",
6
+ "description": "pipe streams together and close all of them if one of them closes",
7
+ "browser": {
8
+ "fs": false
9
+ },
10
+ "keywords": [
11
+ "streams",
12
+ "pipe",
13
+ "destroy",
14
+ "callback"
15
+ ],
16
+ "author": "Mathias Buus Madsen <mathiasbuus@gmail.com>",
17
+ "dependencies": {
18
+ "end-of-stream": "^1.1.0",
19
+ "once": "^1.3.1"
20
+ },
21
+ "scripts": {
22
+ "test": "node test-browser.js && node test-node.js"
23
+ }
24
+ }
@@ -0,0 +1,66 @@
1
+ var stream = require('stream')
2
+ var pump = require('./index')
3
+
4
+ var rs = new stream.Readable()
5
+ var ws = new stream.Writable()
6
+
7
+ rs._read = function (size) {
8
+ this.push(Buffer(size).fill('abc'))
9
+ }
10
+
11
+ ws._write = function (chunk, encoding, cb) {
12
+ setTimeout(function () {
13
+ cb()
14
+ }, 100)
15
+ }
16
+
17
+ var toHex = function () {
18
+ var reverse = new (require('stream').Transform)()
19
+
20
+ reverse._transform = function (chunk, enc, callback) {
21
+ reverse.push(chunk.toString('hex'))
22
+ callback()
23
+ }
24
+
25
+ return reverse
26
+ }
27
+
28
+ var wsClosed = false
29
+ var rsClosed = false
30
+ var callbackCalled = false
31
+
32
+ var check = function () {
33
+ if (wsClosed && rsClosed && callbackCalled) {
34
+ console.log('test-browser.js passes')
35
+ clearTimeout(timeout)
36
+ }
37
+ }
38
+
39
+ ws.on('finish', function () {
40
+ wsClosed = true
41
+ check()
42
+ })
43
+
44
+ rs.on('end', function () {
45
+ rsClosed = true
46
+ check()
47
+ })
48
+
49
+ var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
50
+ callbackCalled = true
51
+ check()
52
+ })
53
+
54
+ if (res !== ws) {
55
+ throw new Error('should return last stream')
56
+ }
57
+
58
+ setTimeout(function () {
59
+ rs.push(null)
60
+ rs.emit('close')
61
+ }, 1000)
62
+
63
+ var timeout = setTimeout(function () {
64
+ check()
65
+ throw new Error('timeout')
66
+ }, 5000)
@@ -0,0 +1,53 @@
1
+ var pump = require('./index')
2
+
3
+ var rs = require('fs').createReadStream('/dev/random')
4
+ var ws = require('fs').createWriteStream('/dev/null')
5
+
6
+ var toHex = function () {
7
+ var reverse = new (require('stream').Transform)()
8
+
9
+ reverse._transform = function (chunk, enc, callback) {
10
+ reverse.push(chunk.toString('hex'))
11
+ callback()
12
+ }
13
+
14
+ return reverse
15
+ }
16
+
17
+ var wsClosed = false
18
+ var rsClosed = false
19
+ var callbackCalled = false
20
+
21
+ var check = function () {
22
+ if (wsClosed && rsClosed && callbackCalled) {
23
+ console.log('test-node.js passes')
24
+ clearTimeout(timeout)
25
+ }
26
+ }
27
+
28
+ ws.on('close', function () {
29
+ wsClosed = true
30
+ check()
31
+ })
32
+
33
+ rs.on('close', function () {
34
+ rsClosed = true
35
+ check()
36
+ })
37
+
38
+ var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
39
+ callbackCalled = true
40
+ check()
41
+ })
42
+
43
+ if (res !== ws) {
44
+ throw new Error('should return last stream')
45
+ }
46
+
47
+ setTimeout(function () {
48
+ rs.destroy()
49
+ }, 1000)
50
+
51
+ var timeout = setTimeout(function () {
52
+ throw new Error('timeout')
53
+ }, 5000)
@@ -1,4 +1,6 @@
1
- This software is released under the MIT license:
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Feross Aboukhadijeh
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
6
  this software and associated documentation files (the "Software"), to deal in
@@ -0,0 +1,90 @@
1
+ # queue-microtask [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
2
+
3
+ [ci-image]: https://img.shields.io/github/workflow/status/feross/queue-microtask/ci/master
4
+ [ci-url]: https://github.com/feross/queue-microtask/actions
5
+ [npm-image]: https://img.shields.io/npm/v/queue-microtask.svg
6
+ [npm-url]: https://npmjs.org/package/queue-microtask
7
+ [downloads-image]: https://img.shields.io/npm/dm/queue-microtask.svg
8
+ [downloads-url]: https://npmjs.org/package/queue-microtask
9
+ [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
10
+ [standard-url]: https://standardjs.com
11
+
12
+ ### fast, tiny [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) shim for modern engines
13
+
14
+ - Use [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) in all modern JS engines.
15
+ - No dependencies. Less than 10 lines. No shims or complicated fallbacks.
16
+ - Optimal performance in all modern environments
17
+ - Uses `queueMicrotask` in modern environments
18
+ - Fallback to `Promise.resolve().then(fn)` in Node.js 10 and earlier, and old browsers (same performance as `queueMicrotask`)
19
+
20
+ ## install
21
+
22
+ ```
23
+ npm install queue-microtask
24
+ ```
25
+
26
+ ## usage
27
+
28
+ ```js
29
+ const queueMicrotask = require('queue-microtask')
30
+
31
+ queueMicrotask(() => { /* this will run soon */ })
32
+ ```
33
+
34
+ ## What is `queueMicrotask` and why would one use it?
35
+
36
+ The `queueMicrotask` function is a WHATWG standard. It queues a microtask to be executed prior to control returning to the event loop.
37
+
38
+ A microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the event loop.
39
+
40
+ The code `queueMicrotask(fn)` is equivalent to the code `Promise.resolve().then(fn)`. It is also very similar to [`process.nextTick(fn)`](https://nodejs.org/api/process.html#process_process_nexttick_callback_args) in Node.
41
+
42
+ Using microtasks lets code run without interfering with any other, potentially higher priority, code that is pending, but before the JS engine regains control over the execution context.
43
+
44
+ See the [spec](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing) or [Node documentation](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback) for more information.
45
+
46
+ ## Who is this package for?
47
+
48
+ This package allows you to use `queueMicrotask` safely in all modern JS engines. Use it if you prioritize small JS bundle size over support for old browsers.
49
+
50
+ If you just need to support Node 12 and later, use `queueMicrotask` directly. If you need to support all versions of Node, use this package.
51
+
52
+ ## Why not use `process.nextTick`?
53
+
54
+ In Node, `queueMicrotask` and `process.nextTick` are [essentially equivalent](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback), though there are [subtle differences](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks) that don't matter in most situations.
55
+
56
+ You can think of `queueMicrotask` as a standardized version of `process.nextTick` that works in the browser. No need to rely on your browser bundler to shim `process` for the browser environment.
57
+
58
+ ## Why not use `setTimeout(fn, 0)`?
59
+
60
+ This approach is the most compatible, but it has problems. Modern browsers throttle timers severely, so `setTimeout(…, 0)` usually takes at least 4ms to run. Furthermore, the throttling gets even worse if the page is backgrounded. If you have many `setTimeout` calls, then this can severely limit the performance of your program.
61
+
62
+ ## Why not use a microtask library like [`immediate`](https://www.npmjs.com/package/immediate) or [`asap`](https://www.npmjs.com/package/asap)?
63
+
64
+ These packages are great! However, if you prioritize small JS bundle size over optimal performance in old browsers then you may want to consider this package.
65
+
66
+ This package (`queue-microtask`) is four times smaller than `immediate`, twice as small as `asap`, and twice as small as using `process.nextTick` and letting the browser bundler shim it automatically.
67
+
68
+ Note: This package throws an exception in JS environments which lack `Promise` support -- which are usually very old browsers and Node.js versions.
69
+
70
+ Since the `queueMicrotask` API is supported in Node.js, Chrome, Firefox, Safari, Opera, and Edge, **the vast majority of users will get optimal performance**. Any JS environment with `Promise`, which is almost all of them, also get optimal performance. If you need support for JS environments which lack `Promise` support, use one of the alternative packages.
71
+
72
+ ## What is a shim?
73
+
74
+ > In computer programming, a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere. – [Wikipedia](https://en.wikipedia.org/wiki/Shim_(computing))
75
+
76
+ This package could also be described as a "ponyfill".
77
+
78
+ > A ponyfill is almost the same as a polyfill, but not quite. Instead of patching functionality for older browsers, a ponyfill provides that functionality as a standalone module you can use. – [PonyFoo](https://ponyfoo.com/articles/polyfills-or-ponyfills)
79
+
80
+ ## API
81
+
82
+ ### `queueMicrotask(fn)`
83
+
84
+ The `queueMicrotask()` method queues a microtask.
85
+
86
+ The `fn` argument is a function to be executed after all pending tasks have completed but before yielding control to the browser's event loop.
87
+
88
+ ## license
89
+
90
+ MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org).
@@ -0,0 +1,2 @@
1
+ declare const queueMicrotask: (cb: () => void) => void
2
+ export = queueMicrotask
@@ -0,0 +1,9 @@
1
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2
+ let promise
3
+
4
+ module.exports = typeof queueMicrotask === 'function'
5
+ ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)
6
+ // reuse resolved promise, and allocate it lazily
7
+ : cb => (promise || (promise = Promise.resolve()))
8
+ .then(cb)
9
+ .catch(err => setTimeout(() => { throw err }, 0))
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "queue-microtask",
3
+ "description": "fast, tiny `queueMicrotask` shim for modern engines",
4
+ "version": "1.2.3",
5
+ "author": {
6
+ "name": "Feross Aboukhadijeh",
7
+ "email": "feross@feross.org",
8
+ "url": "https://feross.org"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/feross/queue-microtask/issues"
12
+ },
13
+ "devDependencies": {
14
+ "standard": "*",
15
+ "tape": "^5.2.2"
16
+ },
17
+ "funding": [
18
+ {
19
+ "type": "github",
20
+ "url": "https://github.com/sponsors/feross"
21
+ },
22
+ {
23
+ "type": "patreon",
24
+ "url": "https://www.patreon.com/feross"
25
+ },
26
+ {
27
+ "type": "consulting",
28
+ "url": "https://feross.org/support"
29
+ }
30
+ ],
31
+ "homepage": "https://github.com/feross/queue-microtask",
32
+ "keywords": [
33
+ "asap",
34
+ "immediate",
35
+ "micro task",
36
+ "microtask",
37
+ "nextTick",
38
+ "process.nextTick",
39
+ "queue micro task",
40
+ "queue microtask",
41
+ "queue-microtask",
42
+ "queueMicrotask",
43
+ "setImmediate",
44
+ "task"
45
+ ],
46
+ "license": "MIT",
47
+ "main": "index.js",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git://github.com/feross/queue-microtask.git"
51
+ },
52
+ "scripts": {
53
+ "test": "standard && tape test/*.js"
54
+ }
55
+ }
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
@@ -0,0 +1,96 @@
1
+ name: ci
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ legacy:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ matrix:
11
+ node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ persist-credentials: false
17
+
18
+ - name: Use Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: ${{ matrix.node-version }}
22
+
23
+ - name: Install
24
+ run: |
25
+ npm install --production && npm install tape
26
+
27
+ - name: Run tests
28
+ run: |
29
+ npm run test
30
+
31
+ test:
32
+ runs-on: ubuntu-latest
33
+
34
+ strategy:
35
+ matrix:
36
+ node-version: [18.x, 20.x, 22.x]
37
+
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ with:
41
+ persist-credentials: false
42
+
43
+ - name: Use Node.js
44
+ uses: actions/setup-node@v4
45
+ with:
46
+ node-version: ${{ matrix.node-version }}
47
+
48
+ - name: Install
49
+ run: |
50
+ npm install
51
+
52
+ - name: Run tests
53
+ run: |
54
+ npm run test:coverage
55
+
56
+ types:
57
+ runs-on: ubuntu-latest
58
+
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ with:
62
+ persist-credentials: false
63
+
64
+ - name: Use Node.js
65
+ uses: actions/setup-node@v4
66
+ with:
67
+ node-version: 22
68
+
69
+ - name: Install
70
+ run: |
71
+ npm install
72
+
73
+ - name: Run types tests
74
+ run: |
75
+ npm run test:typescript
76
+
77
+ lint:
78
+ runs-on: ubuntu-latest
79
+
80
+ steps:
81
+ - uses: actions/checkout@v4
82
+ with:
83
+ persist-credentials: false
84
+
85
+ - name: Use Node.js
86
+ uses: actions/setup-node@v4
87
+ with:
88
+ node-version: 22
89
+
90
+ - name: Install
91
+ run: |
92
+ npm install
93
+
94
+ - name: Lint
95
+ run: |
96
+ npm run lint
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2024 Matteo Collina
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.
22
+
@@ -0,0 +1,139 @@
1
+ # reusify
2
+
3
+ [![npm version][npm-badge]][npm-url]
4
+
5
+ Reuse your objects and functions for maximum speed. This technique will
6
+ make any function run ~10% faster. You call your functions a
7
+ lot, and it adds up quickly in hot code paths.
8
+
9
+ ```
10
+ $ node benchmarks/createNoCodeFunction.js
11
+ Total time 53133
12
+ Total iterations 100000000
13
+ Iteration/s 1882069.5236482036
14
+
15
+ $ node benchmarks/reuseNoCodeFunction.js
16
+ Total time 50617
17
+ Total iterations 100000000
18
+ Iteration/s 1975620.838848608
19
+ ```
20
+
21
+ The above benchmark uses fibonacci to simulate a real high-cpu load.
22
+ The actual numbers might differ for your use case, but the difference
23
+ should not.
24
+
25
+ The benchmark was taken using Node v6.10.0.
26
+
27
+ This library was extracted from
28
+ [fastparallel](http://npm.im/fastparallel).
29
+
30
+ ## Example
31
+
32
+ ```js
33
+ var reusify = require('reusify')
34
+ var fib = require('reusify/benchmarks/fib')
35
+ var instance = reusify(MyObject)
36
+
37
+ // get an object from the cache,
38
+ // or creates a new one when cache is empty
39
+ var obj = instance.get()
40
+
41
+ // set the state
42
+ obj.num = 100
43
+ obj.func()
44
+
45
+ // reset the state.
46
+ // if the state contains any external object
47
+ // do not use delete operator (it is slow)
48
+ // prefer set them to null
49
+ obj.num = 0
50
+
51
+ // store an object in the cache
52
+ instance.release(obj)
53
+
54
+ function MyObject () {
55
+ // you need to define this property
56
+ // so V8 can compile MyObject into an
57
+ // hidden class
58
+ this.next = null
59
+ this.num = 0
60
+
61
+ var that = this
62
+
63
+ // this function is never reallocated,
64
+ // so it can be optimized by V8
65
+ this.func = function () {
66
+ if (null) {
67
+ // do nothing
68
+ } else {
69
+ // calculates fibonacci
70
+ fib(that.num)
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ The above example was intended for synchronous code, let's see async:
77
+ ```js
78
+ var reusify = require('reusify')
79
+ var instance = reusify(MyObject)
80
+
81
+ for (var i = 0; i < 100; i++) {
82
+ getData(i, console.log)
83
+ }
84
+
85
+ function getData (value, cb) {
86
+ var obj = instance.get()
87
+
88
+ obj.value = value
89
+ obj.cb = cb
90
+ obj.run()
91
+ }
92
+
93
+ function MyObject () {
94
+ this.next = null
95
+ this.value = null
96
+
97
+ var that = this
98
+
99
+ this.run = function () {
100
+ asyncOperation(that.value, that.handle)
101
+ }
102
+
103
+ this.handle = function (err, result) {
104
+ that.cb(err, result)
105
+ that.value = null
106
+ that.cb = null
107
+ instance.release(that)
108
+ }
109
+ }
110
+ ```
111
+
112
+ Also note how in the above examples, the code, that consumes an instance of `MyObject`,
113
+ reset the state to initial condition, just before storing it in the cache.
114
+ That's needed so that every subsequent request for an instance from the cache,
115
+ could get a clean instance.
116
+
117
+ ## Why
118
+
119
+ It is faster because V8 doesn't have to collect all the functions you
120
+ create. On a short-lived benchmark, it is as fast as creating the
121
+ nested function, but on a longer time frame it creates less
122
+ pressure on the garbage collector.
123
+
124
+ ## Other examples
125
+ If you want to see some complex example, checkout [middie](https://github.com/fastify/middie) and [steed](https://github.com/mcollina/steed).
126
+
127
+ ## Acknowledgements
128
+
129
+ Thanks to [Trevor Norris](https://github.com/trevnorris) for
130
+ getting me down the rabbit hole of performance, and thanks to [Mathias
131
+ Buss](http://github.com/mafintosh) for suggesting me to share this
132
+ trick.
133
+
134
+ ## License
135
+
136
+ MIT
137
+
138
+ [npm-badge]: https://badge.fury.io/js/reusify.svg
139
+ [npm-url]: https://badge.fury.io/js/reusify
@@ -0,0 +1,15 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Use this section to tell people about which versions of your project are
6
+ currently being supported with security updates.
7
+
8
+ | Version | Supported |
9
+ | ------- | ------------------ |
10
+ | 1.x | :white_check_mark: |
11
+ | < 1.0 | :x: |
12
+
13
+ ## Reporting a Vulnerability
14
+
15
+ Please report all vulnerabilities at [https://github.com/mcollina/fastq/security](https://github.com/mcollina/fastq/security).