Skip to content

refactor: adopt src/tests/scripts layout and ship options.schema.json - #7

Merged
P-Theo merged 2 commits into
mainfrom
refactor/project-layout-and-options-schema
Sep 16, 2026
Merged

P-Theo merged 2 commits into
mainfrom
refactor/project-layout-and-options-schema

Conversation

@P-Theo

@P-Theo P-Theo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Splits the root monolith into src/debug.ts, src/tracker.ts, src/options.ts and src/plugin.tsx behind the tui.tsx shim, moves tests into tests/ (split by module plus a new options-schema agreement test) and scripts into scripts/. Ships options.schema.json (exported and packed) pinned to the runtime constants. check-compatibility now also verifies the README floor; CI drops the redundant beta-tag lookup and asserts the packed entrypoint id. Verified locally: lint, check, test (68 pass), build, compatibility, and a pack-install-import cycle.

#8)

Verify the packed schema export and harden CI on the Node 26 baseline.

- Packed-artifact step asserts the tarball contains package/options.schema.json and that the opencode2-tps/options.schema.json export resolves through the exports map (with the JSON import attribute) with the expected title.
- scripts/check-compatibility.mjs resolves node_modules/.bin against the script location instead of cwd and execs @opencode/cli's real bin target (bin/opencode2.exe) instead of npm's .bin wrapper, dropping the process.platform branch.
- CI node-version moves 24 -> 26.4.0 to match @opentui/core's documented floor; @types/node follows to ^26.0.0 with regenerated lockfile.
- The two setInterval test doubles cast to typeof globalThis.setInterval for Node 26's conditional rest-args typing; no runtime source changes in src/.
@P-Theo
P-Theo merged commit 8f2d7ab into main Sep 16, 2026
1 check passed
@P-Theo
P-Theo deleted the refactor/project-layout-and-options-schema branch September 16, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant