Skip to content

Migrate to Effect 4 and update project tooling - #163

Merged
samuelbriole merged 3 commits into
spiko-tech:mainfrom
samuelbriole:v1
Oct 9, 2026
Merged

samuelbriole merged 3 commits into
spiko-tech:mainfrom
samuelbriole:v1

Conversation

@samuelbriole

@samuelbriole samuelbriole commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Migrate all packages to stable Effect 4.0.0 and upgrade amqplib to 2.2.0.
  • Fix AMQP recovery and interruption-safe shutdown, preserving publisher confirms.
  • Simplify subscriber execution and build/release tooling.

Compatibility

Requires Effect 4; @effect/platform is no longer a peer dependency. Packages are ESM-only with explicit public exports.

Validation

CI is green. Build, lint, type checks, and package/declaration validation pass.
All 83 tests pass locally from both sources and built artifacts (TEST_DIST=1).

@samuelbriole samuelbriole changed the title Migrate messaging packages to Effect 4 Migrate to Effect 4 and update project tooling Sep 29, 2026

@antonin-morel-spiko antonin-morel-spiko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Comment thread tsconfig.base.json Outdated
"skipLibCheck": true, // Skip type checking of third party libraries.
"noErrorTruncation": true, // Do not truncate error messages.
"types": [], // Disable automatic loading of `@types/*` packages.
"jsx": "react-jsx",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken there si no jsx in this repo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing it

NATSError.JetStreamManagerError,
NATSConnection.NATSConnection
> => Layer.scoped(JetStreamManager, makeJetStreamClient(options))
> => Layer.effect(JetStreamManager, makeJetStreamClient(options))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No scope anymore? How do we stop the connection?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually Layer.effect accepts scoped resource acquisition (check the docs), the connection will stop like before

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layer.scoped does not exists anymore in v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, didn't know that

Comment thread packages/nats/src/JetStreamClient.ts
@antonin-morel-spiko

antonin-morel-spiko commented Oct 1, 2026 •

Copy link
Copy Markdown

@samuelbriole just saw that the stable release is out, let's upgrade directly to this version wdyt?

@samuelbriole

Copy link
Copy Markdown
Collaborator Author

@antonin-morel-spiko Agreed, the PR now uses stable Effect 4.0.0. CI is green, and all 83 tests pass from both sources and built artifacts.

Comment on lines 12 to +15
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you dont need to install node when you install pnpm (docs)

@antonin-morel-spiko

Copy link
Copy Markdown

@samuelbriole let's merge!

@samuelbriole

Copy link
Copy Markdown
Collaborator Author

@antonin-morel-spiko unfortunately I don't have any rights on this repo anymore

If you want we can discuss how to share the ownership of this project

@antonin-morel-spiko

Copy link
Copy Markdown

@samuelbriole sent you a sms looks like you didn't get it. Oc let's talk! Sorry I merge a dependabot pr in between this one needs to be rebased. If you're ok I'll merge it when it's ready

@samuelbriole
samuelbriole force-pushed the v1 branch 4 times, most recently from 001f020 to 23912ed Compare October 7, 2026 20:18
@samuelbriole
samuelbriole force-pushed the v1 branch 2 times, most recently from b7efbab to ff7ca2c Compare October 7, 2026 20:22
@antonin-morel-spiko

Copy link
Copy Markdown

@samuelbriole can I merge?

@samuelbriole
samuelbriole added this pull request to the merge queue Oct 9, 2026
Merged via the queue into spiko-tech:main with commit 112f98c Oct 9, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 9, 2026
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