Skip to content

Commit 03a6931

Browse files
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.15
1 parent 26c8535 commit 03a6931

9 files changed

Lines changed: 1617 additions & 94 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20.x'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run type check
27+
run: npm run build
28+
29+
- name: Run tests
30+
run: npm test

0 commit comments

Comments
 (0)