diff --git a/packages/bruno-common/src/utils/template-hasher.ts b/packages/bruno-common/src/utils/template-hasher.ts index b7b5b0218..c42f9b5d8 100644 --- a/packages/bruno-common/src/utils/template-hasher.ts +++ b/packages/bruno-common/src/utils/template-hasher.ts @@ -41,7 +41,7 @@ export function patternHasher(input: string, pattern: string | RegExp = VARIABLE let clone = current; for (const hash in hashToOriginal) { const value = hashToOriginal[hash]; - clone = clone.replace(new RegExp(`(${hash})`, 'g'), value); + clone = clone.replaceAll(hash, value); } return clone; } diff --git a/packages/bruno-common/tsconfig.json b/packages/bruno-common/tsconfig.json index 9978d57dc..eaf475373 100644 --- a/packages/bruno-common/tsconfig.json +++ b/packages/bruno-common/tsconfig.json @@ -3,6 +3,7 @@ "target": "ES6", "esModuleInterop": true, "strict": true, + "lib": ["es2021"], "skipLibCheck": true, "jsx": "react", "module": "ESNext",