Skip to content

Publish every package to npm - #16

Merged
K-Mistele merged 6 commits into
mainfrom
release-process
Oct 5, 2026
Merged

K-Mistele merged 6 commits into
mainfrom
release-process

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Stacked on #15.

What this does

Pushing a v* tag publishes every package in packages/ to npm at the same version, the way fold does it. v0.1.0-rc.1 goes out under the rc tag; v0.1.0 goes out as latest. GitHub signs in to npm through trusted publishing.

Before publishing, the release check:

  • makes sure each package.json is publishable (real versions, public, Effect only as a peer, exports pointing at files that exist)
  • packs every package, installs the tarballs into a fresh project with npm, and typechecks a sample app against them with strict Node.js settings
  • imports every package under plain Node.js, and fails on a second copy of Effect, TypeScript source, or a network call at import

CI runs that check, with a dry-run publish, on every pull request. It also runs the Postgres and Redis suites.

Found by the check

  • @humanlayer/channels-alchemy-cloudflare's type files imported alchemy/Cloudflare/index, a path Alchemy doesn't export. Fixed by importing alchemy/Cloudflare in ChannelsCloudflare.ts.
  • Built type files used extensionless relative imports, which strict Node.js projects can't read. The build now adds .js.

Other changes

  • effect (and alchemy, for the Cloudflare package) are now peer dependencies, published as ^ ranges. emulate moved to dev dependencies, since only tests use it.
  • READMEs for delivery, sql, redis, and alchemy-cloudflare, which had none.
  • scripts/ is excluded from the library lint rules, like tools/, and gets its own type check.
  • The old tools/packaging harness is replaced.

First release (needs a person)

npm only lets you set up trusted publishing for a package that already exists, so the first test version goes out from a laptop:

  1. npm login as someone who can publish to @humanlayer.
  2. bun run build && bun run release:prepare --version 0.1.0-rc.0 && bun run release:validate --version 0.1.0-rc.0 && bun run release:publish --version 0.1.0-rc.0 --tag rc
  3. On npmjs.com, for each of the seven packages: Settings → Trusted publishing → GitHub Actions, org humanlayer, repo effect-channels, workflow release.yml.
  4. After that, tags publish from GitHub.

Test plan

  • bun run check, bun run test (544/544)
  • Build, stage, check, and dry-run publish of all seven packages locally
  • CI passes on this PR
  • First 0.1.0-rc.0 published by hand, trusted publishing set up, then v0.1.0-rc.1 tag publishes from GitHub

🤖 Generated with Claude Code

@humanlayer-channels-app

Copy link
Copy Markdown

Subscribed! Subsequent pull request activity will be logged.

K-Mistele and others added 3 commits October 3, 2026 14:49
Follow fold's release setup. A `v*` tag builds every package in packages/,
stages it in .release/ with real versions, checks it, and publishes it to
npm through trusted publishing. `-rc.N` versions publish under the `rc` tag.

- scripts/build/packages.ts bundles each package's JavaScript and emits its
  declarations, then adds `.js` to relative imports in them so NodeNext
  projects can read them.
- scripts/release/prepare.ts writes publishable manifests: catalog and
  workspace ranges resolved, our packages pinned to the release, Effect and
  Alchemy as `^` peer ranges, exports pointing at dist/.
- scripts/release/validate.ts checks each manifest, then installs the packed
  tarballs into a fresh project with npm, typechecks a sample app against
  them with NodeNext and skipLibCheck off, and imports every package under
  plain Node.js with one copy of Effect, no TypeScript, and no network.
- scripts/release/publish.ts publishes in dependency order and skips
  versions already on npm, so a failed release can be resumed.
- CI runs check, tests, both backend suites, and the release check with a
  dry-run publish on every pull request. Validate Publish runs that by hand.

Effect and Alchemy are now peer dependencies; emulate moves to dev
dependencies, since only tests use it. ChannelsCloudflare imports
alchemy/Cloudflare so its declarations name DurableObjectState through a
public path, not alchemy/Cloudflare/index. Add READMEs for the packages that
had none. Replace the unused tools/packaging harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a102d3-2fe4-7531-aff7-d6c62a5dc2e8
Bun 1.3.14's bundler emits a broken export for `export * as Channels`, which
the release check caught under Node.js. tsc emits one file per source file,
the same on every Bun version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a102d3-2fe4-7531-aff7-d6c62a5dc2e8
K-Mistele and others added 3 commits October 5, 2026 11:09
Add `bun run release:trust`, which runs `npm trust github` for every package
against release.yml in humanlayer/effect-channels and skips packages that
are already connected. Document the first-release steps in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a102d3-2fe4-7531-aff7-d6c62a5dc2e8
@K-Mistele
K-Mistele changed the base branch from update-readme-with-features-and-integration-examples-qib91d to main October 5, 2026 18:43
@K-Mistele
K-Mistele merged commit 49cbfba into main Oct 5, 2026
6 checks 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.

1 participant