Skip to content

chore: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated - #41316

Draft
ggazzo wants to merge 2 commits into
developfrom
chore/ts7-typia-ttsc
Draft

chore: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated#41316
ggazzo wants to merge 2 commits into
developfrom
chore/ts7-typia-ttsc

Conversation

@ggazzo

@ggazzo ggazzo commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Moves the two typia-transformed packages — core-typings and ui-kit — off ts-patch + tsc onto ttsc, so their emit works under the native TypeScript 7 compiler. Validated end-to-end in CI (canary): both packages build with the typia transform on TS7, and the monorepo typechecks at 67/70.

How the TS7 blockers were solved

TS7's native compiler dropped the transformer plugin API ts-patch used. Wiring ttsc (the typescript-go plugin toolchain, which ships typia's native Go transform) into the workspace hit three frictions — all resolved:

Friction Fix
ttsc needs a tsgo binary; typescript@7 trips yarn's builtin compat/typescript patch (ENOENT lib/_tsc.js, berry#7191) Use @typescript/native-preview — same tsgo binary under a different package name, so the patch never applies. Resolve it via ttsc --binary <native-preview>/bin/tsgo.
@ttsc/lint auto-activates and fails without a lint config Don't install it — it's the optional linter, not needed for the build.
Shared base still uses removed moduleResolution: node; TS7 no longer auto-includes @types Per-package moduleResolution: bundler on the build configs + explicit types: ["node"] / es lib on core-typings.

Changes

  • build: ts-patch install && typia patch && tscttsc --binary <native-preview tsgo>
  • deps: typia^13.0.2; +@typescript/native-preview, +ttsc, -ts-patch; drop vestigial ts-jest from ui-kit (jest runs on @swc/jest)
  • tsconfig: bundler on the build configs; core-typings gets types: ["node"] + es lib
  • lockfile regenerated (no typescript@7 → no yarn patch break)

CI result (canary)

Build workspace packages: success — 61/61 tasks (incl. both ttsc packages) · TS7 typecheck: green 67/70.

Remaining to merge

RC's main build CI needs a Go toolchain (ttsc compiles typia's native plugin once per cache key) — add actions/setup-go + a plugin cache to the shared build setup, as done in the TS7 canary workflow.

Draft — implementation validated end-to-end; the main-CI Go step is the one wiring item left.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: db79f9b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot

dionisio-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dd593271-04b2-4823-9a0a-bff71a89b03f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ggazzo ggazzo added this to the 8.7.0 milestone Jul 10, 2026
@ggazzo

ggazzo commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/jira ARCH-2200

@ggazzo ggazzo changed the title build: move typia emit to ttsc for TS7 (core-typings, ui-kit) chore: move typia emit to ttsc for TS7 (core-typings, ui-kit) Jul 10, 2026
@ggazzo
ggazzo force-pushed the chore/ts7-typia-ttsc branch 4 times, most recently from 4bc13bb to 0808d58 Compare July 11, 2026 02:42
@ggazzo ggazzo changed the title chore: move typia emit to ttsc for TS7 (core-typings, ui-kit) build: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated Jul 11, 2026
@ggazzo ggazzo changed the title build: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated chore: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated Jul 11, 2026
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.65%. Comparing base (eb99fc4) to head (db79f9b).
⚠️ Report is 20 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41316      +/-   ##
===========================================
- Coverage    68.68%   68.65%   -0.03%     
===========================================
  Files         4135     4138       +3     
  Lines       160461   159089    -1372     
  Branches     29186    27901    -1285     
===========================================
- Hits        110215   109229     -986     
+ Misses       45137    44724     -413     
- Partials      5109     5136      +27     
Flag Coverage Δ
unit 70.64% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

TS7's native compiler dropped the transformer plugin API that ts-patch used,
so the typia transform (createIs / json.schemas) can't run under plain tsc.
Switch these two packages to ttsc (typescript-go plugin toolchain) with the
@typescript/native-preview tsgo binary, bump typia 9.7.2 -> 13.x.

- build: 'ts-patch install && typia patch && tsc' -> 'ttsc --binary <tsgo>'
- @typescript/native-preview provides tsgo without tripping yarn's builtin
  compat/typescript patch (yarnpkg/berry#7191)
- moduleResolution bundler on the ttsc build configs (base still uses node)
- drop vestigial ts-jest from ui-kit (jest runs on @swc/jest)
- validated in canary CI: 61/61 build tasks, typia transform verified at runtime
@ggazzo
ggazzo force-pushed the chore/ts7-typia-ttsc branch from 7e2e5d1 to 43fd222 Compare July 23, 2026 00:21
typia's json.schemas emits OpenAPI 3.1 / draft shapes that ajv/dist/2020 rejects
in strict mode, crashing the server at boot ("unknown keyword: additionalItems",
"discriminator: mapping is not supported"). This was latent on the branch since
the typia 13 bump — only the Go-plugin build failure kept CI from ever booting.

Emit as '3.1' (JSON Schema 2020-12, matching the runtime Ajv dialect) and rewrite
the residual gaps in place, without changing what any schema validates:
- closed tuples: additionalItems:false -> items:false, pin minItems/maxItems to the
  tuple length (strictTuples)
- discriminator: drop the unsupported 'mapping' (Ajv resolves via propertyName +
  oneOf), add type:'object' (strictTypes)

Verified by reproducing the boot-time addSchema+compile over all 193 typia
component schemas against ajv/dist/2020 with the app's exact options: 0 errors.
OpenAPI doc bumped to 3.1.0 to match the emitted schema dialect.
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