Skip to content

Publish v1.1.3 fix typings - #44

Merged
clamstew merged 2 commits into
mainfrom
publish-v1.1.3-fix-typings
Nov 28, 2025
Merged

Publish v1.1.3 fix typings#44
clamstew merged 2 commits into
mainfrom
publish-v1.1.3-fix-typings

Conversation

@clamstew

Copy link
Copy Markdown
Owner

Description

Please include a summary of the changes and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

AI Optimization Checklist

  • I've run pnpm run ai:sync to verify AI-optimized files are in sync
  • I've generated AI-optimized versions for any new complex files
  • I've reviewed all generated AI-optimized files for accuracy

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@clamstew clamstew self-assigned this Nov 28, 2025
- Renamed source entry files to avoid shadowing npm packages:
  - src/react.ts -> src/react-integration.ts
  - src/preact.ts -> src/preact-integration.ts
  - src/remix.ts -> src/remix-integration.ts
- Fixed TypeScript resolving 'react'/'preact' imports to our files instead of actual packages
- All tests pass (351/351)
- Type-check passes without errors

This fixes CI failures where test files importing from 'react' or 'preact'
were incorrectly resolved to our integration files.
BREAKING CHANGE from v1.1.0-1.1.2: Those versions had broken type definitions.

Changes:
- Switched from vite-plugin-dts to using tsc directly for type declarations
- Added tsconfig.build.json for generating declarations
- Added typesVersions to package.json for backward compatibility
- Updated exports to use correct type definition file names

The key insight was that vite-plugin-dts was generating incorrect relative
paths in .d.ts files (e.g., '../store' instead of './store'). Using tsc
directly with a dedicated tsconfig.build.json generates correct paths.

Tested with:
- moduleResolution: 'node' ✅
- moduleResolution: 'bundler' ✅
- All 351 tests pass ✅
- type-check passes ✅
@clamstew
clamstew force-pushed the publish-v1.1.3-fix-typings branch from fa5ddf6 to 00c0881 Compare November 28, 2025 04:24
@clamstew
clamstew merged commit 559496b into main Nov 28, 2025
2 checks passed
@clamstew
clamstew deleted the publish-v1.1.3-fix-typings branch November 28, 2025 04:28
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