mirror of
https://github.com/tester-army/e2e.git
synced 2026-12-04 04:56:00 +08:00
* refactor(core)!: require an engine on every target and a platform on every engine (ENG-1604) A target's platform now comes only from its engine. The target-level platform key, targets without an engine, engines without a platform, and e2e init --engine none are removed, as a maintainer exception to the deprecation window. API-only projects use a defineEngine stub target. * fix: address review on the target engine contract - Bump ATTACH_PROTOCOL to 4: the opening reply now requires `engine`, so an e2e mcp and e2e run of different versions fail at the handshake with the version mismatch error instead of on an invalid reply. - serveEngine checks the platform through describeEngine before it registers the engine, so a handle without one fails initialize with INVALID_CONFIG naming the engine, not an internal error. - The platform-without-engine message prints the platform with describeValue, which cannot throw on a BigInt or cyclic value. - Move the API-only example config to docs/examples/api-testing/without-browser/ so it is not the config of the web-backed orders example. - Show EngineHandle extending Omit<Engine, 'platform'> in engine.mdx. - Tests: keep fixture targets and engines on one platform (units, scheduler, screenshot-codec), assert the doctor fixture's status error, pin defineConfig refusing platform on one branch of a condition, and rename the Electron-only init test. * docs: trim the target and engine platform docs to the API they describe (ENG-1604) Drop the reasons, compatibility notes, and error message wording added earlier in this PR, revert unrelated rewording, and list platform among the required Engine members. * docs(api-testing): remove the section on running API tests without a browser (ENG-1604) The section showed a target with no engine, which targets no longer allow, and its replacement stub engine is not something to document. The translations' sections told readers to omit the engine. * chore(changeset): drop the link to the removed API testing section (ENG-1604) * refactor(core): require platform on EngineHandle and drop the older-copy checks (ENG-1604) EngineHandle.platform is required like Engine.platform. A handle from an older installed copy of @e2e-dev/core no longer gets its own type allowance or runtime check in describeEngine, serveEngine, target resolution, or e2e init's CI planning. connectEngine still rejects one, since it builds its handle with defineEngine. * fix: address review on the rebased target engine contract (ENG-1604) Main's full-page screenshot code in session.ts now reads the required engine directly, and its protocol tests declare a platform. The ja, zh, pt, and hi reference pages drop the target platform and --engine none, and the changeset says e2e mcp and e2e run must be the same release to attach. * test: give main's telemetry config tests an engine (ENG-1604) * docs(api-testing): restore the section on running API tests without a browser (ENG-1604) The section shows a target on an engine named empty, which drives nothing. The error for a target with a platform and no engine suggests the same engine, and the changeset points API-only projects here. * docs(api-testing): name the target api and give the empty engine platform none (ENG-1604)