imccyu
31f4441fd4
pkg: update vendor dep
2026-07-15 11:28:45 +08:00
Tianyi Cui
07f4047ff0
Use explicit ts specifiers for declarations
...
Restore explicit .ts relative specifiers in source and enable rewriteRelativeImportExtensions so emitted JS uses .js while declarations keep explicit .ts specifiers. Add a NodeNext declaration-consumer gate to prevent extensionless declaration regressions.
2026-06-22 06:11:00 +08:00
Tianyi Cui
7f131dd4d8
refactor: rename build typings dir to types
2026-06-20 00:26:02 +08:00
Tianyi Cui
ed94daed9e
fix: address build config review findings
2026-06-20 00:21:57 +08:00
imccyu
ec9b093cb0
build: two-step for packages/vendor build and README
2026-06-19 23:35:47 +08:00
imccyu
99db549708
refactor: packages/tsconfig.json in vendor use lib/typings/ as output subfolder
2026-06-19 23:35:47 +08:00
imccyu
29e674bfea
refactor: ts in vendor use extensionless import
2026-06-19 23:35:16 +08:00
Tianyi Cui
630bbddf9a
Replace dumble with tsdown for JS bundling
...
dumble (0.2.x, ~530 dl/wk, single-maintainer) was a bus-factor risk as
the load-bearing bundler. tsdown (rolldown-based, ~2.5M dl/wk, actively
maintained) replaces it while output stays list-identical, verified by
snapshot diff: 17 JS bundles, externals preserved, schemastery dual
.mjs/.cjs and logger-console node+browser entries intact.
Root tsdown.config.ts uses workspace globs ['vendor/*', 'packages/*']
(explicit, so examples/* stays excluded); two per-package overrides in
vendor/ cover the special shapes and are logged in vendor/README.md as
ours (not upstream sync surface). scripts/build.ts (dumble
orchestration) is deleted; yarn build = tsc -b && tsdown. tsc -b keeps
owning declarations (dts: false, clean: false).
Rationale recorded in ADR 0008 (also covers the direct-esbuild and
pkgroll alternatives).
Gates: lint, typecheck, 134 tests, hygiene (knip/publint/constraints),
demo smoke all green.
2026-06-11 22:34:43 +08:00
Tianyi Cui
d2fb352f3e
Enable maximum-strict TypeScript across our packages
...
tsconfig.base.json adds noUncheckedIndexedAccess,
exactOptionalPropertyTypes, noImplicitOverride,
noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on
top of strict. Vendored packages opt out of the new flags locally
(their tsconfigs are ours to regenerate; their source is not), keeping
upstream-sync friendliness.
Our code fixed accordingly: index accesses acknowledge undefined
(assembler flush cursors, lastTurnNumber); optional properties are
omitted instead of set-to-undefined (GenerateResult.usage,
ToolDefinition.strict, GenerateOptions.system/tools, error payloads
via an errorData helper); Session.onAppend is explicitly
`(…) => void | undefined`; tests and examples updated for unused
parameters and indexed access.
2026-06-11 14:02:47 +08:00
Tianyi Cui
72688a3888
Vendor Cordis framework packages as source
...
cordis 4.0.0-rc.6, plugin-loader, -include, -group, -timer, -hmr,
-logger-console, cosmokit 1.8.1, schemastery 3.18.0 — copied from the
cordis-workspace checkout, flattened under vendor/, original npm names,
private: true. vendor/README.md is the manifest: upstream repos +
commit SHAs, local-modification log, sync procedure.
Local modification: hmr's locale YAML imports and .i18n() call removed
(avoids a runtime YAML import hook we don't vendor).
2026-06-11 10:53:32 +08:00