From 34cf32f8a44d53cbc3b3ed3e500866e6e201fef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=BDdila?= Date: Thu, 27 Jun 2024 08:42:42 +0200 Subject: [PATCH] fixed replace-env-vars (#37) --- package-lock.json | 14 +++++++------- package.json | 2 +- replace-env-vars.js | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 094a020..833ad0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "replace-in-file": "^8.0.1", "sass": "^1.77.6", "svelte": "^4.2.18", - "svelte-check": "^3.8.3", + "svelte-check": "^3.8.4", "svelte-preprocess": "^6.0.1", "tslib": "^2.6.3", "typescript": "^5.5.2", @@ -5958,9 +5958,9 @@ } }, "node_modules/svelte-check": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.8.3.tgz", - "integrity": "sha512-X1+fTyB3MjVXz0IogrUbdkKvIFMhRVQn1nUW0uF4FRwq69i+7WGtwXrMBhtceV+Rc55iL+8HVEJoEp0CSeosbg==", + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.8.4.tgz", + "integrity": "sha512-61aHMkdinWyH8BkkTX9jPLYxYzaAAz/FK/VQqdr2FiCQQ/q04WCwDlpGbHff1GdrMYTmW8chlTFvRWL9k0A8vg==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", @@ -6138,9 +6138,9 @@ } }, "node_modules/svelte2tsx": { - "version": "0.7.12", - "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.12.tgz", - "integrity": "sha512-LFPsKxxUi+q2QCBI0TBm2m1MDPXp6mN0w0bldauwkZ+3tcvo1S6On3RQdOKe1C2vWRZKyfenj4Nu5Vb0YKagKw==", + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.13.tgz", + "integrity": "sha512-aObZ93/kGAiLXA/I/kP+x9FriZM+GboB/ReOIGmLNbVGEd2xC+aTCppm3mk1cc9I/z60VQf7b2QDxC3jOXu3yw==", "dev": true, "dependencies": { "dedent-js": "^1.0.1", diff --git a/package.json b/package.json index baef30d..7a45226 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "replace-in-file": "^8.0.1", "sass": "^1.77.6", "svelte": "^4.2.18", - "svelte-check": "^3.8.3", + "svelte-check": "^3.8.4", "svelte-preprocess": "^6.0.1", "tslib": "^2.6.3", "typescript": "^5.5.2", diff --git a/replace-env-vars.js b/replace-env-vars.js index 3b671bc..e57552f 100644 --- a/replace-env-vars.js +++ b/replace-env-vars.js @@ -1,7 +1,7 @@ import "dotenv/config"; -import replace from "replace-in-file"; +import { replaceInFile } from "replace-in-file"; -replace({ +replaceInFile({ files: ["dist.svelte/*.svelte", "dist.svelte/*.ts", "dist.svelte/*.js"], from: /\bimport\.meta\.env\.(\w+)/g, to: (_, name) => JSON.stringify(process.env[name]),