Skip to content

Commit 10d1f74

Browse files
longlhoclaude
andauthored
fix(@formatjs/ts-transformer): restore ts-jest-integration subpath export (#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 #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 #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]>
1 parent dc8fd2c commit 10d1f74

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

MODULE.bazel.lock

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ts-transformer/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ formatjs_library(
2929
"ts-jest-integration.ts",
3030
"types.ts",
3131
],
32+
entry_points = [
33+
"index.ts",
34+
"ts-jest-integration.ts",
35+
],
3236
visibility = ["//visibility:public"],
3337
deps = [
3438
"//:node_modules/@formatjs/icu-messageformat-parser",

packages/ts-transformer/integration-tests/integration/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
astTransformers: {
77
before: [
88
{
9-
path: require.resolve('@formatjs/ts-transformer/ts-jest-integration'),
9+
path: require.resolve('@formatjs/ts-transformer/ts-jest-integration.js'),
1010
options: {
1111
// options
1212
overrideIdFn: '[sha512:contenthash:base64:6]',

packages/ts-transformer/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"type": "module",
88
"types": "index.d.ts",
99
"exports": {
10-
".": "./index.js"
10+
".": "./index.js",
11+
"./ts-jest-integration.js": "./ts-jest-integration.js"
1112
},
1213
"engines": {
1314
"node": ">= 20.12.0"

0 commit comments

Comments
 (0)