iterate-harness 2.2.3 → 2.2.4
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/package.json +3 -2
- package/scripts/postinstall.js +11 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iterate-harness",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "npm distribution wrapper for iterate-harness — installs the Python harness (ih CLI) into a managed venv on install and exposes it as a global command",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"lib",
|
|
25
25
|
"scripts",
|
|
26
26
|
"README.md",
|
|
27
|
+
"README.zh-CN.md",
|
|
27
28
|
"LICENSE"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"installer"
|
|
35
36
|
],
|
|
36
37
|
"scripts": {
|
|
37
|
-
"test": "node --test test/bootstrap.test.js test/postinstall.test.js",
|
|
38
|
+
"test": "node --test test/bootstrap.test.js test/postinstall.test.js test/ui.test.js",
|
|
38
39
|
"postinstall": "node scripts/postinstall.js"
|
|
39
40
|
}
|
|
40
41
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -17,9 +17,18 @@
|
|
|
17
17
|
const { ensureRuntime, reportBootstrapFailure, SKIP_INSTALL_ENV_VAR } = require("../lib/bootstrap");
|
|
18
18
|
const ui = require("../lib/ui");
|
|
19
19
|
|
|
20
|
+
// Mirror the truthy-value handling in bootstrap.ensureRuntime so postinstall
|
|
21
|
+
// and the CLI entry point agree on what counts as "skip install" (any of
|
|
22
|
+
// 1/true/yes/on, case-insensitive).
|
|
23
|
+
function skipInstallRequested() {
|
|
24
|
+
return ["1", "true", "yes", "on"].includes(
|
|
25
|
+
String(process.env[SKIP_INSTALL_ENV_VAR] || "").toLowerCase()
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
20
29
|
async function main() {
|
|
21
|
-
if (
|
|
22
|
-
ui.warning(`Skipped install during npm install (${SKIP_INSTALL_ENV_VAR}
|
|
30
|
+
if (skipInstallRequested()) {
|
|
31
|
+
ui.warning(`Skipped install during npm install (${SKIP_INSTALL_ENV_VAR}=${process.env[SKIP_INSTALL_ENV_VAR]}); harness installs on the first \`ih\` run.`);
|
|
23
32
|
return;
|
|
24
33
|
}
|
|
25
34
|
try {
|