fix: publish OpenCode plugin with JS entry - #494
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution CodeRabbit couldn't update its existing comment. The review summary may be out of date. Error details |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nowledge-mem-opencode-plugin/package.json`:
- Around line 6-9: Update test_opencode_plugin_static_contract_is_self_contained
in tests/plugin_e2e/test_key_plugins_e2e.py to assert the package main entry
point is dist/index.js instead of src/index.ts, matching the package.json main
field and preserving the rest of the static contract checks.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 850af125-63db-4d24-9f93-3a4a154fd195
⛔ Files ignored due to path filters (1)
nowledge-mem-opencode-plugin/dist/index.jsis excluded by!**/dist/**
📒 Files selected for processing (5)
integrations.jsonnowledge-mem-opencode-plugin/CHANGELOG.mdnowledge-mem-opencode-plugin/README.mdnowledge-mem-opencode-plugin/package.jsontests/plugin_e2e/test_key_plugins_e2e.py
| "main": "dist/index.js", | ||
| "scripts": { | ||
| "build": "esbuild src/index.ts --bundle --platform=node --format=esm --external:@opencode-ai/plugin --outfile=dist/index.js --banner:js='// Generated from src/index.ts. Run npm run build before publishing.'", | ||
| "check": "npm run build && node --check dist/index.js" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win
Update the static contract test for the new entry point.
main now points to dist/index.js, but tests/plugin_e2e/test_key_plugins_e2e.py Line 1554 still asserts src/index.ts. The test_opencode_plugin_static_contract_is_self_contained test will fail after this package change.
Proposed test update
- assert pkg["main"] == "src/index.ts"
+ assert pkg["main"] == "dist/index.js"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@nowledge-mem-opencode-plugin/package.json` around lines 6 - 9, Update
test_opencode_plugin_static_contract_is_self_contained in
tests/plugin_e2e/test_key_plugins_e2e.py to assert the package main entry point
is dist/index.js instead of src/index.ts, matching the package.json main field
and preserving the rest of the static contract checks.
Summary
opencode-nowledge-mem0.3.6 withmainpointing at precompileddist/index.jssrc/index.tsdirectlyValidation
npm run checkinnowledge-mem-opencode-pluginnpm pack --dry-run --jsonconfirmsdist/index.jsis included andnode_modulesis not bundlednode --check nowledge-mem-opencode-plugin/dist/index.jsgit diff --checkNote
python3 -m pytest community/tests/plugin_e2e/test_key_plugins_e2e.py -qwas not available locally because this machine lacks pytest.Summary by CodeRabbit
New Features
Bug Fixes
Documentation