Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Files added / changed and descriptions
.github/workflows/ci.yml
Purpose: Automated CI that runs on push and pull_request to master.
What it does: checks out the repo, sets Node (matrix: 16.x & 18.x), runs npm ci, then npm test.
Why: ensures tests and lint run on PRs and pushes.
Verify: push a branch/PR or run the same commands locally:
npm ci
npm test
Note: npm test still runs the repository’s full test command (includes lint + mochapack); if you want faster CI, we can change this workflow to call npm run ci-test instead.
.eslintrc.json
Purpose: Provide consistent linting rules and environment (Node + mocha).
Behavior: uses eslint:recommended and import plugin warnings; relaxed on unused vars and console.
Why: standardize code style and catch common issues.
Verify: run the repo lint script:
npm run lint
Note: I kept rules conservative (no strict Airbnb enforcement) to avoid bulk-breaking changes; we can tighten rules and auto-fix step-by-step.
.editorconfig
Purpose: Editor-level formatting defaults (UTF-8, LF line endings, 2 spaces).
Behavior: helps maintain consistent formatting across editors and contributors.
Verify: most editors respect .editorconfig automatically; open files in your editor and confirm indentation/newlines.
CONTRIBUTING.md
Purpose: Basic contribution guidance (fork → branch → test → PR).
Why: lowers friction for new contributors and sets expectations.
Verify: open the file to read; include it in PR review instructions.
.github/ISSUE_TEMPLATE/bug_report.md
Purpose: Bug report template to collect necessary information (steps to reproduce, environment, expected behavior).
Why: standardizes incoming issues so they’re actionable.
Verify: open “New issue” on GitHub in the repo and pick the bug template.
CHANGELOG.md
Purpose: Starter changelog with an "Unreleased" section listing the infra changes added.
Why: Begin tracking notable changes in one place.
Verify: open the file and update it for future releases.
package.json (edited)
Changes:
Added fast-test: runs a quicker mocha subset of tests for common specs to speed local iteration:
"fast-test": "mocha "test/**/*(select|insert|update|delete|util).spec.js" --reporter spec"
Note: fast-test uses plain mocha (not mochapack) and is meant for quick local smoke runs. If some tests depend on mochapack behavior, the full test script is still the canonical run.
Added ci-test: lints and runs fast-test for faster CI alternatives:
"ci-test": "npm run lint && npm run fast-test"
Why: gives maintainers a faster local test/CI path without replacing the repo's full suite.
Verify:
npm run fast-test
npm run ci-test
Note: I left the existing test script unchanged so full CI (if you prefer) still runs the prior command npm test which includes lints + mochapack.
README.md (edited)
Purpose: Added a short "Developer quickstart" section showing npm ci, npm test, and npm run fast-test.
Why: quick onboarding for contributors.
Verify: open the file or follow the commands shown.
How to verify the whole change locally (PowerShell)
Install dependencies cleanly:
npm ci
Run the full test suite (same as CI currently):
npm test
Run the faster smoke tests (dev iteration):
npm run fast-test
Run lint only:
npm run lint
Notes & small caveats
fast-test uses mocha directly and runs a subset of specs for speed. Some tests in the repo rely on mochapack or additional bundling; fast-test is specifically for quicker iteration and might not cover every edge case. Use full npm test before merging major changes.
CI currently runs npm test (the full suite). If you prefer faster PR feedback, we can update ci.yml to call npm run ci-test instead.
ESLint config was intentionally conservative to avoid making many automatic code changes; we can progressively adopt stricter rules and fix violations in controlled commits.
humanise this and give naturally