Skip to content

Comments

Update @gruhn/regex-utils to 2.9.1 and adapt to new AST format#242

Closed
Copilot wants to merge 5 commits intomasterfrom
copilot/update-regex-utils-to-2-9-1
Closed

Update @gruhn/regex-utils to 2.9.1 and adapt to new AST format#242
Copilot wants to merge 5 commits intomasterfrom
copilot/update-regex-utils-to-2-9-1

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Updates @gruhn/regex-utils from 2.7.3 to 2.9.1. The new version changes lookahead representation in the AST:

Old format:

{ type: 'lookahead', isPositive: boolean, inner: RegExpAST, right: RegExpAST }

New format:

{ type: 'assertion', direction: AssertionDir, sign: AssertionSign, inner: RegExpAST, outer: RegExpAST }

Changes

  • Test adaptation: Added convertFromRegExpAST() to map new assertion format to internal lookahead representation in test comparisons
  • Unicode range: Changed alphabet from 0x10FFFF to 0xFFFF to match library's default BMP mode (non-unicode flag behavior)
  • Type safety: Import LibCharSet type instead of using any for charset conversion

The internal parser implementation remains unchanged - only test utilities needed updates to handle the new library format.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 16, 2026 01:23
Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
- Convert new 'assertion' type to old 'lookahead' type in tests
- Update alphabet range from 0x10FFFF to 0xFFFF to match library default
- Add conversion functions for RegExpAST and CharSet types

Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
Use proper LibCharSet type instead of any

Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
- Add JSDoc comments to conversion functions
- Remove unnecessary fallback case in convertCharSet
- Document AST node types and conversion purpose

Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
Copilot AI changed the title [WIP] Update @gruhn/regex-utils to version 2.9.1 and adapt to new AST format Update @gruhn/regex-utils to 2.9.1 and adapt to new AST format Feb 16, 2026
Copilot AI requested a review from futpib February 16, 2026 01:47
@futpib futpib closed this Feb 16, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22047353374

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 105 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.06%) to 90.339%

Files with Coverage Reduction New Missed Lines %
build/zigUnparser.js 1 50.44%
build/dalvikBytecodeParser.js 3 98.27%
build/dalvikBytecodeUnparser.js 8 87.1%
build/dalvikExecutableParser.js 8 91.13%
build/arbitraryJava.js 11 97.69%
build/javaParser.js 14 95.25%
build/regularExpressionParser.js 15 90.81%
build/javaUnparser.js 45 83.23%
Totals Coverage Status
Change from base Build 22045807651: 0.06%
Covered Lines: 18447
Relevant Lines: 20246

💛 - Coveralls

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.

3 participants