You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 742cebb
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(spec): converge HttpRequest onto one declaration (#4688, C11) (#4689)
`@objectstack/spec/shared` and `@objectstack/spec/ui` both exported the name
`HttpRequest` for DIFFERENT type declarations — a row on
`dual-source-exports.baseline.json`, judged by symbol identity (#4411 trap).
This cluster is the degenerate case of that trap. `HttpRequestSchema` was never
duplicated: `ui/view.zod.ts` imports it from `shared/http.zod.ts` and re-exports
it verbatim, which is why the baseline carries no `HttpRequestSchema` row. The
only split was the local type alias at the bottom of view.zod.ts —
`z.infer<typeof HttpRequestSchema>` over the very same schema object, so a
second declaration symbol carrying an identical shape. It is now a re-export of
shared's declaration, which the baseline header explicitly does not count.
Baseline: 19 -> 18.
NOT breaking, and deliberately not labelled so. #4535 calls the three v17
clusters breaking wholesale; this one is verified otherwise. FROM and TO infer
from one schema object, and the compiler agrees: `Equal<PreFixUiHttpRequest,
UiHttpRequest>` and `Equal<PreFixUiHttpRequest, SharedHttpRequest>` both hold,
with a deliberately-false negative control erroring TS2344 to prove the pair is
not vacuous. api-surface.json, authorable-surface.json and spec-changes.json are
all byte-identical after a rebuild — zero authorable key movement, zero
tombstone, zero conversion. Overstating breakage pollutes the upgrade guide as
surely as understating it, so the changeset is patch.
Regression pin: three RUNTIME assertions in ui/view.test.ts. #4642 established
that a compile-time pin in this package is dead text (tsconfig excludes
**/*.test.ts, vitest never type-checks), and that applies to the pre-existing
`type HttpRequest` import in that file too — it is erased, so it never
guaranteed the export survives. The third assertion closes that hole by
resolving symbol identity through the TypeScript API over src/, the same
measurement check:dual-source-exports makes over dist. All three sabotage-verified.
`HttpMethod` on the next line is the identical shape and stays — #4535 scheduled
it for v18, and scope is the maintainer's to set.
Claude-Session: https://claude.ai/code/session_0176qgxgCXTJCUv4YFLtusP9
Co-authored-by: Claude <noreply@anthropic.com>
**所以升级者无需做任何事。** 没有 FROM → TO 迁移动作,`import type { HttpRequest } from '@objectstack/spec/ui'` 和 `from '@objectstack/spec/shared'` 都照旧可用,且现在保证指向同一个声明。谎报破坏和漏报破坏一样会污染升级指南,故按实际情况定级为 patch。
0 commit comments