@testforgejs/vue-test-plugin-i18n 1.0.0-beta.3 → 1.0.0-beta.4

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/dist/index.cjs CHANGED
@@ -46,7 +46,8 @@ var I18N_PLUGIN_NAME = "i18n";
46
46
  var i18nPlugin = {
47
47
  getName: () => I18N_PLUGIN_NAME,
48
48
  getDefinition: () => ({
49
- create: createI18nPlugin
49
+ create: createI18nPlugin,
50
+ supportsInstanceReferences: true
50
51
  }),
51
52
  getDefaultOptions: defaultOptions
52
53
  };
package/dist/index.d.cts CHANGED
@@ -1,13 +1,37 @@
1
1
  import { I18nOptions, I18n } from 'vue-i18n';
2
2
  import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
+ /**
5
+ * Stable TestForge identifier for the Vue I18n plugin.
6
+ *
7
+ * Use this identifier when declaring plugin configuration
8
+ * in presets and other plugin-aware TestForge APIs.
9
+ */
4
10
  declare const I18N_PLUGIN_NAME: "i18n";
5
11
 
6
12
  /**
7
13
  * Configuration options for the Vue I18n test plugin.
8
14
  *
9
- * This interface integrates standard internationalization parameters (`I18nOptions` from `vue-i18n`)
10
- * with TestForge test kernel control options.
15
+ * Combines standard Vue I18n configuration (`I18nOptions` from `vue-i18n`)
16
+ * with TestForge plugin control options.
17
+ *
18
+ * @example
19
+ * Configure the managed Vue I18n plugin for a component test:
20
+ *
21
+ * ```ts
22
+ * factory({}, {
23
+ * plugins: {
24
+ * i18n: {
25
+ * locale: "en",
26
+ * messages: {
27
+ * en: {
28
+ * hello: "Hello World",
29
+ * },
30
+ * },
31
+ * },
32
+ * },
33
+ * });
34
+ * ```
11
35
  *
12
36
  * @see {@link I18nOptions} for configuring locales, fallback languages, and translation messages.
13
37
  * @see {@link PluginControlOptions} for instance capturing and exposure mechanisms.
@@ -17,10 +41,8 @@ type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
17
41
  /**
18
42
  * TestForge core type augmentation for Vue I18n integration.
19
43
  *
20
- * This module registers the i18n configuration under the global plugin options map,
21
- * enabling full type safety when defining internationalization options in tests.
22
- *
23
- * @module I18nAugmentation
44
+ * Registers the public plugin configuration and runtime instance types
45
+ * used by TestForge's managed plugin APIs.
24
46
  */
25
47
  declare module "@testforgejs/vue-test-core" {
26
48
  /**
@@ -28,28 +50,26 @@ declare module "@testforgejs/vue-test-core" {
28
50
  */
29
51
  interface PluginOptionsMap {
30
52
  /**
31
- * Configuration for the `i18n` plugin.
32
- * Accepts a {@link VueTestI18nOptions} object to manage localization and translations.
33
- *
34
- * @example
35
- * ```ts
36
- * factory({}, {
37
- * plugins: {
38
- * i18n: {
39
- * locale: "en",
40
- * messages: { en: { hello: "Hello World" } }
41
- * }
42
- * }
43
- * });
44
- * ```
53
+ * Configuration accepted by the managed `i18n` plugin.
45
54
  */
46
55
  [I18N_PLUGIN_NAME]: VueTestI18nOptions;
47
56
  }
57
+ /**
58
+ * Global map for managed plugin runtime instances.
59
+ */
60
+ interface PluginInstanceMap {
61
+ /**
62
+ * Runtime Vue I18n instance created by the managed `i18n` plugin.
63
+ */
64
+ [I18N_PLUGIN_NAME]: I18n;
65
+ }
48
66
  }
49
67
 
50
68
  /**
51
- * Vue I18n plugin module definition for the TestForge framework.
52
- * Automatically handles internationalization setup inside test environments.
69
+ * Managed Vue I18n plugin module for TestForge.
70
+ *
71
+ * Provides the runtime definition for creating Vue I18n instances
72
+ * and exposes the default configuration used by TestForge-managed presets.
53
73
  */
54
74
  declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
55
75
 
package/dist/index.d.ts CHANGED
@@ -1,13 +1,37 @@
1
1
  import { I18nOptions, I18n } from 'vue-i18n';
2
2
  import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
+ /**
5
+ * Stable TestForge identifier for the Vue I18n plugin.
6
+ *
7
+ * Use this identifier when declaring plugin configuration
8
+ * in presets and other plugin-aware TestForge APIs.
9
+ */
4
10
  declare const I18N_PLUGIN_NAME: "i18n";
5
11
 
6
12
  /**
7
13
  * Configuration options for the Vue I18n test plugin.
8
14
  *
9
- * This interface integrates standard internationalization parameters (`I18nOptions` from `vue-i18n`)
10
- * with TestForge test kernel control options.
15
+ * Combines standard Vue I18n configuration (`I18nOptions` from `vue-i18n`)
16
+ * with TestForge plugin control options.
17
+ *
18
+ * @example
19
+ * Configure the managed Vue I18n plugin for a component test:
20
+ *
21
+ * ```ts
22
+ * factory({}, {
23
+ * plugins: {
24
+ * i18n: {
25
+ * locale: "en",
26
+ * messages: {
27
+ * en: {
28
+ * hello: "Hello World",
29
+ * },
30
+ * },
31
+ * },
32
+ * },
33
+ * });
34
+ * ```
11
35
  *
12
36
  * @see {@link I18nOptions} for configuring locales, fallback languages, and translation messages.
13
37
  * @see {@link PluginControlOptions} for instance capturing and exposure mechanisms.
@@ -17,10 +41,8 @@ type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
17
41
  /**
18
42
  * TestForge core type augmentation for Vue I18n integration.
19
43
  *
20
- * This module registers the i18n configuration under the global plugin options map,
21
- * enabling full type safety when defining internationalization options in tests.
22
- *
23
- * @module I18nAugmentation
44
+ * Registers the public plugin configuration and runtime instance types
45
+ * used by TestForge's managed plugin APIs.
24
46
  */
25
47
  declare module "@testforgejs/vue-test-core" {
26
48
  /**
@@ -28,28 +50,26 @@ declare module "@testforgejs/vue-test-core" {
28
50
  */
29
51
  interface PluginOptionsMap {
30
52
  /**
31
- * Configuration for the `i18n` plugin.
32
- * Accepts a {@link VueTestI18nOptions} object to manage localization and translations.
33
- *
34
- * @example
35
- * ```ts
36
- * factory({}, {
37
- * plugins: {
38
- * i18n: {
39
- * locale: "en",
40
- * messages: { en: { hello: "Hello World" } }
41
- * }
42
- * }
43
- * });
44
- * ```
53
+ * Configuration accepted by the managed `i18n` plugin.
45
54
  */
46
55
  [I18N_PLUGIN_NAME]: VueTestI18nOptions;
47
56
  }
57
+ /**
58
+ * Global map for managed plugin runtime instances.
59
+ */
60
+ interface PluginInstanceMap {
61
+ /**
62
+ * Runtime Vue I18n instance created by the managed `i18n` plugin.
63
+ */
64
+ [I18N_PLUGIN_NAME]: I18n;
65
+ }
48
66
  }
49
67
 
50
68
  /**
51
- * Vue I18n plugin module definition for the TestForge framework.
52
- * Automatically handles internationalization setup inside test environments.
69
+ * Managed Vue I18n plugin module for TestForge.
70
+ *
71
+ * Provides the runtime definition for creating Vue I18n instances
72
+ * and exposes the default configuration used by TestForge-managed presets.
53
73
  */
54
74
  declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
55
75
 
package/dist/index.js CHANGED
@@ -18,7 +18,8 @@ var I18N_PLUGIN_NAME = "i18n";
18
18
  var i18nPlugin = {
19
19
  getName: () => I18N_PLUGIN_NAME,
20
20
  getDefinition: () => ({
21
- create: createI18nPlugin
21
+ create: createI18nPlugin,
22
+ supportsInstanceReferences: true
22
23
  }),
23
24
  getDefaultOptions: defaultOptions
24
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testforgejs/vue-test-plugin-i18n",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "Official TestForge plugin for vue-i18n integration in component tests",
6
6
  "homepage": "https://github.com/testforgejs/testforge#readme",
@@ -44,11 +44,11 @@
44
44
  "author": "Roman Levchenko",
45
45
  "peerDependencies": {
46
46
  "vue-i18n": ">=9.0.0 <12.0.0",
47
- "@testforgejs/vue-test-core": "1.0.0-beta.3"
47
+ "@testforgejs/vue-test-core": "1.0.0-beta.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "vue-i18n": "^11.4.8",
51
- "@testforgejs/vue-test-core": "1.0.0-beta.3"
51
+ "@testforgejs/vue-test-core": "1.0.0-beta.4"
52
52
  },
53
53
  "testforge": {
54
54
  "plugin": {