From 2bbb2b2b64a3429315044a419192ddfa6bd0f594 Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Mon, 15 Apr 2024 12:01:15 +0800 Subject: [PATCH 1/2] perf(shared): use non-capture group for resolveRoutePathFromUrl (#1539) Co-authored-by: Xinyu Liu --- packages/shared/src/utils/resolveRoutePathFromUrl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/utils/resolveRoutePathFromUrl.ts b/packages/shared/src/utils/resolveRoutePathFromUrl.ts index da25efd99c..e2db6f6701 100644 --- a/packages/shared/src/utils/resolveRoutePathFromUrl.ts +++ b/packages/shared/src/utils/resolveRoutePathFromUrl.ts @@ -1,7 +1,7 @@ export const resolveRoutePathFromUrl = (url: string, base = '/'): string => { const pathname = url // remove url origin - .replace(/^(https?:)?\/\/[^/]*/, '') + .replace(/^(?:https?:)?\/\/[^/]*/, '') // remove site base return pathname.startsWith(base) From a33ca4690b225008583cba0701b94c5512503f4c Mon Sep 17 00:00:00 2001 From: Xinyu Liu Date: Mon, 15 Apr 2024 12:05:35 +0800 Subject: [PATCH 2/2] test(e2e): enable workers in build mode of ci (#1541) --- e2e/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index ad3d8d57f3..13ff0ad7f3 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -10,7 +10,7 @@ export default defineConfig({ forbidOnly: isCI, reporter: isCI ? 'github' : 'line', retries: isCI ? 2 : 0, - workers: isCI || isDev ? 1 : undefined, + workers: isDev ? 1 : undefined, projects: [ { name: 'chromium',