Skip to content

Commit 0f1532e

Browse files
committed
fix(testing): remove unnecessary regex escapes
1 parent 67fd386 commit 0f1532e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/channels/plugins/contracts/test-helpers/bundled-channel-plugin-loader.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ function isBareMissingModuleSpecifier(text: string): boolean {
5454
const specifier = match?.[1];
5555
return Boolean(
5656
specifier &&
57-
!specifier.startsWith(".") &&
58-
!specifier.startsWith("/") &&
59-
!path.win32.isAbsolute(specifier),
57+
!specifier.startsWith(".") &&
58+
!specifier.startsWith("/") &&
59+
!path.win32.isAbsolute(specifier),
6060
);
6161
}
6262

6363
function hasExternalDistArtifactPath(text: string): boolean {
6464
const candidates = [
65-
...text.matchAll(/file:\/\/(\/[^\s)]+[\/\\]dist(?:-runtime)?[\/\\][^\s)]*)/gu),
65+
...text.matchAll(/file:\/\/(\/[^\s)]+[/\\]dist(?:-runtime)?[/\\][^\s)]*)/gu),
6666
...text.matchAll(/(\b[A-Za-z]:\\[^\s)]+\\dist(?:-runtime)?\\[^\s)]*)/gu),
67-
...text.matchAll(/(\/[^\s)]+[\/\\]dist(?:-runtime)?[\/\\][^\s)]*)/gu),
67+
...text.matchAll(/(\/[^\s)]+[/\\]dist(?:-runtime)?[/\\][^\s)]*)/gu),
6868
];
6969
return candidates.some((match) => {
7070
const candidate = match[1];

0 commit comments

Comments
 (0)