You've already forked AstralRinth
forked from didirus/AstralRinth
feat: enable async context + patch i18n to be more resilient (#5084)
* feat: enable async context * feat: improve handling of $i18n defining (patch)
This commit is contained in:
@@ -300,6 +300,9 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
compatibilityDate: '2025-01-01',
|
compatibilityDate: '2025-01-01',
|
||||||
telemetry: false,
|
telemetry: false,
|
||||||
|
experimental: {
|
||||||
|
asyncContext: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
function getApiUrl() {
|
function getApiUrl() {
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
"packageManager": "pnpm@9.15.0",
|
"packageManager": "pnpm@9.15.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"readable-stream@2.3.8": "patches/readable-stream@2.3.8.patch"
|
"readable-stream@2.3.8": "patches/readable-stream@2.3.8.patch",
|
||||||
|
"@nuxtjs/i18n@9.5.6": "patches/@nuxtjs__i18n@9.5.6.patch"
|
||||||
},
|
},
|
||||||
"peerDependencyRules": {
|
"peerDependencyRules": {
|
||||||
"allowedVersions": {
|
"allowedVersions": {
|
||||||
|
|||||||
15
patches/@nuxtjs__i18n@9.5.6.patch
Normal file
15
patches/@nuxtjs__i18n@9.5.6.patch
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/dist/runtime/plugins/i18n.js b/dist/runtime/plugins/i18n.js
|
||||||
|
index 7a71fcfda18c0770be2c4b7a0b3c2b875bbb832e..cd008b4126400a909bcc66897a1344cb5659e8a6 100644
|
||||||
|
--- a/dist/runtime/plugins/i18n.js
|
||||||
|
+++ b/dist/runtime/plugins/i18n.js
|
||||||
|
@@ -157,7 +157,9 @@ export default defineNuxtPlugin({
|
||||||
|
}
|
||||||
|
});
|
||||||
|
nuxt.vueApp.use(i18n);
|
||||||
|
- Object.defineProperty(nuxt, "$i18n", { get: () => getI18nTarget(i18n) });
|
||||||
|
+ if (!Object.prototype.hasOwnProperty.call(nuxt, '$i18n')) {
|
||||||
|
+ Object.defineProperty(nuxt, "$i18n", { get: () => getI18nTarget(i18n), configurable: true });
|
||||||
|
+ }
|
||||||
|
return {
|
||||||
|
provide: {
|
||||||
|
/**
|
||||||
7
pnpm-lock.yaml
generated
7
pnpm-lock.yaml
generated
@@ -5,6 +5,9 @@ settings:
|
|||||||
excludeLinksFromLockfile: false
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
patchedDependencies:
|
patchedDependencies:
|
||||||
|
'@nuxtjs/i18n@9.5.6':
|
||||||
|
hash: vp2g27ju44j765ltfjh4og6y5a
|
||||||
|
path: patches/@nuxtjs__i18n@9.5.6.patch
|
||||||
readable-stream@2.3.8:
|
readable-stream@2.3.8:
|
||||||
hash: h52dazg37p4h3yox67pw36akse
|
hash: h52dazg37p4h3yox67pw36akse
|
||||||
path: patches/readable-stream@2.3.8.patch
|
path: patches/readable-stream@2.3.8.patch
|
||||||
@@ -365,7 +368,7 @@ importers:
|
|||||||
version: link:../../packages/tooling-config
|
version: link:../../packages/tooling-config
|
||||||
'@nuxtjs/i18n':
|
'@nuxtjs/i18n':
|
||||||
specifier: ^9.0.0
|
specifier: ^9.0.0
|
||||||
version: 9.5.6(@vue/compiler-dom@3.5.26)(eslint@9.39.2(jiti@2.6.1))(magicast@0.5.1)(rollup@4.54.0)(vue@3.5.26(typescript@5.9.3))
|
version: 9.5.6(patch_hash=vp2g27ju44j765ltfjh4og6y5a)(@vue/compiler-dom@3.5.26)(eslint@9.39.2(jiti@2.6.1))(magicast@0.5.1)(rollup@4.54.0)(vue@3.5.26(typescript@5.9.3))
|
||||||
'@types/dompurify':
|
'@types/dompurify':
|
||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.2.0
|
version: 3.2.0
|
||||||
@@ -11132,7 +11135,7 @@ snapshots:
|
|||||||
- vue-tsc
|
- vue-tsc
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@nuxtjs/i18n@9.5.6(@vue/compiler-dom@3.5.26)(eslint@9.39.2(jiti@2.6.1))(magicast@0.5.1)(rollup@4.54.0)(vue@3.5.26(typescript@5.9.3))':
|
'@nuxtjs/i18n@9.5.6(patch_hash=vp2g27ju44j765ltfjh4og6y5a)(@vue/compiler-dom@3.5.26)(eslint@9.39.2(jiti@2.6.1))(magicast@0.5.1)(rollup@4.54.0)(vue@3.5.26(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/h3': 0.6.1
|
'@intlify/h3': 0.6.1
|
||||||
'@intlify/shared': 10.0.8
|
'@intlify/shared': 10.0.8
|
||||||
|
|||||||
Reference in New Issue
Block a user