fix: escape literals in scan diff#1251
Merged
kriswest merged 2 commits intofinos:mainfrom Oct 17, 2025
Merged
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Contributor
Author
|
@coopernetes assigned you for review as you mentioned needing to use this soon. Literals in commit messages are handled differently (as per the issue) (case insensitve substring match, as opposed to case insensitive regex match) |
b5dafb5 to
5f44579
Compare
5f44579 to
15f8999
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1251 +/- ##
=======================================
Coverage 83.39% 83.40%
=======================================
Files 70 70
Lines 3006 3007 +1
Branches 501 501
=======================================
+ Hits 2507 2508 +1
Misses 396 396
Partials 103 103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Kris West <kristopher.west@natwest.com>
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.
resolves #1238
Escapes string literals in scanDiff using the escape-string-regexp library, which has been adopted into es2025 to implement
RegExp.escape().RegExp.escape()is not yet supported in TypeScript and requires at least node24 or chromium 138, hence, I've gone with the dependency for now and left a note to replace it when we move to requiring node24.Adjusted the relevant test to include regex syntax so that it will fail if not correctly escaped.