From 173ab070135d36bd168bd827b6039cc43a701fd9 Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Fri, 22 Apr 2022 06:24:01 +0200 Subject: [PATCH] fix(manager:nuget): use `upath` for cross-platform paths (#15242) --- .eslintrc.js | 5 ++++- lib/modules/manager/nuget/artifacts.ts | 2 +- tools/clean-cache.mjs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index dfeed5d012..ffb596076a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -71,7 +71,10 @@ module.exports = { // disallow direct `nock` module usage as it causes memory issues. // disallow `parse-link-header` to allow override ENV https://github.com/thlorenz/parse-link-header#environmental-variables - 'no-restricted-imports': [2, { paths: ['nock', 'parse-link-header'] }], + 'no-restricted-imports': [ + 2, + { paths: ['nock', 'parse-link-header', 'path'] }, + ], // Makes no sense to allow type inference for expression parameters, but require typing the response '@typescript-eslint/explicit-function-return-type': [ diff --git a/lib/modules/manager/nuget/artifacts.ts b/lib/modules/manager/nuget/artifacts.ts index 68366a2b7c..bd3a4e733d 100644 --- a/lib/modules/manager/nuget/artifacts.ts +++ b/lib/modules/manager/nuget/artifacts.ts @@ -1,5 +1,5 @@ -import { join } from 'path'; import { quote } from 'shlex'; +import { join } from 'upath'; import { TEMPORARY_ERROR } from '../../../constants/error-messages'; import { logger } from '../../../logger'; import { exec } from '../../../util/exec'; diff --git a/tools/clean-cache.mjs b/tools/clean-cache.mjs index 89d1d1c679..a3474ad902 100644 --- a/tools/clean-cache.mjs +++ b/tools/clean-cache.mjs @@ -1,6 +1,6 @@ import { tmpdir } from 'os'; -import { join } from 'path'; import { remove } from 'fs-extra'; +import { join } from 'upath'; // eslint-disable-next-line @typescript-eslint/no-floating-promises (async () => { -- GitLab