Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
node_modules
*.test.js
specs/
docs/
docs/*
!docs/templates/
.DS_Store
.env
.env.local
Expand Down
25 changes: 25 additions & 0 deletions scripts/test-install-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ try {
'.cursor/rules',
'.pi/skills',
'skills/audit-code/SKILL.md',
'docs/templates/ci/github/test-build-release-node.yml',
];
const isIgnored = (p) =>
npmignore.some((pat) => {
Expand All @@ -244,6 +245,30 @@ try {
}
}

// story: #113 — wire-ci templates must actually ship in the npm tarball.
// The .npmignore pattern check above is necessary but not sufficient (it
// cannot model gitignore negation); prove it with a real pack listing.
{
const { execSync } = require('child_process');
const packOut = execSync('npm pack --dry-run 2>&1', {
cwd: ROOT,
encoding: 'utf8',
maxBuffer: 16 * 1024 * 1024,
});
for (const tpl of [
'docs/templates/ci/github/test-build-release-node.yml',
'docs/templates/ci/github/test-build-release-rust.yml',
'docs/templates/ci/github/test-build-release-python.yml',
'docs/templates/ci/github/test-build-release-go.yml',
'docs/templates/AGENTS.md',
]) {
assert.ok(
packOut.includes(tpl),
`npm tarball must include ${tpl} (wire-ci templates, #113)`
);
}
}

console.log('test-install-helpers: ALL PASS');
} finally {
rmSync(tmpHome, { recursive: true, force: true });
Expand Down