Skip to content

Build with tsc alone and publish to npm from tags - #8

Merged
carsonfarmer merged 1 commit into
mainfrom
claude/practical-goldberg-z4v0o2-publish
Sep 22, 2026
Merged

carsonfarmer merged 1 commit into
mainfrom
claude/practical-goldberg-z4v0o2-publish

Conversation

@carsonfarmer

Copy link
Copy Markdown
Owner

Summary

Makes the package installable from GitHub today and publishable to npm from a tag.

  • Build with tsc alone. dist/ now gets JS and declarations from one tsc -p tsconfig.build.json. A prepare script runs it, so npm install github:carsonfarmer/geometric-tree builds on install without Bun (verified under Node 22: main currently fails with Cannot find module dist/index.js). Source imports use .js extensions so the emitted ESM resolves under Node; Bun and the tests resolve them to .ts as before.
  • Release workflow (.github/workflows/release.yml): on a v* tag it runs typecheck, tests and the Node smoke test, checks the tag matches package.json, and runs npm publish with provenance. Works with npm trusted publishing (OIDC, no secret) or an NPM_TOKEN repository secret.
  • publishConfig sets public access and provenance; README documents git installs and the release flow.

Test plan

  • bun run typecheck, bun test (54 pass), bun run smoke
  • npm pack tarball installed in a clean directory: imports under Node 22 and Bun
  • npm install github:carsonfarmer/geometric-tree#<this branch> in a clean directory: prepare builds dist/, import works under Node

🤖 Generated with Claude Code

https://claude.ai/code/session_01NTbgsritf5j3MP1V7UsU3p


Generated by Claude Code

Emit JS and declarations with tsc so a prepare script can build dist/ on
install, which makes installing from GitHub work without Bun. Source
imports use .js extensions so the emitted ESM resolves under Node.

Add a release workflow that tests, builds and publishes to npm with
provenance when a v* tag matching package.json is pushed, via trusted
publishing or an NPM_TOKEN secret.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTbgsritf5j3MP1V7UsU3p
@carsonfarmer
carsonfarmer merged commit 36e280b into main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants