@devcoffee/nuxt-core 1.6.0 → 1.6.1

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.6.1
4
+
5
+ [compare changes](https://github.com/coolkg1412/devcoffee-nuxt-core/compare/v1.6.0...v1.6.1)
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - Enhance Nuxt app integration by adding $formatters to NuxtApp interface ([e4e3bec](https://github.com/coolkg1412/devcoffee-nuxt-core/commit/e4e3bec))
10
+
11
+ ### ❤️ Contributors
12
+
13
+ - Hieu Nguyen <hieu.nguyen@devcoffee.tech>
14
+
3
15
  ## v1.6.0
4
16
 
5
17
  [compare changes](https://github.com/coolkg1412/devcoffee-nuxt-core/compare/v1.5.1...v1.6.0)
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-core",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "configKey": "nuxtCore",
5
5
  "compatibility": {
6
6
  "nuxt": "^4.0.0"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { addCustomTab } from '@nuxt/devtools-kit';
2
2
  import { defineNuxtModule, useLogger, createResolver, addTemplate, addServerImports, addServerImportsDir, addServerPlugin, addImportsDir, addPlugin, addRouteMiddleware, addServerHandler } from '@nuxt/kit';
3
3
  import { deepMerge, pick } from '../dist/runtime/utils.js';
4
4
 
5
- const version = "1.6.0";
5
+ const version = "1.6.1";
6
6
 
7
7
  const defaultLocale = "vi-VN";
8
8
  const defaultLanguage = "vi";
@@ -42,6 +42,11 @@ declare module 'vue' {
42
42
  $formatters: PluginProviders;
43
43
  }
44
44
  }
45
+ declare module '#app' {
46
+ interface NuxtApp {
47
+ $formatters: PluginProviders;
48
+ }
49
+ }
45
50
  /**
46
51
  * 🧩 Nuxt plugin for global data formatting utilities.
47
52
  *
@@ -108,13 +108,17 @@ export default defineNuxtPlugin((_nuxtApp) => {
108
108
  }
109
109
  return asDateTimeString(date, true);
110
110
  }
111
- _nuxtApp.provide("formatters", {
112
- toPad,
113
- toFormattedSize,
114
- asPhoneText,
115
- asDateString,
116
- asTimeString,
117
- asDateTimeString,
118
- asRelativeTimeString
119
- });
111
+ return {
112
+ provide: {
113
+ formatters: {
114
+ toPad,
115
+ toFormattedSize,
116
+ asPhoneText,
117
+ asDateString,
118
+ asTimeString,
119
+ asDateTimeString,
120
+ asRelativeTimeString
121
+ }
122
+ }
123
+ };
120
124
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devcoffee/nuxt-core",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },