Skip to content

Improve codebase quality: fix bugs, modernize code, add CI#131

Merged
liady merged 2 commits intomasterfrom
claude/improve-codebase-quality-ya5Da
Mar 3, 2026
Merged

Improve codebase quality: fix bugs, modernize code, add CI#131
liady merged 2 commits intomasterfrom
claude/improve-codebase-quality-ya5Da

Conversation

@liady
Copy link
Owner

@liady liady commented Mar 3, 2026

Bug fixes:

  • Fix error-handling bug in index.js where forEach loop called utils.error() (which throws) on every iteration with a shadowed variable
  • Fix loose equality (==) to strict (===) in containsPattern and test
  • Remove unnecessary regex 'g' flag on regexes used with .test(), eliminating brittle lastIndex state management

Modernization:

  • Use Array.includes() instead of indexOf() !== -1
  • Use Array.flat() instead of reduce(concat)
  • Use arrow functions in utility callbacks

Tooling:

  • Add ESLint 'lint' script to package.json
  • Change 'test' script from watch mode to lint+unit (CI-friendly)
  • Add eqeqeq ESLint rule to prevent future loose equality
  • Add GitHub Actions CI workflow (Node 14/16/18/20 matrix)
  • Update mock-fs from v4 to v5 for Node.js 22 compatibility (fixes 8 pre-existing test failures)

claude added 2 commits March 2, 2026 16:52
Bug fixes:
- Fix error-handling bug in index.js where forEach loop called utils.error()
  (which throws) on every iteration with a shadowed variable
- Fix loose equality (==) to strict (===) in containsPattern and test
- Remove unnecessary regex 'g' flag on regexes used with .test(), eliminating
  brittle lastIndex state management

Modernization:
- Use Array.includes() instead of indexOf() !== -1
- Use Array.flat() instead of reduce(concat)
- Use arrow functions in utility callbacks

Tooling:
- Add ESLint 'lint' script to package.json
- Change 'test' script from watch mode to lint+unit (CI-friendly)
- Add eqeqeq ESLint rule to prevent future loose equality
- Add GitHub Actions CI workflow (Node 14/16/18/20 matrix)
- Update mock-fs from v4 to v5 for Node.js 22 compatibility (fixes 8 pre-existing test failures)

https://claude.ai/code/session_017GbwKxDk7oJN3tXXKSbUDg
- Remove Node 14 from CI matrix (EOL, npm 6 can't parse lockfile v3)
- Set --openssl-legacy-provider for Node 18+ to fix webpack 4's
  use of the removed md4 hash algorithm (ERR_OSSL_EVP_UNSUPPORTED)

https://claude.ai/code/session_017GbwKxDk7oJN3tXXKSbUDg
@liady liady merged commit 492ae5e into master Mar 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants