fix: avoid JSON import in ESM package#256
Draft
enyst wants to merge 1 commit into
Draft
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
4 tasks
Contributor
Endpoint audit❌ 6 off-contract call(s) — not on the agent-server · classifiers: cloud
❌ Not on agent-server (gated, 6)⛔ (no known backend) — served by no backend we can see (5)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Importing the published
@openhands/typescript-clientpackage root in Node ESM fails because the builtdist/models/acp.jsimportsacp-providers.jsonwithout a JSON import attribute. This keeps issue #135 from being fully solved even though the package is published.Summary
acp-providers.jsonas the drift-check mirror and add a unit test to verify it stays in sync with the runtime registry.Issue Number
Fixes #135
How to Test
npm run buildnode --input-type=module -e "import('@openhands/typescript-client').then(m=>console.log('ok', typeof m.RemoteWorkspace, m.ACP_PROVIDERS.codex.key)).catch(e=>{console.error(e); process.exit(1);})"npm test -- --runInBand src/__tests__/acp-providers.test.ts src/__tests__/package-import.test.tsnpm run test:package-installnpm run lint && npm test -- --runInBand && npm run format:checkVideo/Screenshots
Not applicable; package/runtime fix only.
Type
Notes
test:git-dependencyremains as a backwards-compatible alias for the newtest:package-installscript.This PR was created by an AI agent (OpenHands) on behalf of the user.
@enyst can click here to continue refining the PR