Fix published package leaking raw .ts sources into consumer type-chec…#523
Merged
Conversation
…ks (#522) Consumers on legacy moduleResolution "node" (node10) resolved subpath imports like permissionless/accounts to raw .ts sources instead of the compiled declarations, because node10 ignores the exports map and prefers .ts over .d.ts in directory lookups. The sources then got type-checked with the consumer's own compiler flags, surfacing errors under flags stricter than the library's build (noUncheckedIndexedAccess). - Ship a proxy package.json in every exported subpath directory (viem parity; the pattern existed for actions/ but was never completed), redirecting node10 resolution to _types/_esm/_cjs - Move the 7 file-based barrel subpaths (actions/{erc7579,pimlico, passkeyServer,etherspot,smartAccount}, clients/{pimlico, passkeyServer}) into directories, since a .ts file beats a directory proxy under node10; package-specifier imports are unaffected - Exclude test files, vitest config, and coverage from the tarball via a files field; raw .ts sources are intentionally kept for debugging - Enable noUncheckedIndexedAccess and fix the resulting errors across permissionless, wagmi, and mock-paymaster so shipped sources stay clean even when consumers type-check them with that flag - Add a package-types CI job that packs the tarball and type-checks it as node10 and bundler consumers to prevent regressions - Delete the broken types/package.json proxy (pointed at a nonexistent declaration file; ./types was never exported) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: f90ee52 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
- Coverage 78.67% 78.41% -0.26%
==========================================
Files 105 105
Lines 8950 8988 +38
Branches 564 570 +6
==========================================
+ Hits 7041 7048 +7
- Misses 1883 1914 +31
Partials 26 26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
size-limit report 📦
|
Without an explicit types option, tsc auto-includes every node_modules/@types package from parent directories, so the monorepo root's hoisted typings leaked into the fixture program. In CI, @types/pg failed to resolve pg-protocol/dist/messages under skipLibCheck: false and broke the bundler consumer check. The fixture must only type-check the packed permissionless tarball, not workspace typings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
Fixes #522 |
mouseless0x
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ks (#522)
Consumers on legacy moduleResolution "node" (node10) resolved subpath imports like permissionless/accounts to raw .ts sources instead of the compiled declarations, because node10 ignores the exports map and prefers .ts over .d.ts in directory lookups. The sources then got type-checked with the consumer's own compiler flags, surfacing errors under flags stricter than the library's build (noUncheckedIndexedAccess).