@lerna-lite/core 1.9.0 → 1.11.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.
- package/dist/command.js +3 -4
- package/dist/command.js.map +1 -1
- package/dist/conventional-commits/get-changelog-config.d.ts +5 -6
- package/dist/conventional-commits/get-changelog-config.js +1 -1
- package/dist/conventional-commits/get-changelog-config.js.map +1 -1
- package/dist/conventional-commits/get-commits-since-last-release.d.ts +11 -8
- package/dist/conventional-commits/get-commits-since-last-release.js +29 -17
- package/dist/conventional-commits/get-commits-since-last-release.js.map +1 -1
- package/dist/conventional-commits/get-github-commits.d.ts +1 -1
- package/dist/conventional-commits/get-github-commits.js.map +1 -1
- package/dist/conventional-commits/index.d.ts +1 -0
- package/dist/conventional-commits/index.js +1 -0
- package/dist/conventional-commits/index.js.map +1 -1
- package/dist/conventional-commits/update-changelog.js +10 -76
- package/dist/conventional-commits/update-changelog.js.map +1 -1
- package/dist/conventional-commits/writer-opts-transform.d.ts +38 -0
- package/dist/conventional-commits/writer-opts-transform.js +72 -0
- package/dist/conventional-commits/writer-opts-transform.js.map +1 -0
- package/dist/git-clients/GitLabClient.d.ts +1 -1
- package/dist/git-clients/GitLabClient.js +2 -3
- package/dist/git-clients/GitLabClient.js.map +1 -1
- package/dist/git-clients/gitlab-client.js +1 -1
- package/dist/git-clients/gitlab-client.js.map +1 -1
- package/dist/models/command-options.d.ts +30 -30
- package/dist/models/interfaces.d.ts +18 -0
- package/dist/package-graph/package-graph.d.ts +7 -7
- package/dist/package-graph/package-graph.js +9 -10
- package/dist/package-graph/package-graph.js.map +1 -1
- package/dist/prompt.d.ts +3 -3
- package/dist/utils/collect-updates/__helpers__/build-graph.d.ts +3 -0
- package/dist/utils/collect-updates/__helpers__/build-graph.js +76 -0
- package/dist/utils/collect-updates/__helpers__/build-graph.js.map +1 -0
- package/dist/utils/query-graph.d.ts +1 -1
- package/package.json +14 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlab-client.js","sourceRoot":"","sources":["../../src/git-clients/gitlab-client.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AACzB,iDAA8C;AAE9C,SAAS,eAAe,CAAC,MAAM;IAC7B,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAE7C,gBAAG,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IAED,MAAM,MAAM,GAAG,IAAI,2BAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"gitlab-client.js","sourceRoot":"","sources":["../../src/git-clients/gitlab-client.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAyB;AACzB,iDAA8C;AAE9C,SAAS,eAAe,CAAC,MAAM;IAC7B,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAE7C,gBAAG,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IAED,MAAM,MAAM,GAAG,IAAI,2BAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAEQ,gDAAkB"}
|
|
@@ -6,13 +6,13 @@ export interface ChangedCommandOption {
|
|
|
6
6
|
conventionalGraduate: boolean | string | string[];
|
|
7
7
|
/** always include targeted packages when detecting changed packages, skipping default logic. */
|
|
8
8
|
forcePublish?: boolean | string | string[];
|
|
9
|
-
/** ignore changes in files matched by glob(s) when detecting changed packages. Pass
|
|
9
|
+
/** ignore changes in files matched by glob(s) when detecting changed packages. Pass `--no-ignore-changes` to completely disable. */
|
|
10
10
|
ignoreChanges: string[];
|
|
11
11
|
/** include tags from merged branches when detecting changed packages. */
|
|
12
12
|
includeMergedTags?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface DiffCommandOption {
|
|
15
|
-
/** ignore changes in files matched by glob(s) when detecting changed packages. Pass
|
|
15
|
+
/** ignore changes in files matched by glob(s) when detecting changed packages. Pass `--no-ignore-changes` to completely disable. */
|
|
16
16
|
ignoreChanges: string[];
|
|
17
17
|
/** package name */
|
|
18
18
|
pkgName: string;
|
|
@@ -30,11 +30,11 @@ export interface ExecCommandOption {
|
|
|
30
30
|
parallel?: boolean;
|
|
31
31
|
/** Continue executing command despite non-zero exit in a given package. */
|
|
32
32
|
noBail?: boolean;
|
|
33
|
-
/** proxy for
|
|
33
|
+
/** proxy for `--no-bail` */
|
|
34
34
|
bail?: boolean;
|
|
35
35
|
/** Do not prefix streaming output. */
|
|
36
36
|
noPrefix?: boolean;
|
|
37
|
-
/** proxy for
|
|
37
|
+
/** proxy for `--no-prefix` */
|
|
38
38
|
prefix?: boolean;
|
|
39
39
|
/** Profile command executions and output performance profile to default location. */
|
|
40
40
|
profile?: boolean;
|
|
@@ -66,7 +66,7 @@ export interface ListCommandOption {
|
|
|
66
66
|
toposort?: boolean;
|
|
67
67
|
}
|
|
68
68
|
export interface PublishCommandOption extends VersionCommandOption {
|
|
69
|
-
/** alias to
|
|
69
|
+
/** alias to `--canary` */
|
|
70
70
|
c?: boolean;
|
|
71
71
|
/** Publish packages after every successful merge using the sha as part of the tag. */
|
|
72
72
|
canary?: boolean;
|
|
@@ -90,7 +90,7 @@ export interface PublishCommandOption extends VersionCommandOption {
|
|
|
90
90
|
ignoreScripts?: boolean;
|
|
91
91
|
/** Do not reset changes file-by-file, but globally. */
|
|
92
92
|
noGranularPathspec?: boolean;
|
|
93
|
-
/** proxy for
|
|
93
|
+
/** proxy for `--no-granular-pathspec` */
|
|
94
94
|
granularPathspec?: boolean;
|
|
95
95
|
/** Supply a one-time password for publishing with two-factor authentication. */
|
|
96
96
|
otp?: string;
|
|
@@ -105,9 +105,9 @@ export interface PublishCommandOption extends VersionCommandOption {
|
|
|
105
105
|
tempTag?: boolean;
|
|
106
106
|
/** Do not verify package read-write access for current npm user. */
|
|
107
107
|
noVerifyAccess?: boolean;
|
|
108
|
-
/** proxy for
|
|
108
|
+
/** proxy for `--no-verify-access` */
|
|
109
109
|
verifyAccess?: boolean;
|
|
110
|
-
/** alias to
|
|
110
|
+
/** alias to `--yes` */
|
|
111
111
|
y?: boolean;
|
|
112
112
|
/** Skip all confirmation prompts. */
|
|
113
113
|
yes?: boolean;
|
|
@@ -123,25 +123,25 @@ export interface VersionCommandOption {
|
|
|
123
123
|
conventionalCommits?: boolean;
|
|
124
124
|
/** Version currently prereleased packages to a non-prerelease version. */
|
|
125
125
|
conventionalGraduate?: boolean | string;
|
|
126
|
-
/** Version changed packages as prereleases when using
|
|
126
|
+
/** Version changed packages as prereleases when using `--conventional-commits`. */
|
|
127
127
|
conventionalPrerelease?: boolean | string;
|
|
128
|
-
/** Add a custom message at the top of your "changelog.md" which is located in the root of your project. This option is only available when using
|
|
128
|
+
/** Add a custom message at the top of your "changelog.md" which is located in the root of your project. This option is only available when using `--conventional-commits` with changelogs. */
|
|
129
129
|
changelogHeaderMessage?: string;
|
|
130
130
|
/**
|
|
131
|
-
* Specify if we want to include the commit author's name, this option is only available when using
|
|
131
|
+
* Specify if we want to include the commit author's name, this option is only available when using `--conventional-commits` with changelogs.
|
|
132
132
|
* We can also optionally provide a custom message or else a default format will be used.
|
|
133
133
|
*/
|
|
134
134
|
changelogIncludeCommitsGitAuthor?: boolean | string;
|
|
135
135
|
/** @deprecated option renamed to `changelogIncludeCommitsGitAuthor` */
|
|
136
136
|
changelogIncludeCommitAuthorFullname?: boolean | string;
|
|
137
137
|
/**
|
|
138
|
-
* Specify if we want to include the commit remote client login name (ie GitHub username), this option is only available when using
|
|
138
|
+
* Specify if we want to include the commit remote client login name (ie GitHub username), this option is only available when using `--conventional-commits` with changelogs.
|
|
139
139
|
* We can also optionally provide a custom message or else a default format will be used.
|
|
140
140
|
*/
|
|
141
141
|
changelogIncludeCommitsClientLogin?: boolean | string;
|
|
142
142
|
/**
|
|
143
143
|
* Add a custom message as a prefix to each new version in your "changelog.md" which is located in the root of your project.
|
|
144
|
-
* This option is only available when using
|
|
144
|
+
* This option is only available when using `--conventional-commits` with changelogs.
|
|
145
145
|
*/
|
|
146
146
|
changelogVersionMessage?: string;
|
|
147
147
|
/** Defaults 'angular', custom conventional-changelog preset. */
|
|
@@ -158,42 +158,42 @@ export interface VersionCommandOption {
|
|
|
158
158
|
gitRemote: string;
|
|
159
159
|
/**
|
|
160
160
|
* Ignore changes in files matched by glob(s) when detecting changed packages.
|
|
161
|
-
* Pass
|
|
161
|
+
* Pass `--no-ignore-changes` to completely disable.
|
|
162
162
|
*/
|
|
163
163
|
ignoreChanges?: string[];
|
|
164
|
-
/** Disable all lifecycle scripts */
|
|
164
|
+
/** Disable all lifecycle scripts. */
|
|
165
165
|
ignoreScripts?: boolean;
|
|
166
166
|
/** Include tags from merged branches when detecting changed packages. */
|
|
167
167
|
includeMergedTags?: boolean;
|
|
168
|
-
/** alias to
|
|
168
|
+
/** alias to `--message`. */
|
|
169
169
|
m?: string;
|
|
170
170
|
/** Use a custom commit message when creating the version commit. */
|
|
171
171
|
message?: string;
|
|
172
|
-
/** Do not generate CHANGELOG.md files when using
|
|
172
|
+
/** Do not generate CHANGELOG.md files when using `--conventional-commits`. */
|
|
173
173
|
noChangelog?: boolean;
|
|
174
|
-
/** proxy for
|
|
174
|
+
/** proxy for `--no-changelog`. */
|
|
175
175
|
changelog?: boolean;
|
|
176
176
|
/** Do not run git commit hooks when committing version changes. */
|
|
177
177
|
noCommitHooks?: boolean;
|
|
178
|
-
/** proxy for
|
|
178
|
+
/** proxy for `--no-commit-hooks`. */
|
|
179
179
|
commitHooks?: boolean;
|
|
180
180
|
/** Do not commit or tag version changes. */
|
|
181
181
|
noGitTagVersion?: boolean;
|
|
182
|
-
/** proxy for
|
|
182
|
+
/** proxy for `--no-git-tag-version`. */
|
|
183
183
|
gitTagVersion?: boolean;
|
|
184
184
|
/** Do not stage changes file-by-file, but globally. */
|
|
185
185
|
noGranularPathspec?: boolean;
|
|
186
|
-
/** Stage changes file-by-file, not globally. Proxy for
|
|
186
|
+
/** Stage changes file-by-file, not globally. Proxy for `--no-granular-pathspec`. */
|
|
187
187
|
granularPathspec?: boolean;
|
|
188
188
|
/** Do not version private packages. */
|
|
189
189
|
noPrivate?: boolean;
|
|
190
|
-
/** proxy for
|
|
190
|
+
/** proxy for `--no-private`. */
|
|
191
191
|
private?: boolean;
|
|
192
192
|
/** Do not push tagged commit to git remote. */
|
|
193
193
|
noPush?: boolean;
|
|
194
|
-
/** proxy for
|
|
194
|
+
/** proxy for `--no-push`. */
|
|
195
195
|
push?: boolean;
|
|
196
|
-
/** Defaults to 'alpha', specify the prerelease identifier when versioning a prerelease */
|
|
196
|
+
/** Defaults to 'alpha', specify the prerelease identifier when versioning a prerelease. */
|
|
197
197
|
preid?: string;
|
|
198
198
|
/** Remote git client, which client is used when reading commits from remote which is useful when associating client login for each changelog entry. */
|
|
199
199
|
remoteClient?: RemoteClientType;
|
|
@@ -211,14 +211,14 @@ export interface VersionCommandOption {
|
|
|
211
211
|
noManuallyUpdateRootLockfile?: boolean;
|
|
212
212
|
/** Defaults to true when found, update the project root lock file, the lib will internally read/write back to the lock file. */
|
|
213
213
|
manuallyUpdateRootLockfile?: boolean;
|
|
214
|
-
/** Runs `npm install --package-lock-only` or equivalent depending on the package manager defined in `npmClient
|
|
214
|
+
/** Runs `npm install --package-lock-only` or equivalent depending on the package manager defined in `npmClient`. */
|
|
215
215
|
syncWorkspaceLock?: boolean;
|
|
216
216
|
/**
|
|
217
217
|
* @deprecated Strict match transform version numbers to an exact range (like "1.2.3") rather than with a caret (like ^1.2.3) when using `workspace:*`.
|
|
218
218
|
* Future version will make `workspace:` protocol as strict matching at all time, so this flag becomes redundant.
|
|
219
219
|
*/
|
|
220
220
|
workspaceStrictMatch?: boolean;
|
|
221
|
-
/** alias to
|
|
221
|
+
/** alias to `--yes` */
|
|
222
222
|
y?: boolean;
|
|
223
223
|
/** Skip all confirmation prompts. */
|
|
224
224
|
yes?: boolean;
|
|
@@ -234,19 +234,19 @@ export interface RunCommandOption {
|
|
|
234
234
|
parallel?: boolean;
|
|
235
235
|
/** Continue running script despite non-zero exit in a given package. */
|
|
236
236
|
noBail?: boolean;
|
|
237
|
-
/** proxy for
|
|
237
|
+
/** proxy for `--no-bail`. */
|
|
238
238
|
bail?: boolean;
|
|
239
239
|
/** Do not prefix streaming output. */
|
|
240
240
|
noPrefix?: boolean;
|
|
241
|
-
/** proxy for
|
|
241
|
+
/** proxy for `--no-prefix`. */
|
|
242
242
|
prefix?: boolean;
|
|
243
243
|
/** Profile script executions and output performance profile to default location. */
|
|
244
244
|
profile?: boolean;
|
|
245
245
|
/** Output performance profile to custom location instead of default project root. */
|
|
246
246
|
profileLocation?: string;
|
|
247
|
-
/** npm script to run by the command */
|
|
247
|
+
/** npm script to run by the command. */
|
|
248
248
|
script: string;
|
|
249
|
-
/** Enables integration with [Nx](https://nx.dev) */
|
|
249
|
+
/** Enables integration with [Nx](https://nx.dev). */
|
|
250
250
|
useNx?: boolean;
|
|
251
251
|
/** when "useNx" is enabled, do we want to skip caching with Nx? */
|
|
252
252
|
skipNxCache?: boolean;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { GitRawCommitsOptions, ParserOptions } from 'conventional-changelog-core';
|
|
2
|
+
import { Options as WriterOptions } from 'conventional-changelog-writer';
|
|
3
|
+
import { Options as RecommendedBumpOptions } from 'conventional-recommended-bump';
|
|
1
4
|
import log from 'npmlog';
|
|
2
5
|
import npa from 'npm-package-arg';
|
|
3
6
|
import { Package } from '../package';
|
|
@@ -13,6 +16,19 @@ export interface BaseChangelogOptions {
|
|
|
13
16
|
rootPath?: string;
|
|
14
17
|
tagPrefix?: string;
|
|
15
18
|
}
|
|
19
|
+
export interface ChangelogConfig {
|
|
20
|
+
conventionalChangelog: {
|
|
21
|
+
parserOpts: ParserOptions;
|
|
22
|
+
writerOpts: WriterOptions;
|
|
23
|
+
};
|
|
24
|
+
gitRawCommitsOpts: GitRawCommitsOptions & {
|
|
25
|
+
path: string;
|
|
26
|
+
};
|
|
27
|
+
key?: string;
|
|
28
|
+
parserOpts: ParserOptions;
|
|
29
|
+
recommendedBumpOpts: RecommendedBumpOptions;
|
|
30
|
+
writerOpts: WriterOptions;
|
|
31
|
+
}
|
|
16
32
|
export interface CommandOptions {
|
|
17
33
|
rollPublish?: boolean;
|
|
18
34
|
rollVersion?: boolean;
|
|
@@ -154,6 +170,8 @@ export interface LernaConfig {
|
|
|
154
170
|
version: string;
|
|
155
171
|
}
|
|
156
172
|
export interface ProjectConfig extends LernaConfig, QueryGraphConfig {
|
|
173
|
+
/** Lerna JSON Schema https://json-schema.org/ */
|
|
174
|
+
$schema: string;
|
|
157
175
|
ci?: boolean;
|
|
158
176
|
concurrency: number | string;
|
|
159
177
|
cwd: string;
|
|
@@ -5,22 +5,22 @@ import { Package } from '../package';
|
|
|
5
5
|
*
|
|
6
6
|
* @extends {Map<string, PackageGraphNode>}
|
|
7
7
|
*/
|
|
8
|
-
export declare class PackageGraph extends Map {
|
|
8
|
+
export declare class PackageGraph extends Map<string, PackageGraphNode> {
|
|
9
9
|
/**
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {Package[]} packages - An array of Packages to build the graph out of.
|
|
11
11
|
* @param {'allDependencies'|'dependencies'} [graphType]
|
|
12
12
|
* Pass "dependencies" to create a graph of only dependencies,
|
|
13
13
|
* excluding the devDependencies that would normally be included.
|
|
14
14
|
* @param {boolean|'auto'|'force'|'explicit'} [localDependencies] Treatment of local sibling dependencies, default "auto"
|
|
15
15
|
*/
|
|
16
16
|
constructor(packages: Package[], graphType?: 'allDependencies' | 'dependencies', localDependencies?: boolean | 'auto' | 'force' | 'explicit' | 'forceLocal');
|
|
17
|
-
get rawPackageList():
|
|
17
|
+
get rawPackageList(): Package[];
|
|
18
18
|
/**
|
|
19
19
|
* Takes a list of Packages and returns a list of those same Packages with any Packages
|
|
20
20
|
* they depend on. i.e if packageA depended on packageB `graph.addDependencies([packageA])`
|
|
21
21
|
* would return [packageA, packageB].
|
|
22
22
|
*
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {Package[]} filteredPackages - The packages to include dependencies for.
|
|
24
24
|
*/
|
|
25
25
|
addDependencies(filteredPackages: Package[]): Package[];
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export declare class PackageGraph extends Map {
|
|
|
28
28
|
* that depend on them. i.e if packageC depended on packageD `graph.addDependents([packageD])`
|
|
29
29
|
* would return [packageD, packageC].
|
|
30
30
|
*
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {Package[]} filteredPackages - The packages to include dependents for.
|
|
32
32
|
*/
|
|
33
33
|
addDependents(filteredPackages: Package[]): Package[];
|
|
34
34
|
/**
|
|
@@ -36,8 +36,8 @@ export declare class PackageGraph extends Map {
|
|
|
36
36
|
* `PackageGraphNode` property that is a collection of `PackageGraphNode`s.
|
|
37
37
|
* Returns input packages with any additional packages found by traversing `nodeProp`.
|
|
38
38
|
*
|
|
39
|
-
* @param {
|
|
40
|
-
* @param {'localDependencies'|'localDependents'} nodeProp The property on `PackageGraphNode` used to traverse
|
|
39
|
+
* @param {Package[]} packageList - The list of packages to extend
|
|
40
|
+
* @param {'localDependencies'|'localDependents'} nodeProp - The property on `PackageGraphNode` used to traverse
|
|
41
41
|
*/
|
|
42
42
|
extendList(packageList: Package[], nodeProp: 'localDependencies' | 'localDependents'): Package[];
|
|
43
43
|
/**
|
|
@@ -14,7 +14,7 @@ const validation_error_1 = require("../validation-error");
|
|
|
14
14
|
*/
|
|
15
15
|
class PackageGraph extends Map {
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {Package[]} packages - An array of Packages to build the graph out of.
|
|
18
18
|
* @param {'allDependencies'|'dependencies'} [graphType]
|
|
19
19
|
* Pass "dependencies" to create a graph of only dependencies,
|
|
20
20
|
* excluding the devDependencies that would normally be included.
|
|
@@ -25,7 +25,6 @@ class PackageGraph extends Map {
|
|
|
25
25
|
if (localDependencies === true || localDependencies === 'forceLocal') {
|
|
26
26
|
localDependencies = 'force'; // eslint-disable-line
|
|
27
27
|
}
|
|
28
|
-
// @ts-ignore
|
|
29
28
|
super(packages.map((pkg) => { var _a; return [(_a = pkg === null || pkg === void 0 ? void 0 : pkg.name) !== null && _a !== void 0 ? _a : '', new lib_1.PackageGraphNode(pkg)]; }));
|
|
30
29
|
if (packages.length !== this.size) {
|
|
31
30
|
// weed out the duplicates
|
|
@@ -103,7 +102,7 @@ class PackageGraph extends Map {
|
|
|
103
102
|
* they depend on. i.e if packageA depended on packageB `graph.addDependencies([packageA])`
|
|
104
103
|
* would return [packageA, packageB].
|
|
105
104
|
*
|
|
106
|
-
* @param {
|
|
105
|
+
* @param {Package[]} filteredPackages - The packages to include dependencies for.
|
|
107
106
|
*/
|
|
108
107
|
addDependencies(filteredPackages) {
|
|
109
108
|
return this.extendList(filteredPackages, 'localDependencies');
|
|
@@ -113,7 +112,7 @@ class PackageGraph extends Map {
|
|
|
113
112
|
* that depend on them. i.e if packageC depended on packageD `graph.addDependents([packageD])`
|
|
114
113
|
* would return [packageD, packageC].
|
|
115
114
|
*
|
|
116
|
-
* @param {
|
|
115
|
+
* @param {Package[]} filteredPackages - The packages to include dependents for.
|
|
117
116
|
*/
|
|
118
117
|
addDependents(filteredPackages) {
|
|
119
118
|
return this.extendList(filteredPackages, 'localDependents');
|
|
@@ -123,21 +122,20 @@ class PackageGraph extends Map {
|
|
|
123
122
|
* `PackageGraphNode` property that is a collection of `PackageGraphNode`s.
|
|
124
123
|
* Returns input packages with any additional packages found by traversing `nodeProp`.
|
|
125
124
|
*
|
|
126
|
-
* @param {
|
|
127
|
-
* @param {'localDependencies'|'localDependents'} nodeProp The property on `PackageGraphNode` used to traverse
|
|
125
|
+
* @param {Package[]} packageList - The list of packages to extend
|
|
126
|
+
* @param {'localDependencies'|'localDependents'} nodeProp - The property on `PackageGraphNode` used to traverse
|
|
128
127
|
*/
|
|
129
128
|
extendList(packageList, nodeProp) {
|
|
130
129
|
// the current list of packages we are expanding using breadth-first-search
|
|
131
130
|
const search = new Set(packageList.map(({ name }) => this.get(name)));
|
|
132
131
|
// an intermediate list of matched PackageGraphNodes
|
|
133
|
-
/** @type {PackageGraphNode[]} */
|
|
134
132
|
const result = [];
|
|
135
133
|
search.forEach((currentNode) => {
|
|
136
134
|
// anything searched for is always a result
|
|
137
135
|
result.push(currentNode);
|
|
138
136
|
currentNode[nodeProp].forEach((meta, depName) => {
|
|
139
137
|
const depNode = this.get(depName);
|
|
140
|
-
if (depNode !== currentNode && !search.has(depNode)) {
|
|
138
|
+
if (depNode && depNode !== currentNode && !search.has(depNode)) {
|
|
141
139
|
search.add(depNode);
|
|
142
140
|
}
|
|
143
141
|
});
|
|
@@ -206,10 +204,11 @@ class PackageGraph extends Map {
|
|
|
206
204
|
topLevelDependent = nodeToCycle.get(topLevelDependent);
|
|
207
205
|
}
|
|
208
206
|
// Otherwise the same node is checked multiple times which is very wasteful in a large repository
|
|
209
|
-
|
|
207
|
+
const identifier = `${baseNode.name}:${topLevelDependent.name}`;
|
|
208
|
+
if (alreadyVisited.has(identifier)) {
|
|
210
209
|
return;
|
|
211
210
|
}
|
|
212
|
-
alreadyVisited.add(
|
|
211
|
+
alreadyVisited.add(identifier);
|
|
213
212
|
if (topLevelDependent === baseNode || (topLevelDependent.isCycle && topLevelDependent.has(baseNode.name))) {
|
|
214
213
|
const cycle = new lib_1.CyclicPackageGraphNode();
|
|
215
214
|
walkStack.forEach((nodeInCycle) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-graph.js","sourceRoot":"","sources":["../../src/package-graph/package-graph.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAkC;AAElC,+BAA+E;AAE/E,0DAAsD;AAGtD;;;;GAIG;AACH,MAAa,YAAa,SAAQ,
|
|
1
|
+
{"version":3,"file":"package-graph.js","sourceRoot":"","sources":["../../src/package-graph/package-graph.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAkC;AAElC,+BAA+E;AAE/E,0DAAsD;AAGtD;;;;GAIG;AACH,MAAa,YAAa,SAAQ,GAA6B;IAC7D;;;;;;OAMG;IACH,YACE,QAAmB,EACnB,YAAgD,iBAAiB,EACjE,oBAA4E,MAAM;QAElF,6BAA6B;QAC7B,IAAI,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,YAAY,EAAE;YACpE,iBAAiB,GAAG,OAAO,CAAC,CAAC,sBAAsB;SACpD;QAED,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAY,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,mCAAI,EAAE,EAAE,IAAI,sBAAgB,CAAC,GAAG,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,CAAC;QAEpF,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE;YACjC,0BAA0B;YAC1B,MAAM,IAAI,GAAqB,IAAI,GAAG,EAAE,CAAC;YAEzC,KAAK,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,QAAQ,EAAE;gBACzC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBAClB,IAAI,CAAC,GAAG,CAAC,I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AAC;CACF;AAxUD,oCAwUC"}
|
package/dist/prompt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ListChoiceOptions, Question } from 'inquirer';
|
|
2
2
|
/**
|
|
3
3
|
* Prompt for confirmation
|
|
4
4
|
* @param {string} message
|
|
@@ -13,11 +13,11 @@ export declare function promptConfirmation(message: string): Promise<boolean>;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function promptSelectOne(message: string, { choices, filter, validate }?: {
|
|
15
15
|
choices: ListChoiceOptions[];
|
|
16
|
-
} & Pick<
|
|
16
|
+
} & Pick<Question<import("inquirer").Answers>, "filter" | "validate">): Promise<string>;
|
|
17
17
|
/**
|
|
18
18
|
* Prompt for input
|
|
19
19
|
* @param {string} message
|
|
20
20
|
* @param {Pick<import("inquirer").Question, 'filter' | 'validate'>} [options]
|
|
21
21
|
* @returns {Promise<string>}
|
|
22
22
|
*/
|
|
23
|
-
export declare function promptTextInput(message: string, { filter, validate }?: Pick<
|
|
23
|
+
export declare function promptTextInput(message: string, { filter, validate }?: Pick<Question<import("inquirer").Answers>, "filter" | "validate">): Promise<string>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// helpers
|
|
4
|
+
const index_1 = require("../../../index");
|
|
5
|
+
function buildGraph(mapPackages = (pkg) => pkg) {
|
|
6
|
+
// cat __fixtures__/toposort/packages/*/package.json
|
|
7
|
+
const packages = [
|
|
8
|
+
{
|
|
9
|
+
name: 'package-cycle-1',
|
|
10
|
+
version: '1.0.0',
|
|
11
|
+
dependencies: {
|
|
12
|
+
'package-cycle-2': '1.0.0',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'package-cycle-2',
|
|
17
|
+
version: '1.0.0',
|
|
18
|
+
dependencies: {
|
|
19
|
+
'package-cycle-1': '1.0.0',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'package-cycle-extraneous-1',
|
|
24
|
+
version: '1.0.0',
|
|
25
|
+
description: 'This package is used to break ties between package-cycle-{1,2}.',
|
|
26
|
+
dependencies: {
|
|
27
|
+
'package-cycle-1': '1.0.0',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'package-cycle-extraneous-2',
|
|
32
|
+
version: '1.0.0',
|
|
33
|
+
description: 'This package is used to break ties between package-cycle-{1,2}.',
|
|
34
|
+
dependencies: {
|
|
35
|
+
'package-cycle-1': '1.0.0',
|
|
36
|
+
'package-cycle-2': '1.0.0',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'package-dag-1',
|
|
41
|
+
version: '1.0.0',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'package-dag-2a',
|
|
45
|
+
version: '1.0.0',
|
|
46
|
+
dependencies: {
|
|
47
|
+
'package-dag-1': '1.0.0',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'package-dag-2b',
|
|
52
|
+
version: '1.0.0',
|
|
53
|
+
dependencies: {
|
|
54
|
+
'package-dag-1': '1.0.0',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'package-dag-3',
|
|
59
|
+
version: '1.0.0',
|
|
60
|
+
dependencies: {
|
|
61
|
+
'package-dag-2a': '1.0.0',
|
|
62
|
+
'package-dag-1': '1.0.0',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'package-standalone',
|
|
67
|
+
version: '1.0.0',
|
|
68
|
+
},
|
|
69
|
+
]
|
|
70
|
+
.map(mapPackages)
|
|
71
|
+
.map((json) => new index_1.Package(json, `/test/packages/${json.name}`, '/test'));
|
|
72
|
+
return new index_1.PackageGraph(packages);
|
|
73
|
+
}
|
|
74
|
+
exports.default = buildGraph;
|
|
75
|
+
module.exports = buildGraph;
|
|
76
|
+
//# sourceMappingURL=build-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-graph.js","sourceRoot":"","sources":["../../../../src/utils/collect-updates/__helpers__/build-graph.ts"],"names":[],"mappings":";;AAAA,UAAU;AACV,0CAAuD;AAEvD,SAAS,UAAU,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;IAC5C,oDAAoD;IACpD,MAAM,QAAQ,GAAG;QACf;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,iEAAiE;YAC9E,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,iEAAiE;YAC9E,YAAY,EAAE;gBACZ,iBAAiB,EAAE,OAAO;gBAC1B,iBAAiB,EAAE,OAAO;aAC3B;SACF;QACD;YACE,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,OAAO;SACjB;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE;gBACZ,gBAAgB,EAAE,OAAO;gBACzB,eAAe,EAAE,OAAO;aACzB;SACF;QACD;YACE,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;SACjB;KACF;SACE,GAAG,CAAC,WAAW,CAAC;SAChB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,eAAO,CAAC,IAAI,EAAE,kBAAkB,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAE5E,OAAO,IAAI,oBAAY,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,kBAAe,UAAU,CAAC;AAC1B,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}
|
|
@@ -22,7 +22,7 @@ export declare class QueryGraph {
|
|
|
22
22
|
* @param {QueryGraphConfig} [options]
|
|
23
23
|
*/
|
|
24
24
|
constructor(packages: Package[], { graphType, localDependencies, rejectCycles }?: QueryGraphConfig);
|
|
25
|
-
_getNextLeaf():
|
|
25
|
+
_getNextLeaf(): PackageGraphNode[];
|
|
26
26
|
_getNextCycle(): any;
|
|
27
27
|
getAvailablePackages(): PackageGraphNode[];
|
|
28
28
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lerna-lite/core",
|
|
3
3
|
"description": "Lerna-Lite core implementation module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"typings": "dist/index.d.ts",
|
|
@@ -31,15 +31,17 @@
|
|
|
31
31
|
"npm": ">=8.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@npmcli/run-script": "^4.1
|
|
34
|
+
"@npmcli/run-script": "^4.2.1",
|
|
35
35
|
"@octokit/plugin-enterprise-rest": "^6.0.1",
|
|
36
|
-
"@octokit/rest": "^19.0.
|
|
36
|
+
"@octokit/rest": "^19.0.4",
|
|
37
37
|
"async": "^3.2.4",
|
|
38
38
|
"chalk": "^4.1.2",
|
|
39
39
|
"clone-deep": "^4.0.1",
|
|
40
40
|
"config-chain": "^1.1.13",
|
|
41
41
|
"conventional-changelog-angular": "^5.0.13",
|
|
42
42
|
"conventional-changelog-core": "^4.2.4",
|
|
43
|
+
"conventional-changelog-writer": "^5.0.1",
|
|
44
|
+
"conventional-commits-parser": "^3.2.4",
|
|
43
45
|
"conventional-recommended-bump": "^6.1.0",
|
|
44
46
|
"cosmiconfig": "^7.0.1",
|
|
45
47
|
"dedent": "^0.7.0",
|
|
@@ -61,14 +63,14 @@
|
|
|
61
63
|
"node-fetch": "^2.6.7",
|
|
62
64
|
"npm-package-arg": "^9.1.0",
|
|
63
65
|
"npm-packlist": "^5.1.1",
|
|
64
|
-
"npm-registry-fetch": "^13.3.
|
|
66
|
+
"npm-registry-fetch": "^13.3.1",
|
|
65
67
|
"npmlog": "^6.0.2",
|
|
66
68
|
"os": "^0.1.2",
|
|
67
69
|
"p-map": "^4.0.0",
|
|
68
70
|
"p-pipe": "^3.1.0",
|
|
69
71
|
"p-queue": "^6.6.2",
|
|
70
72
|
"p-reduce": "^2.1.0",
|
|
71
|
-
"pacote": "^13.6.
|
|
73
|
+
"pacote": "^13.6.2",
|
|
72
74
|
"path": "^0.12.7",
|
|
73
75
|
"pify": "^5.0.0",
|
|
74
76
|
"resolve-from": "^5.0.0",
|
|
@@ -79,8 +81,7 @@
|
|
|
79
81
|
"tar": "^6.1.11",
|
|
80
82
|
"temp-dir": "^1.0.0",
|
|
81
83
|
"uuid": "^8.3.2",
|
|
82
|
-
"
|
|
83
|
-
"write-file-atomic": "^4.0.1",
|
|
84
|
+
"write-file-atomic": "^4.0.2",
|
|
84
85
|
"write-json-file": "^4.3.0",
|
|
85
86
|
"write-pkg": "^4.0.0",
|
|
86
87
|
"yargs": "^17.5.1"
|
|
@@ -89,27 +90,29 @@
|
|
|
89
90
|
"@types/async": "^3.2.15",
|
|
90
91
|
"@types/clone-deep": "^4.0.1",
|
|
91
92
|
"@types/conventional-changelog-core": "^4.2.1",
|
|
93
|
+
"@types/conventional-changelog-writer": "^4.0.1",
|
|
94
|
+
"@types/conventional-commits-parser": "^3.0.2",
|
|
92
95
|
"@types/conventional-recommended-bump": "^6.1.0",
|
|
93
96
|
"@types/dedent": "^0.7.0",
|
|
94
97
|
"@types/execa": "^2.0.0",
|
|
95
98
|
"@types/fs-extra": "^9.0.13",
|
|
96
99
|
"@types/git-url-parse": "^9.0.1",
|
|
97
100
|
"@types/glob-parent": "^5.1.1",
|
|
98
|
-
"@types/inquirer": "^
|
|
101
|
+
"@types/inquirer": "^9.0.1",
|
|
99
102
|
"@types/load-json-file": "^5.1.0",
|
|
100
103
|
"@types/minimatch": "^3.0.5",
|
|
101
104
|
"@types/npm-package-arg": "^6.1.1",
|
|
102
105
|
"@types/p-map": "^2.0.0",
|
|
103
|
-
"@types/semver": "^7.3.
|
|
106
|
+
"@types/semver": "^7.3.12",
|
|
104
107
|
"@types/strong-log-transformer": "^1.0.0",
|
|
105
108
|
"@types/write-file-atomic": "^4.0.0",
|
|
106
109
|
"@types/write-json-file": "^3.2.1",
|
|
107
110
|
"@types/write-pkg": "^4.0.0",
|
|
108
|
-
"yargs-parser": "^21.
|
|
111
|
+
"yargs-parser": "^21.1.1"
|
|
109
112
|
},
|
|
110
113
|
"funding": {
|
|
111
114
|
"type": "ko_fi",
|
|
112
115
|
"url": "https://ko-fi.com/ghiscoding"
|
|
113
116
|
},
|
|
114
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "6507645f2e3875d9c586b47f3acfffab0a0e1255"
|
|
115
118
|
}
|