nuxt-ignis 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.9 (2025-02-03)
4
+ - feat: expose `useI18n` composable via custom `useIgnisI18n`
5
+
6
+ ## 0.1.8 (2025-02-02)
7
+ - build: fix `nuxt-neon` security issue
8
+ - build: fix `vite` security issue
9
+
3
10
  ## 0.1.7 (2025-01-31)
4
11
  - feat: unified test-pack included via separate `nuxt-spec` layer
5
12
  - feat: support `ssr` and `pages` settings
package/README.md CHANGED
@@ -20,7 +20,7 @@ Aside from being "forked", `nuxt-ignis` is also available as [NPM package](https
20
20
 
21
21
  1) Add following dependency into your `package.json`:
22
22
  ```
23
- "nuxt-ignis": "0.1.7"
23
+ "nuxt-ignis": "0.1.9"
24
24
  ```
25
25
 
26
26
  2) Add following section into your `nuxt.config.ts`:
@@ -117,6 +117,7 @@ Default values are **false** (not included) for all optional modules.
117
117
  - you can select default language locale via `NUXT_PUBLIC_IGNIS_I18N_LOCALE`
118
118
  - all `.json` files with messages in `@assets/lang` folder will be auto-scanned
119
119
  - if [default config file](https://github.com/AloisSeckar/nuxt-ignis/blob/main/i18n.config.ts) is not suitable for your project, you may specify path to your own using `NUXT_PUBLIC_IGNIS_I18N_CONFIG`
120
+ - **NOTE:** the `useI18n` composable is not available and must be replaced with custom `useIgnisI18n` wrapper
120
121
 
121
122
  #### Formkit options
122
123
  - you can select default language locale via `NUXT_PUBLIC_IGNIS_FORMKIT_LOCALE`
package/app.vue CHANGED
@@ -30,7 +30,12 @@ useHead({
30
30
  },
31
31
  })
32
32
  initConsola()
33
+
33
34
  log.info('Nuxt Ignis was here!')
35
+
36
+ const { locale } = useIgnisI18n()
37
+ log.debug(`I18n locale set to ${locale.value}`)
38
+
34
39
  const title = useT('title')
35
40
  const alt = title
36
41
 
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Custom wrapper around `useI18n()` composable
3
+ * which is apparently not available out of the box in target apps
4
+ */
5
+ export function useIgnisI18n() {
6
+ const i18n = useRuntimeConfig().public.ignis.i18n
7
+ if (i18n.enabled) {
8
+ return {
9
+ ...useI18n(),
10
+ }
11
+ } else {
12
+ return {
13
+ locale: ref(i18n.default || 'en'),
14
+ // TODO possible other defaults?
15
+ }
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ignis",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Enhanced and customizable Nuxt application starter pack",
5
5
  "repository": "github:AloisSeckar/nuxt-ignis",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "consola": "3.4.0",
32
32
  "defu": "6.1.4",
33
33
  "elrh-pslo": "1.1.6",
34
- "nuxt-neon": "0.2.5",
34
+ "nuxt-neon": "0.3.0",
35
35
  "nuxt-security": "2.1.5",
36
36
  "nuxt-spec": "0.0.2",
37
37
  "nuxt-time": "1.0.3",
@@ -42,6 +42,11 @@
42
42
  "vue": "latest",
43
43
  "vue-router": "latest"
44
44
  },
45
+ "pnpm": {
46
+ "overrides": {
47
+ "vite": "latest"
48
+ }
49
+ },
45
50
  "devDependencies": {
46
51
  "nuxt": "3.15.4"
47
52
  },