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 <daniel@roe.dev>
This commit is contained in:
renovate[bot] 2023-06-12 20:43:13 +01:00 committed by GitHub
parent 4ac4dfda15
commit 3b0b924946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 9 deletions

View File

@ -32,7 +32,7 @@
"consola": "3.1.0", "consola": "3.1.0",
"deep-object-diff": "1.1.9", "deep-object-diff": "1.1.9",
"defu": "6.1.2", "defu": "6.1.2",
"destr": "1.2.2", "destr": "2.0.0",
"execa": "7.1.1", "execa": "7.1.1",
"flat": "5.0.2", "flat": "5.0.2",
"giget": "1.1.2", "giget": "1.1.2",

View File

@ -4,6 +4,7 @@ import { createRequire } from 'node:module'
import { resolve } from 'pathe' import { resolve } from 'pathe'
import jiti from 'jiti' import jiti from 'jiti'
import destr from 'destr' import destr from 'destr'
import type { PackageJson } from 'pkg-types'
import { splitByCase } from 'scule' import { splitByCase } from 'scule'
import clipboardy from 'clipboardy' import clipboardy from 'clipboardy'
import type { NuxtModule } from '@nuxt/schema' import type { NuxtModule } from '@nuxt/schema'
@ -138,14 +139,14 @@ function getPkg (name: string, rootDir: string) {
// console.log('not found:', name) // console.log('not found:', name)
} }
return readJSONSync(pkgPath) return readJSONSync(pkgPath) as PackageJson
} }
function findPackage (rootDir: string) { function findPackage (rootDir: string) {
return findup(rootDir, (dir) => { return findup(rootDir, (dir) => {
const p = resolve(dir, 'package.json') const p = resolve(dir, 'package.json')
if (existsSync(p)) { if (existsSync(p)) {
return readJSONSync(p) return readJSONSync(p) as PackageJson
} }
}) || {} }) || {}
} }

View File

@ -65,7 +65,7 @@
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"cookie-es": "^1.0.0", "cookie-es": "^1.0.0",
"defu": "^6.1.2", "defu": "^6.1.2",
"destr": "^1.2.2", "destr": "^2.0.0",
"devalue": "^4.3.2", "devalue": "^4.3.2",
"escape-string-regexp": "^5.0.0", "escape-string-regexp": "^5.0.0",
"estree-walker": "^3.0.3", "estree-walker": "^3.0.3",

View File

@ -266,8 +266,8 @@ importers:
specifier: 6.1.2 specifier: 6.1.2
version: 6.1.2 version: 6.1.2
destr: destr:
specifier: 1.2.2 specifier: 2.0.0
version: 1.2.2 version: 2.0.0
execa: execa:
specifier: 7.1.1 specifier: 7.1.1
version: 7.1.1 version: 7.1.1
@ -362,8 +362,8 @@ importers:
specifier: ^6.1.2 specifier: ^6.1.2
version: 6.1.2 version: 6.1.2
destr: destr:
specifier: ^1.2.2 specifier: ^2.0.0
version: 1.2.2 version: 2.0.0
devalue: devalue:
specifier: ^4.3.2 specifier: ^4.3.2
version: 4.3.2 version: 4.3.2
@ -4152,6 +4152,9 @@ packages:
/destr@1.2.2: /destr@1.2.2:
resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==}
/destr@2.0.0:
resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==}
/destroy@1.2.0: /destroy@1.2.0:
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}

View File

@ -38,7 +38,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"61.9k"') expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"61.9k"')
const modules = await analyzeSizes('node_modules/**/*', serverDir) const modules = await analyzeSizes('node_modules/**/*', serverDir)
expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2286k"') expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2295k"')
const packages = modules.files const packages = modules.files
.filter(m => m.endsWith('package.json')) .filter(m => m.endsWith('package.json'))
@ -64,11 +64,13 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
"devalue", "devalue",
"estree-walker", "estree-walker",
"h3", "h3",
"h3/node_modules/destr",
"hookable", "hookable",
"iron-webcrypto", "iron-webcrypto",
"klona", "klona",
"node-fetch-native", "node-fetch-native",
"ofetch", "ofetch",
"ofetch/node_modules/destr",
"ohash", "ohash",
"pathe", "pathe",
"radix3", "radix3",
@ -80,6 +82,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
"unenv", "unenv",
"unhead", "unhead",
"unstorage", "unstorage",
"unstorage/node_modules/destr",
"vue", "vue",
"vue-bundle-renderer", "vue-bundle-renderer",
] ]