Repository navigation
refactor: emit ESM entries as .js and package tools/test - #422
Conversation
Packages are type module, so tsdown no longer forces .mjs. Shared test helpers live in @getpie/test.
commit: |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Required CI blocker — not reviewed or mergedHead Stopped at CI, before full code review/independent E2E. Restore the browser-locator type integration in the candidate and obtain successful required checks, then restart review and independent acceptance. No rerun, implementation changes, conflict resolution or merge performed. |
The setup file is only a runtime path, so tsc no longer saw getBySlot.
Include the locator module itself. Standalone scripts outside a package stay .mjs. The remote reader takes the record path from the environment.
tsdown may emit usesEmbeddedModules outside dist/server.js.
codeSplitting pulled usesEmbeddedModules out of server.js on CI. The daemon is spawned as that one file.
Keep ESM .js entries and @getpie/test. Keep main's seeded-provider and pie-verify HOME notes. codeSplitting stays off so the Pi 0.99.1 fold remains in server.js instead of a sibling .mjs chunk.
|
Merged origin/main into refactor/js-entries (no force push). The only conflict was .agents/rules/topics/toolchain.md. Kept this PR's @getpie/test and fake-pi.js names, and main's seeded-provider note: pie-verify keeps HOME, and PI_CODING_AGENT_DIR must not point at an empty directory. Main's bundled-node test scanned sibling .mjs chunks after the Pi 0.99.1 upgrade. This branch emits server.js with codeSplitting off, so the fold stays in that entry and the test reads only server.js. Locator types stay included from tools/test/browser-locators.ts in apps/app/tsconfig.json. The earlier TS2339 comment was already fixed on this branch and was not reopened by the merge. Local: apps/app tsc passed; packages/ssh scripts.test.ts 11 passed; packages/server bundled-node.test.ts passed; desktop daemon-server-process.test.ts 8 passed. |
|
Required Check failed on head |
Vite's module runner rejects import.meta.resolve. Resolve fake-gh and locator paths from @getpie/test itself.
|
Fixed the browser global-setup crash. Vite 5/8 module runner does not implement import.meta.resolve, so apps/app/e2e/global-setup.ts no longer calls it. @getpie/test/paths resolves fake-gh, fake-pi, and browser-locators from its own import.meta.url. The same replacement is in the browser Vitest config. Merged origin/main (no force push). Local pnpm exec vitest run --config vitest.browser.config.mts: global setup ran; 99 passed, 1 failed. The failure is slash-command-menu.test.tsx ctrl+Enter expecting / / , from main (#104), not this setup change. |
|
auto-merge: no Head
Needs a human review plus a packaged-desktop and SSH-remote smoke test before merge. Not merging. |
Review and verification record — approved, merging
Review
Independent verificationClean worktree at this head. Locked install.
Gaps
|
|
Merged as 9d2ea78 (squash, head guard |
Requirement
Use ESM
.jsfor Pie-owned entries, and make everytools/directory a workspace package.Expected behavior
@getpie/server#buildemitsdist/server.js. CLI bins aredist/cli.jsanddist/relay.js.@getpie/coreand oxlint plugins emit.js. Shared test helpers resolve through@getpie/test.pie-pi-processstayspi-process.js. Daemon spawn, session create, and stored session data are unchanged.Changes and risks
Root
package.jsonis"type": "module", and tsdownfixedExtensionis off so Node-platform builds follow that. Desktop pack hooks and the SSH daemon-record reader are ESM.tools/testingmoved totools/test(@getpie/test).Installed apps and published CLI bins keep the old
.mjsnames until rebuilt. A remote host running the SSH launch script must acceptnode --input-type=module.Verification
Not run as a suite. Confirmed
tsdownemitsdist/server.js,compatibility.js, and oxlint.jsplugins.import.meta.resolve("@getpie/test/fake-pi")resolves fromapps/app. Pre-commit oxlint/oxfmt passed on8e91318e.