@lerna-lite/core 1.17.0 → 2.0.0-alpha.2
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/child-process.d.ts +9 -9
- package/dist/child-process.js +26 -42
- package/dist/child-process.js.map +1 -1
- package/dist/command.d.ts +3 -3
- package/dist/command.js +57 -69
- package/dist/command.js.map +1 -1
- package/dist/constants.js +1 -4
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +10 -13
- package/dist/index.js.map +1 -1
- package/dist/models/command-options.d.ts +78 -80
- package/dist/models/command-options.js +1 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -5
- package/dist/models/index.js.map +1 -1
- package/dist/models/interfaces.d.ts +2 -4
- package/dist/models/interfaces.js +1 -2
- package/dist/package-graph/index.d.ts +2 -2
- package/dist/package-graph/index.js +2 -5
- package/dist/package-graph/index.js.map +1 -1
- package/dist/package-graph/lib/cyclic-package-graph-node.d.ts +1 -1
- package/dist/package-graph/lib/cyclic-package-graph-node.js +2 -5
- package/dist/package-graph/lib/cyclic-package-graph-node.js.map +1 -1
- package/dist/package-graph/lib/index.d.ts +3 -3
- package/dist/package-graph/lib/index.js +3 -6
- package/dist/package-graph/lib/index.js.map +1 -1
- package/dist/package-graph/lib/package-graph-node.d.ts +1 -1
- package/dist/package-graph/lib/package-graph-node.js +6 -12
- package/dist/package-graph/lib/package-graph-node.js.map +1 -1
- package/dist/package-graph/lib/report-cycles.js +5 -10
- package/dist/package-graph/lib/report-cycles.js.map +1 -1
- package/dist/package-graph/package-graph.d.ts +2 -19
- package/dist/package-graph/package-graph.js +10 -64
- package/dist/package-graph/package-graph.js.map +1 -1
- package/dist/package.d.ts +2 -3
- package/dist/package.js +34 -47
- package/dist/package.js.map +1 -1
- package/dist/project/index.d.ts +2 -2
- package/dist/project/index.js +2 -5
- package/dist/project/index.js.map +1 -1
- package/dist/project/lib/apply-extends.js +12 -17
- package/dist/project/lib/apply-extends.js.map +1 -1
- package/dist/project/lib/index.d.ts +3 -3
- package/dist/project/lib/index.js +3 -6
- package/dist/project/lib/index.js.map +1 -1
- package/dist/project/lib/make-file-finder.d.ts +1 -1
- package/dist/project/lib/make-file-finder.js +12 -19
- package/dist/project/lib/make-file-finder.js.map +1 -1
- package/dist/project/lib/shallow-extend.js +1 -5
- package/dist/project/lib/shallow-extend.js.map +1 -1
- package/dist/project/project.d.ts +2 -2
- package/dist/project/project.js +71 -69
- package/dist/project/project.js.map +1 -1
- package/dist/prompt.js +14 -21
- package/dist/prompt.js.map +1 -1
- package/dist/utils/check-working-tree.d.ts +1 -1
- package/dist/utils/check-working-tree.js +11 -18
- package/dist/utils/check-working-tree.js.map +1 -1
- package/dist/utils/clean-stack.js +1 -5
- package/dist/utils/clean-stack.js.map +1 -1
- package/dist/utils/collect-uncommitted.js +10 -16
- package/dist/utils/collect-uncommitted.js.map +1 -1
- package/dist/utils/collect-updates/collect-updates.d.ts +4 -4
- package/dist/utils/collect-updates/collect-updates.js +21 -26
- package/dist/utils/collect-updates/collect-updates.js.map +1 -1
- package/dist/utils/collect-updates/index.d.ts +2 -2
- package/dist/utils/collect-updates/index.js +2 -5
- package/dist/utils/collect-updates/index.js.map +1 -1
- package/dist/utils/collect-updates/lib/collect-dependents.js +1 -5
- package/dist/utils/collect-updates/lib/collect-dependents.js.map +1 -1
- package/dist/utils/collect-updates/lib/collect-packages.d.ts +1 -1
- package/dist/utils/collect-updates/lib/collect-packages.js +3 -7
- package/dist/utils/collect-updates/lib/collect-packages.js.map +1 -1
- package/dist/utils/collect-updates/lib/get-packages-for-option.js +1 -5
- package/dist/utils/collect-updates/lib/get-packages-for-option.js.map +1 -1
- package/dist/utils/collect-updates/lib/has-tags.d.ts +1 -1
- package/dist/utils/collect-updates/lib/has-tags.js +9 -14
- package/dist/utils/collect-updates/lib/has-tags.js.map +1 -1
- package/dist/utils/collect-updates/lib/index.d.ts +5 -5
- package/dist/utils/collect-updates/lib/index.js +5 -8
- package/dist/utils/collect-updates/lib/index.js.map +1 -1
- package/dist/utils/collect-updates/lib/make-diff-predicate.d.ts +1 -1
- package/dist/utils/collect-updates/lib/make-diff-predicate.js +19 -26
- package/dist/utils/collect-updates/lib/make-diff-predicate.js.map +1 -1
- package/dist/utils/conf.js +27 -32
- package/dist/utils/conf.js.map +1 -1
- package/dist/utils/defaults.d.ts +3 -1
- package/dist/utils/defaults.js +17 -20
- package/dist/utils/defaults.js.map +1 -1
- package/dist/utils/describe-ref.d.ts +1 -1
- package/dist/utils/describe-ref.js +12 -17
- package/dist/utils/describe-ref.js.map +1 -1
- package/dist/utils/env-replace.js +2 -7
- package/dist/utils/env-replace.js.map +1 -1
- package/dist/utils/find-prefix.js +9 -15
- package/dist/utils/find-prefix.js.map +1 -1
- package/dist/utils/index.d.ts +22 -22
- package/dist/utils/index.js +22 -26
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/log-package-error.js +8 -13
- package/dist/utils/log-package-error.js.map +1 -1
- package/dist/utils/nerf-dart.js +4 -9
- package/dist/utils/nerf-dart.js.map +1 -1
- package/dist/utils/npm-conf.d.ts +2 -2
- package/dist/utils/npm-conf.js +12 -19
- package/dist/utils/npm-conf.js.map +1 -1
- package/dist/utils/object-utils.js +8 -15
- package/dist/utils/object-utils.js.map +1 -1
- package/dist/utils/output.js +4 -9
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/parse-field.js +9 -14
- package/dist/utils/parse-field.js.map +1 -1
- package/dist/utils/prerelease-id-from-version.js +3 -8
- package/dist/utils/prerelease-id-from-version.js.map +1 -1
- package/dist/utils/pulse-till-done.js +3 -8
- package/dist/utils/pulse-till-done.js.map +1 -1
- package/dist/utils/query-graph.d.ts +4 -4
- package/dist/utils/query-graph.js +3 -7
- package/dist/utils/query-graph.js.map +1 -1
- package/dist/utils/run-lifecycle.d.ts +2 -2
- package/dist/utils/run-lifecycle.js +12 -19
- package/dist/utils/run-lifecycle.js.map +1 -1
- package/dist/utils/run-topologically.d.ts +2 -2
- package/dist/utils/run-topologically.js +5 -10
- package/dist/utils/run-topologically.js.map +1 -1
- package/dist/utils/string-utils.js +1 -5
- package/dist/utils/string-utils.js.map +1 -1
- package/dist/utils/types.d.ts +3 -3
- package/dist/utils/types.js +16 -20
- package/dist/utils/types.js.map +1 -1
- package/dist/utils/warn-if-hanging.js +5 -10
- package/dist/utils/warn-if-hanging.js.map +1 -1
- package/dist/utils/write-log-file.js +9 -14
- package/dist/utils/write-log-file.js.map +1 -1
- package/dist/validation-error.js +4 -9
- package/dist/validation-error.js.map +1 -1
- package/package.json +36 -20
- package/dist/utils/collect-updates/__helpers__/build-graph.d.ts +0 -3
- package/dist/utils/collect-updates/__helpers__/build-graph.js +0 -75
- package/dist/utils/collect-updates/__helpers__/build-graph.js.map +0 -1
package/dist/child-process.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Package } from './package';
|
|
1
|
+
import type { Options as ExecaOptions, SyncOptions as ExacaSyncOptions, ExecaChildProcess } from 'execa';
|
|
2
|
+
import { Package } from './package.js';
|
|
3
3
|
/**
|
|
4
4
|
* Execute a command asynchronously, piping stdio by default.
|
|
5
5
|
* @param {string} command
|
|
6
6
|
* @param {string[]} args
|
|
7
7
|
* @param {import("execa").Options} [opts]
|
|
8
8
|
*/
|
|
9
|
-
export declare function exec(command: string, args: string[], opts?:
|
|
9
|
+
export declare function exec(command: string, args: string[], opts?: ExecaOptions & {
|
|
10
10
|
pkg?: Package;
|
|
11
11
|
}, dryRun?: boolean): Promise<any>;
|
|
12
12
|
/**
|
|
@@ -15,14 +15,14 @@ export declare function exec(command: string, args: string[], opts?: execa.Optio
|
|
|
15
15
|
* @param {string[]} args
|
|
16
16
|
* @param {import("execa").SyncOptions} [opts]
|
|
17
17
|
*/
|
|
18
|
-
export declare function execSync(command: string, args?: string[], opts?:
|
|
18
|
+
export declare function execSync(command: string, args?: string[], opts?: ExacaSyncOptions<string>, dryRun?: boolean): string;
|
|
19
19
|
/**
|
|
20
20
|
* Spawn a command asynchronously, _always_ inheriting stdio.
|
|
21
21
|
* @param {string} command
|
|
22
22
|
* @param {string[]} args
|
|
23
23
|
* @param {import("execa").Options} [opts]
|
|
24
24
|
*/
|
|
25
|
-
export declare function spawn(command: string, args: string[], opts?:
|
|
25
|
+
export declare function spawn(command: string, args: string[], opts?: ExecaOptions & {
|
|
26
26
|
pkg?: Package;
|
|
27
27
|
}, dryRun?: boolean): Promise<any>;
|
|
28
28
|
/**
|
|
@@ -32,7 +32,7 @@ export declare function spawn(command: string, args: string[], opts?: execa.Opti
|
|
|
32
32
|
* @param {import("execa").Options} [opts]
|
|
33
33
|
* @param {string} [prefix]
|
|
34
34
|
*/
|
|
35
|
-
export declare function spawnStreaming(command: string, args: string[], opts?:
|
|
35
|
+
export declare function spawnStreaming(command: string, args: string[], opts?: ExecaOptions & {
|
|
36
36
|
pkg?: Package;
|
|
37
37
|
}, prefix?: string | boolean, dryRun?: boolean): Promise<any>;
|
|
38
38
|
export declare function getChildProcessCount(): number;
|
|
@@ -42,7 +42,7 @@ export declare function getExitCode(result: any): any;
|
|
|
42
42
|
* @param {string[]} args
|
|
43
43
|
* @param {import("execa").Options} opts
|
|
44
44
|
*/
|
|
45
|
-
export declare function spawnProcess(command: string, args: string[], opts:
|
|
45
|
+
export declare function spawnProcess(command: string, args: string[], opts: ExecaOptions & {
|
|
46
46
|
pkg?: Package;
|
|
47
47
|
}, dryRun?: boolean): any;
|
|
48
48
|
/**
|
|
@@ -51,9 +51,9 @@ export declare function spawnProcess(command: string, args: string[], opts: exec
|
|
|
51
51
|
* @param {string[]} args
|
|
52
52
|
* @param {import("execa").Options} [opts]
|
|
53
53
|
*/
|
|
54
|
-
export declare function wrapError(spawned:
|
|
54
|
+
export declare function wrapError(spawned: ExecaChildProcess & {
|
|
55
55
|
pkg?: Package;
|
|
56
|
-
}): Promise<execa.ExecaReturnValue<string>>;
|
|
56
|
+
}): Promise<import("execa").ExecaReturnValue<string>>;
|
|
57
57
|
/**
|
|
58
58
|
* Log the child-process command and its arguments as dry-run (without executing the process)
|
|
59
59
|
* @param {string} command
|
package/dist/child-process.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const execa_1 = tslib_1.__importDefault(require("execa"));
|
|
7
|
-
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
8
|
-
const os_1 = tslib_1.__importDefault(require("os"));
|
|
9
|
-
const strong_log_transformer_1 = tslib_1.__importDefault(require("strong-log-transformer"));
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { execa, execaSync } from 'execa';
|
|
3
|
+
import log from 'npmlog';
|
|
4
|
+
import { constants } from 'node:os';
|
|
5
|
+
import logTransformer from 'strong-log-transformer';
|
|
10
6
|
// bookkeeping for spawned processes
|
|
11
7
|
const children = new Set();
|
|
12
8
|
// when streaming processes are spawned, use this color for prefix
|
|
@@ -20,37 +16,34 @@ let currentColor = 0;
|
|
|
20
16
|
* @param {string[]} args
|
|
21
17
|
* @param {import("execa").Options} [opts]
|
|
22
18
|
*/
|
|
23
|
-
function exec(command, args, opts, dryRun = false) {
|
|
19
|
+
export function exec(command, args, opts, dryRun = false) {
|
|
24
20
|
const options = Object.assign({ stdio: 'pipe' }, opts);
|
|
25
21
|
const spawned = spawnProcess(command, args, options, dryRun);
|
|
26
22
|
return dryRun ? Promise.resolve() : wrapError(spawned);
|
|
27
23
|
}
|
|
28
|
-
exports.exec = exec;
|
|
29
24
|
/**
|
|
30
25
|
* Execute a command synchronously.
|
|
31
26
|
* @param {string} command
|
|
32
27
|
* @param {string[]} args
|
|
33
28
|
* @param {import("execa").SyncOptions} [opts]
|
|
34
29
|
*/
|
|
35
|
-
function execSync(command, args, opts, dryRun = false) {
|
|
30
|
+
export function execSync(command, args, opts, dryRun = false) {
|
|
36
31
|
// prettier-ignore
|
|
37
32
|
return dryRun
|
|
38
33
|
? logExecCommand(command, args)
|
|
39
|
-
:
|
|
34
|
+
: execaSync(command, args, opts).stdout;
|
|
40
35
|
}
|
|
41
|
-
exports.execSync = execSync;
|
|
42
36
|
/**
|
|
43
37
|
* Spawn a command asynchronously, _always_ inheriting stdio.
|
|
44
38
|
* @param {string} command
|
|
45
39
|
* @param {string[]} args
|
|
46
40
|
* @param {import("execa").Options} [opts]
|
|
47
41
|
*/
|
|
48
|
-
function spawn(command, args, opts, dryRun = false) {
|
|
42
|
+
export function spawn(command, args, opts, dryRun = false) {
|
|
49
43
|
const options = Object.assign({}, opts, { stdio: 'inherit' });
|
|
50
44
|
const spawned = spawnProcess(command, args, options, dryRun);
|
|
51
45
|
return wrapError(spawned);
|
|
52
46
|
}
|
|
53
|
-
exports.spawn = spawn;
|
|
54
47
|
/**
|
|
55
48
|
* Spawn a command asynchronously, streaming stdio with optional prefix.
|
|
56
49
|
* @param {string} command
|
|
@@ -58,8 +51,8 @@ exports.spawn = spawn;
|
|
|
58
51
|
* @param {import("execa").Options} [opts]
|
|
59
52
|
* @param {string} [prefix]
|
|
60
53
|
*/
|
|
61
|
-
|
|
62
|
-
function spawnStreaming(command, args, opts, prefix, dryRun = false) {
|
|
54
|
+
/* c8 ignore next */
|
|
55
|
+
export function spawnStreaming(command, args, opts, prefix, dryRun = false) {
|
|
63
56
|
const options = Object.assign({}, opts);
|
|
64
57
|
options.stdio = ['ignore', 'pipe', 'pipe'];
|
|
65
58
|
const spawned = spawnProcess(command, args, options, dryRun);
|
|
@@ -67,7 +60,7 @@ function spawnStreaming(command, args, opts, prefix, dryRun = false) {
|
|
|
67
60
|
const stderrOpts = {}; // mergeMultiline causes escaped newlines :P
|
|
68
61
|
if (prefix) {
|
|
69
62
|
const colorName = colorWheel[currentColor % NUM_COLORS];
|
|
70
|
-
const color =
|
|
63
|
+
const color = chalk[colorName];
|
|
71
64
|
currentColor += 1;
|
|
72
65
|
stdoutOpts.tag = `${color.bold(prefix)}:`;
|
|
73
66
|
stderrOpts.tag = `${color(prefix)}:`;
|
|
@@ -77,40 +70,35 @@ function spawnStreaming(command, args, opts, prefix, dryRun = false) {
|
|
|
77
70
|
process.stdout.setMaxListeners(children.size);
|
|
78
71
|
process.stderr.setMaxListeners(children.size);
|
|
79
72
|
}
|
|
80
|
-
spawned.stdout.pipe((
|
|
81
|
-
spawned.stderr.pipe((
|
|
73
|
+
spawned.stdout.pipe(logTransformer(stdoutOpts)).pipe(process.stdout);
|
|
74
|
+
spawned.stderr.pipe(logTransformer(stderrOpts)).pipe(process.stderr);
|
|
82
75
|
return wrapError(spawned);
|
|
83
76
|
}
|
|
84
|
-
|
|
85
|
-
function getChildProcessCount() {
|
|
77
|
+
export function getChildProcessCount() {
|
|
86
78
|
return children.size;
|
|
87
79
|
}
|
|
88
|
-
|
|
89
|
-
function getExitCode(result) {
|
|
90
|
-
var _a, _b, _c;
|
|
80
|
+
export function getExitCode(result) {
|
|
91
81
|
// https://nodejs.org/docs/latest-v6.x/api/child_process.html#child_process_event_close
|
|
92
82
|
if (typeof result.code === 'number' || typeof result.exitCode === 'number') {
|
|
93
|
-
return
|
|
83
|
+
return result.code ?? result.exitCode;
|
|
94
84
|
}
|
|
95
85
|
// https://nodejs.org/docs/latest-v6.x/api/errors.html#errors_error_code
|
|
96
|
-
// istanbul ignore else
|
|
97
86
|
if (typeof result.code === 'string' || typeof result.exitCode === 'string') {
|
|
98
|
-
return
|
|
87
|
+
return constants.errno[result.code ?? result.exitCode];
|
|
99
88
|
}
|
|
100
|
-
|
|
101
|
-
throw new TypeError(`Received unexpected exit code value ${JSON.stringify(
|
|
89
|
+
/* c8 ignore next: extremely weird */
|
|
90
|
+
throw new TypeError(`Received unexpected exit code value ${JSON.stringify(result.code ?? result.exitCode)}`);
|
|
102
91
|
}
|
|
103
|
-
exports.getExitCode = getExitCode;
|
|
104
92
|
/**
|
|
105
93
|
* @param {string} command
|
|
106
94
|
* @param {string[]} args
|
|
107
95
|
* @param {import("execa").Options} opts
|
|
108
96
|
*/
|
|
109
|
-
function spawnProcess(command, args, opts, dryRun = false) {
|
|
97
|
+
export function spawnProcess(command, args, opts, dryRun = false) {
|
|
110
98
|
if (dryRun) {
|
|
111
99
|
return logExecCommand(command, args);
|
|
112
100
|
}
|
|
113
|
-
const child = (
|
|
101
|
+
const child = execa(command, args, opts);
|
|
114
102
|
const drain = (_code, signal) => {
|
|
115
103
|
children.delete(child);
|
|
116
104
|
// don't run repeatedly if this is the error event
|
|
@@ -126,14 +114,13 @@ function spawnProcess(command, args, opts, dryRun = false) {
|
|
|
126
114
|
children.add(child);
|
|
127
115
|
return child;
|
|
128
116
|
}
|
|
129
|
-
exports.spawnProcess = spawnProcess;
|
|
130
117
|
/**
|
|
131
118
|
* Spawn a command asynchronously, _always_ inheriting stdio.
|
|
132
119
|
* @param {string} command
|
|
133
120
|
* @param {string[]} args
|
|
134
121
|
* @param {import("execa").Options} [opts]
|
|
135
122
|
*/
|
|
136
|
-
function wrapError(spawned) {
|
|
123
|
+
export function wrapError(spawned) {
|
|
137
124
|
if (spawned.pkg) {
|
|
138
125
|
return spawned.catch((err) => {
|
|
139
126
|
// ensure exit code is always a number
|
|
@@ -145,21 +132,18 @@ function wrapError(spawned) {
|
|
|
145
132
|
}
|
|
146
133
|
return spawned;
|
|
147
134
|
}
|
|
148
|
-
exports.wrapError = wrapError;
|
|
149
135
|
/**
|
|
150
136
|
* Log the child-process command and its arguments as dry-run (without executing the process)
|
|
151
137
|
* @param {string} command
|
|
152
138
|
* @param {string[]} args
|
|
153
139
|
*/
|
|
154
|
-
function logExecCommand(command, args) {
|
|
155
|
-
|
|
156
|
-
const argStr = (_a = (Array.isArray(args) ? args.join(' ') : args)) !== null && _a !== void 0 ? _a : '';
|
|
140
|
+
export function logExecCommand(command, args) {
|
|
141
|
+
const argStr = (Array.isArray(args) ? args.join(' ') : args) ?? '';
|
|
157
142
|
const cmdList = [];
|
|
158
143
|
for (const c of [command, argStr]) {
|
|
159
144
|
cmdList.push(Array.isArray(c) ? c.join(' ') : c);
|
|
160
145
|
}
|
|
161
|
-
|
|
146
|
+
log.info(chalk.bold.magenta('[dry-run] >'), cmdList.join(' '));
|
|
162
147
|
return '';
|
|
163
148
|
}
|
|
164
|
-
exports.logExecCommand = logExecCommand;
|
|
165
149
|
//# sourceMappingURL=child-process.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-process.js","sourceRoot":"","sources":["../src/child-process.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"child-process.js","sourceRoot":"","sources":["../src/child-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAIpD,oCAAoC;AACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;AAE3B,kEAAkE;AAClE,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACzE,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;AAErC,6DAA6D;AAC7D,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAAC,OAAe,EAAE,IAAc,EAAE,IAAuC,EAAE,MAAM,GAAG,KAAK;IAC3G,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAE7D,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,O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,EAAE;YAChC,sCAAsC;YACtC,GAAG,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;YAEhC,8BAA8B;YAC9B,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAEtB,MAAM,GAAG,CAAC;QACZ,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,IAAe;IAC7D,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAEnE,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAClD;IAED,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/dist/command.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Logger } from 'npmlog';
|
|
2
|
-
import { Project } from './project/project';
|
|
3
|
-
import { ChangedCommandOption, CommandType, DiffCommandOption, ExecCommandOption, ExecOpts, InitCommandOption, ListCommandOption, ProjectConfig, PublishCommandOption, VersionCommandOption, WatchCommandOption } from './models';
|
|
4
|
-
import { PackageGraph } from './package-graph/package-graph';
|
|
2
|
+
import { Project } from './project/project.js';
|
|
3
|
+
import { ChangedCommandOption, CommandType, DiffCommandOption, ExecCommandOption, ExecOpts, InitCommandOption, ListCommandOption, ProjectConfig, PublishCommandOption, VersionCommandOption, WatchCommandOption } from './models/index.js';
|
|
4
|
+
import { PackageGraph } from './package-graph/package-graph.js';
|
|
5
5
|
type AvailableCommandOption = ChangedCommandOption | DiffCommandOption | ExecCommandOption | InitCommandOption | ListCommandOption | PublishCommandOption | VersionCommandOption | WatchCommandOption | ProjectConfig;
|
|
6
6
|
export declare class Command<T extends AvailableCommandOption> {
|
|
7
7
|
argv: any;
|
package/dist/command.js
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const write_log_file_1 = require("./utils/write-log-file");
|
|
16
|
-
const project_1 = require("./project/project");
|
|
17
|
-
const validation_error_1 = require("./validation-error");
|
|
18
|
-
const package_graph_1 = require("./package-graph/package-graph");
|
|
1
|
+
import cloneDeep from 'clone-deep';
|
|
2
|
+
import dedent from 'dedent';
|
|
3
|
+
import { execaSync } from 'execa';
|
|
4
|
+
import isCI from 'is-ci';
|
|
5
|
+
import log from 'npmlog';
|
|
6
|
+
import { cpus } from 'node:os';
|
|
7
|
+
import { cleanStack } from './utils/clean-stack.js';
|
|
8
|
+
import { logExecCommand } from './child-process.js';
|
|
9
|
+
import { logPackageError } from './utils/log-package-error.js';
|
|
10
|
+
import { warnIfHanging } from './utils/warn-if-hanging.js';
|
|
11
|
+
import { writeLogFile } from './utils/write-log-file.js';
|
|
12
|
+
import { Project } from './project/project.js';
|
|
13
|
+
import { ValidationError } from './validation-error.js';
|
|
14
|
+
import { PackageGraph } from './package-graph/package-graph.js';
|
|
19
15
|
// maxBuffer value for running exec
|
|
20
|
-
const DEFAULT_CONCURRENCY =
|
|
21
|
-
class Command {
|
|
16
|
+
const DEFAULT_CONCURRENCY = cpus().length;
|
|
17
|
+
export class Command {
|
|
22
18
|
constructor(_argv) {
|
|
23
19
|
this.commandName = '';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const argv = (
|
|
27
|
-
|
|
20
|
+
log.pause();
|
|
21
|
+
log.heading = 'lerna-lite';
|
|
22
|
+
const argv = cloneDeep(_argv);
|
|
23
|
+
log.silly('argv', argv.toString());
|
|
28
24
|
// 'FooCommand' => 'foo'
|
|
29
25
|
this.commandName = this.constructor.name.replace(/Command$/, '').toLowerCase();
|
|
30
26
|
// composed commands are called from other commands, like publish -> version
|
|
31
27
|
this.composed = typeof argv.composed === 'string' && argv.composed !== this.commandName;
|
|
32
28
|
if (!this.composed) {
|
|
33
29
|
// composed commands have already logged the lerna version
|
|
34
|
-
|
|
30
|
+
log.notice('cli', `v${argv.lernaVersion}`);
|
|
35
31
|
}
|
|
36
32
|
// launch the command
|
|
37
33
|
let runner = new Promise((resolve, reject) => {
|
|
38
34
|
// run everything inside a Promise chain
|
|
39
35
|
let chain = Promise.resolve();
|
|
40
|
-
chain = chain.then(() => (this.project = new
|
|
36
|
+
chain = chain.then(() => (this.project = new Project(argv.cwd)));
|
|
41
37
|
chain = chain.then(() => this.configureEnvironment());
|
|
42
38
|
chain = chain.then(() => this.configureOptions());
|
|
43
39
|
chain = chain.then(() => this.configureProperties());
|
|
@@ -46,32 +42,31 @@ class Command {
|
|
|
46
42
|
chain = chain.then(() => this.runPreparations());
|
|
47
43
|
chain = chain.then(() => this.runCommand());
|
|
48
44
|
chain.then((result) => {
|
|
49
|
-
|
|
45
|
+
warnIfHanging();
|
|
50
46
|
resolve(result);
|
|
51
47
|
}, (err) => {
|
|
52
48
|
if (err.pkg) {
|
|
53
49
|
// Cleanly log specific package error details
|
|
54
|
-
|
|
50
|
+
logPackageError(err, this.options.stream);
|
|
55
51
|
}
|
|
56
52
|
else if (err.name !== 'ValidationError') {
|
|
57
53
|
// npmlog does some funny stuff to the stack by default,
|
|
58
54
|
// so pass it directly to avoid duplication.
|
|
59
|
-
|
|
55
|
+
log.error('', cleanStack(err, this.constructor.name));
|
|
60
56
|
}
|
|
61
57
|
// ValidationError does not trigger a log dump, nor do external package errors
|
|
62
58
|
if (err.name !== 'ValidationError' && !err.pkg) {
|
|
63
|
-
|
|
59
|
+
writeLogFile(this.project.rootPath);
|
|
64
60
|
}
|
|
65
|
-
|
|
61
|
+
warnIfHanging();
|
|
66
62
|
// error code is handled by cli.fail()
|
|
67
63
|
reject(err);
|
|
68
64
|
if (err.name === 'ValidationError') {
|
|
69
|
-
|
|
65
|
+
log.error(err.code, (err.body && err.body.error) || err.message);
|
|
70
66
|
}
|
|
71
67
|
});
|
|
72
68
|
});
|
|
73
69
|
// passed via yargs context in tests, never actual CLI
|
|
74
|
-
/* istanbul ignore else */
|
|
75
70
|
if (argv.onResolved || argv.onRejected) {
|
|
76
71
|
runner = runner.then(argv.onResolved, argv.onRejected);
|
|
77
72
|
// when nested, never resolve inner with outer callbacks
|
|
@@ -91,13 +86,11 @@ class Command {
|
|
|
91
86
|
}
|
|
92
87
|
// proxy 'Promise' methods to 'private' instance
|
|
93
88
|
then(onResolved, onRejected) {
|
|
94
|
-
|
|
95
|
-
return (_a = this.runner) === null || _a === void 0 ? void 0 : _a.then(onResolved, onRejected);
|
|
89
|
+
return this.runner?.then(onResolved, onRejected);
|
|
96
90
|
}
|
|
97
|
-
/*
|
|
91
|
+
/* c8 ignore next 3 */
|
|
98
92
|
catch(onRejected) {
|
|
99
|
-
|
|
100
|
-
return (_a = this.runner) === null || _a === void 0 ? void 0 : _a.catch(onRejected);
|
|
93
|
+
return this.runner?.catch(onRejected);
|
|
101
94
|
}
|
|
102
95
|
get requiresGit() {
|
|
103
96
|
return true;
|
|
@@ -110,9 +103,9 @@ class Command {
|
|
|
110
103
|
configureEnvironment() {
|
|
111
104
|
let loglevel;
|
|
112
105
|
let progress;
|
|
113
|
-
/*
|
|
114
|
-
if (
|
|
115
|
-
|
|
106
|
+
/* c8 ignore next 3 */
|
|
107
|
+
if (isCI || !process.stderr.isTTY || process.env.TERM === 'dumb') {
|
|
108
|
+
log.disableColor();
|
|
116
109
|
progress = false;
|
|
117
110
|
}
|
|
118
111
|
else if (!process.stdout.isTTY) {
|
|
@@ -121,12 +114,12 @@ class Command {
|
|
|
121
114
|
loglevel = 'error';
|
|
122
115
|
}
|
|
123
116
|
else if (process.stderr.isTTY) {
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
log.enableColor();
|
|
118
|
+
log.enableUnicode();
|
|
126
119
|
}
|
|
127
120
|
Object.defineProperty(this, 'envDefaults', {
|
|
128
121
|
value: {
|
|
129
|
-
ci:
|
|
122
|
+
ci: isCI,
|
|
130
123
|
progress,
|
|
131
124
|
loglevel,
|
|
132
125
|
},
|
|
@@ -151,39 +144,37 @@ class Command {
|
|
|
151
144
|
}
|
|
152
145
|
}
|
|
153
146
|
configureProperties() {
|
|
154
|
-
var _a;
|
|
155
147
|
const { concurrency, sort, maxBuffer } = this.options;
|
|
156
148
|
this.concurrency = Math.max(1, +concurrency || DEFAULT_CONCURRENCY);
|
|
157
149
|
this.toposort = sort === undefined || sort;
|
|
158
150
|
this.execOpts = {
|
|
159
|
-
cwd:
|
|
151
|
+
cwd: this.project.rootPath ?? '',
|
|
160
152
|
maxBuffer,
|
|
161
153
|
};
|
|
162
154
|
}
|
|
163
155
|
configureLogging() {
|
|
164
156
|
const { loglevel } = this.options;
|
|
165
157
|
if (loglevel) {
|
|
166
|
-
|
|
158
|
+
log.level = loglevel;
|
|
167
159
|
}
|
|
168
160
|
// handle log.success()
|
|
169
|
-
|
|
161
|
+
log.addLevel('success', 3001, { fg: 'green', bold: true });
|
|
170
162
|
// create logger that subclasses use
|
|
171
163
|
Object.defineProperty(this, 'logger', {
|
|
172
|
-
value:
|
|
164
|
+
value: log.newGroup(this.commandName),
|
|
173
165
|
});
|
|
174
166
|
// emit all buffered logs at configured level and higher
|
|
175
|
-
|
|
167
|
+
log.resume();
|
|
176
168
|
}
|
|
177
169
|
enableProgressBar() {
|
|
178
|
-
/*
|
|
170
|
+
/* c8 ignore next 3 */
|
|
179
171
|
if (this.options.progress !== false) {
|
|
180
|
-
|
|
172
|
+
log.enableProgress();
|
|
181
173
|
}
|
|
182
174
|
}
|
|
183
175
|
gitInitialized() {
|
|
184
|
-
var _a;
|
|
185
176
|
const opts = {
|
|
186
|
-
cwd:
|
|
177
|
+
cwd: this.project.rootPath ?? '',
|
|
187
178
|
// don't throw, just want boolean
|
|
188
179
|
reject: false,
|
|
189
180
|
// only return code, no stdio needed
|
|
@@ -192,26 +183,26 @@ class Command {
|
|
|
192
183
|
const gitCommand = 'git';
|
|
193
184
|
const gitArgs = ['rev-parse'];
|
|
194
185
|
if (this.options.dryRun) {
|
|
195
|
-
|
|
186
|
+
logExecCommand(gitCommand, gitArgs);
|
|
196
187
|
return true;
|
|
197
188
|
}
|
|
198
|
-
return
|
|
189
|
+
return execaSync(gitCommand, gitArgs, opts).exitCode === 0;
|
|
199
190
|
}
|
|
200
191
|
runValidations() {
|
|
201
192
|
if ((this.options.since !== undefined || this.requiresGit) && !this.gitInitialized()) {
|
|
202
|
-
throw new
|
|
193
|
+
throw new ValidationError('ENOGIT', 'The git binary was not found, or this is not a git repository.');
|
|
203
194
|
}
|
|
204
195
|
if (!this.project.manifest) {
|
|
205
|
-
throw new
|
|
196
|
+
throw new ValidationError('ENOPKG', 'No `package.json` file found, make sure it exist in the root of your project.');
|
|
206
197
|
}
|
|
207
198
|
if (this.project.configNotFound) {
|
|
208
|
-
throw new
|
|
199
|
+
throw new ValidationError('ENOLERNA', '`lerna.json` does not exist, have you run `lerna init`?');
|
|
209
200
|
}
|
|
210
201
|
if (!this.project.version) {
|
|
211
|
-
throw new
|
|
202
|
+
throw new ValidationError('ENOVERSION', 'Required property `version` does not exist in `lerna.json`, make sure to provide one of two modes (fixed or independent). For example "version": "independent" OR "version": "1.0.0"');
|
|
212
203
|
}
|
|
213
204
|
if (this.options.independent && !this.project.isIndependent()) {
|
|
214
|
-
throw new
|
|
205
|
+
throw new ValidationError('EVERSIONMODE', dedent `
|
|
215
206
|
You ran lerna-lite with --independent or -i, but the repository is not set to independent mode.
|
|
216
207
|
To use independent mode you need to set lerna.json's "version" property to "independent".
|
|
217
208
|
Then you won't need to pass the --independent or -i flags.
|
|
@@ -221,18 +212,16 @@ class Command {
|
|
|
221
212
|
runPreparations() {
|
|
222
213
|
if (!this.composed && this.project.isIndependent()) {
|
|
223
214
|
// composed commands have already logged the independent status
|
|
224
|
-
|
|
215
|
+
log.info('versioning', 'independent');
|
|
225
216
|
}
|
|
226
217
|
if (!this.composed && this.options.ci) {
|
|
227
|
-
|
|
218
|
+
log.info('ci', 'enabled');
|
|
228
219
|
}
|
|
229
220
|
let chain = Promise.resolve();
|
|
230
221
|
if (this.commandName !== 'info') {
|
|
231
222
|
chain = chain.then(() => this.project.getPackages());
|
|
232
223
|
chain = chain.then((packages) => {
|
|
233
|
-
this.packageGraph = new
|
|
234
|
-
? 'allPlusPeerDependencies'
|
|
235
|
-
: 'allDependencies');
|
|
224
|
+
this.packageGraph = new PackageGraph(packages || [], this.options.allowPeerDependenciesUpdate ? 'allPlusPeerDependencies' : 'allDependencies');
|
|
236
225
|
});
|
|
237
226
|
}
|
|
238
227
|
return chain;
|
|
@@ -248,13 +237,12 @@ class Command {
|
|
|
248
237
|
});
|
|
249
238
|
}
|
|
250
239
|
initialize() {
|
|
251
|
-
throw new
|
|
240
|
+
throw new ValidationError(this.commandName, 'initialize() needs to be implemented.');
|
|
252
241
|
}
|
|
253
242
|
execute() {
|
|
254
|
-
throw new
|
|
243
|
+
throw new ValidationError(this.commandName, 'execute() needs to be implemented.');
|
|
255
244
|
}
|
|
256
245
|
}
|
|
257
|
-
exports.Command = Command;
|
|
258
246
|
// _.defaults(), but simplified:
|
|
259
247
|
// * All inputs are plain objects
|
|
260
248
|
// * Only own keys, not inherited
|
package/dist/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAmC,MAAM,OAAO,CAAC;AACnE,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,GAAe,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAcxD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,mCAAmC;AACnC,MAAM,mBAAmB,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC;AAa1C,MAAM,OAAO,OAAO;IAgBlB,YAAY,KAA6B;QARzC,gBAAW,GAAgB,EAAE,CAAC;QAS5B,GAAG,CAAC,KAAK,EAAE,CAAC;QACZ,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC;QAE3B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAkB,CAAC;QAC/C,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEnC,wBAAwB;QACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC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AM,MAAM,IAAI,OAAO,EAAE;QAC5B,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE;YAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;gBACrC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;oBAC9B,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;iBAC5B;aACF;SACF;KACF;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './models';
|
|
2
|
-
export * from './package-graph';
|
|
3
|
-
export * from './project';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './child-process';
|
|
6
|
-
export * from './constants';
|
|
7
|
-
export * from './command';
|
|
8
|
-
export * from './package';
|
|
9
|
-
export * from './prompt';
|
|
10
|
-
export * from './validation-error';
|
|
1
|
+
export * from './models/index.js';
|
|
2
|
+
export * from './package-graph/index.js';
|
|
3
|
+
export * from './project/index.js';
|
|
4
|
+
export * from './utils/index.js';
|
|
5
|
+
export * from './child-process.js';
|
|
6
|
+
export * from './constants.js';
|
|
7
|
+
export * from './command.js';
|
|
8
|
+
export * from './package.js';
|
|
9
|
+
export * from './prompt.js';
|
|
10
|
+
export * from './validation-error.js';
|