@lerna-lite/core 1.1.0 → 1.4.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 (147) hide show
  1. package/README.md +3 -3
  2. package/dist/child-process.d.ts +62 -62
  3. package/dist/child-process.js +165 -165
  4. package/dist/command.d.ts +37 -35
  5. package/dist/command.js +262 -262
  6. package/dist/command.js.map +1 -1
  7. package/dist/conventional-commits/constants.d.ts +4 -4
  8. package/dist/conventional-commits/constants.js +12 -12
  9. package/dist/conventional-commits/get-changelog-config.d.ts +12 -12
  10. package/dist/conventional-commits/get-changelog-config.js +98 -98
  11. package/dist/conventional-commits/index.d.ts +6 -6
  12. package/dist/conventional-commits/index.js +22 -22
  13. package/dist/conventional-commits/make-bump-only-filter.d.ts +6 -6
  14. package/dist/conventional-commits/make-bump-only-filter.js +22 -22
  15. package/dist/conventional-commits/read-existing-changelog.d.ts +7 -7
  16. package/dist/conventional-commits/read-existing-changelog.js +32 -32
  17. package/dist/conventional-commits/recommend-version.d.ts +11 -10
  18. package/dist/conventional-commits/recommend-version.js +86 -86
  19. package/dist/conventional-commits/recommend-version.js.map +1 -1
  20. package/dist/conventional-commits/update-changelog.d.ts +11 -11
  21. package/dist/conventional-commits/update-changelog.js +83 -83
  22. package/dist/git-clients/GitLabClient.d.ts +8 -8
  23. package/dist/git-clients/GitLabClient.js +39 -39
  24. package/dist/git-clients/github-client.d.ts +6 -6
  25. package/dist/git-clients/github-client.js +40 -40
  26. package/dist/git-clients/gitlab-client.d.ts +6 -6
  27. package/dist/git-clients/gitlab-client.js +21 -21
  28. package/dist/git-clients/index.d.ts +2 -2
  29. package/dist/git-clients/index.js +18 -18
  30. package/dist/index.d.ts +12 -12
  31. package/dist/index.js +30 -30
  32. package/dist/models/command-options.d.ts +206 -0
  33. package/dist/models/command-options.js +3 -0
  34. package/dist/models/command-options.js.map +1 -0
  35. package/dist/models/index.d.ts +2 -148
  36. package/dist/models/index.js +18 -2
  37. package/dist/models/index.js.map +1 -1
  38. package/dist/models/interfaces.d.ts +201 -0
  39. package/dist/models/interfaces.js +3 -0
  40. package/dist/models/interfaces.js.map +1 -0
  41. package/dist/otplease.d.ts +14 -13
  42. package/dist/otplease.js +108 -112
  43. package/dist/otplease.js.map +1 -1
  44. package/dist/package-graph/index.d.ts +2 -2
  45. package/dist/package-graph/index.js +18 -18
  46. package/dist/package-graph/lib/cyclic-package-graph-node.d.ts +42 -42
  47. package/dist/package-graph/lib/cyclic-package-graph-node.js +97 -97
  48. package/dist/package-graph/lib/index.d.ts +3 -3
  49. package/dist/package-graph/lib/index.js +19 -19
  50. package/dist/package-graph/lib/package-graph-node.d.ts +33 -33
  51. package/dist/package-graph/lib/package-graph-node.js +58 -58
  52. package/dist/package-graph/lib/report-cycles.d.ts +1 -1
  53. package/dist/package-graph/lib/report-cycles.js +19 -19
  54. package/dist/package-graph/package-graph.d.ts +79 -79
  55. package/dist/package-graph/package-graph.js +276 -248
  56. package/dist/package-graph/package-graph.js.map +1 -1
  57. package/dist/package.d.ts +91 -96
  58. package/dist/package.js +282 -260
  59. package/dist/package.js.map +1 -1
  60. package/dist/project/index.d.ts +2 -2
  61. package/dist/project/index.js +18 -18
  62. package/dist/project/lib/apply-extends.d.ts +10 -6
  63. package/dist/project/lib/apply-extends.js +37 -37
  64. package/dist/project/lib/apply-extends.js.map +1 -1
  65. package/dist/project/lib/index.d.ts +3 -3
  66. package/dist/project/lib/index.js +19 -19
  67. package/dist/project/lib/make-file-finder.d.ts +3 -3
  68. package/dist/project/lib/make-file-finder.js +71 -71
  69. package/dist/project/lib/shallow-extend.d.ts +11 -5
  70. package/dist/project/lib/shallow-extend.js +24 -24
  71. package/dist/project/lib/shallow-extend.js.map +1 -1
  72. package/dist/project/project.d.ts +45 -51
  73. package/dist/project/project.js +198 -197
  74. package/dist/project/project.js.map +1 -1
  75. package/dist/prompt.d.ts +23 -23
  76. package/dist/prompt.js +75 -75
  77. package/dist/utils/check-working-tree.d.ts +8 -8
  78. package/dist/utils/check-working-tree.js +41 -41
  79. package/dist/utils/clean-stack.d.ts +5 -5
  80. package/dist/utils/clean-stack.js +18 -18
  81. package/dist/utils/collect-uncommitted.d.ts +18 -19
  82. package/dist/utils/collect-uncommitted.js +40 -45
  83. package/dist/utils/collect-uncommitted.js.map +1 -1
  84. package/dist/utils/collect-updates/collect-updates.d.ts +11 -11
  85. package/dist/utils/collect-updates/collect-updates.js +82 -82
  86. package/dist/utils/collect-updates/index.d.ts +2 -2
  87. package/dist/utils/collect-updates/index.js +18 -18
  88. package/dist/utils/collect-updates/lib/collect-dependents.d.ts +11 -11
  89. package/dist/utils/collect-updates/lib/collect-dependents.js +45 -45
  90. package/dist/utils/collect-updates/lib/collect-packages.d.ts +13 -13
  91. package/dist/utils/collect-updates/lib/collect-packages.js +33 -33
  92. package/dist/utils/collect-updates/lib/get-packages-for-option.d.ts +5 -5
  93. package/dist/utils/collect-updates/lib/get-packages-for-option.js +30 -30
  94. package/dist/utils/collect-updates/lib/has-tags.d.ts +5 -5
  95. package/dist/utils/collect-updates/lib/has-tags.js +26 -26
  96. package/dist/utils/collect-updates/lib/index.d.ts +5 -5
  97. package/dist/utils/collect-updates/lib/index.js +21 -21
  98. package/dist/utils/collect-updates/lib/make-diff-predicate.d.ts +7 -7
  99. package/dist/utils/collect-updates/lib/make-diff-predicate.js +64 -64
  100. package/dist/utils/conf.d.ts +25 -25
  101. package/dist/utils/conf.js +255 -255
  102. package/dist/utils/defaults.d.ts +1 -1
  103. package/dist/utils/defaults.js +182 -182
  104. package/dist/utils/defaults.js.map +1 -1
  105. package/dist/utils/describe-ref.d.ts +37 -37
  106. package/dist/utils/describe-ref.js +80 -80
  107. package/dist/utils/env-replace.d.ts +1 -1
  108. package/dist/utils/env-replace.js +22 -22
  109. package/dist/utils/find-prefix.d.ts +2 -2
  110. package/dist/utils/find-prefix.js +48 -48
  111. package/dist/utils/index.d.ts +23 -22
  112. package/dist/utils/index.js +39 -38
  113. package/dist/utils/index.js.map +1 -1
  114. package/dist/utils/log-package-error.d.ts +5 -5
  115. package/dist/utils/log-package-error.js +35 -35
  116. package/dist/utils/nerf-dart.d.ts +1 -1
  117. package/dist/utils/nerf-dart.js +18 -18
  118. package/dist/utils/npm-conf.d.ts +4 -4
  119. package/dist/utils/npm-conf.js +55 -55
  120. package/dist/utils/output.d.ts +1 -1
  121. package/dist/utils/output.js +13 -13
  122. package/dist/utils/parse-field.d.ts +1 -1
  123. package/dist/utils/parse-field.js +65 -65
  124. package/dist/utils/prerelease-id-from-version.d.ts +5 -5
  125. package/dist/utils/prerelease-id-from-version.js +15 -15
  126. package/dist/utils/pulse-till-done.d.ts +1 -1
  127. package/dist/utils/pulse-till-done.js +40 -40
  128. package/dist/utils/query-graph.d.ts +36 -36
  129. package/dist/utils/query-graph.js +77 -77
  130. package/dist/utils/query-graph.js.map +1 -1
  131. package/dist/utils/run-lifecycle.d.ts +10 -10
  132. package/dist/utils/run-lifecycle.js +131 -107
  133. package/dist/utils/run-lifecycle.js.map +1 -1
  134. package/dist/utils/run-topologically.d.ts +12 -12
  135. package/dist/utils/run-topologically.js +36 -36
  136. package/dist/utils/temp-write.d.ts +13 -0
  137. package/dist/utils/temp-write.js +50 -0
  138. package/dist/utils/temp-write.js.map +1 -0
  139. package/dist/utils/types.d.ts +131 -129
  140. package/dist/utils/types.js +138 -138
  141. package/dist/utils/warn-if-hanging.d.ts +1 -1
  142. package/dist/utils/warn-if-hanging.js +17 -17
  143. package/dist/utils/write-log-file.d.ts +1 -1
  144. package/dist/utils/write-log-file.js +32 -32
  145. package/dist/validation-error.d.ts +4 -4
  146. package/dist/validation-error.js +18 -18
  147. package/package.json +14 -10
package/dist/package.d.ts CHANGED
@@ -1,96 +1,91 @@
1
- /**
2
- * @typedef {object} RawManifest The subset of package.json properties that Lerna-Lite uses
3
- * @property {string} name
4
- * @property {string} version
5
- * @property {boolean} [private]
6
- * @property {Record<string, string>|string} [bin]
7
- * @property {Record<string, string>} [scripts]
8
- * @property {Record<string, string>} [dependencies]
9
- * @property {Record<string, string>} [devDependencies]
10
- * @property {Record<string, string>} [optionalDependencies]
11
- * @property {Record<string, string>} [peerDependencies]
12
- * @property {Record<'directory' | 'registry' | 'tag', string>} [publishConfig]
13
- * @property {string[] | { packages: string[] }} [workspaces]
14
- */
15
- /**
16
- * Lerna's internal representation of a local package, with
17
- * many values resolved directly from the original JSON.
18
- */
19
- export declare class Package {
20
- _id: string;
21
- name: string;
22
- licensePath: string;
23
- localDependencies: Map<string, any>;
24
- /**
25
- * Create a Package instance from parameters, possibly reusing existing instance.
26
- * @param {string|Package|RawManifest} ref A path to a package.json file, Package instance, or JSON object
27
- * @param {string} [dir] If `ref` is a JSON object, this is the location of the manifest
28
- * @returns {Package}
29
- */
30
- static lazy(ref: any, dir?: string): any;
31
- /**
32
- * @param {RawManifest} pkg
33
- * @param {string} location
34
- * @param {string} [rootPath]
35
- */
36
- constructor(pkg: Package, location: string, rootPath?: string);
37
- get location(): string;
38
- get private(): boolean;
39
- get resolved(): {
40
- name: string;
41
- bin: any;
42
- scope: any;
43
- };
44
- get rootPath(): string;
45
- get scripts(): any;
46
- get bin(): any;
47
- get binLocation(): string;
48
- get manifestLocation(): string;
49
- get nodeModulesLocation(): string;
50
- get __isLernaPackage(): boolean;
51
- get version(): string;
52
- set version(version: string);
53
- get contents(): any;
54
- set contents(subDirectory: any);
55
- get dependencies(): string[];
56
- get devDependencies(): string[];
57
- get optionalDependencies(): string[];
58
- get peerDependencies(): string[];
59
- get pkg(): Package;
60
- /**
61
- * Map-like retrieval of arbitrary values
62
- * @template {keyof RawManifest} K
63
- * @param {K} key field name to retrieve value
64
- * @returns {RawManifest[K]} value stored under key, if present
65
- */
66
- get(key: any): any;
67
- /**
68
- * Map-like storage of arbitrary values
69
- * @template {keyof RawManifest} K
70
- * @param {T} key field name to store value
71
- * @param {RawManifest[K]} val value to store
72
- * @returns {Package} instance for chaining
73
- */
74
- set(key: string, val: any): this;
75
- /**
76
- * Provide shallow copy for munging elsewhere
77
- * @returns {Object}
78
- */
79
- toJSON(): {};
80
- /**
81
- * Refresh internal state from disk (e.g., changed by external lifecycles)
82
- */
83
- refresh(): Promise<this>;
84
- /**
85
- * Write manifest changes to disk
86
- * @returns {Promise} resolves when write finished
87
- */
88
- serialize(): Promise<this>;
89
- /**
90
- * Mutate local dependency spec according to type
91
- * @param {Object} resolved npa metadata
92
- * @param {String} depVersion semver
93
- * @param {String} savePrefix npm_config_save_prefix
94
- */
95
- updateLocalDependency(resolved: any, depVersion: any, savePrefix: any): void;
96
- }
1
+ import { CommandType, NpaResolveResult, RawManifest } from './models';
2
+ /**
3
+ * Lerna's internal representation of a local package, with
4
+ * many values resolved directly from the original JSON.
5
+ */
6
+ export declare class Package {
7
+ _id: string;
8
+ name: string;
9
+ licensePath: string;
10
+ localDependencies: Map<string, any>;
11
+ /**
12
+ * Create a Package instance from parameters, possibly reusing existing instance.
13
+ * @param {string|Package|RawManifest} ref A path to a package.json file, Package instance, or JSON object
14
+ * @param {string} [dir] If `ref` is a JSON object, this is the location of the manifest
15
+ * @returns {Package}
16
+ */
17
+ static lazy(ref: string | Package | RawManifest, dir?: string): Package;
18
+ /**
19
+ * @param {RawManifest} pkg
20
+ * @param {string} location
21
+ * @param {string} [rootPath]
22
+ */
23
+ constructor(pkg: RawManifest, location: string, rootPath?: string);
24
+ get location(): string;
25
+ get private(): boolean;
26
+ get resolved(): {
27
+ name: string;
28
+ bin: any;
29
+ scope: any;
30
+ };
31
+ get rootPath(): string;
32
+ get scripts(): any;
33
+ get bin(): any;
34
+ get binLocation(): string;
35
+ get manifestLocation(): string;
36
+ get nodeModulesLocation(): string;
37
+ get __isLernaPackage(): boolean;
38
+ get version(): string;
39
+ set version(version: string);
40
+ get workspaces(): string[] | {
41
+ packages: string[];
42
+ };
43
+ set workspaces(workspaces: string[] | {
44
+ packages: string[];
45
+ });
46
+ get contents(): string;
47
+ set contents(subDirectory: string);
48
+ get dependencies(): string[];
49
+ get devDependencies(): string[];
50
+ get optionalDependencies(): string[];
51
+ get peerDependencies(): string[];
52
+ get pkg(): Package;
53
+ /**
54
+ * Map-like retrieval of arbitrary values
55
+ * @template {keyof RawManifest} K
56
+ * @param {K} key field name to retrieve value
57
+ * @returns {RawManifest[K]} value stored under key, if present
58
+ */
59
+ get<K extends keyof RawManifest>(key: string): K;
60
+ /**
61
+ * Map-like storage of arbitrary values
62
+ * @template {keyof RawManifest} K
63
+ * @param {T} key field name to store value
64
+ * @param {RawManifest[K]} val value to store
65
+ * @returns {Package} instance for chaining
66
+ */
67
+ set(key: string, val: RawManifest[keyof RawManifest]): Package;
68
+ /**
69
+ * Provide shallow copy for munging elsewhere
70
+ * @returns {Object}
71
+ */
72
+ toJSON(): {};
73
+ /**
74
+ * Refresh internal state from disk (e.g., changed by external lifecycles)
75
+ */
76
+ refresh(): Promise<this>;
77
+ /**
78
+ * Write manifest changes to disk
79
+ * @returns {Promise} resolves when write finished
80
+ */
81
+ serialize(): Promise<this>;
82
+ /**
83
+ * Mutate local dependency spec according to type
84
+ * @param {Object} resolved npa metadata
85
+ * @param {String} depVersion semver
86
+ * @param {String} savePrefix npm_config_save_prefix
87
+ * @param {Boolean} workspaceStrictMatch - are we using strict match with `workspace:` protocol
88
+ * @param {String} updatedByCommand - which command called this update?
89
+ */
90
+ updateLocalDependency(resolved: NpaResolveResult, depVersion: string, savePrefix: string, workspaceStrictMatch?: boolean, updatedByCommand?: CommandType): void;
91
+ }