chore: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated - #41316
chore: typia emit via ttsc for TS7 (core-typings, ui-kit) — validated#41316ggazzo wants to merge 2 commits into
Conversation
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
/jira ARCH-2200 |
4bc13bb to
0808d58
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
0808d58 to
7e2e5d1
Compare
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
7e2e5d1 to
43fd222
Compare
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.
Summary
Moves the two typia-transformed packages —
core-typingsandui-kit— offts-patch + tscontottsc, 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-patchused. Wiringttsc(the typescript-go plugin toolchain, which ships typia's native Go transform) into the workspace hit three frictions — all resolved:ttscneeds a tsgo binary;typescript@7trips yarn's builtincompat/typescriptpatch (ENOENT lib/_tsc.js, berry#7191)@typescript/native-preview— same tsgo binary under a different package name, so the patch never applies. Resolve it viattsc --binary <native-preview>/bin/tsgo.@ttsc/lintauto-activates and fails without a lint configmoduleResolution: node; TS7 no longer auto-includes@typesmoduleResolution: bundleron the build configs + explicittypes: ["node"]/ es lib oncore-typings.Changes
ts-patch install && typia patch && tsc→ttsc --binary <native-preview tsgo>typia→^13.0.2;+@typescript/native-preview,+ttsc,-ts-patch; drop vestigialts-jestfromui-kit(jest runs on@swc/jest)bundleron the build configs;core-typingsgetstypes: ["node"]+ es libtypescript@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 (
ttsccompiles typia's native plugin once per cache key) — addactions/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.