Skip to content

feat!: expose build info through readBuildInfo() - #18

Merged
timonwong merged 2 commits into
mainfrom
feat/read-build-info
Sep 21, 2026
Merged

timonwong merged 2 commits into
mainfrom
feat/read-build-info

Conversation

@timonwong

Copy link
Copy Markdown
Member

Summary

Hosts can now read the build info as a typed value instead of parsing build-info.json. The new ./build-info subpath imports only node:fs, so a Host can read it without pulling the runner into its bundle.

Changes

  • New ./build-info subpath exporting readBuildInfo(): BuildInfo. It reads the build-info.json that ships next to shellcheck.wasm synchronously and caches the result. It throws if the file is missing.
  • ./node re-exports readBuildInfo and BuildInfo.
  • Breaking: the ./build-info.json subpath export is removed. The file still ships in dist/.
  • SHELLCHECK_VERSION is unchanged.
  • The README entry points table is updated, and CONTEXT.md gains a Build info term.
  • Tests cover resolving the new subpath, the removed JSON export, the import surface of dist/build-info.js (only node:fs), and readBuildInfo() matching the shipped JSON and SHELLCHECK_VERSION.

Follow-up

  • vscode-shellcheck#1952: src/runtime/wasm/build-info.ts should call readBuildInfo() from @vscode-shellcheck/shellcheck-wasm/build-info once this ships (planned as 0.2.0).

Hosts parsed dist/build-info.json themselves and could not import the
package entry for SHELLCHECK_VERSION without bundling the runner. The
new ./build-info subpath returns the typed build info and imports
nothing but node:fs.

BREAKING CHANGE: the ./build-info.json subpath export is removed; use
readBuildInfo() from ./build-info or ./node instead.
@timonwong
timonwong merged commit 72391de into main Sep 21, 2026
4 checks passed
@timonwong
timonwong deleted the feat/read-build-info branch September 21, 2026 12:31
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant