@ikunin/sprintpilot 2.3.2 → 2.3.3
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/commands/install.js
CHANGED
|
@@ -1410,6 +1410,17 @@ async function runInstall(options = {}) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
|
|
1413
|
+
// v2.3.3 — Sprintpilot bundles js-yaml into _Sprintpilot/node_modules/
|
|
1414
|
+
// at install time (see step 6b below). Guard against users committing it.
|
|
1415
|
+
const nodeModulesResult = await addIgnoreEntry(
|
|
1416
|
+
ignore.path,
|
|
1417
|
+
'_Sprintpilot/node_modules/',
|
|
1418
|
+
{ dryRun },
|
|
1419
|
+
);
|
|
1420
|
+
if (nodeModulesResult.added && !dryRun) {
|
|
1421
|
+
console.log(`Added '_Sprintpilot/node_modules/' to ${path.basename(ignore.path)}`);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1413
1424
|
// 5. Install skills per tool
|
|
1414
1425
|
let totalInstalled = 0;
|
|
1415
1426
|
const allSkills = await listSkills();
|
|
@@ -1567,6 +1578,32 @@ async function runInstall(options = {}) {
|
|
|
1567
1578
|
}
|
|
1568
1579
|
console.log('Runtime resources installed to _Sprintpilot/');
|
|
1569
1580
|
|
|
1581
|
+
// 6b. v2.3.3 — bundle js-yaml into _Sprintpilot/node_modules/.
|
|
1582
|
+
// Two runtime scripts (sprint-plan.js, infer-dependencies.js)
|
|
1583
|
+
// require('js-yaml') for full YAML parse/dump support that the
|
|
1584
|
+
// in-tree yaml-lite intentionally doesn't cover. Without this,
|
|
1585
|
+
// `/sprintpilot-plan-sprint` and dependency inference crash with
|
|
1586
|
+
// MODULE_NOT_FOUND on every invocation in the consumer project.
|
|
1587
|
+
//
|
|
1588
|
+
// We resolve js-yaml from Sprintpilot's own node_modules (where
|
|
1589
|
+
// npm placed it when the user ran `npx @ikunin/sprintpilot`) and
|
|
1590
|
+
// copy the whole package into <projectRoot>/_Sprintpilot/node_modules/js-yaml/.
|
|
1591
|
+
// Node's require walk finds it from _Sprintpilot/scripts/ at runtime.
|
|
1592
|
+
try {
|
|
1593
|
+
const jsYamlPkgJson = require.resolve('js-yaml/package.json');
|
|
1594
|
+
const jsYamlSrc = path.dirname(jsYamlPkgJson);
|
|
1595
|
+
const jsYamlDest = path.join(targetAddonDir, 'node_modules', 'js-yaml');
|
|
1596
|
+
await fs.remove(jsYamlDest);
|
|
1597
|
+
await fs.copy(jsYamlSrc, jsYamlDest, { overwrite: true });
|
|
1598
|
+
console.log(' Bundled js-yaml → _Sprintpilot/node_modules/js-yaml/');
|
|
1599
|
+
} catch (err) {
|
|
1600
|
+
console.warn(
|
|
1601
|
+
pc.yellow(
|
|
1602
|
+
` WARN: failed to bundle js-yaml (${err.message || err}). sprint-plan and dependency inference will fail at runtime.`,
|
|
1603
|
+
),
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1570
1607
|
// 6a. Re-apply v1 module-config snapshot (if any) — MUST happen after
|
|
1571
1608
|
// step 6 because step 6 wrote pristine bundled configs that would
|
|
1572
1609
|
// otherwise clobber the user's values. On failure, persist the
|
package/package.json
CHANGED