Skip to content

fix: remove broken import for non-existent github adapter#1

Closed
sacloudy wants to merge 1 commit intojackwener:mainfrom
sacloudy:bugfix/fix-missing-github-adapter
Closed

fix: remove broken import for non-existent github adapter#1
sacloudy wants to merge 1 commit intojackwener:mainfrom
sacloudy:bugfix/fix-missing-github-adapter

Conversation

@sacloudy
Copy link

Summary

  • 修复 index.ts 中引用不存在的 github 适配器目录的问题
  • 移除了对 ./github/search.js 的导入,因为对应的 github 目录不存在

Test plan

  • npx tsx src/main.ts list 运行成功

The index.ts referenced ./github/search.js but the github directory
with adapter files doesn't exist, causing runtime errors.
@jiangzhx
Copy link
Contributor

i got same error

@erixyuan
Copy link
Contributor

Confirmed on current main (92c23e8). I reproduced this locally because src/clis/index.ts still imports ./github/search.js, but there is no corresponding src/clis/github/ adapter directory in the repo.

Repro:

npm install
npx tsx src/main.ts list

I also hit the same failure path when building first and then running the compiled entrypoint, so this is not limited to the TS dev path:

npm run build
node dist/main.js list

Removing that import fixes the startup issue on my side.

@jackwener
Copy link
Owner

感谢你的细心发现和贡献!关于模块未找到的问题已经在 v0.2.0 版本通过引入 Dynamic Loader 动态加载机制(彻底移除了硬编码的 index.js)从根本上解决了。为了感谢你的敏锐发现和修复尝试,我已经将你设置为了重构 commit 71f2f3dCo-authored-by。🎉

@jackwener jackwener closed this Mar 15, 2026
jackwener added a commit that referenced this pull request Mar 15, 2026
- #1 Fix URL injection in subtitle.ts via JSON.stringify
- #2 Remove debug console.error from production code
- #3 Delete stale test_subtitle.ts
- #4 Add --lang option for multi-language subtitle selection
- #5 Fix duplicate comment numbering (two '// 4.')
- #6 Add clickLabels targeted clicking + --click flag to explore
- #7 Move empty-value penalty into scoreEndpoint() (affects filtering)
- #8 Add cascade request code template to CLI-CREATOR.md
jackwener added a commit that referenced this pull request Mar 19, 2026
P0 Critical:
- #1 Fix double IIFE wrapping: unified wrapForEval() replaces
  normalizeEvaluateSource + ad-hoc wrap in page.evaluate()
- #2 Fix navigate race: check tab.status before addListener,
  reduced timeout 30s→15s

P1 Should Fix:
- #8 Remove unused permissions (scripting, host_permissions, content_scripts)
- #10 Add retry (3x, 500ms) + timeout (30s) to sendCommand()

P2 Cleanup:
- #3 Extract isWebUrl() to safely handle undefined tab.url
- #4 Sanitize maxDepth with Math.max/min bounds
- #6 Delete empty src/daemon/ directory
- #7 Remove dead createJsonRpcRequest + its test
- #9 Remove stale IIFE-mode comment
- #11 Validate body.id in daemon request handler
- #12 Guard ensureAttached: detach+re-attach on 'already attached'
- #14 Extract _tabOpt() helper (removes 13x spread duplication)
- #15 Add verbose warning for unsupported consoleMessages()

All 35 unit tests pass.
jackwener added a commit that referenced this pull request Mar 19, 2026
P0 Critical:
- #1 Fix double IIFE wrapping: unified wrapForEval() replaces
  normalizeEvaluateSource + ad-hoc wrap in page.evaluate()
- #2 Fix navigate race: check tab.status before addListener,
  reduced timeout 30s→15s

P1 Should Fix:
- #8 Remove unused permissions (scripting, host_permissions, content_scripts)
- #10 Add retry (3x, 500ms) + timeout (30s) to sendCommand()

P2 Cleanup:
- #3 Extract isWebUrl() to safely handle undefined tab.url
- #4 Sanitize maxDepth with Math.max/min bounds
- #6 Delete empty src/daemon/ directory
- #7 Remove dead createJsonRpcRequest + its test
- #9 Remove stale IIFE-mode comment
- #11 Validate body.id in daemon request handler
- #12 Guard ensureAttached: detach+re-attach on 'already attached'
- #14 Extract _tabOpt() helper (removes 13x spread duplication)
- #15 Add verbose warning for unsupported consoleMessages()

All 35 unit tests pass.
jackwener added a commit that referenced this pull request Mar 19, 2026
Bug fixes:
- #1 /logs?level=error returned 404 — use pathname for route matching
- #2 Duplicate initialization — added 'initialized' guard flag

Should fix:
- #4 Added screenshot() to IPage interface
- #5 Graceful shutdown rejects pending requests before exit
- #6 Use process.execPath instead of 'npx tsx' for faster daemon spawn

Cleanup:
- #7 Removed duplicate 'browser' keyword in package.json
- #8 Removed unused normalizeEvaluateSource import from browser.ts
- #9 Changed dynamic import to static import in intercept.ts
- #10 Added explicit throw at end of sendCommand for clarity

61 tests pass (4 test files). Extension: 10.55KB.
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.

4 participants