From 7e9dc72864d9511a99990e0fad293e448795fb30 Mon Sep 17 00:00:00 2001 From: Filip Drozd Date: Tue, 28 Mar 2023 09:40:30 +0200 Subject: [PATCH] fix: replace path join with url join for full url concatenation --- packages/theme/nuxt.config.js | 4 ++-- packages/theme/package.json | 2 +- yarn.lock | 22 ++++++---------------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/packages/theme/nuxt.config.js b/packages/theme/nuxt.config.js index 0a8be10f..8473cb06 100644 --- a/packages/theme/nuxt.config.js +++ b/packages/theme/nuxt.config.js @@ -2,7 +2,7 @@ import { getRoutes } from './routes'; import theme from './themeConfig'; import webpack from 'webpack'; import * as dotenv from 'dotenv'; -import path from 'path'; +import urlJoin from 'url-join'; dotenv.config({ path: `./../../.env.${process.env.NODE_ENV}` }); @@ -197,6 +197,6 @@ export default { { code: 'EUR', label: 'Euro' } ], backendUrl: process.env.BACKEND_URL, - middlewareUrl: path.join(serverConfig.baseUrl, '/api') + middlewareUrl: urlJoin(serverConfig.baseUrl, '/api') } }; diff --git a/packages/theme/package.json b/packages/theme/package.json index 09b7d3da..73a1330a 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -23,7 +23,7 @@ "cookie-universal-nuxt": "^2.1.5", "nuxt": "^2.15.8", "nuxt-i18n": "^6.28.0", - "path": "^0.12.7", + "url-join": "^5.0.0", "vee-validate": "^3.4.13", "vue-demi": "latest", "vue-scrollto": "^2.20.0", diff --git a/yarn.lock b/yarn.lock index 5728f018..a9c3d4b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12756,14 +12756,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -path@^0.12.7: - version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" - integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== - dependencies: - process "^0.11.1" - util "^0.10.3" - pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -13614,7 +13606,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.1, process@^0.11.10: +process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -16328,6 +16320,11 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +url-join@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1" + integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA== + url-loader@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2" @@ -16405,13 +16402,6 @@ util@0.10.3: dependencies: inherits "2.0.1" -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - util@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61"