Skip to content
Merged
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
8 changes: 7 additions & 1 deletion test/smoke/pack-smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ const repoRoot = resolve(new URL('../..', import.meta.url).pathname)
const sandbox = mkdtempSync(join(tmpdir(), 'ocex-pack-smoke-'))

try {
const packedName = execSync('npm pack --silent', {
const packedRaw = execSync('npm pack --json --silent', {
cwd: repoRoot,
encoding: 'utf8'
}).trim()

const packed = JSON.parse(packedRaw)
const packedName = Array.isArray(packed) ? packed[0]?.filename : null
if (!packedName) {
throw new Error('npm pack did not return a tarball filename')
}

const tarball = join(repoRoot, packedName)
const probeDir = join(sandbox, 'probe')
execSync('mkdir -p probe', { cwd: sandbox })
Expand Down
Loading