@pnpm/exec.build-commands 1000.0.0 → 1000.0.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/lib/approveBuilds.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.help = help;
|
|
|
8
8
|
exports.cliOptionsTypes = cliOptionsTypes;
|
|
9
9
|
exports.rcOptionsTypes = rcOptionsTypes;
|
|
10
10
|
exports.handler = handler;
|
|
11
|
+
const logger_1 = require("@pnpm/logger");
|
|
11
12
|
const read_project_manifest_1 = require("@pnpm/read-project-manifest");
|
|
12
13
|
const render_help_1 = __importDefault(require("render-help"));
|
|
13
14
|
const enquirer_1 = require("enquirer");
|
|
@@ -31,10 +32,12 @@ async function handler(opts) {
|
|
|
31
32
|
if (opts.rootProjectManifest == null)
|
|
32
33
|
return;
|
|
33
34
|
const automaticallyIgnoredBuilds = await (0, getAutomaticallyIgnoredBuilds_1.getAutomaticallyIgnoredBuilds)(opts);
|
|
34
|
-
if (automaticallyIgnoredBuilds
|
|
35
|
+
if (!automaticallyIgnoredBuilds?.length) {
|
|
36
|
+
(0, logger_1.globalInfo)('There are no packages awaiting approval');
|
|
35
37
|
return;
|
|
38
|
+
}
|
|
36
39
|
const { result } = await (0, enquirer_1.prompt)({
|
|
37
|
-
choices: [...automaticallyIgnoredBuilds],
|
|
40
|
+
choices: sortStrings([...automaticallyIgnoredBuilds]),
|
|
38
41
|
indicator(state, choice) {
|
|
39
42
|
return ` ${choice.enabled ? '●' : '○'}`;
|
|
40
43
|
},
|
|
@@ -74,22 +77,28 @@ async function handler(opts) {
|
|
|
74
77
|
if (opts.rootProjectManifest.pnpm?.ignoredBuiltDependencies == null) {
|
|
75
78
|
opts.rootProjectManifest.pnpm = {
|
|
76
79
|
...opts.rootProjectManifest.pnpm,
|
|
77
|
-
ignoredBuiltDependencies: ignoredPackages,
|
|
80
|
+
ignoredBuiltDependencies: sortStrings(ignoredPackages),
|
|
78
81
|
};
|
|
79
82
|
}
|
|
80
83
|
else {
|
|
81
|
-
opts.rootProjectManifest.pnpm.ignoredBuiltDependencies
|
|
84
|
+
opts.rootProjectManifest.pnpm.ignoredBuiltDependencies = sortStrings([
|
|
85
|
+
...opts.rootProjectManifest.pnpm.ignoredBuiltDependencies,
|
|
86
|
+
...ignoredPackages,
|
|
87
|
+
]);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
if (buildPackages.length) {
|
|
85
91
|
if (opts.rootProjectManifest.pnpm?.onlyBuiltDependencies == null) {
|
|
86
92
|
opts.rootProjectManifest.pnpm = {
|
|
87
93
|
...opts.rootProjectManifest.pnpm,
|
|
88
|
-
onlyBuiltDependencies: buildPackages,
|
|
94
|
+
onlyBuiltDependencies: sortStrings(buildPackages),
|
|
89
95
|
};
|
|
90
96
|
}
|
|
91
97
|
else {
|
|
92
|
-
opts.rootProjectManifest.pnpm.onlyBuiltDependencies
|
|
98
|
+
opts.rootProjectManifest.pnpm.onlyBuiltDependencies = sortStrings([
|
|
99
|
+
...opts.rootProjectManifest.pnpm.onlyBuiltDependencies,
|
|
100
|
+
...buildPackages,
|
|
101
|
+
]);
|
|
93
102
|
}
|
|
94
103
|
}
|
|
95
104
|
if (buildPackages.length) {
|
|
@@ -110,4 +119,7 @@ Do you approve?`,
|
|
|
110
119
|
return plugin_commands_rebuild_1.rebuild.handler(opts, buildPackages);
|
|
111
120
|
}
|
|
112
121
|
}
|
|
122
|
+
function sortStrings(array) {
|
|
123
|
+
return array.sort((a, b) => a.localeCompare(b));
|
|
124
|
+
}
|
|
113
125
|
//# sourceMappingURL=approveBuilds.js.map
|
package/lib/approveBuilds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approveBuilds.js","sourceRoot":"","sources":["../src/approveBuilds.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"approveBuilds.js","sourceRoot":"","sources":["../src/approveBuilds.ts"],"names":[],"mappings":";;;;;;AAaA,oBAKC;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,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -7,7 +7,7 @@ exports.getAutomaticallyIgnoredBuilds = getAutomaticallyIgnoredBuilds;
|
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const modules_yaml_1 = require("@pnpm/modules-yaml");
|
|
9
9
|
async function getAutomaticallyIgnoredBuilds(opts) {
|
|
10
|
-
const modulesManifest = await (0, modules_yaml_1.readModulesManifest)(opts.modulesDir ?? path_1.default.join(opts.dir, 'node_modules'));
|
|
10
|
+
const modulesManifest = await (0, modules_yaml_1.readModulesManifest)(opts.modulesDir ?? path_1.default.join(opts.lockfileDir ?? opts.dir, 'node_modules'));
|
|
11
11
|
if (modulesManifest == null) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutomaticallyIgnoredBuilds.js","sourceRoot":"","sources":["../src/getAutomaticallyIgnoredBuilds.ts"],"names":[],"mappings":";;;;;AAIA,sEAMC;AAVD,gDAAuB;AACvB,qDAAwD;AAGjD,KAAK,UAAU,6BAA6B,CAAE,IAA8B;IACjF,MAAM,eAAe,GAAG,MAAM,IAAA,kCAAmB,EAAC,IAAI,CAAC,UAAU,IAAI,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"getAutomaticallyIgnoredBuilds.js","sourceRoot":"","sources":["../src/getAutomaticallyIgnoredBuilds.ts"],"names":[],"mappings":";;;;;AAIA,sEAMC;AAVD,gDAAuB;AACvB,qDAAwD;AAGjD,KAAK,UAAU,6BAA6B,CAAE,IAA8B;IACjF,MAAM,eAAe,GAAG,MAAM,IAAA,kCAAmB,EAAC,IAAI,CAAC,UAAU,IAAI,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAA;IAC7H,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,eAAe,EAAE,aAAa,IAAI,EAAE,CAAA;AAC7C,CAAC"}
|
package/lib/ignoredBuilds.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Config } from '@pnpm/config';
|
|
2
|
-
export type IgnoredBuildsCommandOpts = Pick<Config, 'modulesDir' | 'dir' | 'rootProjectManifest'>;
|
|
2
|
+
export type IgnoredBuildsCommandOpts = Pick<Config, 'modulesDir' | 'dir' | 'rootProjectManifest' | 'lockfileDir'>;
|
|
3
3
|
export declare const commandNames: string[];
|
|
4
4
|
export declare function help(): string;
|
|
5
5
|
export declare function cliOptionsTypes(): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exec.build-commands",
|
|
3
|
-
"version": "1000.0.
|
|
3
|
+
"version": "1000.0.2",
|
|
4
4
|
"description": "Commands for managing dependency builds",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/exec/build-commands#readme",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@pnpm/registry-mock": "3.
|
|
26
|
+
"@pnpm/registry-mock": "3.50.0",
|
|
27
27
|
"@types/ramda": "0.29.12",
|
|
28
28
|
"load-json-file": "^6.2.0",
|
|
29
29
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
30
|
-
"@pnpm/config": "1002.2.
|
|
31
|
-
"@pnpm/exec.build-commands": "1000.0.
|
|
32
|
-
"@pnpm/plugin-commands-installation": "1001.3.0",
|
|
30
|
+
"@pnpm/config": "1002.2.1",
|
|
31
|
+
"@pnpm/exec.build-commands": "1000.0.2",
|
|
33
32
|
"@pnpm/prepare": "0.0.111",
|
|
34
|
-
"@pnpm/types": "1000.1.1"
|
|
33
|
+
"@pnpm/types": "1000.1.1",
|
|
34
|
+
"@pnpm/plugin-commands-installation": "1001.3.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"chalk": "^4.1.2",
|
|
38
38
|
"enquirer": "^2.4.1",
|
|
39
39
|
"render-help": "^1.0.3",
|
|
40
|
-
"@pnpm/config": "1002.2.
|
|
41
|
-
"@pnpm/plugin-commands-rebuild": "1001.1.4",
|
|
42
|
-
"@pnpm/prepare-temp-dir": "0.0.0",
|
|
40
|
+
"@pnpm/config": "1002.2.1",
|
|
43
41
|
"@pnpm/modules-yaml": "1000.1.2",
|
|
44
|
-
"@pnpm/
|
|
42
|
+
"@pnpm/plugin-commands-rebuild": "1001.1.5",
|
|
43
|
+
"@pnpm/read-project-manifest": "1000.0.5",
|
|
44
|
+
"@pnpm/prepare-temp-dir": "0.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@pnpm/logger": ">=5.1.0 <1001.0.0"
|