diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6be66af --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8, 10, 12, 14, 16, 18, 20, 22] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..7444dbb --- /dev/null +++ b/CLAUDE.md @@ -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.