Repository navigation
Build with tsc alone and publish to npm from tags - #8
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the package installable from GitHub today and publishable to npm from a tag.
tscalone.dist/now gets JS and declarations from onetsc -p tsconfig.build.json. Apreparescript runs it, sonpm install github:carsonfarmer/geometric-treebuilds on install without Bun (verified under Node 22:maincurrently fails withCannot find module dist/index.js). Source imports use.jsextensions so the emitted ESM resolves under Node; Bun and the tests resolve them to.tsas before..github/workflows/release.yml): on av*tag it runs typecheck, tests and the Node smoke test, checks the tag matchespackage.json, and runsnpm publishwith provenance. Works with npm trusted publishing (OIDC, no secret) or anNPM_TOKENrepository secret.publishConfigsets public access and provenance; README documents git installs and the release flow.Test plan
bun run typecheck,bun test(54 pass),bun run smokenpm packtarball installed in a clean directory: imports under Node 22 and Bunnpm install github:carsonfarmer/geometric-tree#<this branch>in a clean directory:preparebuildsdist/, import works under Node🤖 Generated with Claude Code
https://claude.ai/code/session_01NTbgsritf5j3MP1V7UsU3p
Generated by Claude Code