Make Camino examples and scaffolds complete Yarn and Nix packages

This commit is contained in:
Timothy J. Aveni
2026-09-22 15:31:42 -07:00
parent 82a4542746
commit 152f58a3c6
9 changed files with 193 additions and 32 deletions
+24
View File
@@ -61,4 +61,28 @@ test("structural plans validate the graph, journal originals, and reject stale e
await applyStructure(draft);
assert.match(await fs.readFile(path.join(root, "workspace.qx"), "utf8"), /import interface NotImplementedYet/);
await assert.rejects(() => planStructure(root, { ...provisional, validation: "resource-graph" }));
const plugin = ".yarn/plugins/yarn-plugin-nixify.cjs";
await applyStructure(
await planStructure(root, {
kind: "workspace",
validation: "syntax",
files: [
{ file: plugin, create: "module.exports = {};\n" },
{ file: "yarn.lock", create: "__metadata:\n version: 8\n" },
{ file: "flake.lock", create: '{"version":7}\n' },
],
}),
);
assert.equal(await fs.readFile(path.join(root, plugin), "utf8"), "module.exports = {};\n");
for (const file of [".yarn/../escape.cjs", ".yarn/cache/entry.cjs", ".git/hooks/hook.cjs"]) {
await assert.rejects(
() =>
planStructure(root, {
kind: "workspace",
validation: "syntax",
files: [{ file, create: "" }],
}),
/Unsafe scaffold path/,
);
}
});