@depup/lerna 9.0.5-depup.0

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 (258) hide show
  1. package/README.md +88 -0
  2. package/dist/cli.js +50 -0
  3. package/dist/commands/changed/command.js +5806 -0
  4. package/dist/commands/changed/index.js +5195 -0
  5. package/dist/commands/clean/command.js +6271 -0
  6. package/dist/commands/clean/index.js +6157 -0
  7. package/dist/commands/diff/command.js +5313 -0
  8. package/dist/commands/diff/index.js +4742 -0
  9. package/dist/commands/diff/lib/get-last-commit.js +4240 -0
  10. package/dist/commands/diff/lib/has-commit.js +4233 -0
  11. package/dist/commands/exec/command.js +6010 -0
  12. package/dist/commands/exec/index.js +5337 -0
  13. package/dist/commands/import/command.js +5500 -0
  14. package/dist/commands/import/index.js +4931 -0
  15. package/dist/commands/info/command.js +5229 -0
  16. package/dist/commands/info/index.js +4685 -0
  17. package/dist/commands/init/command.js +5440 -0
  18. package/dist/commands/init/index.js +4872 -0
  19. package/dist/commands/list/command.js +5974 -0
  20. package/dist/commands/list/index.js +5309 -0
  21. package/dist/commands/publish/command.js +9271 -0
  22. package/dist/commands/publish/index.js +8771 -0
  23. package/dist/commands/publish/lib/create-temp-licenses.js +64 -0
  24. package/dist/commands/publish/lib/fetch-config.js +4763 -0
  25. package/dist/commands/publish/lib/get-current-sha.js +4764 -0
  26. package/dist/commands/publish/lib/get-current-tags.js +4776 -0
  27. package/dist/commands/publish/lib/get-npm-username.js +4886 -0
  28. package/dist/commands/publish/lib/get-packages-without-license.js +53 -0
  29. package/dist/commands/publish/lib/get-profile-data.js +4802 -0
  30. package/dist/commands/publish/lib/get-two-factor-auth-required.js +4855 -0
  31. package/dist/commands/publish/lib/get-whoami.js +4798 -0
  32. package/dist/commands/publish/lib/git-checkout.js +4761 -0
  33. package/dist/commands/publish/lib/remove-temp-licenses.js +54 -0
  34. package/dist/commands/publish/lib/verify-npm-package-access.js +4848 -0
  35. package/dist/commands/run/command.js +6229 -0
  36. package/dist/commands/run/index.js +5534 -0
  37. package/dist/commands/version/command.js +7415 -0
  38. package/dist/commands/version/index.js +7100 -0
  39. package/dist/commands/version/lib/create-release.js +4892 -0
  40. package/dist/commands/version/lib/get-current-branch.js +4764 -0
  41. package/dist/commands/version/lib/git-add.js +4817 -0
  42. package/dist/commands/version/lib/git-commit.js +4788 -0
  43. package/dist/commands/version/lib/git-push.js +4769 -0
  44. package/dist/commands/version/lib/git-tag.js +4771 -0
  45. package/dist/commands/version/lib/is-anything-committed.js +4765 -0
  46. package/dist/commands/version/lib/is-behind-upstream.js +4780 -0
  47. package/dist/commands/version/lib/is-breaking-change.js +61 -0
  48. package/dist/commands/version/lib/prompt-version.js +4833 -0
  49. package/dist/commands/version/lib/remote-branch-exists.js +4768 -0
  50. package/dist/commands/version/lib/update-lockfile-version.js +4791 -0
  51. package/dist/index.js +13093 -0
  52. package/dist/libs/child-process/src/forked-strong-log-transformer.d.ts +19 -0
  53. package/dist/libs/child-process/src/index.d.ts +46 -0
  54. package/dist/libs/child-process/src/set-exit-code.d.ts +1 -0
  55. package/dist/libs/commands/changed/src/command.d.ts +6 -0
  56. package/dist/libs/commands/changed/src/index.d.ts +15 -0
  57. package/dist/libs/commands/clean/src/command.d.ts +6 -0
  58. package/dist/libs/commands/diff/src/command.d.ts +6 -0
  59. package/dist/libs/commands/diff/src/index.d.ts +12 -0
  60. package/dist/libs/commands/diff/src/lib/get-last-commit.d.ts +7 -0
  61. package/dist/libs/commands/diff/src/lib/has-commit.d.ts +7 -0
  62. package/dist/libs/commands/exec/src/command.d.ts +6 -0
  63. package/dist/libs/commands/exec/src/index.d.ts +35 -0
  64. package/dist/libs/commands/import/src/command.d.ts +6 -0
  65. package/dist/libs/commands/import/src/index.d.ts +36 -0
  66. package/dist/libs/commands/info/src/command.d.ts +6 -0
  67. package/dist/libs/commands/info/src/index.d.ts +6 -0
  68. package/dist/libs/commands/init/src/command.d.ts +6 -0
  69. package/dist/libs/commands/init/src/index.d.ts +37 -0
  70. package/dist/libs/commands/list/src/command.d.ts +6 -0
  71. package/dist/libs/commands/list/src/index.d.ts +8 -0
  72. package/dist/libs/commands/publish/src/command.d.ts +6 -0
  73. package/dist/libs/commands/run/src/command.d.ts +7 -0
  74. package/dist/libs/commands/run/src/index.d.ts +39 -0
  75. package/dist/libs/commands/version/src/command.d.ts +6 -0
  76. package/dist/libs/core/src/index.d.ts +46 -0
  77. package/dist/libs/core/src/lib/add-dependencies.d.ts +2 -0
  78. package/dist/libs/core/src/lib/add-dependents.d.ts +2 -0
  79. package/dist/libs/core/src/lib/check-working-tree.d.ts +12 -0
  80. package/dist/libs/core/src/lib/cli.d.ts +14 -0
  81. package/dist/libs/core/src/lib/collect-uncommitted.d.ts +12 -0
  82. package/dist/libs/core/src/lib/collect-updates/collect-project-updates.d.ts +29 -0
  83. package/dist/libs/core/src/lib/collect-updates/has-tags.d.ts +6 -0
  84. package/dist/libs/core/src/lib/collect-updates/index.d.ts +1 -0
  85. package/dist/libs/core/src/lib/collect-updates/make-diff-predicate.d.ts +3 -0
  86. package/dist/libs/core/src/lib/command/clean-stack.d.ts +1 -0
  87. package/dist/libs/core/src/lib/command/create-project-graph-with-packages.d.ts +5 -0
  88. package/dist/libs/core/src/lib/command/default-options.d.ts +2 -0
  89. package/dist/libs/core/src/lib/command/detect-projects.d.ts +6 -0
  90. package/dist/libs/core/src/lib/command/index.d.ts +80 -0
  91. package/dist/libs/core/src/lib/command/is-git-initialized.d.ts +1 -0
  92. package/dist/libs/core/src/lib/command/log-package-error.d.ts +1 -0
  93. package/dist/libs/core/src/lib/command/warn-if-hanging.d.ts +1 -0
  94. package/dist/libs/core/src/lib/conventional-commits/apply-build-metadata.d.ts +4 -0
  95. package/dist/libs/core/src/lib/conventional-commits/constants.d.ts +17 -0
  96. package/dist/libs/core/src/lib/conventional-commits/get-changelog-config.d.ts +2 -0
  97. package/dist/libs/core/src/lib/conventional-commits/index.d.ts +3 -0
  98. package/dist/libs/core/src/lib/conventional-commits/make-bump-only-filter.d.ts +2 -0
  99. package/dist/libs/core/src/lib/conventional-commits/read-existing-changelog.d.ts +6 -0
  100. package/dist/libs/core/src/lib/conventional-commits/recommend-version.d.ts +6 -0
  101. package/dist/libs/core/src/lib/conventional-commits/update-changelog.d.ts +8 -0
  102. package/dist/libs/core/src/lib/corepack/exec-package-manager.d.ts +4 -0
  103. package/dist/libs/core/src/lib/corepack/index.d.ts +1 -0
  104. package/dist/libs/core/src/lib/corepack/is-corepack-enabled.d.ts +1 -0
  105. package/dist/libs/core/src/lib/cycles/get-cycles.d.ts +6 -0
  106. package/dist/libs/core/src/lib/cycles/index.d.ts +3 -0
  107. package/dist/libs/core/src/lib/cycles/merge-overlapping-cycles.d.ts +6 -0
  108. package/dist/libs/core/src/lib/cycles/report-cycles.d.ts +1 -0
  109. package/dist/libs/core/src/lib/describe-ref.d.ts +17 -0
  110. package/dist/libs/core/src/lib/filter-options.d.ts +15 -0
  111. package/dist/libs/core/src/lib/filter-projects.d.ts +4 -0
  112. package/dist/libs/core/src/lib/get-npm-exec-opts.d.ts +11 -0
  113. package/dist/libs/core/src/lib/get-package-manifest-path.d.ts +2 -0
  114. package/dist/libs/core/src/lib/get-packages-for-option.d.ts +4 -0
  115. package/dist/libs/core/src/lib/get-packed.d.ts +1 -0
  116. package/dist/libs/core/src/lib/git-checkout.d.ts +7 -0
  117. package/dist/libs/core/src/lib/has-npm-version.d.ts +1 -0
  118. package/dist/libs/core/src/lib/listable-format-projects.d.ts +24 -0
  119. package/dist/libs/core/src/lib/listable-options.d.ts +54 -0
  120. package/dist/libs/core/src/lib/log-packed.d.ts +14 -0
  121. package/dist/libs/core/src/lib/npm-conf/conf.d.ts +22 -0
  122. package/dist/libs/core/src/lib/npm-conf/env-replace.d.ts +1 -0
  123. package/dist/libs/core/src/lib/npm-conf/find-prefix.d.ts +1 -0
  124. package/dist/libs/core/src/lib/npm-conf/nerf-dart.d.ts +1 -0
  125. package/dist/libs/core/src/lib/npm-conf/parse-field.d.ts +1 -0
  126. package/dist/libs/core/src/lib/npm-install.d.ts +2 -0
  127. package/dist/libs/core/src/lib/npm-publish.d.ts +20 -0
  128. package/dist/libs/core/src/lib/npm-run-script.d.ts +2 -0
  129. package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-base.d.ts +6 -0
  130. package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-group.d.ts +21 -0
  131. package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-stream.d.ts +14 -0
  132. package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker.d.ts +10 -0
  133. package/dist/libs/core/src/lib/npmlog/gauge/index.d.ts +43 -0
  134. package/dist/libs/core/src/lib/npmlog/index.d.ts +76 -0
  135. package/dist/libs/core/src/lib/oidc.d.ts +25 -0
  136. package/dist/libs/core/src/lib/otplease.d.ts +15 -0
  137. package/dist/libs/core/src/lib/output.d.ts +1 -0
  138. package/dist/libs/core/src/lib/pack-directory.d.ts +30 -0
  139. package/dist/libs/core/src/lib/package.d.ts +128 -0
  140. package/dist/libs/core/src/lib/prerelease-id-from-version.d.ts +1 -0
  141. package/dist/libs/core/src/lib/profiler.d.ts +20 -0
  142. package/dist/libs/core/src/lib/project/apply-extends.d.ts +4 -0
  143. package/dist/libs/core/src/lib/project/index.d.ts +82 -0
  144. package/dist/libs/core/src/lib/project/make-file-finder.d.ts +2 -0
  145. package/dist/libs/core/src/lib/project/shallow-extend.d.ts +1 -0
  146. package/dist/libs/core/src/lib/project-graph-with-packages.d.ts +23 -0
  147. package/dist/libs/core/src/lib/prompt.d.ts +19 -0
  148. package/dist/libs/core/src/lib/pulse-till-done.d.ts +2 -0
  149. package/dist/libs/core/src/lib/rimraf-dir.d.ts +1 -0
  150. package/dist/libs/core/src/lib/run-lifecycle.d.ts +21 -0
  151. package/dist/libs/core/src/lib/run-projects-topologically.d.ts +10 -0
  152. package/dist/libs/core/src/lib/scm-clients/github/create-github-client.d.ts +4 -0
  153. package/dist/libs/core/src/lib/scm-clients/gitlab/create-gitlab-client.d.ts +11 -0
  154. package/dist/libs/core/src/lib/scm-clients/gitlab/gitlab-client.d.ts +13 -0
  155. package/dist/libs/core/src/lib/scm-clients/index.d.ts +2 -0
  156. package/dist/libs/core/src/lib/temp-write.d.ts +5 -0
  157. package/dist/libs/core/src/lib/timer.d.ts +1 -0
  158. package/dist/libs/core/src/lib/toposort-projects.d.ts +2 -0
  159. package/dist/libs/core/src/lib/validation-error.d.ts +4 -0
  160. package/dist/libs/core/src/lib/write-log-file.d.ts +1 -0
  161. package/dist/libs/legacy-core/src/index.d.ts +10 -0
  162. package/dist/libs/legacy-core/src/lib/collect-updates/collect-dependents.d.ts +5 -0
  163. package/dist/libs/legacy-core/src/lib/collect-updates/collect-packages.d.ts +10 -0
  164. package/dist/libs/legacy-core/src/lib/collect-updates/has-tags.d.ts +5 -0
  165. package/dist/libs/legacy-core/src/lib/collect-updates/index.d.ts +19 -0
  166. package/dist/libs/legacy-core/src/lib/collect-updates/make-diff-predicate.d.ts +7 -0
  167. package/dist/libs/legacy-core/src/lib/command/clean-stack.d.ts +1 -0
  168. package/dist/libs/legacy-core/src/lib/command/default-options.d.ts +2 -0
  169. package/dist/libs/legacy-core/src/lib/command/index.d.ts +40 -0
  170. package/dist/libs/legacy-core/src/lib/command/log-package-error.d.ts +1 -0
  171. package/dist/libs/legacy-core/src/lib/command/warn-if-hanging.d.ts +1 -0
  172. package/dist/libs/legacy-core/src/lib/create-symlink.d.ts +4 -0
  173. package/dist/libs/legacy-core/src/lib/filter-packages.d.ts +13 -0
  174. package/dist/libs/legacy-core/src/lib/get-filtered-packages.d.ts +7 -0
  175. package/dist/libs/legacy-core/src/lib/listable-format.d.ts +8 -0
  176. package/dist/libs/legacy-core/src/lib/package-graph/cyclic-package-graph-node.d.ts +37 -0
  177. package/dist/libs/legacy-core/src/lib/package-graph/index.d.ts +74 -0
  178. package/dist/libs/legacy-core/src/lib/package-graph/package-graph-node.d.ts +32 -0
  179. package/dist/libs/legacy-core/src/lib/package-graph/report-cycles.d.ts +1 -0
  180. package/dist/libs/legacy-core/src/lib/query-graph.d.ts +27 -0
  181. package/dist/libs/legacy-core/src/lib/resolve-symlink.d.ts +1 -0
  182. package/dist/libs/legacy-core/src/lib/run-topologically.d.ts +16 -0
  183. package/dist/libs/legacy-core/src/lib/symlink-binary/index.d.ts +5 -0
  184. package/dist/libs/legacy-core/src/lib/symlink-dependencies.d.ts +9 -0
  185. package/dist/libs/legacy-core/src/lib/write-log-file.d.ts +1 -0
  186. package/dist/migrations/add-schema-config/add-schema-config.js +34 -0
  187. package/dist/migrations/remove-invalid-init-config/remove-invalid-init-config.js +34 -0
  188. package/dist/migrations/remove-invalid-lerna-config/remove-invalid-lerna-config.js +34 -0
  189. package/dist/migrations/remove-invalid-use-workspaces/remove-invalid-use-workspaces.js +34 -0
  190. package/dist/migrations/remove-unnecessary-use-nx/remove-unnecessary-use-nx.js +34 -0
  191. package/dist/migrations/update-options-from-legacy-deprecate-config/update-options-from-legacy-deprecate-config.js +96 -0
  192. package/dist/packages/lerna/src/commands/add-caching/command.d.ts +6 -0
  193. package/dist/packages/lerna/src/commands/add-caching/index.d.ts +1 -0
  194. package/dist/packages/lerna/src/commands/changed/command.d.ts +1 -0
  195. package/dist/packages/lerna/src/commands/changed/index.d.ts +1 -0
  196. package/dist/packages/lerna/src/commands/clean/command.d.ts +0 -0
  197. package/dist/packages/lerna/src/commands/clean/index.d.ts +1 -0
  198. package/dist/packages/lerna/src/commands/diff/command.d.ts +1 -0
  199. package/dist/packages/lerna/src/commands/diff/index.d.ts +1 -0
  200. package/dist/packages/lerna/src/commands/diff/lib/get-last-commit.d.ts +1 -0
  201. package/dist/packages/lerna/src/commands/diff/lib/has-commit.d.ts +1 -0
  202. package/dist/packages/lerna/src/commands/exec/command.d.ts +1 -0
  203. package/dist/packages/lerna/src/commands/exec/index.d.ts +1 -0
  204. package/dist/packages/lerna/src/commands/import/command.d.ts +1 -0
  205. package/dist/packages/lerna/src/commands/import/index.d.ts +1 -0
  206. package/dist/packages/lerna/src/commands/info/command.d.ts +1 -0
  207. package/dist/packages/lerna/src/commands/info/index.d.ts +1 -0
  208. package/dist/packages/lerna/src/commands/init/command.d.ts +1 -0
  209. package/dist/packages/lerna/src/commands/init/index.d.ts +1 -0
  210. package/dist/packages/lerna/src/commands/list/command.d.ts +1 -0
  211. package/dist/packages/lerna/src/commands/list/index.d.ts +1 -0
  212. package/dist/packages/lerna/src/commands/publish/command.d.ts +0 -0
  213. package/dist/packages/lerna/src/commands/publish/index.d.ts +1 -0
  214. package/dist/packages/lerna/src/commands/publish/lib/create-temp-licenses.d.ts +0 -0
  215. package/dist/packages/lerna/src/commands/publish/lib/fetch-config.d.ts +0 -0
  216. package/dist/packages/lerna/src/commands/publish/lib/get-current-sha.d.ts +0 -0
  217. package/dist/packages/lerna/src/commands/publish/lib/get-current-tags.d.ts +0 -0
  218. package/dist/packages/lerna/src/commands/publish/lib/get-npm-username.d.ts +0 -0
  219. package/dist/packages/lerna/src/commands/publish/lib/get-packages-without-license.d.ts +0 -0
  220. package/dist/packages/lerna/src/commands/publish/lib/get-profile-data.d.ts +0 -0
  221. package/dist/packages/lerna/src/commands/publish/lib/get-two-factor-auth-required.d.ts +0 -0
  222. package/dist/packages/lerna/src/commands/publish/lib/get-whoami.d.ts +0 -0
  223. package/dist/packages/lerna/src/commands/publish/lib/git-checkout.d.ts +0 -0
  224. package/dist/packages/lerna/src/commands/publish/lib/remove-temp-licenses.d.ts +0 -0
  225. package/dist/packages/lerna/src/commands/publish/lib/verify-npm-package-access.d.ts +0 -0
  226. package/dist/packages/lerna/src/commands/repair/command.d.ts +6 -0
  227. package/dist/packages/lerna/src/commands/repair/index.d.ts +1 -0
  228. package/dist/packages/lerna/src/commands/run/command.d.ts +1 -0
  229. package/dist/packages/lerna/src/commands/run/index.d.ts +1 -0
  230. package/dist/packages/lerna/src/commands/version/command.d.ts +0 -0
  231. package/dist/packages/lerna/src/commands/version/index.d.ts +1 -0
  232. package/dist/packages/lerna/src/commands/version/lib/create-release.d.ts +0 -0
  233. package/dist/packages/lerna/src/commands/version/lib/get-current-branch.d.ts +0 -0
  234. package/dist/packages/lerna/src/commands/version/lib/git-add.d.ts +0 -0
  235. package/dist/packages/lerna/src/commands/version/lib/git-commit.d.ts +0 -0
  236. package/dist/packages/lerna/src/commands/version/lib/git-push.d.ts +0 -0
  237. package/dist/packages/lerna/src/commands/version/lib/git-tag.d.ts +0 -0
  238. package/dist/packages/lerna/src/commands/version/lib/is-anything-committed.d.ts +0 -0
  239. package/dist/packages/lerna/src/commands/version/lib/is-behind-upstream.d.ts +0 -0
  240. package/dist/packages/lerna/src/commands/version/lib/is-breaking-change.d.ts +0 -0
  241. package/dist/packages/lerna/src/commands/version/lib/prompt-version.d.ts +0 -0
  242. package/dist/packages/lerna/src/commands/version/lib/remote-branch-exists.d.ts +0 -0
  243. package/dist/packages/lerna/src/commands/version/lib/update-lockfile-version.d.ts +0 -0
  244. package/dist/packages/lerna/src/commands/watch/command.d.ts +6 -0
  245. package/dist/packages/lerna/src/commands/watch/index.d.ts +1 -0
  246. package/dist/packages/lerna/src/index.d.ts +1 -0
  247. package/dist/packages/lerna/src/migrations/add-schema-config/add-schema-config.d.ts +2 -0
  248. package/dist/packages/lerna/src/migrations/remove-invalid-init-config/remove-invalid-init-config.d.ts +2 -0
  249. package/dist/packages/lerna/src/migrations/remove-invalid-lerna-config/remove-invalid-lerna-config.d.ts +2 -0
  250. package/dist/packages/lerna/src/migrations/remove-invalid-use-workspaces/remove-invalid-use-workspaces.d.ts +2 -0
  251. package/dist/packages/lerna/src/migrations/remove-unnecessary-use-nx/remove-unnecessary-use-nx.d.ts +2 -0
  252. package/dist/packages/lerna/src/migrations/update-options-from-legacy-deprecate-config/update-options-from-legacy-deprecate-config.d.ts +9 -0
  253. package/dist/packages/lerna/src/utils/detect-projects.d.ts +4 -0
  254. package/dist/packages/lerna/src/utils/index.d.ts +1 -0
  255. package/dist/utils/index.js +4362 -0
  256. package/migrations.json +40 -0
  257. package/package.json +376 -0
  258. package/schemas/lerna-schema.json +1855 -0
@@ -0,0 +1,128 @@
1
+ import npa from "npm-package-arg";
2
+ import { Packed } from "./pack-directory";
3
+ declare const PKG: unique symbol;
4
+ declare const _location: unique symbol;
5
+ declare const _resolved: unique symbol;
6
+ declare const _rootPath: unique symbol;
7
+ declare const _scripts: unique symbol;
8
+ declare const _contents: unique symbol;
9
+ export type AssetDefinition = string | {
10
+ from: string;
11
+ to: string;
12
+ };
13
+ export interface RawManifestLernaConfig {
14
+ command?: {
15
+ publish?: {
16
+ directory?: string;
17
+ assets?: AssetDefinition[];
18
+ };
19
+ };
20
+ }
21
+ export interface RawManifest {
22
+ name: string;
23
+ version: string;
24
+ description?: string;
25
+ private?: boolean;
26
+ bin?: Record<string, string> | string;
27
+ scripts?: Record<string, string>;
28
+ dependencies?: Record<string, string>;
29
+ devDependencies?: Record<string, string>;
30
+ optionalDependencies?: Record<string, string>;
31
+ peerDependencies?: Record<string, string>;
32
+ publishConfig?: Record<"directory" | "registry" | "tag", string>;
33
+ workspaces?: string[];
34
+ nx?: Record<string, unknown>;
35
+ gitHead?: string;
36
+ lerna?: RawManifestLernaConfig;
37
+ }
38
+ export type ExtendedNpaResult = npa.Result & {
39
+ workspaceSpec?: string;
40
+ workspaceAlias?: "*" | "^" | "~";
41
+ };
42
+ /**
43
+ * Lerna's internal representation of a local package, with
44
+ * many values resolved directly from the original JSON.
45
+ */
46
+ export declare class Package {
47
+ name: string;
48
+ [PKG]: RawManifest;
49
+ [_location]: string;
50
+ [_resolved]: npa.Result;
51
+ [_rootPath]: string;
52
+ [_scripts]: Record<string, string>;
53
+ [_contents]: string | undefined;
54
+ licensePath?: string;
55
+ packed?: Packed;
56
+ /**
57
+ * Create a Package instance from parameters, possibly reusing existing instance.
58
+ * @param ref A path to a package.json file, Package instance, or JSON object
59
+ * @param [dir] If `ref` is a JSON object, this is the location of the manifest
60
+ */
61
+ static lazy(ref: string | Package | RawManifest, dir?: string): Package;
62
+ constructor(pkg: RawManifest, location: string, rootPath?: string);
63
+ get location(): string;
64
+ get private(): boolean;
65
+ set private(isPrivate: boolean);
66
+ get resolved(): npa.Result;
67
+ get rootPath(): string;
68
+ get scripts(): Record<string, string>;
69
+ get lernaConfig(): RawManifestLernaConfig | undefined;
70
+ set lernaConfig(config: RawManifestLernaConfig | undefined);
71
+ get bin(): Record<string, string>;
72
+ get binLocation(): string;
73
+ get manifestLocation(): string;
74
+ get nodeModulesLocation(): string;
75
+ get __isLernaPackage(): boolean;
76
+ get version(): string;
77
+ set version(version: string);
78
+ get contents(): string;
79
+ set contents(subDirectory: string);
80
+ get dependencies(): Record<string, string> | undefined;
81
+ get devDependencies(): Record<string, string> | undefined;
82
+ get optionalDependencies(): Record<string, string> | undefined;
83
+ get peerDependencies(): Record<string, string> | undefined;
84
+ /**
85
+ * Map-like retrieval of arbitrary values
86
+ */
87
+ get(key: keyof RawManifest): string | boolean | string[] | Record<string, string> | RawManifestLernaConfig | Record<"directory" | "registry" | "tag", string> | Record<string, unknown> | undefined;
88
+ /**
89
+ * Map-like storage of arbitrary values
90
+ */
91
+ set(key: keyof RawManifest, val: RawManifest[keyof RawManifest]): Package;
92
+ /**
93
+ * Provide shallow copy for munging elsewhere
94
+ */
95
+ toJSON(): any;
96
+ /**
97
+ * Refresh internal state from disk (e.g., changed by external lifecycles)
98
+ */
99
+ refresh(): Promise<this>;
100
+ /**
101
+ * Write manifest changes to disk
102
+ * @returns {Promise} resolves when write finished
103
+ */
104
+ serialize(): Promise<this>;
105
+ /**
106
+ * Sync dist manifest version
107
+ */
108
+ syncDistVersion(doSync: boolean): Promise<this>;
109
+ getLocalDependency(depName: string): {
110
+ collection: "dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies";
111
+ spec: string;
112
+ } | null;
113
+ /**
114
+ * Mutate local dependency spec according to type
115
+ * @param resolved npa metadata
116
+ * @param depVersion semver
117
+ * @param savePrefix npm_config_save_prefix
118
+ * @param options
119
+ */
120
+ updateLocalDependency(resolved: ExtendedNpaResult, depVersion: string, savePrefix: string, options?: {
121
+ eraseWorkspacePrefix: boolean;
122
+ }): void;
123
+ /**
124
+ * Remove the private property, effectively making the package public.
125
+ */
126
+ removePrivate(): void;
127
+ }
128
+ export {};
@@ -0,0 +1 @@
1
+ export declare function prereleaseIdFromVersion(version: string): string | undefined;
@@ -0,0 +1,20 @@
1
+ import npmlog, { Logger } from "./npmlog";
2
+ export declare function generateProfileOutputPath(outputDirectory?: string): string;
3
+ interface ProfilerConfig {
4
+ concurrency: number;
5
+ log?: typeof npmlog;
6
+ outputDirectory?: string;
7
+ }
8
+ /**
9
+ * A profiler to trace execution times across multiple concurrent calls.
10
+ */
11
+ export declare class Profiler {
12
+ events: any[];
13
+ logger: Logger;
14
+ outputPath: string;
15
+ threads: number[];
16
+ constructor({ concurrency, log, outputDirectory }: ProfilerConfig);
17
+ run(fn: () => any, name: any): Promise<any>;
18
+ output(): Promise<void>;
19
+ }
20
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function applyExtends(config: {
2
+ [x: string]: unknown;
3
+ extends?: any;
4
+ }, cwd: string, seen?: Set<unknown>): any;
@@ -0,0 +1,82 @@
1
+ import { Package } from "../package";
2
+ interface CommandConfigs {
3
+ [command: string]: CommandConfigOptions;
4
+ }
5
+ export interface CommandConfigOptions {
6
+ _?: (string | number)[];
7
+ concurrency?: number;
8
+ sort?: boolean;
9
+ maxBuffer?: number;
10
+ stream?: boolean;
11
+ loglevel?: string;
12
+ verbose?: boolean;
13
+ progress?: boolean;
14
+ npmClient?: string;
15
+ useNx?: boolean;
16
+ independent?: boolean;
17
+ ci?: boolean;
18
+ since?: string;
19
+ }
20
+ export interface LernaConfig {
21
+ $schema: string;
22
+ version: string;
23
+ packages?: string[];
24
+ useNx?: boolean;
25
+ npmClient?: string;
26
+ command?: CommandConfigs;
27
+ }
28
+ /**
29
+ * A representation of the entire project managed by Lerna.
30
+ *
31
+ * Wherever the lerna.json file is located, that is the project root.
32
+ * All package globs are rooted from this location.
33
+ */
34
+ export declare class Project {
35
+ #private;
36
+ config: LernaConfig;
37
+ configNotFound: boolean;
38
+ rootConfigLocation: string;
39
+ rootPath: string;
40
+ packageConfigs: string[];
41
+ manifest: Package;
42
+ /**
43
+ * @deprecated Only used in legacy core utilities
44
+ * TODO: remove in v8
45
+ */
46
+ static getPackages(cwd: string): Promise<Package[]>;
47
+ /**
48
+ * @deprecated Only used in legacy core utilities
49
+ * TODO: remove in v8
50
+ */
51
+ static getPackagesSync(cwd: string): Package[];
52
+ constructor(cwd?: string, options?: {
53
+ skipLernaConfigValidations: boolean;
54
+ });
55
+ get version(): string;
56
+ set version(val: string);
57
+ get packageParentDirs(): string[];
58
+ get licensePath(): string | undefined;
59
+ get fileFinder(): (fileName: string, fileMapper: any, customGlobOpts: any) => Promise<any>;
60
+ /**
61
+ * A promise resolving to a list of Package instances
62
+ */
63
+ getPackages(): Promise<Package[]>;
64
+ /**
65
+ * A list of Package instances
66
+ */
67
+ getPackagesSync(): Package[];
68
+ getPackageLicensePaths(): Promise<string[]>;
69
+ isIndependent(): boolean;
70
+ serializeConfig(): string;
71
+ }
72
+ /**
73
+ * @deprecated Only used in legacy core utilities
74
+ * TODO: remove in v8
75
+ */
76
+ export declare const getPackages: typeof Project.getPackages;
77
+ /**
78
+ * @deprecated Only used in legacy core utilities
79
+ * TODO: remove in v8
80
+ */
81
+ export declare const getPackagesSync: typeof Project.getPackagesSync;
82
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function makeFileFinder(rootPath: string, packageConfigs: any[]): (fileName: string, fileMapper: any, customGlobOpts: any) => Promise<any>;
2
+ export declare function makeSyncFileFinder(rootPath: string, packageConfigs: any[]): <T>(fileName: string, fileMapper: (filePath: string) => T) => T[];
@@ -0,0 +1 @@
1
+ export declare function shallowExtend(json: any, defaults?: {}): any;
@@ -0,0 +1,23 @@
1
+ import { ProjectGraph, ProjectGraphDependency, ProjectGraphProjectNode } from "@nx/devkit";
2
+ import { ExtendedNpaResult, Package } from "./package";
3
+ export interface ProjectGraphProjectNodeWithPackage extends ProjectGraphProjectNode {
4
+ package: Package | null;
5
+ }
6
+ export interface ProjectGraphWorkspacePackageDependency extends ProjectGraphDependency {
7
+ targetVersionMatchesDependencyRequirement: boolean;
8
+ targetResolvedNpaResult: ExtendedNpaResult;
9
+ dependencyCollection: "dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies";
10
+ }
11
+ export interface ProjectGraphWithPackages extends ProjectGraph {
12
+ nodes: Record<string, ProjectGraphProjectNodeWithPackage>;
13
+ localPackageDependencies: Record<string, ProjectGraphWorkspacePackageDependency[]>;
14
+ }
15
+ export declare const isExternalNpmDependency: (dep: string) => boolean;
16
+ /**
17
+ * Get the package for a given project graph node with a package.
18
+ * This should be preferred over directly accessing `node.package`,
19
+ * since this function will throw an error if the package is not found.
20
+ * @param project the project graph node to get the package for
21
+ * @returns the package for the given project
22
+ */
23
+ export declare function getPackage(project: ProjectGraphProjectNodeWithPackage): Package;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Prompt for confirmation
3
+ */
4
+ export declare function promptConfirmation(message: string): Promise<boolean>;
5
+ /**
6
+ * Prompt for selection
7
+ */
8
+ export declare function promptSelectOne(message: string, { choices, filter, validate, }?: {
9
+ choices?: any;
10
+ filter?: (input: string) => string;
11
+ validate?: (input: string) => string | boolean;
12
+ }): Promise<string>;
13
+ /**
14
+ * Prompt for input
15
+ */
16
+ export declare function promptTextInput(message: string, { filter, validate, }?: {
17
+ filter?: (input: string) => string;
18
+ validate?: (input: string) => string | boolean;
19
+ }): Promise<string>;
@@ -0,0 +1,2 @@
1
+ export declare function pulseTillDone(promise: any): any;
2
+ export declare function pulseTillDone(prefix: string, promise: any): any;
@@ -0,0 +1 @@
1
+ export declare function rimrafDir(dirPath: string): Promise<void>;
@@ -0,0 +1,21 @@
1
+ import log from "./npmlog";
2
+ import { Package } from "./package";
3
+ interface LifecycleConfig {
4
+ log?: typeof log;
5
+ ignorePrepublish?: boolean;
6
+ ignoreScripts?: boolean;
7
+ nodeOptions?: string;
8
+ scriptShell?: string;
9
+ scriptsPrependNodePath?: boolean;
10
+ unsafePerm?: boolean;
11
+ stdio?: string;
12
+ }
13
+ /**
14
+ * Run a lifecycle script for a package.
15
+ * @param {import("@lerna/package").Package} pkg
16
+ * @param {string} stage
17
+ * @param {LifecycleConfig} options
18
+ */
19
+ export declare function runLifecycle(pkg: Package, stage: string, options: LifecycleConfig): Promise<any>;
20
+ export declare function createRunner(commandOptions: any): (pkg: Package, stage: string) => Promise<any>;
21
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ProjectGraphProjectNodeWithPackage, ProjectGraphWithPackages } from "./project-graph-with-packages";
2
+ interface TopologicalConfig {
3
+ concurrency?: number;
4
+ rejectCycles?: boolean;
5
+ }
6
+ /**
7
+ * Run callback in maximally-saturated topological order.
8
+ */
9
+ export declare function runProjectsTopologically<T>(projects: ProjectGraphProjectNodeWithPackage[], projectGraph: ProjectGraphWithPackages, runner: (node: ProjectGraphProjectNodeWithPackage) => Promise<T>, { concurrency, rejectCycles }?: TopologicalConfig): Promise<T[]>;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Octokit } from "@octokit/rest";
2
+ import parseGitUrl from "git-url-parse";
3
+ export declare function createGitHubClient(): Octokit;
4
+ export declare function parseGitRepo(remote?: string, opts?: any): parseGitUrl.GitUrl;
@@ -0,0 +1,11 @@
1
+ export declare function createGitLabClient(): {
2
+ repos: {
3
+ createRelease: ({ owner, repo, name, tag_name: tagName, body }: {
4
+ owner: any;
5
+ repo: any;
6
+ name: any;
7
+ tag_name: any;
8
+ body: any;
9
+ }) => Promise<void>;
10
+ };
11
+ };
@@ -0,0 +1,13 @@
1
+ export declare class GitLabClient {
2
+ token: string;
3
+ baseUrl: string;
4
+ constructor(token: string, baseUrl?: string);
5
+ createRelease({ owner, repo, name, tag_name: tagName, body }: {
6
+ owner: any;
7
+ repo: any;
8
+ name: any;
9
+ tag_name: any;
10
+ body: any;
11
+ }): Promise<void>;
12
+ releasesUrl(namespace: string, project: string): string;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { createGitHubClient, parseGitRepo } from "./github/create-github-client";
2
+ export { createGitLabClient } from "./gitlab/create-gitlab-client";
@@ -0,0 +1,5 @@
1
+ declare function tempWrite(fileContent: any, filePath?: string): Promise<string>;
2
+ declare namespace tempWrite {
3
+ var sync: (fileContent: any, filePath?: string) => string;
4
+ }
5
+ export default tempWrite;
@@ -0,0 +1 @@
1
+ export declare function timer(): () => number;
@@ -0,0 +1,2 @@
1
+ import { ProjectGraphProjectNodeWithPackage, ProjectGraphWithPackages } from "./project-graph-with-packages";
2
+ export declare function toposortProjects(projects: ProjectGraphProjectNodeWithPackage[], projectGraph: ProjectGraphWithPackages, rejectCycles?: boolean): ProjectGraphProjectNodeWithPackage[];
@@ -0,0 +1,4 @@
1
+ export declare class ValidationError extends Error {
2
+ prefix: string;
3
+ constructor(prefix: string, message: string, ...rest: unknown[]);
4
+ }
@@ -0,0 +1 @@
1
+ export declare function writeLogFile(cwd: string): void;
@@ -0,0 +1,10 @@
1
+ export { collectPackages, collectUpdates } from "./lib/collect-updates";
2
+ export { Command } from "./lib/command";
3
+ export { createSymlink } from "./lib/create-symlink";
4
+ export { getFilteredPackages } from "./lib/get-filtered-packages";
5
+ export { listableFormat } from "./lib/listable-format";
6
+ export { PackageGraph } from "./lib/package-graph";
7
+ export { PackageGraphNode } from "./lib/package-graph/package-graph-node";
8
+ export { runTopologically } from "./lib/run-topologically";
9
+ export { symlinkBinary } from "./lib/symlink-binary";
10
+ export { symlinkDependencies } from "./lib/symlink-dependencies";
@@ -0,0 +1,5 @@
1
+ import { PackageGraphNode } from "../package-graph/package-graph-node";
2
+ /**
3
+ * Build a set of nodes that are dependents of the input set.
4
+ */
5
+ export declare function collectDependents(nodes: Set<PackageGraphNode>): Set<PackageGraphNode>;
@@ -0,0 +1,10 @@
1
+ import { PackageGraphNode } from "../package-graph/package-graph-node";
2
+ export interface PackageCollectorOptions {
3
+ isCandidate?: (node?: PackageGraphNode, name?: string) => boolean;
4
+ onInclude?: (name: string) => void;
5
+ excludeDependents?: boolean;
6
+ }
7
+ /**
8
+ * Build a list of graph nodes, possibly including dependents, using predicate if available.
9
+ */
10
+ export declare function collectPackages(packages: Map<string, PackageGraphNode>, { isCandidate, onInclude, excludeDependents }?: PackageCollectorOptions): PackageGraphNode[];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Determine if any git tags are reachable.
3
+ * @param {import("@lerna/child-process").ExecOpts} opts
4
+ */
5
+ export declare function hasTags(opts?: any): boolean;
@@ -0,0 +1,19 @@
1
+ import { Package } from "@lerna/core";
2
+ import { PackageGraph } from "../package-graph";
3
+ import { collectPackages } from "./collect-packages";
4
+ export { collectPackages };
5
+ export interface UpdateCollectorOptions {
6
+ bump?: string;
7
+ canary?: boolean;
8
+ ignoreChanges?: string[];
9
+ includeMergedTags?: boolean;
10
+ forcePublish?: boolean | string | string[];
11
+ since?: string;
12
+ conventionalCommits?: boolean;
13
+ conventionalGraduate?: string | boolean;
14
+ excludeDependents?: boolean;
15
+ }
16
+ /**
17
+ * Create a list of graph nodes representing packages changed since the previous release, tagged or otherwise.
18
+ */
19
+ export declare function collectUpdates(filteredPackages: Package[], packageGraph: PackageGraph, execOpts: any, commandOptions: UpdateCollectorOptions): import("../..").PackageGraphNode[];
@@ -0,0 +1,7 @@
1
+ import { PackageGraphNode } from "../package-graph/package-graph-node";
2
+ /**
3
+ * @param {string} committish
4
+ * @param {import("@lerna/child-process").ExecOpts} execOpts
5
+ * @param {string[]} ignorePatterns
6
+ */
7
+ export declare function makeDiffPredicate(committish: string, execOpts: any, ignorePatterns?: string[]): (node: PackageGraphNode) => boolean;
@@ -0,0 +1 @@
1
+ export declare function cleanStack(err: string | Error, className: string): string;
@@ -0,0 +1,2 @@
1
+ import { CommandConfigOptions } from "@lerna/core";
2
+ export declare function defaultOptions<T extends CommandConfigOptions>(...sources: any[]): T;
@@ -0,0 +1,40 @@
1
+ import { CommandConfigOptions, Logger, Project } from "@lerna/core";
2
+ import { PackageGraph } from "../package-graph";
3
+ export declare class Command<T extends CommandConfigOptions = CommandConfigOptions> {
4
+ readonly _argv: any;
5
+ name: string;
6
+ composed: boolean;
7
+ options: T;
8
+ runner: Promise<unknown>;
9
+ concurrency?: number;
10
+ toposort: boolean;
11
+ execOpts?: {
12
+ cwd: string;
13
+ maxBuffer?: number;
14
+ };
15
+ packageGraph?: PackageGraph;
16
+ logger: Logger;
17
+ private _project?;
18
+ get project(): Project;
19
+ set project(project: Project);
20
+ constructor(_argv: any, { skipValidations }?: {
21
+ skipValidations: boolean;
22
+ });
23
+ then(onResolved: () => void, onRejected: (err: string | Error) => void): Promise<void>;
24
+ catch(onRejected: (err: string | Error) => void): Promise<unknown>;
25
+ get requiresGit(): boolean;
26
+ get otherCommandConfigs(): never[];
27
+ configureEnvironment(): void;
28
+ configureOptions(): void;
29
+ argv(argv: any, arg1: any, config: any, envDefaults: any): any;
30
+ envDefaults(argv: any, arg1: any, config: any, envDefaults: any): any;
31
+ configureProperties(): void;
32
+ configureLogging(): void;
33
+ enableProgressBar(): void;
34
+ gitInitialized(): boolean;
35
+ runValidations(): void;
36
+ runPreparations(): Promise<void>;
37
+ runCommand(): Promise<void>;
38
+ initialize(): void;
39
+ execute(): void;
40
+ }
@@ -0,0 +1 @@
1
+ export declare function logPackageError(err: any, stream?: boolean): void;
@@ -0,0 +1 @@
1
+ export declare function warnIfHanging(): void;
@@ -0,0 +1,4 @@
1
+ import { SymlinkType } from "fs-extra";
2
+ type CreateSymlinkType = SymlinkType | "exec";
3
+ export declare function createSymlink(src: string, dest: string, type: CreateSymlinkType): Promise<void>;
4
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Package } from "@lerna/core";
2
+ /**
3
+ * Filters a list of packages, returning all packages that match the `include` glob[s]
4
+ * and do not match the `exclude` glob[s].
5
+ *
6
+ * @param packagesToFilter The packages to filter
7
+ * @param [include] A list of globs to match the package name against
8
+ * @param [exclude] A list of globs to filter the package name against
9
+ * @param [showPrivate] When false, filter out private packages
10
+ * @param [continueIfNoMatch] When true, do not throw if no package is matched
11
+ * @throws when a given glob would produce an empty list of packages and `continueIfNoMatch` is not set.
12
+ */
13
+ export declare function filterPackages(packagesToFilter: Package[], include?: string[], exclude?: string[], showPrivate?: boolean, continueIfNoMatch?: boolean): Package[];
@@ -0,0 +1,7 @@
1
+ import { FilterOptions, Package } from "@lerna/core";
2
+ import { ExecOptions } from "child_process";
3
+ import { PackageGraph } from "./package-graph";
4
+ /**
5
+ * Retrieve a list of Package instances filtered by various options.
6
+ */
7
+ export declare function getFilteredPackages(packageGraph: PackageGraph, execOpts: ExecOptions, opts: Partial<FilterOptions>): Promise<Package[]>;
@@ -0,0 +1,8 @@
1
+ import { ListableOptions, Package } from "@lerna/core";
2
+ /**
3
+ * Format a list of packages according to specified options.
4
+ */
5
+ export declare function listableFormat(pkgList: Package[], options: ListableOptions): {
6
+ text: string;
7
+ count: number;
8
+ };
@@ -0,0 +1,37 @@
1
+ import { PackageGraphNode } from "./package-graph-node";
2
+ /**
3
+ * Represents a cyclic collection of nodes in a PackageGraph.
4
+ * It is meant to be used as a black box, where the only exposed
5
+ * information are the connections to the other nodes of the graph.
6
+ * It can contain either `PackageGraphNode`s or other `CyclicPackageGraphNode`s.
7
+ */
8
+ export declare class CyclicPackageGraphNode extends Map<string, PackageGraphNode | CyclicPackageGraphNode> {
9
+ name: string;
10
+ localDependencies: Map<string, PackageGraphNode | CyclicPackageGraphNode>;
11
+ localDependents: Map<string, PackageGraphNode | CyclicPackageGraphNode>;
12
+ constructor();
13
+ get isCycle(): boolean;
14
+ /**
15
+ * @returns A representation of a cycle, like like `A -> B -> C -> A`.
16
+ */
17
+ toString(): string;
18
+ /**
19
+ * Flattens a CyclicPackageGraphNode (which can have multiple level of cycles).
20
+ */
21
+ flatten(): PackageGraphNode[];
22
+ /**
23
+ * Checks if a given node is contained in this cycle (or in a nested one)
24
+ *
25
+ * @param name The name of the package to search in this cycle
26
+ */
27
+ contains(name: string): boolean;
28
+ /**
29
+ * Adds a graph node, or a nested cycle, to this group.
30
+ */
31
+ insert(node: PackageGraphNode | CyclicPackageGraphNode): void;
32
+ /**
33
+ * Remove pointers to candidate node from internal collections.
34
+ * @param candidateNode instance to unlink
35
+ */
36
+ unlink(candidateNode: PackageGraphNode | CyclicPackageGraphNode): void;
37
+ }