Create a fresh copy of the base repository config#789
Closed
klutchell wants to merge 3 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a helper method to properly escape special regex characters in glob input strings and extends test cases to ensure these edge cases are correctly handled.
- Introduces escapeRegExp in lib/glob.js to escape special characters.
- Updates glob matching logic for non-glob patterns.
- Adds comprehensive tests in test/unit/lib/glob.test.ts for inputs with special regex characters.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/unit/lib/glob.test.ts | Adds tests to verify glob patterns with special regex characters |
| lib/glob.js | Updates non-glob pattern handling by escaping special regex characters via a new helper |
Comments suppressed due to low confidence (1)
lib/glob.js:12
- The property name 'regexptText' might be a typo; consider renaming it to 'regexpText' for clarity.
this.regexptText = this.globize(this.glob)
9992e55 to
c7fb6ce
Compare
Signed-off-by: Kyle Harding <kyle@balena.io>
Signed-off-by: Kyle Harding <kyle@balena.io>
Signed-off-by: Kyle Harding <kyle@balena.io>
c7fb6ce to
31fa05e
Compare
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.
No description provided.