From 87747f8fdcc1d31749771991d3532fdb4da363e4 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Apr 2024 14:50:05 +0200 Subject: [PATCH] fix: Update NPM version to LTS 10 Signed-off-by: Ferdinand Thiessen --- package-lock.json | 2 +- package.json | 2 +- vite.config.ts | 6 ------ vitest.config.ts | 9 +++++++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 99e4745e..f4f78c90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ }, "engines": { "node": "^20.0.0", - "npm": "^9.0.0" + "npm": "^10.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index f8a57def..43773ace 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,6 @@ }, "engines": { "node": "^20.0.0", - "npm": "^9.0.0" + "npm": "^10.0.0" } } diff --git a/vite.config.ts b/vite.config.ts index 2660aaa3..7b6dc9bd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,7 +23,6 @@ const translations = Object.fromEntries(readdirSync('./l10n') ] })) - export default createLibConfig({ index: 'lib/index.ts', }, { @@ -31,9 +30,4 @@ export default createLibConfig({ replace: { LOCALES: JSON.stringify(translations) }, - config: { - test: { - environment: 'jsdom', - } - } }) diff --git a/vitest.config.ts b/vitest.config.ts index dbd135f4..769d9f27 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -3,6 +3,11 @@ import config from './vite.config' export default async (env) => { const cfg = await config(env) // remove the node externals plugin that interferes with vitest - cfg.plugins = cfg.plugins!.filter((plugin) => plugin && "name" in plugin && plugin.name !== 'node-externals') - return cfg + cfg.plugins = cfg.plugins!.filter((plugin) => plugin && 'name' in plugin && plugin.name !== 'node-externals') + return { + ...cfg, + test: { + environment: 'jsdom', + }, + } }