From 3b0b924946a4d012824134d223cbcb68385c2214 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 20:43:13 +0100 Subject: [PATCH] chore(deps): update dependency destr to v2 (main) (#21536) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- packages/nuxi/package.json | 2 +- packages/nuxi/src/commands/info.ts | 5 +++-- packages/nuxt/package.json | 2 +- pnpm-lock.yaml | 11 +++++++---- test/bundle.test.ts | 5 ++++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index 379f415e14..66d1841ab7 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -32,7 +32,7 @@ "consola": "3.1.0", "deep-object-diff": "1.1.9", "defu": "6.1.2", - "destr": "1.2.2", + "destr": "2.0.0", "execa": "7.1.1", "flat": "5.0.2", "giget": "1.1.2", diff --git a/packages/nuxi/src/commands/info.ts b/packages/nuxi/src/commands/info.ts index 1336696c78..0bae405f7f 100644 --- a/packages/nuxi/src/commands/info.ts +++ b/packages/nuxi/src/commands/info.ts @@ -4,6 +4,7 @@ import { createRequire } from 'node:module' import { resolve } from 'pathe' import jiti from 'jiti' import destr from 'destr' +import type { PackageJson } from 'pkg-types' import { splitByCase } from 'scule' import clipboardy from 'clipboardy' import type { NuxtModule } from '@nuxt/schema' @@ -138,14 +139,14 @@ function getPkg (name: string, rootDir: string) { // console.log('not found:', name) } - return readJSONSync(pkgPath) + return readJSONSync(pkgPath) as PackageJson } function findPackage (rootDir: string) { return findup(rootDir, (dir) => { const p = resolve(dir, 'package.json') if (existsSync(p)) { - return readJSONSync(p) + return readJSONSync(p) as PackageJson } }) || {} } diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index ac15ae59de..c52541417d 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -65,7 +65,7 @@ "chokidar": "^3.5.3", "cookie-es": "^1.0.0", "defu": "^6.1.2", - "destr": "^1.2.2", + "destr": "^2.0.0", "devalue": "^4.3.2", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e75cc5a364..1b0cb31b3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -266,8 +266,8 @@ importers: specifier: 6.1.2 version: 6.1.2 destr: - specifier: 1.2.2 - version: 1.2.2 + specifier: 2.0.0 + version: 2.0.0 execa: specifier: 7.1.1 version: 7.1.1 @@ -362,8 +362,8 @@ importers: specifier: ^6.1.2 version: 6.1.2 destr: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^2.0.0 + version: 2.0.0 devalue: specifier: ^4.3.2 version: 4.3.2 @@ -4152,6 +4152,9 @@ packages: /destr@1.2.2: resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} + /destr@2.0.0: + resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==} + /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 0b302f3cda..0fe5069ce2 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -38,7 +38,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"61.9k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) - expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2286k"') + expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2295k"') const packages = modules.files .filter(m => m.endsWith('package.json')) @@ -64,11 +64,13 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM "devalue", "estree-walker", "h3", + "h3/node_modules/destr", "hookable", "iron-webcrypto", "klona", "node-fetch-native", "ofetch", + "ofetch/node_modules/destr", "ohash", "pathe", "radix3", @@ -80,6 +82,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM "unenv", "unhead", "unstorage", + "unstorage/node_modules/destr", "vue", "vue-bundle-renderer", ]