Add CLAUDE.md with project overview and dev commands#97
Add CLAUDE.md with project overview and dev commands#97
Conversation
Runs tests on Node 14, 16, 18, 20, and 22 on pushes to master and pull requests. These are the currently available versions satisfying the >=6.0.0 engines constraint. https://claude.ai/code/session_014m3WiCHJ6YMPF94nF3Dm7z
Covers the full range of Node versions that work with mocha 6.x and are installable via actions/setup-node. https://claude.ai/code/session_014m3WiCHJ6YMPF94nF3Dm7z
The lockfile was inadvertently upgraded to v3 format by a newer npm. Restoring the original v1 format for compatibility with the older Node/npm versions in our CI matrix. https://claude.ai/code/session_014m3WiCHJ6YMPF94nF3Dm7z
There was a problem hiding this comment.
Pull request overview
Adds developer-facing documentation (CLAUDE.md) and introduces GitHub Actions CI to run the existing Mocha test suite.
Changes:
- Added
CLAUDE.mdwith project overview, architecture notes, and common dev commands. - Added
.github/workflows/ci.ymlto runnpm teston a Node.js version matrix for pushes/PRs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
CLAUDE.md |
Documents project purpose, structure, and how to run tests locally. |
.github/workflows/ci.yml |
Adds GitHub Actions workflow to run the test suite across multiple Node versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: npm install |
There was a problem hiding this comment.
The workflow runs npm install even though a package-lock.json is checked in. For CI reproducibility and to ensure lockfile fidelity, prefer npm ci (and optionally add npm caching via setup-node).
| - run: npm install | |
| cache: 'npm' | |
| - run: npm ci |
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [8, 10, 12, 14, 16, 18, 20, 22] |
There was a problem hiding this comment.
The Node.js version matrix starts at 8, but package.json declares engines.node ">=6.0.0" (and the existing .travis.yml tests 6/7). Either expand CI to cover the minimum supported versions or update the documented/declared engine range so support expectations match what CI actually validates.
| node-version: [8, 10, 12, 14, 16, 18, 20, 22] | |
| node-version: [6, 7, 8, 10, 12, 14, 16, 18, 20, 22] |
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Consider explicitly scoping GITHUB_TOKEN permissions for this workflow (e.g., permissions: contents: read) since the job only checks out code and runs tests. This reduces the blast radius if a dependency/script is compromised.
| runs-on: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read |
https://claude.ai/code/session_014m3WiCHJ6YMPF94nF3Dm7z