mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
chore(deps): update jiti
(#29280)
This commit is contained in:
parent
61985f4800
commit
fd5a0a1ff8
@ -43,9 +43,9 @@
|
||||
"@vue/compiler-core": "3.5.11",
|
||||
"@vue/compiler-dom": "3.5.11",
|
||||
"@vue/shared": "3.5.11",
|
||||
"c12": "2.0.0",
|
||||
"c12": "2.0.1",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"jiti": "2.1.2",
|
||||
"jiti": "2.3.1",
|
||||
"magic-string": "^0.30.11",
|
||||
"nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda",
|
||||
"nuxt": "workspace:*",
|
||||
@ -55,7 +55,7 @@
|
||||
"send": ">=0.19.0",
|
||||
"typescript": "5.6.2",
|
||||
"ufo": "1.5.4",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"vite": "5.4.8",
|
||||
"vue": "3.5.11"
|
||||
},
|
||||
@ -87,7 +87,7 @@
|
||||
"eslint-typegen": "0.3.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"happy-dom": "15.7.4",
|
||||
"jiti": "2.1.2",
|
||||
"jiti": "2.3.1",
|
||||
"markdownlint-cli": "0.42.0",
|
||||
"nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda",
|
||||
"nuxi": "3.14.0",
|
||||
|
@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/schema": "workspace:*",
|
||||
"c12": "^2.0.0",
|
||||
"c12": "^2.0.1",
|
||||
"consola": "^3.2.3",
|
||||
"defu": "^6.1.4",
|
||||
"destr": "^2.0.3",
|
||||
@ -35,7 +35,7 @@
|
||||
"globby": "^14.0.2",
|
||||
"hash-sum": "^2.0.0",
|
||||
"ignore": "^6.0.2",
|
||||
"jiti": "^2.1.2",
|
||||
"jiti": "^2.3.1",
|
||||
"klona": "^2.0.6",
|
||||
"mlly": "^1.7.1",
|
||||
"pathe": "^1.1.2",
|
||||
@ -45,13 +45,13 @@
|
||||
"ufo": "^1.5.4",
|
||||
"unctx": "^2.3.1",
|
||||
"unimport": "^3.13.1",
|
||||
"untyped": "^1.5.0"
|
||||
"untyped": "^1.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/hash-sum": "1.0.2",
|
||||
"@types/semver": "7.5.8",
|
||||
"nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"vite": "5.4.8",
|
||||
"vitest": "2.1.2",
|
||||
"webpack": "5.95.0"
|
||||
|
@ -72,10 +72,7 @@ export const normalizeModuleTranspilePath = (p: string) => {
|
||||
export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, nuxt: Nuxt = useNuxt()) {
|
||||
let buildTimeModuleMeta: ModuleMeta = {}
|
||||
|
||||
const jiti = createJiti(nuxt.options.rootDir, {
|
||||
interopDefault: true,
|
||||
alias: nuxt.options.alias,
|
||||
})
|
||||
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||
|
||||
// Import if input is string
|
||||
if (typeof nuxtModule === 'string') {
|
||||
@ -85,7 +82,7 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
|
||||
for (const path of paths) {
|
||||
try {
|
||||
const src = jiti.esmResolve(path, { parentURL: parentURL.replace(/\/node_modules\/?$/, '') })
|
||||
nuxtModule = await jiti.import(src) as NuxtModule
|
||||
nuxtModule = await jiti.import(src, { default: true }) as NuxtModule
|
||||
|
||||
// nuxt-module-builder generates a module.json with metadata including the version
|
||||
const moduleMetadataPath = join(dirname(src), 'module.json')
|
||||
|
@ -71,7 +71,7 @@
|
||||
"@unhead/vue": "^1.11.7",
|
||||
"@vue/shared": "^3.5.11",
|
||||
"acorn": "8.12.1",
|
||||
"c12": "^2.0.0",
|
||||
"c12": "^2.0.1",
|
||||
"chokidar": "^3.6.0",
|
||||
"compatx": "^0.1.8",
|
||||
"consola": "^3.2.3",
|
||||
@ -88,7 +88,7 @@
|
||||
"hookable": "^5.5.3",
|
||||
"ignore": "^6.0.2",
|
||||
"impound": "^0.1.0",
|
||||
"jiti": "^2.1.2",
|
||||
"jiti": "^2.3.1",
|
||||
"klona": "^2.0.6",
|
||||
"knitwork": "^1.1.0",
|
||||
"magic-string": "^0.30.11",
|
||||
@ -118,7 +118,7 @@
|
||||
"unplugin": "^1.14.1",
|
||||
"unplugin-vue-router": "^0.10.8",
|
||||
"unstorage": "^1.12.0",
|
||||
"untyped": "^1.5.0",
|
||||
"untyped": "^1.5.1",
|
||||
"vue": "^3.5.11",
|
||||
"vue-bundle-renderer": "^2.1.1",
|
||||
"vue-devtools-stub": "^0.1.0",
|
||||
@ -131,7 +131,7 @@
|
||||
"@types/estree": "1.0.6",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.11",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"vite": "5.4.8",
|
||||
"vitest": "2.1.2"
|
||||
},
|
||||
|
@ -23,7 +23,6 @@ export default defineNuxtModule({
|
||||
|
||||
// Initialize untyped/jiti loader
|
||||
const _resolveSchema = createJiti(fileURLToPath(import.meta.url), {
|
||||
interopDefault: true,
|
||||
cache: false,
|
||||
transformOptions: {
|
||||
babel: {
|
||||
@ -97,7 +96,7 @@ export default defineNuxtModule({
|
||||
let loadedConfig: SchemaDefinition
|
||||
try {
|
||||
// TODO: fix type for second argument of `import`
|
||||
loadedConfig = await _resolveSchema.import(filePath, {}) as SchemaDefinition
|
||||
loadedConfig = await _resolveSchema.import(filePath, { default: true }) as SchemaDefinition
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
'Unable to load schema from',
|
||||
|
@ -45,13 +45,13 @@
|
||||
"@vue/compiler-core": "3.5.11",
|
||||
"@vue/compiler-sfc": "3.5.11",
|
||||
"@vue/language-core": "2.1.6",
|
||||
"c12": "2.0.0",
|
||||
"c12": "2.0.1",
|
||||
"esbuild-loader": "4.2.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"ignore": "6.0.2",
|
||||
"nitro": "npm:nitro-nightly@3.0.0-beta-28665895.e727afda",
|
||||
"ofetch": "1.4.0",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"unctx": "2.3.1",
|
||||
"unenv": "1.10.0",
|
||||
"vite": "5.4.8",
|
||||
@ -74,7 +74,7 @@
|
||||
"ufo": "^1.5.4",
|
||||
"uncrypto": "^0.1.3",
|
||||
"unimport": "^3.13.1",
|
||||
"untyped": "^1.5.0"
|
||||
"untyped": "^1.5.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.10.0"
|
||||
|
@ -28,7 +28,7 @@
|
||||
"@types/clear": "0.1.4",
|
||||
"@types/estree": "1.0.6",
|
||||
"rollup": "4.24.0",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"vue": "3.5.11"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -47,7 +47,7 @@
|
||||
"externality": "^1.0.2",
|
||||
"get-port-please": "^3.1.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"jiti": "^2.1.2",
|
||||
"jiti": "^2.3.1",
|
||||
"knitwork": "^1.1.0",
|
||||
"magic-string": "^0.30.11",
|
||||
"mlly": "^1.7.1",
|
||||
|
@ -18,10 +18,7 @@ export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']>
|
||||
css.postcss.plugins = []
|
||||
const postcssOptions = nuxt.options.postcss
|
||||
|
||||
const jiti = createJiti(nuxt.options.rootDir, {
|
||||
interopDefault: true,
|
||||
alias: nuxt.options.alias,
|
||||
})
|
||||
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||
|
||||
for (const pluginName of sortPlugins(postcssOptions)) {
|
||||
const pluginOptions = postcssOptions.plugins[pluginName]
|
||||
@ -29,7 +26,7 @@ export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']>
|
||||
|
||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||
for (const parentURL of nuxt.options.modulesDir) {
|
||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true }) as (opts: Record<string, any>) => Plugin
|
||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true, default: true }) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
css.postcss.plugins.push(pluginFn(pluginOptions))
|
||||
break
|
||||
|
@ -40,7 +40,7 @@
|
||||
"globby": "^14.0.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"hash-sum": "^2.0.0",
|
||||
"jiti": "^2.1.2",
|
||||
"jiti": "^2.3.1",
|
||||
"knitwork": "^1.1.0",
|
||||
"lodash-es": "4.17.21",
|
||||
"magic-string": "^0.30.11",
|
||||
@ -79,7 +79,7 @@
|
||||
"@types/webpack-bundle-analyzer": "4.7.0",
|
||||
"@types/webpack-hot-middleware": "2.25.9",
|
||||
"rollup": "4.24.0",
|
||||
"unbuild": "3.0.0-rc.8",
|
||||
"unbuild": "3.0.0-rc.11",
|
||||
"vue": "3.5.11"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -36,10 +36,7 @@ export async function getPostcssConfig (nuxt: Nuxt) {
|
||||
sourceMap: nuxt.options.webpack.cssSourceMap,
|
||||
})
|
||||
|
||||
const jiti = createJiti(nuxt.options.rootDir, {
|
||||
interopDefault: true,
|
||||
alias: nuxt.options.alias,
|
||||
})
|
||||
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
|
||||
|
||||
// Keep the order of default plugins
|
||||
if (!Array.isArray(postcssOptions.plugins) && isPureObject(postcssOptions.plugins)) {
|
||||
@ -51,7 +48,7 @@ export async function getPostcssConfig (nuxt: Nuxt) {
|
||||
|
||||
let pluginFn: ((opts: Record<string, any>) => Plugin) | undefined
|
||||
for (const parentURL of nuxt.options.modulesDir) {
|
||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true }) as (opts: Record<string, any>) => Plugin
|
||||
pluginFn = await jiti.import(pluginName, { parentURL: parentURL.replace(/\/node_modules\/?$/, ''), try: true, default: true }) as (opts: Record<string, any>) => Plugin
|
||||
if (typeof pluginFn === 'function') {
|
||||
plugins.push(pluginFn(pluginOptions))
|
||||
break
|
||||
|
553
pnpm-lock.yaml
553
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user