Skip to content

fix: correct publishConfig.types format in package.json files#400

Merged
FL4TLiN3 merged 1 commit intomainfrom
fix/publishconfig-types-format
Jan 9, 2026
Merged

fix: correct publishConfig.types format in package.json files#400
FL4TLiN3 merged 1 commit intomainfrom
fix/publishconfig-types-format

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Jan 9, 2026

Summary

  • Fixed publishConfig.types format across 22 package.json files
  • Changed from invalid object format to proper exports condition format
  • TypeScript can now correctly resolve type definitions for published packages

Problem

The types field in publishConfig was incorrectly specified as an object:

"types": {
  ".": "./dist/src/index.d.ts"
}

This format is invalid for the types field, causing TypeScript to fail to resolve type definitions in @perstack/core@0.0.33 and other published packages.

Solution

Moved type declarations into the exports field using the TypeScript 4.7+ recommended pattern:

"exports": {
  ".": {
    "types": "./dist/src/index.d.ts",
    "import": "./dist/src/index.js"
  }
}

Test plan

  • pnpm build passes (28 tasks)
  • pnpm typecheck passes (50 tasks)
  • Verify type resolution in external project after publishing

🤖 Generated with Claude Code

The types field was incorrectly specified as an object instead of being
included in the exports field. This caused TypeScript to fail to resolve
type definitions for published packages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 merged commit 4171080 into main Jan 9, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Jan 9, 2026
@FL4TLiN3 FL4TLiN3 deleted the fix/publishconfig-types-format branch February 25, 2026 13:38
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