From d4ddab4a766ade0cbe5e1de8f01dfc8b05b51e66 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 25 Aug 2024 08:40:51 +0100 Subject: [PATCH] build: update `@nuxt/module-builder` (#3071) --- package.json | 4 +- pnpm-lock.yaml | 122 +++++++++++++-------------------------------- src/module.ts | 2 +- tsconfig.test.json | 10 +++- 4 files changed, 48 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 37b1aa4b7..40b147b6f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "./package.json": "./package.json" }, "imports": { - "#i18n": "./dist/runtime/composables/index.mjs" + "#i18n": "./dist/runtime/composables/index.js" }, "main": "./dist/module.cjs", "module": "./dist/module.mjs", @@ -107,7 +107,7 @@ "@babel/plugin-syntax-import-assertions": "^7.24.7", "@babel/types": "^7.24.7", "@eslint/js": "9.5.0", - "@nuxt/module-builder": "^0.6.0", + "@nuxt/module-builder": "^0.8.3", "@nuxt/schema": "^3.12.4", "@types/debug": "^4.1.9", "@types/eslint": "^8.56.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b15ab9aab..2e1dc9b01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,8 +95,8 @@ importers: specifier: 9.5.0 version: 9.5.0 '@nuxt/module-builder': - specifier: ^0.6.0 - version: 0.6.0(@nuxt/kit@3.12.4(magicast@0.3.4)(rollup@3.29.4))(nuxi@3.12.0)(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)) + specifier: ^0.8.3 + version: 0.8.3(@nuxt/kit@3.12.4(magicast@0.3.4)(rollup@3.29.4))(nuxi@3.12.0)(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)) '@nuxt/schema': specifier: ^3.12.4 version: 3.12.4(rollup@3.29.4) @@ -1497,12 +1497,12 @@ packages: resolution: {integrity: sha512-aNRD1ylzijY0oYolldNcZJXVyxdGzNTl+Xd0UYyFQCu9f4wqUZqQ9l+b7arCEzchr96pMK0xdpvLcS3xo1wDcw==} engines: {node: ^14.18.0 || >=16.10.0} - '@nuxt/module-builder@0.6.0': - resolution: {integrity: sha512-d/sn+6n23qB+yGuItNvGnNlPpDzwcsW6riyISdo4H2MO/3TWFsIzB5+JZK104t0G6ftxB71xWHmBBYEdkXOhVw==} + '@nuxt/module-builder@0.8.3': + resolution: {integrity: sha512-m9W3P6f6TFnHmVFKRo/2gELWDi3r0k8i93Z1fY5z410GZmttGVPv8KgRgOgC79agRi/OtpbyG3BPRaWdbDZa5w==} hasBin: true peerDependencies: - '@nuxt/kit': ^3.11.2 - nuxi: ^3.11.1 + '@nuxt/kit': ^3.12.4 + nuxi: ^3.12.0 '@nuxt/schema@3.12.4': resolution: {integrity: sha512-H7FwBV4ChssMaeiLyPdVLOLUa0326ebp3pNbJfGgFt7rSoKh1MmgjorecA8JMxOQZziy3w6EELf4+5cgLh/F1w==} @@ -3207,12 +3207,6 @@ packages: engines: {node: '>=4'} hasBin: true - cssnano-preset-default@7.0.3: - resolution: {integrity: sha512-dQ3Ba1p/oewICp/szF1XjFFgql8OlOBrI2YNBUUwhHQnJNoMOcQTa+Bi7jSJN8r/eM1egW0Ud1se/S7qlduWKA==} - engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} - peerDependencies: - postcss: ^8.4.31 - cssnano-preset-default@7.0.4: resolution: {integrity: sha512-jQ6zY9GAomQX7/YNLibMEsRZguqMUGuupXcEk2zZ+p3GUxwCAsobqPYE62VrJ9qZ0l9ltrv2rgjwZPBIFIjYtw==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -3225,12 +3219,6 @@ packages: peerDependencies: postcss: ^8.4.31 - cssnano@7.0.3: - resolution: {integrity: sha512-lsekJctOTqdCn4cNrtrSwsuMR/fHC+oiVMHkp/OugBWtwjH8XJag1/OtGaYJGtz0un1fQcRy4ryfYTQsfh+KSQ==} - engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} - peerDependencies: - postcss: ^8.4.31 - cssnano@7.0.4: resolution: {integrity: sha512-rQgpZra72iFjiheNreXn77q1haS2GEy69zCMbu4cpXCFPMQF+D4Ik5V7ktMzUF/sA7xCIgcqHwGPnCD+0a1vHg==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -4753,12 +4741,12 @@ packages: engines: {node: '>=10'} hasBin: true - mkdist@1.5.3: - resolution: {integrity: sha512-XXvaXyS3k/fCExY2/c9z0fmJ9kWq/UZeZZGQ0R693M004lowXNJKIENdH5Cf5Uu3LtSB9vhGu/1YM7IGjWbfxA==} + mkdist@1.5.4: + resolution: {integrity: sha512-GEmKYJG5K1YGFIq3t0K3iihZ8FTgXphLf/4UjbmpXIAtBFn4lEjXk3pXNTSfy7EtcEXhp2Nn1vzw5pIus6RY3g==} hasBin: true peerDependencies: - sass: ^1.77.6 - typescript: '>=5.4.5' + sass: ^1.77.8 + typescript: '>=5.5.3' vue-tsc: ^1.8.27 || ^2.0.21 peerDependenciesMeta: sass: @@ -5205,12 +5193,6 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss-convert-values@7.0.1: - resolution: {integrity: sha512-9x2ofb+hYPwHWMlWAzyWys2yMDZYGfkX9LodbaVTmLdlupmtH2AGvj8Up95wzzNPRDEzPIxQIkUaPJew3bT6xA==} - engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} - peerDependencies: - postcss: ^8.4.31 - postcss-convert-values@7.0.2: resolution: {integrity: sha512-MuZIF6HJ4izko07Q0TgW6pClalI4al6wHRNPkFzqQdwAwG7hPn0lA58VZdxyb2Vl5AYjJ1piO+jgF9EnTjQwQQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -6170,6 +6152,16 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + tsconfck@3.1.1: + resolution: {integrity: sha512-00eoI6WY57SvZEVjm13stEVE90VkEdJAFGgpFLTsZbJyW/LwFQ7uQxJHWpZ2hzSWgCPKc9AnBnNP+0X7o3hAmQ==} + engines: {node: ^18 || >=20} + hasBin: true + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} @@ -8168,16 +8160,18 @@ snapshots: - rollup - supports-color - '@nuxt/module-builder@0.6.0(@nuxt/kit@3.12.4(magicast@0.3.4)(rollup@3.29.4))(nuxi@3.12.0)(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2))': + '@nuxt/module-builder@0.8.3(@nuxt/kit@3.12.4(magicast@0.3.4)(rollup@3.29.4))(nuxi@3.12.0)(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2))': dependencies: '@nuxt/kit': 3.12.4(magicast@0.3.4)(rollup@3.29.4) citty: 0.1.6 consola: 3.2.3 defu: 6.1.4 + magic-regexp: 0.8.0 mlly: 1.7.1 nuxi: 3.12.0 pathe: 1.1.2 - pkg-types: 1.1.1 + pkg-types: 1.1.3 + tsconfck: 3.1.1(typescript@5.5.2) unbuild: 2.0.0(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)) transitivePeerDependencies: - sass @@ -10508,40 +10502,6 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-default@7.0.3(postcss@8.4.40): - dependencies: - browserslist: 4.23.1 - css-declaration-sorter: 7.2.0(postcss@8.4.40) - cssnano-utils: 5.0.0(postcss@8.4.40) - postcss: 8.4.40 - postcss-calc: 10.0.0(postcss@8.4.40) - postcss-colormin: 7.0.1(postcss@8.4.40) - postcss-convert-values: 7.0.1(postcss@8.4.40) - postcss-discard-comments: 7.0.1(postcss@8.4.40) - postcss-discard-duplicates: 7.0.0(postcss@8.4.40) - postcss-discard-empty: 7.0.0(postcss@8.4.40) - postcss-discard-overridden: 7.0.0(postcss@8.4.40) - postcss-merge-longhand: 7.0.2(postcss@8.4.40) - postcss-merge-rules: 7.0.2(postcss@8.4.40) - postcss-minify-font-values: 7.0.0(postcss@8.4.40) - postcss-minify-gradients: 7.0.0(postcss@8.4.40) - postcss-minify-params: 7.0.1(postcss@8.4.40) - postcss-minify-selectors: 7.0.2(postcss@8.4.40) - postcss-normalize-charset: 7.0.0(postcss@8.4.40) - postcss-normalize-display-values: 7.0.0(postcss@8.4.40) - postcss-normalize-positions: 7.0.0(postcss@8.4.40) - postcss-normalize-repeat-style: 7.0.0(postcss@8.4.40) - postcss-normalize-string: 7.0.0(postcss@8.4.40) - postcss-normalize-timing-functions: 7.0.0(postcss@8.4.40) - postcss-normalize-unicode: 7.0.1(postcss@8.4.40) - postcss-normalize-url: 7.0.0(postcss@8.4.40) - postcss-normalize-whitespace: 7.0.0(postcss@8.4.40) - postcss-ordered-values: 7.0.1(postcss@8.4.40) - postcss-reduce-initial: 7.0.1(postcss@8.4.40) - postcss-reduce-transforms: 7.0.0(postcss@8.4.40) - postcss-svgo: 7.0.1(postcss@8.4.40) - postcss-unique-selectors: 7.0.1(postcss@8.4.40) - cssnano-preset-default@7.0.4(postcss@8.4.40): dependencies: browserslist: 4.23.1 @@ -10580,12 +10540,6 @@ snapshots: dependencies: postcss: 8.4.40 - cssnano@7.0.3(postcss@8.4.40): - dependencies: - cssnano-preset-default: 7.0.3(postcss@8.4.40) - lilconfig: 3.1.2 - postcss: 8.4.40 - cssnano@7.0.4(postcss@8.4.40): dependencies: cssnano-preset-default: 7.0.4(postcss@8.4.40) @@ -12018,7 +11972,7 @@ snapshots: regexp-tree: 0.1.27 type-level-regexp: 0.1.17 ufo: 1.5.4 - unplugin: 1.10.1 + unplugin: 1.12.0 magic-string-ast@0.6.2: dependencies: @@ -12467,23 +12421,21 @@ snapshots: mkdirp@1.0.4: {} - mkdist@1.5.3(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)): + mkdist@1.5.4(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)): dependencies: autoprefixer: 10.4.19(postcss@8.4.40) citty: 0.1.6 - cssnano: 7.0.3(postcss@8.4.40) + cssnano: 7.0.4(postcss@8.4.40) defu: 6.1.4 - esbuild: 0.21.5 - fs-extra: 11.2.0 - globby: 14.0.1 + esbuild: 0.23.0 + fast-glob: 3.3.2 jiti: 1.21.0 mlly: 1.7.1 - mri: 1.2.0 pathe: 1.1.2 - pkg-types: 1.1.1 + pkg-types: 1.1.3 postcss: 8.4.40 postcss-nested: 6.0.1(postcss@8.4.40) - semver: 7.6.2 + semver: 7.6.3 optionalDependencies: typescript: 5.5.2 vue-tsc: 2.0.22(typescript@5.5.2) @@ -13444,12 +13396,6 @@ snapshots: postcss: 8.4.40 postcss-value-parser: 4.2.0 - postcss-convert-values@7.0.1(postcss@8.4.40): - dependencies: - browserslist: 4.23.1 - postcss: 8.4.40 - postcss-value-parser: 4.2.0 - postcss-convert-values@7.0.2(postcss@8.4.40): dependencies: browserslist: 4.23.1 @@ -14494,6 +14440,10 @@ snapshots: ts-interface-checker@0.1.13: {} + tsconfck@3.1.1(typescript@5.5.2): + optionalDependencies: + typescript: 5.5.2 + tslib@2.6.3: {} tsscmp@1.0.6: {} @@ -14568,7 +14518,7 @@ snapshots: hookable: 5.5.3 jiti: 1.21.0 magic-string: 0.30.10 - mkdist: 1.5.3(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)) + mkdist: 1.5.4(typescript@5.5.2)(vue-tsc@2.0.22(typescript@5.5.2)) mlly: 1.7.1 pathe: 1.1.2 pkg-types: 1.1.1 diff --git a/src/module.ts b/src/module.ts index 42d8e4eb3..7b79d0244 100644 --- a/src/module.ts +++ b/src/module.ts @@ -234,7 +234,7 @@ export default defineNuxtModule({ addPlugin(resolve(runtimeDir, 'plugins/switch-locale-path-ssr')) // for composables - nuxt.options.alias['#i18n'] = resolve(distDir, 'runtime/composables/index.mjs') + nuxt.options.alias['#i18n'] = resolve(distDir, 'runtime/composables/index.js') nuxt.options.build.transpile.push('#i18n') const genTemplate = (isServer: boolean, lazy?: boolean) => { diff --git a/tsconfig.test.json b/tsconfig.test.json index ace019c56..ccaaee2f1 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,4 +1,12 @@ { "extends": "./tsconfig.json", - "exclude": ["**/.nuxt/**", "**/*/dist/*", "docs/**", "playground/**", "specs/**", "src/runtime/templates/**"] + "exclude": [ + "**/.nuxt/**", + "**/*/dist/*", + "dist/**", + "docs/**", + "playground/**", + "specs/**", + "src/runtime/templates/**" + ] }