Skip to content

fix(@formatjs/ts-transformer): restore ts-jest-integration import#6433

Closed
azolotopup wants to merge 1 commit intoformatjs:mainfrom
azolotopup:main
Closed

fix(@formatjs/ts-transformer): restore ts-jest-integration import#6433
azolotopup wants to merge 1 commit intoformatjs:mainfrom
azolotopup:main

Conversation

@azolotopup
Copy link
Copy Markdown

PR #6080 added "exports": { ".": "./index.js" } to @formatjs/ts-transformer, which inadvertently broke the ts-jest-integration deep import that ts-jest users rely on for AST transformer configuration.

Problem

After upgrading to @formatjs/[email protected], any project using ts-jest with the formatjs ast transformer fails before tests execute with error:
File not found: @formatjs/ts-transformer/ts-jest-integration

This affects the documented ts-jest configuration pattern:

Fix

Expose ts-jest-integration as an explicit subpath export

Impact

No breaking changes — existing "." export is unchanged
Restores the documented ts-jest integration path without requiring any workaround on the consumer side
ts-jest-integration.js already exists in the published package; this change only makes it reachable via the exports map

Related

Regression introduced by: #6080

Comment thread packages/ts-transformer/package.json Outdated
@longlho
Copy link
Copy Markdown
Member

longlho commented Apr 24, 2026

Thanks for the report! I've opened #6437 with a more complete fix that also adds ts-jest-integration.ts as a rolldown entry point (so the .js, .d.ts, and .js.map are actually bundled into the published package). Closing this in favor of that PR.

@longlho longlho closed this Apr 24, 2026
dzbarsky pushed a commit to dzbarsky/formatjs that referenced this pull request Apr 26, 2026
…port (formatjs#6437)

## Summary
- Add `./ts-jest-integration.js` to the `exports` field in
`package.json`
- Add `ts-jest-integration.ts` as a rolldown entry point in
`BUILD.bazel` so it gets bundled with `.js`, `.d.ts`, and `.js.map` into
the published package
- Update jest integration test config to use `.js` extension in the
import path

This was a regression from formatjs#6080 which added an `exports` field to
`package.json` but only included `.` — blocking the
`ts-jest-integration` deep import that ts-jest users rely on.

Closes formatjs#6433

## Test plan
- [x] `bazel test //packages/ts-transformer:package_exports_test` —
validates all exports resolve to real files
- [x] `bazel test //packages/ts-transformer:unit_test` — 27 tests pass
- [x] All pre-commit hooks pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
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