From 2b7f7a06ac9e6c58886f6d205ff9ee5168dffcdb Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Tue, 19 Jul 2022 18:24:19 +0530 Subject: [PATCH] Use nodeJS 14+ compatible method for replacing (#3429) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/app-store-cli/src/app-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-store-cli/src/app-store.ts b/packages/app-store-cli/src/app-store.ts index 362ae815c3..8babcad63f 100644 --- a/packages/app-store-cli/src/app-store.ts +++ b/packages/app-store-cli/src/app-store.ts @@ -104,7 +104,7 @@ function generateFiles() { ...getObjectExporter("apiHandlers", { fileToBeImported: "api/index.ts", // Import path must have / even for windows and not \ - importBuilder: (app) => `const ${app.name}_api = import("./${app.path.replaceAll("\\", "/")}/api");`, + importBuilder: (app) => `const ${app.name}_api = import("./${app.path.replace(/\\/g, "/")}/api");`, entryBuilder: (app) => `${app.name}:${app.name}_api,`, }) ); @@ -114,7 +114,7 @@ function generateFiles() { fileToBeImported: "_metadata.ts", // Import path must have / even for windows and not \ importBuilder: (app) => - `import { metadata as ${app.name}_meta } from "./${app.path.replaceAll("\\", "/")}/_metadata";`, + `import { metadata as ${app.name}_meta } from "./${app.path.replace(/\\/g, "/")}/_metadata";`, entryBuilder: (app) => `${app.name}:${app.name}_meta,`, }) );