Skip to content

fix(trailer-codec): publish type declarations#2

Merged
flyingrobots merged 1 commit into
mainfrom
fix/types-declarations-v3
Jun 24, 2026
Merged

fix(trailer-codec): publish type declarations#2
flyingrobots merged 1 commit into
mainfrom
fix/types-declarations-v3

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • add root index.d.ts declarations for the async v3 public API
  • wire package types, root export metadata, and files to publish the declarations
  • bump package version to v3.0.4 and update the changelog
  • refresh the lockfile, including dev-tool audit fixes

Validation

  • npm run lint
  • npm test
  • npm audit --audit-level=high
  • npm pack --dry-run
  • TypeScript consumer compile with npx -p typescript@latest tsc --noEmit --strict --module NodeNext --moduleResolution NodeNext --target ES2022 --skipLibCheck
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added first-class TypeScript declarations for the public async API, making the package easier to use in TypeScript projects.
    • Published type definitions with the package so editors and builds can recognize the available API surface.
  • Bug Fixes

    • Updated package metadata so the installed package correctly exposes both runtime code and TypeScript types.
    • Added validation coverage to ensure the published type entry points remain correct.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds root TypeScript declarations for the async v3 trailer codec API, updates package metadata to publish index.d.ts, bumps the package to 3.0.4, and adds a unit test that checks the published types entry.

Changes

TypeScript declaration publishing

Layer / File(s) Summary
Public models and errors
index.d.ts
Adds the root declaration surface for commit and trailer models, input shapes, and codec error typing.
Schema, parser, and service
index.d.ts
Adds trailer schema bundle types, parser options/results, body formatting options, and the async trailer codec service.
Codec facade helpers
index.d.ts
Adds helper payload types, wrapper classes, raw encode/decode functions, and configured codec constructors.
Publish metadata and validation
package.json, CHANGELOG.md, test/unit/package-types.test.js
Bumps the package version, publishes index.d.ts through exports and files, records the release note, and adds a metadata test.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A bunny hopped by with a type-filled grin,
index.d.ts let the new trails begin.
types and default now leap side by side,
With tests at my paws and the changelog as guide,
I twitched my nose: “This release feels just right!” 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: publishing TypeScript type declarations for the trailer-codec package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/types-declarations-v3

Comment @coderabbitai help to get the list of available commands.

@flyingrobots flyingrobots merged commit 95ba0fb into main Jun 24, 2026
2 of 3 checks passed
@flyingrobots flyingrobots deleted the fix/types-declarations-v3 branch June 24, 2026 21:47
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