openpencil/tools/package-artifacts/package.json
Danila Poyarkov e5dd226683
fix(tools): run npm packaging guards in package verification
* fix(tools): run npm packaging guards in package verification

The packed-resolution unit tests spawned npm pack, npm init and npm
install under Bun's default 5 s test timeout, and npm's cold start on a
fresh CI runner exceeded it. Package-manager work is not bounded by a
test budget, so the fixture chain becomes a packaging-guard phase of
test:packages: fixture manifests packed with the release's npm pack,
inspected, installed through the real consumer install and imported
under Node and Bun, each with the outcome it must produce.

The tarball inspector reads archives in-process with @publint/pack
instead of a tar executable. Its bun test coverage is now pure unit
tests plus in-process tarball fixtures.

* fix(tools): bound npm init and build tarball fixtures in-process

The consumer install helper gave npm install a deadline but not npm
init, so a stalled init could hold the packaging-guard phase open. The
inspector tests built their archives with a tar executable, which
contradicted what they claim to prove; nanotar now writes them
in-process.

* refactor(tools): alias package tool tests and compare guards with isEqual

package-artifacts and package-quality were the only tools without a
#domain/* subpath alias, so their tests reached into ../src. Both now
declare the alias like the other tools and the tests use it. The guard
diagnostic comparison uses es-toolkit's isEqual instead of joined
strings.

* fix(tools): match the expected runtime failure in packaging guards

A guard that expected Bun to fail accepted any non-zero exit, so an
unrelated error would have satisfied it. Failing expectations now carry
the resolution error Bun must report, and observations keep the actual
output so a mismatch names what happened instead.
2026-09-26 01:40:24 +04:00

26 lines
510 B
JSON

{
"name": "@open-pencil/package-artifacts",
"private": true,
"type": "module",
"imports": {
"#package-artifacts/*": "./src/*.ts"
},
"exports": {
".": "./src/index.ts",
"./tarball": "./src/tarball.ts",
"./workspace": "./src/workspace/root.ts"
},
"scripts": {
"test": "bun test tests"
},
"dependencies": {
"@publint/pack": "^0.1.5",
"pkg-types": "^2.3.1",
"tinyexec": "^1.3.0",
"valibot": "^1.4.2"
},
"devDependencies": {
"nanotar": "^0.3.0"
}
}