@ikunin/sprintpilot 2.3.2 → 2.3.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.
|
@@ -260,12 +260,28 @@ function buildEdges(strategies, nodes, depsDoc, { includeCrossEpic = false } = {
|
|
|
260
260
|
out.push([a, b]);
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
|
+
// Track whether explicit produced any edges in this build — if it did,
|
|
264
|
+
// ordering is suppressed for the same nodeset to avoid the back-edge
|
|
265
|
+
// cycle bug: when an explicit dep points "backwards" against story
|
|
266
|
+
// order (e.g. 6-1 depends on 6-3 — explicit emits 6-3 → 6-1), the
|
|
267
|
+
// linear ordering chain (6-1 → 6-2 → 6-3) closes a fake cycle that
|
|
268
|
+
// the user never declared. Explicit deps express the user's intent
|
|
269
|
+
// in full; ordering is only a fallback when none are provided.
|
|
270
|
+
let explicitProducedEdges = false;
|
|
263
271
|
for (const strat of strategies) {
|
|
264
272
|
if (strat === 'explicit') {
|
|
265
|
-
|
|
266
|
-
|
|
273
|
+
const explicit = edgesFromExplicit(depsDoc, nodes);
|
|
274
|
+
pushEdges(explicit);
|
|
275
|
+
if (explicit.length > 0) explicitProducedEdges = true;
|
|
276
|
+
if (includeCrossEpic) {
|
|
277
|
+
const cross = edgesFromCrossEpic(depsDoc, nodes);
|
|
278
|
+
pushEdges(cross);
|
|
279
|
+
if (cross.length > 0) explicitProducedEdges = true;
|
|
280
|
+
}
|
|
267
281
|
} else if (strat === 'ordering') {
|
|
268
|
-
|
|
282
|
+
if (!explicitProducedEdges) {
|
|
283
|
+
pushEdges(edgesFromOrdering(nodes));
|
|
284
|
+
}
|
|
269
285
|
} else if (strat === 'files') {
|
|
270
286
|
// files strategy opt-in, not implemented yet — a future
|
|
271
287
|
// sprintpilot-infer-dependencies skill populates the explicit sidecar.
|
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