Skip to content
Merged
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ jobs:
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: npm install --global npm@11
- run: pnpm run build
- name: Validate release tag
id: release
run: |
Expand All @@ -188,7 +189,7 @@ jobs:
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- if: steps.registry.outputs.exists != 'true'
run: npm publish --access public
run: npm publish --access public --ignore-scripts
- name: Write release notes
run: node scripts/release-notes.mjs "${GITHUB_REF_NAME#v}" > "${RUNNER_TEMP}/release-notes.md"
- name: Create GitHub release
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## Unreleased

- Build before `npm publish` reads the manifest. npm validates `bin` against the
working tree before `prepack` produces `dist`, so every release logged
`No bin file found at dist/executable.js` twice. The published package was
always correct, and `npx solid-objects` has always worked, but a warning that
says the binary is missing is a poor thing to print while publishing one.
The publish job builds first and publishes with `--ignore-scripts`, so the
build runs once rather than twice.
- Check the `bin` entry the manifest declares rather than a hard-coded path.
`check-package.mjs` asserted `dist/executable.js` directly, so renaming the
build output would have shipped a `bin` that resolves to nothing while the
check still passed.

## 0.16.0 - 2026-09-23

- Find a message whose reference a caller lost. `runtime.findBy({ requestId })`
Expand Down
18 changes: 14 additions & 4 deletions scripts/check-package.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import fs from "node:fs"
import path from "node:path"

const executablePath = path.resolve("dist/executable.js")
const executableMode = fs.statSync(executablePath).mode
const manifest = JSON.parse(fs.readFileSync(path.resolve("package.json"), "utf8"))
const binaries = Object.entries(manifest.bin ?? {})

if ((executableMode & 0o111) === 0) {
throw new Error(`${executablePath} is not executable`)
if (binaries.length === 0) {
throw new Error("package.json declares no bin entry")
}

for (const [name, declared] of binaries) {
const target = path.resolve(declared)
if (!fs.existsSync(target)) {
throw new Error(`bin ${name} points at ${declared}, which the build does not produce`)
}
if ((fs.statSync(target).mode & 0o111) === 0) {
throw new Error(`${target} is not executable`)
}
}
Loading