Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
Comment thread
jergason marked this conversation as resolved.
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-latest
permissions:
contents: read

Copilot uses AI. Check for mistakes.
strategy:
matrix:
node-version: [8, 10, 12, 14, 16, 18, 20, 22]
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
node-version: [8, 10, 12, 14, 16, 18, 20, 22]
node-version: [6, 7, 8, 10, 12, 14, 16, 18, 20, 22]

Copilot uses AI. Check for mistakes.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
- run: npm install
cache: 'npm'
- run: npm ci

Copilot uses AI. Check for mistakes.
- run: npm test
30 changes: 30 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CLAUDE.md

## Project overview

recursive-readdir is a Node.js utility that recursively lists all files in a directory and its subdirectories. It supports filtering via glob patterns (minimatch) and custom functions, with both callback and Promise APIs.

- **Language:** JavaScript (CommonJS, Node.js >=6.0.0)
- **Single source file:** `index.js`
- **Production dependency:** `minimatch`

## Commands

```bash
# Install dependencies
npm install

# Run tests
npm test
```

There is no build step, linter, or formatter configured.

## Architecture

- `index.js` — entire library source (~96 lines). Exports a single function `readdir(path, [ignores], [callback])`.
- `test/recursive-readdir-test.js` — Mocha test suite with fixtures in `test/testdir/`, `test/testdirBeta/`, and `test/testsymlinks/`.

## Testing

Tests use Mocha with Node's built-in `assert` module. Test fixtures are checked-in directories under `test/`. Always run `npm test` to verify changes.
Loading