Skip to content

fix(wbn-sign): fix type declarations and keep ESM/CJS builds in sync - #919

Merged
zgroza merged 1 commit into
mainfrom
push-vzouqtlyzuro
Oct 14, 2026
Merged

zgroza merged 1 commit into
mainfrom
push-vzouqtlyzuro

Conversation

@zgroza

@zgroza zgroza commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator
  • Point types in package.json at lib/wbn-sign.d.ts instead of the non-existent lib/wbn-sign.d.js.
  • Restore the IntegrityBlockSigner declaration: stripInternal dropped the whole class, because a plain comment above it mentioned the internal tag.
  • Keep the default crypto import out of the emitted declarations, which did not type-check for consumers without esModuleInterop.
  • Build and test before publishing, so that a release can no longer mix a stale ESM build with a freshly built CJS bundle (as wbn-sign@0.3.1 on npm does).
  • Run the tests of the public API against both the ESM and the CJS build.
  • Test that the package.json entry points exist, that lib/ contains no stale outputs of removed sources, and that the emitted declarations type-check.

@zgroza
zgroza requested a review from rferens October 12, 2026 17:04
@zgroza
zgroza added this pull request to stack #921 October 12, 2026 17:05

@rferens rferens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me. That's the change that really help this package to maintain its quality and flawless releases. Great thanks!

Comment thread js/sign/README.md Outdated
- Point `types` in package.json at lib/wbn-sign.d.ts instead of the
  non-existent lib/wbn-sign.d.js.
- Restore the IntegrityBlockSigner declaration: `stripInternal` dropped the
  whole class, because a plain comment above it mentioned the internal tag.
- Keep the default `crypto` import out of the emitted declarations, which
  did not type-check for consumers without `esModuleInterop`.
- Build and test before publishing, so that a release can no longer mix a
  stale ESM build with a freshly built CJS bundle (as wbn-sign@0.3.1 on npm
  does).
- Run the tests of the public API against both the ESM and the CJS build.
- Test that the package.json entry points exist, that lib/ contains no stale
  outputs of removed sources, and that the emitted declarations type-check.
@zgroza
zgroza force-pushed the push-vzouqtlyzuro branch from 3ca98de to e123af5 Compare October 14, 2026 12:47
@zgroza
zgroza merged commit ca6a053 into main Oct 14, 2026
19 checks passed
@zgroza
zgroza deleted the push-vzouqtlyzuro branch October 14, 2026 12:54
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