fix(nuxt): support importing types from #imports (#21796)

This commit is contained in:
Anthony Fu 2023-06-26 17:53:29 +02:00 committed by GitHub
parent e69837d6a7
commit 3550893227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 13 deletions

View File

@ -35,7 +35,7 @@
"scule": "^1.0.0", "scule": "^1.0.0",
"semver": "^7.5.3", "semver": "^7.5.3",
"unctx": "^2.3.1", "unctx": "^2.3.1",
"unimport": "^3.0.8", "unimport": "^3.0.9",
"untyped": "^1.3.2" "untyped": "^1.3.2"
}, },
"devDependencies": { "devDependencies": {

View File

@ -96,7 +96,7 @@
"uncrypto": "^0.1.3", "uncrypto": "^0.1.3",
"unctx": "^2.3.1", "unctx": "^2.3.1",
"unenv": "^1.5.1", "unenv": "^1.5.1",
"unimport": "^3.0.8", "unimport": "^3.0.9",
"unplugin": "^1.3.1", "unplugin": "^1.3.1",
"unplugin-vue-router": "^0.6.4", "unplugin-vue-router": "^0.6.4",
"untyped": "^1.3.2", "untyped": "^1.3.2",

View File

@ -155,7 +155,7 @@ function addDeclarationTemplates (ctx: Unimport, options: Partial<ImportsOptions
addTemplate({ addTemplate({
filename: 'imports.d.ts', filename: 'imports.d.ts',
getContents: () => ctx.toExports(nuxt.options.buildDir) getContents: () => ctx.toExports(nuxt.options.buildDir, true)
}) })
addTemplate({ addTemplate({

View File

@ -54,7 +54,7 @@
"postcss-import-resolver": "^2.0.0", "postcss-import-resolver": "^2.0.0",
"std-env": "^3.3.3", "std-env": "^3.3.3",
"ufo": "^1.1.2", "ufo": "^1.1.2",
"unimport": "^3.0.8", "unimport": "^3.0.9",
"untyped": "^1.3.2" "untyped": "^1.3.2"
}, },
"engines": { "engines": {

View File

@ -183,8 +183,8 @@ importers:
specifier: ^2.3.1 specifier: ^2.3.1
version: 2.3.1 version: 2.3.1
unimport: unimport:
specifier: ^3.0.8 specifier: ^3.0.9
version: 3.0.8(rollup@3.25.1) version: 3.0.9(rollup@3.25.1)
untyped: untyped:
specifier: ^1.3.2 specifier: ^1.3.2
version: 1.3.2 version: 1.3.2
@ -455,8 +455,8 @@ importers:
specifier: ^1.5.1 specifier: ^1.5.1
version: 1.5.1 version: 1.5.1
unimport: unimport:
specifier: ^3.0.8 specifier: ^3.0.9
version: 3.0.8(rollup@3.25.1) version: 3.0.9(rollup@3.25.1)
unplugin: unplugin:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.3.1 version: 1.3.1
@ -528,8 +528,8 @@ importers:
specifier: ^1.1.2 specifier: ^1.1.2
version: 1.1.2 version: 1.1.2
unimport: unimport:
specifier: ^3.0.8 specifier: ^3.0.9
version: 3.0.8(rollup@3.25.1) version: 3.0.9(rollup@3.25.1)
untyped: untyped:
specifier: ^1.3.2 specifier: ^1.3.2
version: 1.3.2 version: 1.3.2
@ -6557,7 +6557,7 @@ packages:
ufo: 1.1.2 ufo: 1.1.2
uncrypto: 0.1.3 uncrypto: 0.1.3
unenv: 1.5.1 unenv: 1.5.1
unimport: 3.0.8(rollup@3.25.1) unimport: 3.0.9(rollup@3.25.1)
unstorage: 1.7.0 unstorage: 1.7.0
transitivePeerDependencies: transitivePeerDependencies:
- '@azure/app-configuration' - '@azure/app-configuration'
@ -8487,8 +8487,8 @@ packages:
hookable: 5.5.3 hookable: 5.5.3
dev: false dev: false
/unimport@3.0.8(rollup@3.25.1): /unimport@3.0.9(rollup@3.25.1):
resolution: {integrity: sha512-AOt6xj3QMwqcTZRPB+NhFkyVEjCKnpTVoPm5x6424zz2NYYtCfym2bpJofzPHIJKPNIh5ko2/t2q46ZIMgdmbw==} resolution: {integrity: sha512-5T1zUOQVcmb2IASqscTg/IVDTv6aMaB8kkL/KoeC06I07ciWrOQk5fCpPeGT0ziu2cBMgqZmNB8lmNfoumNjBA==}
dependencies: dependencies:
'@rollup/pluginutils': 5.0.2(rollup@3.25.1) '@rollup/pluginutils': 5.0.2(rollup@3.25.1)
escape-string-regexp: 5.0.0 escape-string-regexp: 5.0.0