Skip to content

refactor(types): migrate from tsd to tstyche + CI matrix bump - #136

Open
Puppo wants to merge 6 commits into
mcollina:masterfrom
Puppo:refactor/types-migrate-to-tstyche
Open

refactor(types): migrate from tsd to tstyche + CI matrix bump#136
Puppo wants to merge 6 commits into
mcollina:masterfrom
Puppo:refactor/types-migrate-to-tstyche

Conversation

@Puppo

@Puppo Puppo commented Jun 17, 2026

Copy link
Copy Markdown

Migrate type tests from tsd to tstyche, move the type files into a types/ folder, and upgrade the CI matrix.

Puppo added 6 commits June 17, 2026 12:46
- Replace tsd devDependency with tstyche ^7.1.0
- Update test:types and test scripts to invoke tstyche
- Rename mqemitter-redis.test-d.ts to mqemitter-redis.tst.ts
- Translate assertions:
  - expectType<T>(value)  -> expect(value).type.toBe<T>()
  - expectError(value)    -> expect(value).type.not.toBeCallableWith(...)
- Wrap assertions in describe/it blocks for a structured, readable report
- Add root tsconfig.json so tstyche (module: NodeNext) can resolve
  the existing 'export = MQEmitterRedis' .d.ts via esModuleInterop

Refs: nearform/fastify-slow-down#625
Add 26.x to the node-version matrix in .github/workflows/ci.yml so we
catch regressions on the upcoming Current release line early. Node 26
is not LTS yet (it ships as Current in May 2026 and will become LTS
in October 2026) but the package's engines field already accepts it.

Also includes the companion CI housekeeping that was already staged:
- Bump actions/checkout and actions/setup-node from v4 to v6
- Swap Redis 7.2 for 8.0 in the services image matrix (still covers
  the 7.x -> 8.x major-version boundary alongside 7.4)
Switch the redis services matrix from pinned [7.4, 8.0] to floating
[7, 8] so the image tag always points to the latest 7.x and 8.x
releases on Docker Hub. Trade-off: a CI run is no longer bit-exact
reproducible for the Redis image, but we never have to bump the
matrix manually when a new minor ships.
Auto-formatting nudge: the 6379:6379 port mapping was over-indented
under the services.redis block. Two-space dash matches the rest of
the YAML style.
tstyche baseline TSConfig (esModuleInterop: true) handles the
export = MQEmitterRedis declaration correctly without a root
tsconfig.json.

BREAKING CHANGE: types field in package.json now points to
types/mqemitter-redis.d.ts
@Puppo
Puppo marked this pull request as ready for review June 17, 2026 15:03

@mcollina mcollina left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

lgtm

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