Improve codebase quality: fix bugs, modernize code, add CI#131
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug fixes:
Modernization:
Tooling: