Commit 03a6931
committed
feat: migrate to ESM, add test suite and CI workflow
Convert the project to use proper ES modules with modern best practices:
- Add "type": "module" to package.json for native ESM support
- Replace CommonJS entry point check with ESM-compatible import.meta.url
- Update main entry point to dist/index.js
Add comprehensive test coverage:
- Implement integration test suite with Vitest
- Test documentation download, caching, and search functionality
- Add security tests for path traversal protection
- Test resource URI handling and error cases
- All 9 tests passing
Set up continuous integration:
- Add GitHub Actions CI workflow for automated testing
- Run type checking and test suite on all commits and PRs
- Use Node.js 20.x for consistent build environment
Other improvements:
- Add resources/docs.ts to modularize resource handling
- Export server and main function for better testability
- Remove obsolete test_server.manual.ts file
- Update dependencies including Vitest 4.0.151 parent 26c8535 commit 03a6931
9 files changed
Lines changed: 1617 additions & 94 deletions
File tree
- .github/workflows
- src
- resources
- tools
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments