mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
b01ed548d7
* build: declare typescript (catalog:) in every package that runs tsc Twenty packages invoke tsc in their build/typecheck scripts without declaring a typescript dependency, resolving whatever tsc pnpm happens to leave reachable. That broke locally after the TypeScript 6 upgrade (#2700): base.json now uses the TS6-only 'types': ['*'] wildcard, and worktrees carrying pre-upgrade node_modules/.bin/tsc shims (orphaned typescript@5.9.3 bins that pnpm never refreshes for an undeclared dependency) fail with TS2688 'Cannot find type definition file for *'. Declaring 'typescript': 'catalog:' (the convention nest already follows) makes pnpm own each package's tsc bin, so version upgrades refresh the shims and this staleness class cannot recur. Packages without tsc in their scripts are left unchanged. Full pnpm build: 27/27 tasks green. * Address review: drop duplicate zod devDep; regenerate lockfile minimally - packages/world listed zod in both dependencies and devDependencies (pre-existing on main, surfaced by the devDependencies sort) — keep the runtime dependency only. - Regenerate pnpm-lock.yaml from a pristine main baseline with --lockfile-only (a clean-main run produces zero diff, so main has no drift). Remaining non-typescript changes are mechanical consequences of the change itself: typescript is an (optional) peer of several tooling dependencies, so declaring it in 20 importers creates new peer-resolution snapshot variants and prunes the now-orphaned old ones; plus one radix-ui 1.6.1->1.6.2 refresh in docs caused by its floating 'latest' specifier. - Validated: pnpm install --frozen-lockfile succeeds; full build 27/27.
@workflow/serde
Serialization symbols for custom class serialization in Workflow SDK.
Usage
import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
class MyClass {
constructor(public value: string) {}
static [WORKFLOW_SERIALIZE](instance: MyClass) {
return { value: instance.value };
}
static [WORKFLOW_DESERIALIZE](data: { value: string }) {
return new MyClass(data.value);
}
}
License
Apache-2.0