From 4b84f7db1523923ad5fb757ef0d8a75f46950467 Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 4 Jan 2023 08:12:32 +0100 Subject: [PATCH] Removed deprecated package for Vite 4 --- package-lock.json | 216 +++++++++++++++++++++++++++++++++------------- package.json | 2 +- quasar.config.js | 3 +- vitest.config.js | 4 +- 4 files changed, 162 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70d44bcda..a7675f32e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "vue-router-mock": "^0.1.9" }, "devDependencies": { - "@intlify/vite-plugin-vue-i18n": "^3.3.1", + "@intlify/unplugin-vue-i18n": "^0.8.1", "@pinia/testing": "^0.0.14", "@quasar/app-vite": "^1.1.3", "@quasar/quasar-app-extension-testing-unit-vitest": "^0.1.2", @@ -546,30 +546,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "node_modules/@intlify/bundle-utils": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-2.2.2.tgz", - "integrity": "sha512-vngkvlIVV8ZJoyC5VqMvqJd2nvsx+qMN7pQjPiPjOrVndeiR7Dlue0k86Q8FsFUzyksW3HJZZi833ldxwbFzTA==", - "dev": true, - "dependencies": { - "@intlify/message-compiler": "^9.1.0", - "@intlify/shared": "^9.1.0", - "jsonc-eslint-parser": "^1.0.1", - "source-map": "^0.6.1", - "yaml-eslint-parser": "^0.3.2" - }, - "engines": { - "node": ">= 12" - }, - "peerDependenciesMeta": { - "petite-vue-i18n": { - "optional": true - }, - "vue-i18n": { - "optional": true - } - } - }, "node_modules/@intlify/core-base": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.2.2.tgz", @@ -615,27 +591,60 @@ "node": ">= 14" } }, - "node_modules/@intlify/vite-plugin-vue-i18n": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@intlify/vite-plugin-vue-i18n/-/vite-plugin-vue-i18n-3.4.0.tgz", - "integrity": "sha512-XXcZBgwJ+3FRu11c4ARoY9N00kElPii0/jNZ49qR045Ka7/YGCwb1Ku14BBlMSEHiHDSjLQknLwrJKSQGVZLyA==", + "node_modules/@intlify/unplugin-vue-i18n": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@intlify/unplugin-vue-i18n/-/unplugin-vue-i18n-0.8.1.tgz", + "integrity": "sha512-BhigujPmP6JL1FSxmpogCaL+REozncHCVkJuUnefz4GWBu3X+pRe5O7PeJn8/g+Iml2ieQJz4ISPMmEbuGQjqQ==", "dev": true, "dependencies": { - "@intlify/bundle-utils": "^2.2.2", - "@intlify/shared": "^9.1.0", - "@rollup/pluginutils": "^4.1.0", + "@intlify/bundle-utils": "^3.4.0", + "@intlify/shared": "next", + "@rollup/pluginutils": "^4.2.0", + "@vue/compiler-sfc": "^3.2.45", "debug": "^4.3.1", "fast-glob": "^3.2.5", - "source-map": "0.6.1" + "js-yaml": "^4.1.0", + "json5": "^2.2.0", + "pathe": "^1.0.0", + "picocolors": "^1.0.0", + "source-map": "0.6.1", + "unplugin": "^1.0.0" + }, + "engines": { + "node": ">= 14.16" + }, + "peerDependencies": { + "petite-vue-i18n": "*", + "vue-i18n": "*", + "vue-i18n-bridge": "*" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + }, + "vue-i18n-bridge": { + "optional": true + } + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/@intlify/bundle-utils": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-3.4.0.tgz", + "integrity": "sha512-2UQkqiSAOSPEHMGWlybqWm4G2K0X+FyYho5AwXz6QklSX1EY5EDmOSxZmwscn2qmKBnp6OYsme5kUrnN9xrWzQ==", + "dev": true, + "dependencies": { + "@intlify/message-compiler": "next", + "@intlify/shared": "next", + "jsonc-eslint-parser": "^1.0.1", + "source-map": "0.6.1", + "yaml-eslint-parser": "^0.3.2" }, "engines": { "node": ">= 12" }, - "peerDependencies": { - "petite-vue-i18n": "^9.1.0", - "vite": "^2.0.0", - "vue-i18n": "^9.1.0" - }, "peerDependenciesMeta": { "petite-vue-i18n": { "optional": true @@ -645,6 +654,24 @@ } } }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/pathe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.0.0.tgz", + "integrity": "sha512-nPdMG0Pd09HuSsr7QOKUXO2Jr9eqaDiZvDwdyIhNG5SHYujkQHYKDfGQkulBxvbDHz8oHLsTgKN86LSwYzSHAg==", + "dev": true + }, "node_modules/@intlify/vue-devtools": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.2.2.tgz", @@ -6945,6 +6972,18 @@ "node": ">= 0.8" } }, + "node_modules/unplugin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", + "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", + "dev": true, + "dependencies": { + "acorn": "^8.8.1", + "chokidar": "^3.5.3", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.5.0" + } + }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -7384,6 +7423,21 @@ "node": ">=10.0.0" } }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", + "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", + "dev": true + }, "node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -7882,19 +7936,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "@intlify/bundle-utils": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-2.2.2.tgz", - "integrity": "sha512-vngkvlIVV8ZJoyC5VqMvqJd2nvsx+qMN7pQjPiPjOrVndeiR7Dlue0k86Q8FsFUzyksW3HJZZi833ldxwbFzTA==", - "dev": true, - "requires": { - "@intlify/message-compiler": "^9.1.0", - "@intlify/shared": "^9.1.0", - "jsonc-eslint-parser": "^1.0.1", - "source-map": "^0.6.1", - "yaml-eslint-parser": "^0.3.2" - } - }, "@intlify/core-base": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.2.2.tgz", @@ -7928,18 +7969,51 @@ "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.2.2.tgz", "integrity": "sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==" }, - "@intlify/vite-plugin-vue-i18n": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@intlify/vite-plugin-vue-i18n/-/vite-plugin-vue-i18n-3.4.0.tgz", - "integrity": "sha512-XXcZBgwJ+3FRu11c4ARoY9N00kElPii0/jNZ49qR045Ka7/YGCwb1Ku14BBlMSEHiHDSjLQknLwrJKSQGVZLyA==", + "@intlify/unplugin-vue-i18n": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@intlify/unplugin-vue-i18n/-/unplugin-vue-i18n-0.8.1.tgz", + "integrity": "sha512-BhigujPmP6JL1FSxmpogCaL+REozncHCVkJuUnefz4GWBu3X+pRe5O7PeJn8/g+Iml2ieQJz4ISPMmEbuGQjqQ==", "dev": true, "requires": { - "@intlify/bundle-utils": "^2.2.2", - "@intlify/shared": "^9.1.0", - "@rollup/pluginutils": "^4.1.0", + "@intlify/bundle-utils": "^3.4.0", + "@intlify/shared": "next", + "@rollup/pluginutils": "^4.2.0", + "@vue/compiler-sfc": "^3.2.45", "debug": "^4.3.1", "fast-glob": "^3.2.5", - "source-map": "0.6.1" + "js-yaml": "^4.1.0", + "json5": "^2.2.0", + "pathe": "^1.0.0", + "picocolors": "^1.0.0", + "source-map": "0.6.1", + "unplugin": "^1.0.0" + }, + "dependencies": { + "@intlify/bundle-utils": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-3.4.0.tgz", + "integrity": "sha512-2UQkqiSAOSPEHMGWlybqWm4G2K0X+FyYho5AwXz6QklSX1EY5EDmOSxZmwscn2qmKBnp6OYsme5kUrnN9xrWzQ==", + "dev": true, + "requires": { + "@intlify/message-compiler": "next", + "@intlify/shared": "next", + "jsonc-eslint-parser": "^1.0.1", + "source-map": "0.6.1", + "yaml-eslint-parser": "^0.3.2" + } + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "pathe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.0.0.tgz", + "integrity": "sha512-nPdMG0Pd09HuSsr7QOKUXO2Jr9eqaDiZvDwdyIhNG5SHYujkQHYKDfGQkulBxvbDHz8oHLsTgKN86LSwYzSHAg==", + "dev": true + } } }, "@intlify/vue-devtools": { @@ -12579,6 +12653,18 @@ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true }, + "unplugin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", + "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", + "dev": true, + "requires": { + "acorn": "^8.8.1", + "chokidar": "^3.5.3", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.5.0" + } + }, "untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -12860,6 +12946,18 @@ "wildcard": "^2.0.0" } }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true + }, + "webpack-virtual-modules": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", + "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", + "dev": true + }, "whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", diff --git a/package.json b/package.json index 8184115fe..96c545e46 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "vue-router-mock": "^0.1.9" }, "devDependencies": { - "@intlify/vite-plugin-vue-i18n": "^3.3.1", + "@intlify/unplugin-vue-i18n": "^0.8.1", "@pinia/testing": "^0.0.14", "@quasar/app-vite": "^1.1.3", "@quasar/quasar-app-extension-testing-unit-vitest": "^0.1.2", diff --git a/quasar.config.js b/quasar.config.js index 47204c299..005a922d7 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -9,6 +9,7 @@ // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js const { configure } = require('quasar/wrappers'); +const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/vite') const path = require('path'); module.exports = configure(function (/* ctx */) { @@ -88,7 +89,7 @@ module.exports = configure(function (/* ctx */) { vitePlugins: [ [ - '@intlify/vite-plugin-vue-i18n', + VueI18nPlugin, { // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false` // compositionOnly: false, diff --git a/vitest.config.js b/vitest.config.js index 49384bd93..2f581b083 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -2,7 +2,7 @@ import { defineConfig } from 'vitest/config'; import vue from '@vitejs/plugin-vue'; import { quasar, transformAssetUrls } from '@quasar/vite-plugin'; import jsconfigPaths from 'vite-jsconfig-paths'; -import vueI18n from '@intlify/vite-plugin-vue-i18n'; +import VueI18n from '@intlify/unplugin-vue-i18n'; import path from 'path'; // https://vitejs.dev/config/ @@ -23,7 +23,7 @@ export default defineConfig({ quasar({ sassVariables: 'src/quasar-variables.scss', }), - vueI18n({ + VueI18n({ include: path.resolve(__dirname, 'src/i18n/**'), }), jsconfigPaths(),