Critical Fixes:
- Fixed EditorConfig violations in grammar.js, scanner.c, README.md, .mega-linter.yml
- Changed JSDoc comments from 1-space to 2-space indent per .editorconfig
- Fixed line length violations in README.md and .mega-linter.yml
- Updated test count badge from 59/59 to 61/61 in README.md
- Created queries/highlights.scm for syntax highlighting support
- Updated package.json with repository and files fields
Configuration Updates:
- Added repository field pointing to GitHub
- Added files field to control npm package contents
- Properly formatted CONTRIBUTING.md with prettier
All 61 tests passing (100% success rate)
All critical EditorConfig violations resolved
Created scripts/post-generate.sh that automatically re-applies the critical
buffer overflow fix to parser.h after tree-sitter generate runs. This fix
prevents undefined behavior in set_contains() when accessing an empty array.
The script is automatically executed after tree-sitter generate via the npm
generate script. Added generate:only for cases where post-processing should
be skipped.
- Add comprehensive caching for npm, yarn, and pnpm package managers
- Cache paths now include:
- npm: ~/.npm, node_modules/.cache
- yarn: ~/.yarn, ~/.cache/yarn, ~/.cache/yarn/global
- pnpm: ~/.pnpm-store, ~/.cache/pnpm, ~/.local/share/pnpm/global
- Update cache keys to include all lockfile types (package-lock.json, yarn.lock, pnpm-lock.yaml)
- Rename 'Cache Tree-sitter CLI' to 'Cache npx store' for clarity
- Apply changes consistently across test, lint, and coverage jobs
This improves cache hit rates and build performance regardless of which
Node.js package manager is used in the development environment.
- Reduce grammar conflicts to essential bash and ShellSpec rules only
- Restore original precedence values for consistent rule ordering
- Simplify Data block rule while maintaining all functionality
- Add required statements field to match test expectations
Performance improvements:
- Parse speed: ~55 bytes/ms → 1784 bytes/ms (32x faster)
- All 61 tests still pass (100% success rate)
- Significantly reduced parser generation time and runtime complexity
The optimizations focused on minimizing unnecessary conflicts and
simplifying complex choice structures while preserving full ShellSpec
grammar compatibility and correctness.
- Convert GitHub Actions from local to inline actions for better maintainability
- Add comprehensive caching for npm dependencies, tree-sitter CLI, and build artifacts
- Fix checkout steps missing in test matrix jobs
- Apply defensive programming in test coverage validation
- Use local tree-sitter CLI via npx instead of global installation
- Update tree-sitter-cli to v0.25.0 for compatibility with tree-sitter-bash
- Add proper tree-sitter field to package.json with grammar metadata
- Fix grammar precedence for Data blocks (#| lines now have higher precedence)
- Standardize dates in memory files to September 12, 2025
- Enhance workflow robustness with dynamic workflow ID resolution
- Improve test file pattern matching and error handling
This commit addresses all CodeRabbit review suggestions and optimizes
GitHub Actions workflows for better performance and reliability.