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
@@ -1,20 +1,19 @@
1
1
  # ShellJS - Unix shell commands for Node.js
2
2
 
3
- [![Travis](https://img.shields.io/travis/shelljs/shelljs/master.svg?style=flat-square&label=unix)](https://travis-ci.org/shelljs/shelljs)
4
- [![AppVeyor](https://img.shields.io/appveyor/ci/shelljs/shelljs/master.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/shelljs/shelljs/branch/master)
3
+ [![GitHub Actions](https://img.shields.io/github/actions/workflow/status/shelljs/shelljs/main.yml?style=flat-square&logo=github)](https://github.com/shelljs/shelljs/actions/workflows/main.yml)
5
4
  [![Codecov](https://img.shields.io/codecov/c/github/shelljs/shelljs/master.svg?style=flat-square&label=coverage)](https://codecov.io/gh/shelljs/shelljs)
6
5
  [![npm version](https://img.shields.io/npm/v/shelljs.svg?style=flat-square)](https://www.npmjs.com/package/shelljs)
7
6
  [![npm downloads](https://img.shields.io/npm/dm/shelljs.svg?style=flat-square)](https://www.npmjs.com/package/shelljs)
8
7
 
9
- ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell
8
+ ShellJS is a portable **(Windows/Linux/macOS)** implementation of Unix shell
10
9
  commands on top of the Node.js API. You can use it to eliminate your shell
11
10
  script's dependency on Unix while still keeping its familiar and powerful
12
11
  commands. You can also install it globally so you can run it from outside Node
13
12
  projects - say goodbye to those gnarly Bash scripts!
14
13
 
15
- ShellJS is proudly tested on every node release since `v4`!
14
+ ShellJS is proudly tested on every LTS node release since <!-- start minVersion -->`v18`<!-- stop minVersion -->!
16
15
 
17
- The project is [unit-tested](http://travis-ci.org/shelljs/shelljs) and battle-tested in projects like:
16
+ The project is unit-tested and battle-tested in projects like:
18
17
 
19
18
  + [Firebug](http://getfirebug.com/) - Firefox's infamous debugger
20
19
  + [JSHint](http://jshint.com) & [ESLint](http://eslint.org/) - popular JavaScript linters
@@ -58,8 +57,7 @@ wiki](https://github.com/shelljs/shelljs/wiki/Using-ShellJS-Plugins).
58
57
  For documentation on all the latest features, check out our
59
58
  [README](https://github.com/shelljs/shelljs). To read docs that are consistent
60
59
  with the latest release, check out [the npm
61
- page](https://www.npmjs.com/package/shelljs) or
62
- [shelljs.org](http://documentup.com/shelljs/shelljs).
60
+ page](https://www.npmjs.com/package/shelljs).
63
61
 
64
62
  ## Installing
65
63
 
@@ -122,6 +120,13 @@ var shell = require('shelljs');
122
120
  shell.echo('hello world');
123
121
  ```
124
122
 
123
+ Alternatively, we also support importing as a module with:
124
+
125
+ ```javascript
126
+ import shell from 'shelljs';
127
+ shell.echo('hello world');
128
+ ```
129
+
125
130
  <!-- DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED -->
126
131
 
127
132
 
@@ -130,7 +135,7 @@ shell.echo('hello world');
130
135
 
131
136
  All commands run synchronously, unless otherwise stated.
132
137
  All commands accept standard bash globbing characters (`*`, `?`, etc.),
133
- compatible with the [node `glob` module](https://github.com/isaacs/node-glob).
138
+ compatible with [`fast-glob`](https://www.npmjs.com/package/fast-glob).
134
139
 
135
140
  For less-commonly used commands and features, please check out our [wiki
136
141
  page](https://github.com/shelljs/shelljs/wiki).
@@ -151,15 +156,16 @@ var str = cat('file1', 'file2');
151
156
  var str = cat(['file1', 'file2']); // same as above
152
157
  ```
153
158
 
154
- Returns a string containing the given file, or a concatenated string
155
- containing the files if more than one file is given (a new line character is
156
- introduced between each file).
159
+ Returns a [ShellString](#shellstringstr) containing the given file, or a
160
+ concatenated string containing the files if more than one file is given (a
161
+ new line character is introduced between each file).
157
162
 
158
163
 
159
164
  ### cd([dir])
160
165
 
161
166
  Changes to directory `dir` for the duration of the script. Changes to home
162
- directory if no argument is supplied.
167
+ directory if no argument is supplied. Returns a
168
+ [ShellString](#shellstringstr) to indicate success or failure.
163
169
 
164
170
 
165
171
  ### chmod([options,] octal_mode || octal_string, file)
@@ -188,6 +194,47 @@ Notable exceptions:
188
194
  + In symbolic modes, `a-r` and `-r` are identical. No consideration is
189
195
  given to the `umask`.
190
196
  + There is no "quiet" option, since default behavior is to run silent.
197
+ + Windows OS uses a very different permission model than POSIX. `chmod()`
198
+ does its best on Windows, but there are limits to how file permissions can
199
+ be set. Note that WSL (Windows subsystem for Linux) **does** follow POSIX,
200
+ so cross-platform compatibility should not be a concern there.
201
+
202
+ Returns a [ShellString](#shellstringstr) indicating success or failure.
203
+
204
+
205
+ ### cmd(arg1[, arg2, ...] [, options])
206
+
207
+ Available options:
208
+
209
+ + `cwd: directoryPath`: change the current working directory only for this
210
+ cmd() invocation.
211
+ + `maxBuffer: num`: Raise or decrease the default buffer size for
212
+ stdout/stderr.
213
+ + `timeout`: Change the default timeout.
214
+
215
+ Examples:
216
+
217
+ ```javascript
218
+ var version = cmd('node', '--version').stdout;
219
+ cmd('git', 'commit', '-am', `Add suport for node ${version}`);
220
+ console.log(cmd('echo', '1st arg', '2nd arg', '3rd arg').stdout)
221
+ console.log(cmd('echo', 'this handles ;, |, &, etc. as literal characters').stdout)
222
+ ```
223
+
224
+ Executes the given command synchronously. This is intended as an easier
225
+ alternative for [exec()](#execcommand--options--callback), with better
226
+ security around globbing, comamnd injection, and variable expansion. This is
227
+ guaranteed to only run one external command, and won't give special
228
+ treatment for any shell characters (ex. this treats `|` as a literal
229
+ character, not as a shell pipeline).
230
+ This returns a [ShellString](#shellstringstr).
231
+
232
+ By default, this performs globbing on all platforms, but you can disable
233
+ this with `set('-f')`.
234
+
235
+ This **does not** support asynchronous mode. If you need asynchronous
236
+ command execution, check out [execa](https://www.npmjs.com/package/execa) or
237
+ the node builtin `child_process.execFile()` instead.
191
238
 
192
239
 
193
240
  ### cp([options,] source [, source ...], dest)
@@ -201,6 +248,7 @@ Available options:
201
248
  + `-r`, `-R`: recursive
202
249
  + `-L`: follow symlinks
203
250
  + `-P`: don't follow symlinks
251
+ + `-p`: preserve file mode, ownership, and timestamps
204
252
 
205
253
  Examples:
206
254
 
@@ -211,7 +259,8 @@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
211
259
  cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
212
260
  ```
213
261
 
214
- Copies files.
262
+ Copies files. Returns a [ShellString](#shellstringstr) indicating success
263
+ or failure.
215
264
 
216
265
 
217
266
  ### pushd([options,] [dir | '-N' | '+N'])
@@ -219,7 +268,7 @@ Copies files.
219
268
  Available options:
220
269
 
221
270
  + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
222
- + `-q`: Supresses output to the console.
271
+ + `-q`: Suppresses output to the console.
223
272
 
224
273
  Arguments:
225
274
 
@@ -243,7 +292,7 @@ Save the current directory on the top of the directory stack and then `cd` to `d
243
292
  Available options:
244
293
 
245
294
  + `-n`: Suppress the normal directory change when removing directories from the stack, so that only the stack is manipulated.
246
- + `-q`: Supresses output to the console.
295
+ + `-q`: Suppresses output to the console.
247
296
 
248
297
  Arguments:
249
298
 
@@ -268,7 +317,7 @@ When no arguments are given, `popd` removes the top directory from the stack and
268
317
  Available options:
269
318
 
270
319
  + `-c`: Clears the directory stack by deleting all of the elements.
271
- + `-q`: Supresses output to the console.
320
+ + `-q`: Suppresses output to the console.
272
321
 
273
322
  Arguments:
274
323
 
@@ -295,8 +344,7 @@ var str = echo('hello world');
295
344
  echo('-n', 'no newline at end');
296
345
  ```
297
346
 
298
- Prints `string` to stdout, and returns string with additional utility methods
299
- like `.to()`.
347
+ Prints `string` to stdout, and returns a [ShellString](#shellstringstr).
300
348
 
301
349
 
302
350
  ### exec(command [, options] [, callback])
@@ -305,6 +353,7 @@ Available options:
305
353
 
306
354
  + `async`: Asynchronous execution. If a callback is provided, it will be set to
307
355
  `true`, regardless of the passed value (default: `false`).
356
+ + `fatal`: Exit upon error (default: `false`).
308
357
  + `silent`: Do not echo program output to console (default: `false`).
309
358
  + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and
310
359
  what is written to stdout and stderr when not in silent mode (default: `'utf8'`).
@@ -328,15 +377,20 @@ exec('some_long_running_process', function(code, stdout, stderr) {
328
377
  });
329
378
  ```
330
379
 
331
- Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous
332
- mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object
333
- of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process
334
- object, and the `callback` receives the arguments `(code, stdout, stderr)`.
380
+ Executes the given `command` _synchronously_, unless otherwise specified.
381
+ When in synchronous mode, this returns a [ShellString](#shellstringstr).
382
+ Otherwise, this returns the child process object, and the `callback`
383
+ receives the arguments `(code, stdout, stderr)`.
335
384
 
336
385
  Not seeing the behavior you want? `exec()` runs everything through `sh`
337
386
  by default (or `cmd.exe` on Windows), which differs from `bash`. If you
338
387
  need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option.
339
388
 
389
+ **Security note:** as `shell.exec()` executes an arbitrary string in the
390
+ system shell, it is **critical** to properly sanitize user input to avoid
391
+ **command injection**. For more context, consult the [Security
392
+ Guidelines](https://github.com/shelljs/shelljs/wiki/Security-guidelines).
393
+
340
394
 
341
395
  ### find(path [, path ...])
342
396
  ### find(path_array)
@@ -349,7 +403,8 @@ find(['src', 'lib']); // same as above
349
403
  find('.').filter(function(file) { return file.match(/\.js$/); });
350
404
  ```
351
405
 
352
- Returns array of all files (however deep) in the given paths.
406
+ Returns a [ShellString](#shellstringstr) (with array-like properties) of all
407
+ files (however deep) in the given paths.
353
408
 
354
409
  The main difference from `ls('-R', path)` is that the resulting file names
355
410
  include the base directories (e.g., `lib/resources/file1` instead of just `file1`).
@@ -363,6 +418,7 @@ Available options:
363
418
  + `-v`: Invert `regex_filter` (only print non-matching lines).
364
419
  + `-l`: Print only filenames of matching files.
365
420
  + `-i`: Ignore case.
421
+ + `-n`: Print line numbers.
366
422
 
367
423
  Examples:
368
424
 
@@ -371,8 +427,9 @@ grep('-v', 'GLOBAL_VARIABLE', '*.js');
371
427
  grep('GLOBAL_VARIABLE', '*.js');
372
428
  ```
373
429
 
374
- Reads input string from given files and returns a string containing all lines of the
375
- file that match the given `regex_filter`.
430
+ Reads input string from given files and returns a
431
+ [ShellString](#shellstringstr) containing all lines of the @ file that match
432
+ the given `regex_filter`.
376
433
 
377
434
 
378
435
  ### head([{'-n': \<num\>},] file [, file ...])
@@ -390,7 +447,7 @@ var str = head('file1', 'file2');
390
447
  var str = head(['file1', 'file2']); // same as above
391
448
  ```
392
449
 
393
- Read the start of a file.
450
+ Read the start of a `file`. Returns a [ShellString](#shellstringstr).
394
451
 
395
452
 
396
453
  ### ln([options,] source, dest)
@@ -407,7 +464,9 @@ ln('file', 'newlink');
407
464
  ln('-sf', 'file', 'existing');
408
465
  ```
409
466
 
410
- Links `source` to `dest`. Use `-f` to force the link, should `dest` already exist.
467
+ Links `source` to `dest`. Use `-f` to force the link, should `dest` already
468
+ exist. Returns a [ShellString](#shellstringstr) indicating success or
469
+ failure.
411
470
 
412
471
 
413
472
  ### ls([options,] [path, ...])
@@ -419,22 +478,28 @@ Available options:
419
478
  + `-A`: all files (include files beginning with `.`, except for `.` and `..`)
420
479
  + `-L`: follow symlinks
421
480
  + `-d`: list directories themselves, not their contents
422
- + `-l`: list objects representing each file, each with fields containing `ls
423
- -l` output fields. See
424
- [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
425
- for more info
481
+ + `-l`: provides more details for each file. Specifically, each file is
482
+ represented by a structured object with separate fields for file
483
+ metadata (see
484
+ [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)). The
485
+ return value also overrides `.toString()` to resemble `ls -l`'s
486
+ output format for human readability, but programmatic usage should
487
+ depend on the stable object format rather than the `.toString()`
488
+ representation.
426
489
 
427
490
  Examples:
428
491
 
429
492
  ```javascript
430
493
  ls('projs/*.js');
494
+ ls('projs/**/*.js'); // Find all js files recursively in projs
431
495
  ls('-R', '/users/me', '/tmp');
432
496
  ls('-R', ['/users/me', '/tmp']); // same as above
433
497
  ls('-l', 'file.txt'); // { name: 'file.txt', mode: 33188, nlink: 1, ...}
434
498
  ```
435
499
 
436
- Returns array of files in the given `path`, or files in
437
- the current directory if no `path` is provided.
500
+ Returns a [ShellString](#shellstringstr) (with array-like properties) of all
501
+ the files in the given `path`, or files in the current directory if no
502
+ `path` is provided.
438
503
 
439
504
 
440
505
  ### mkdir([options,] dir [, dir ...])
@@ -451,7 +516,8 @@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
451
516
  mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
452
517
  ```
453
518
 
454
- Creates directories.
519
+ Creates directories. Returns a [ShellString](#shellstringstr) indicating
520
+ success or failure.
455
521
 
456
522
 
457
523
  ### mv([options ,] source [, source ...], dest')
@@ -470,12 +536,13 @@ mv('file1', 'file2', 'dir/');
470
536
  mv(['file1', 'file2'], 'dir/'); // same as above
471
537
  ```
472
538
 
473
- Moves `source` file(s) to `dest`.
539
+ Moves `source` file(s) to `dest`. Returns a [ShellString](#shellstringstr)
540
+ indicating success or failure.
474
541
 
475
542
 
476
543
  ### pwd()
477
544
 
478
- Returns the current directory.
545
+ Returns the current directory as a [ShellString](#shellstringstr).
479
546
 
480
547
 
481
548
  ### rm([options,] file [, file ...])
@@ -494,7 +561,8 @@ rm('some_file.txt', 'another_file.txt');
494
561
  rm(['some_file.txt', 'another_file.txt']); // same as above
495
562
  ```
496
563
 
497
- Removes files.
564
+ Removes files. Returns a [ShellString](#shellstringstr) indicating success
565
+ or failure.
498
566
 
499
567
 
500
568
  ### sed([options,] search_regex, replacement, file [, file ...])
@@ -508,11 +576,11 @@ Examples:
508
576
 
509
577
  ```javascript
510
578
  sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
511
- sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
512
579
  ```
513
580
 
514
- Reads an input string from `file`s, and performs a JavaScript `replace()` on the input
515
- using the given `search_regex` and `replacement` string or function. Returns the new string after replacement.
581
+ Reads an input string from `file`s, line by line, and performs a JavaScript `replace()` on
582
+ each of the lines from the input string using the given `search_regex` and `replacement` string or
583
+ function. Returns the new [ShellString](#shellstringstr) after replacement.
516
584
 
517
585
  Note:
518
586
 
@@ -523,6 +591,10 @@ using the `$n` syntax:
523
591
  sed(/(\w+)\s(\w+)/, '$2, $1', 'file.txt');
524
592
  ```
525
593
 
594
+ Also, like unix `sed`, ShellJS `sed` runs replacements on each line from the input file
595
+ (split by '\n') separately, so `search_regex`es that span more than one line (or include '\n')
596
+ will not match anything and nothing will be replaced.
597
+
526
598
 
527
599
  ### set(options)
528
600
 
@@ -557,8 +629,9 @@ sort('foo.txt', 'bar.txt');
557
629
  sort('-r', 'foo.txt');
558
630
  ```
559
631
 
560
- Return the contents of the `file`s, sorted line-by-line. Sorting multiple
561
- files mixes their content (just as unix `sort` does).
632
+ Return the contents of the `file`s, sorted line-by-line as a
633
+ [ShellString](#shellstringstr). Sorting multiple files mixes their content
634
+ (just as unix `sort` does).
562
635
 
563
636
 
564
637
  ### tail([{'-n': \<num\>},] file [, file ...])
@@ -576,7 +649,7 @@ var str = tail('file1', 'file2');
576
649
  var str = tail(['file1', 'file2']); // same as above
577
650
  ```
578
651
 
579
- Read the end of a `file`.
652
+ Read the end of a `file`. Returns a [ShellString](#shellstringstr).
580
653
 
581
654
 
582
655
  ### tempdir()
@@ -608,10 +681,11 @@ Examples:
608
681
 
609
682
  ```javascript
610
683
  if (test('-d', path)) { /* do something with dir */ };
611
- if (!test('-f', path)) continue; // skip if it's a regular file
684
+ if (!test('-f', path)) continue; // skip if it's not a regular file
612
685
  ```
613
686
 
614
- Evaluates `expression` using the available primaries and returns corresponding value.
687
+ Evaluates `expression` using the available primaries and returns
688
+ corresponding boolean value.
615
689
 
616
690
 
617
691
  ### ShellString.prototype.to(file)
@@ -624,7 +698,8 @@ cat('input.txt').to('output.txt');
624
698
 
625
699
  Analogous to the redirection operator `>` in Unix, but works with
626
700
  `ShellStrings` (such as those returned by `cat`, `grep`, etc.). _Like Unix
627
- redirections, `to()` will overwrite any existing file!_
701
+ redirections, `to()` will overwrite any existing file!_ Returns the same
702
+ [ShellString](#shellstringstr) this operated on, to support chaining.
628
703
 
629
704
 
630
705
  ### ShellString.prototype.toEnd(file)
@@ -636,7 +711,8 @@ cat('input.txt').toEnd('output.txt');
636
711
  ```
637
712
 
638
713
  Analogous to the redirect-and-append operator `>>` in Unix, but works with
639
- `ShellStrings` (such as those returned by `cat`, `grep`, etc.).
714
+ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). Returns the
715
+ same [ShellString](#shellstringstr) this operated on, to support chaining.
640
716
 
641
717
 
642
718
  ### touch([options,] file [, file ...])
@@ -647,20 +723,26 @@ Available options:
647
723
  + `-a`: Change only the access time
648
724
  + `-c`: Do not create any files
649
725
  + `-m`: Change only the modification time
650
- + `-d DATE`: Parse `DATE` and use it instead of current time
651
- + `-r FILE`: Use `FILE`'s times instead of current time
726
+ + `{'-d': someDate}`, `{date: someDate}`: Use a `Date` instance (ex. `someDate`)
727
+ instead of current time
728
+ + `{'-r': file}`, `{reference: file}`: Use `file`'s times instead of current
729
+ time
652
730
 
653
731
  Examples:
654
732
 
655
733
  ```javascript
656
734
  touch('source.js');
657
- touch('-c', '/path/to/some/dir/source.js');
658
- touch({ '-r': FILE }, '/path/to/some/dir/source.js');
735
+ touch('-c', 'path/to/file.js');
736
+ touch({ '-r': 'referenceFile.txt' }, 'path/to/file.js');
737
+ touch({ '-d': new Date('December 17, 1995 03:24:00'), '-m': true }, 'path/to/file.js');
738
+ touch({ date: new Date('December 17, 1995 03:24:00') }, 'path/to/file.js');
659
739
  ```
660
740
 
661
- Update the access and modification times of each `FILE` to the current time.
662
- A `FILE` argument that does not exist is created empty, unless `-c` is supplied.
663
- This is a partial implementation of [`touch(1)`](http://linux.die.net/man/1/touch).
741
+ Update the access and modification times of each file to the current time.
742
+ A file argument that does not exist is created empty, unless `-c` is supplied.
743
+ This is a partial implementation of
744
+ [`touch(1)`](http://linux.die.net/man/1/touch). Returns a
745
+ [ShellString](#shellstringstr) indicating success or failure.
664
746
 
665
747
 
666
748
  ### uniq([options,] [input, [output]])
@@ -679,7 +761,8 @@ uniq('-i', 'foo.txt');
679
761
  uniq('-cd', 'foo.txt', 'bar.txt');
680
762
  ```
681
763
 
682
- Filter adjacent matching lines from `input`.
764
+ Filter adjacent matching lines from `input`. Returns a
765
+ [ShellString](#shellstringstr).
683
766
 
684
767
 
685
768
  ### which(command)
@@ -692,7 +775,8 @@ var nodeExec = which('node');
692
775
 
693
776
  Searches for `command` in the system's `PATH`. On Windows, this uses the
694
777
  `PATHEXT` variable to append the extension if it's not already executable.
695
- Returns string containing the absolute path to `command`.
778
+ Returns a [ShellString](#shellstringstr) containing the absolute path to
779
+ `command`.
696
780
 
697
781
 
698
782
  ### exit(code)
@@ -709,16 +793,29 @@ return value to be an error message. If you need the last error message, use
709
793
  the `.stderr` attribute from the last command's return value instead.
710
794
 
711
795
 
796
+ ### errorCode()
797
+
798
+ Returns the error code from the last command.
799
+
800
+
712
801
  ### ShellString(str)
713
802
 
714
803
  Examples:
715
804
 
716
805
  ```javascript
717
- var foo = ShellString('hello world');
806
+ var foo = new ShellString('hello world');
718
807
  ```
719
808
 
720
- Turns a regular string into a string-like object similar to what each
721
- command returns. This has special methods, like `.to()` and `.toEnd()`.
809
+ This is a dedicated type returned by most ShellJS methods, which wraps a
810
+ string (or array) value. This has all the string (or array) methods, but
811
+ also exposes extra methods: [`.to()`](#shellstringprototypetofile),
812
+ [`.toEnd()`](#shellstringprototypetoendfile), and all the pipe-able methods
813
+ (ex. `.cat()`, `.grep()`, etc.). This can be easily converted into a string
814
+ by calling `.toString()`.
815
+
816
+ This type also exposes the corresponding command's stdout, stderr, and
817
+ return status code via the `.stdout` (string), `.stderr` (string), and
818
+ `.code` (number) properties respectively.
722
819
 
723
820
 
724
821
  ### env['VAR_NAME']
@@ -732,7 +829,7 @@ Examples:
732
829
 
733
830
  ```javascript
734
831
  grep('foo', 'file1.txt', 'file2.txt').sed(/o/g, 'a').to('output.txt');
735
- echo('files with o\'s in the name:\n' + ls().grep('o'));
832
+ echo("files with o's in the name:\n" + ls().grep('o'));
736
833
  cat('test.js').exec('node'); // pipe to exec() call
737
834
  ```
738
835
 
@@ -792,7 +889,14 @@ rm -rf foo.txt bar.txt
792
889
  exec echo hello
793
890
  ```
794
891
 
795
- ### config.globOptions
892
+ ### config.globOptions (deprecated)
893
+
894
+ **Deprecated**: we recommend that you do not edit `config.globOptions`.
895
+ Support for this configuration option may be changed or removed in a future
896
+ ShellJS release.
897
+
898
+ **Breaking change**: ShellJS v0.8.x uses `node-glob`. Starting with ShellJS
899
+ v0.9.x, `config.globOptions` is compatible with `fast-glob`.
796
900
 
797
901
  Example:
798
902
 
@@ -800,7 +904,11 @@ Example:
800
904
  config.globOptions = {nodir: true};
801
905
  ```
802
906
 
803
- Use this value for calls to `glob.sync()` instead of the default options.
907
+ `config.globOptions` changes how ShellJS expands glob (wildcard)
908
+ expressions. See
909
+ [fast-glob](https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#options-3)
910
+ for available options. Be aware that modifying `config.globOptions` **may
911
+ break ShellJS functionality.**
804
912
 
805
913
  ### config.reset()
806
914
 
@@ -830,6 +938,6 @@ Reset `shell.config` to the defaults:
830
938
 
831
939
  ## Team
832
940
 
833
- | [![Nate Fischer](https://avatars.githubusercontent.com/u/5801521?s=130)](https://github.com/nfischer) | [![Brandon Freitag](https://avatars1.githubusercontent.com/u/5988055?v=3&s=130)](http://github.com/freitagbr) |
834
- |:---:|:---:|
835
- | [Nate Fischer](https://github.com/nfischer) | [Brandon Freitag](http://github.com/freitagbr) |
941
+ | [![Nate Fischer](https://avatars.githubusercontent.com/u/5801521?s=130)](https://github.com/nfischer) |
942
+ |:---:|
943
+ | [Nate Fischer](https://github.com/nfischer) |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shelljs",
3
- "version": "0.8.5",
3
+ "version": "0.9.2",
4
4
  "description": "Portable Unix shell commands for Node.js",
5
5
  "keywords": [
6
6
  "shelljs",
@@ -23,8 +23,18 @@
23
23
  "license": "BSD-3-Clause",
24
24
  "homepage": "http://github.com/shelljs/shelljs",
25
25
  "main": "./shell.js",
26
+ "exports": {
27
+ ".": "./shell.js",
28
+ "./global": "./global.js",
29
+ "./global.js": "./global.js",
30
+ "./make": "./make.js",
31
+ "./make.js": "./make.js",
32
+ "./package": "./package.json",
33
+ "./package.json": "./package.json",
34
+ "./plugin": "./plugin.js",
35
+ "./plugin.js": "./plugin.js"
36
+ },
26
37
  "files": [
27
- "commands.js",
28
38
  "global.js",
29
39
  "make.js",
30
40
  "plugin.js",
@@ -33,15 +43,14 @@
33
43
  "src"
34
44
  ],
35
45
  "scripts": {
36
- "ci-or-install": "node scripts/ci-or-install",
46
+ "check-node-support": "node scripts/check-node-support",
37
47
  "posttest": "npm run lint",
38
- "test": "nyc --reporter=text --reporter=lcov ava test/*.js",
39
- "test-no-coverage": "ava test/*.js",
48
+ "test": "ava",
49
+ "test-with-coverage": "nyc --reporter=text --reporter=lcov ava",
40
50
  "gendocs": "node scripts/generate-docs",
41
51
  "lint": "eslint .",
42
52
  "after-travis": "travis-check-changes",
43
53
  "changelog": "shelljs-changelog",
44
- "codecov": "codecov",
45
54
  "release:major": "shelljs-release major",
46
55
  "release:minor": "shelljs-release minor",
47
56
  "release:patch": "shelljs-release patch"
@@ -50,30 +59,37 @@
50
59
  "shjs": "./bin/shjs"
51
60
  },
52
61
  "dependencies": {
53
- "glob": "^7.0.0",
62
+ "execa": "^1.0.0",
63
+ "fast-glob": "^3.3.2",
54
64
  "interpret": "^1.0.0",
55
65
  "rechoir": "^0.6.2"
56
66
  },
57
67
  "ava": {
58
68
  "serial": true,
59
- "powerAssert": false
69
+ "powerAssert": false,
70
+ "files": [
71
+ "test/*.js"
72
+ ],
73
+ "helpers": [
74
+ "test/resources/**",
75
+ "test/utils/**"
76
+ ]
60
77
  },
61
78
  "devDependencies": {
62
- "ava": "^0.21.0",
63
- "chalk": "^1.1.3",
64
- "codecov": "^3.0.2",
65
- "coffee-script": "^1.10.0",
66
- "eslint": "^2.0.0",
67
- "eslint-config-airbnb-base": "^3.0.0",
68
- "eslint-plugin-import": "^1.11.1",
69
- "nyc": "^11.3.0",
70
- "shelljs-changelog": "^0.2.0",
71
- "shelljs-release": "^0.3.0",
72
- "shx": "^0.2.0",
73
- "travis-check-changes": "^0.2.0"
79
+ "ava": "^2.4.0",
80
+ "chalk": "^4.1.2",
81
+ "coffee-script": "^1.12.7",
82
+ "eslint": "^8.2.0",
83
+ "eslint-config-airbnb-base": "^15.0.0",
84
+ "eslint-plugin-import": "^2.31.0",
85
+ "js-yaml": "^4.1.0",
86
+ "nyc": "^17.1.0",
87
+ "shelljs-changelog": "^0.2.6",
88
+ "shelljs-release": "^0.5.2",
89
+ "shx": "^0.3.4",
90
+ "travis-check-changes": "^0.4.0"
74
91
  },
75
- "optionalDependencies": {},
76
92
  "engines": {
77
- "node": ">=4"
93
+ "node": ">=18"
78
94
  }
79
95
  }
@@ -1,4 +1,4 @@
1
- // Various utilties exposed to plugins
1
+ // Various utilities exposed to plugins
2
2
 
3
3
  require('./shell'); // Create the ShellJS instance (mandatory)
4
4