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

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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { I18nOptions, I18n } from 'vue-i18n';
2
- import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
2
+ import { RuntimePluginOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
4
  /**
5
5
  * Stable TestForge identifier for the Vue I18n plugin.
@@ -12,8 +12,11 @@ declare const I18N_PLUGIN_NAME: "i18n";
12
12
  /**
13
13
  * Configuration options for the Vue I18n test plugin.
14
14
  *
15
- * Combines standard Vue I18n configuration (`I18nOptions` from `vue-i18n`)
16
- * with TestForge plugin control options.
15
+ * Uses native Vue I18n options for configuring the i18n instance
16
+ * created by TestForge.
17
+ *
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
17
20
  *
18
21
  * @example
19
22
  * Configure the managed Vue I18n plugin for a component test:
@@ -33,10 +36,28 @@ declare const I18N_PLUGIN_NAME: "i18n";
33
36
  * });
34
37
  * ```
35
38
  *
36
- * @see {@link I18nOptions} for configuring locales, fallback languages, and translation messages.
37
- * @see {@link PluginControlOptions} for instance capturing and exposure mechanisms.
39
+ * @see `I18nOptions` from `vue-i18n` for configuring locales,
40
+ * fallback languages, and translation messages.
41
+ */
42
+ type VueTestI18nOptions = I18nOptions;
43
+ /**
44
+ * Resolved runtime options for the managed Vue I18n test plugin.
45
+ *
46
+ * Combines {@link VueTestI18nOptions} with the internal TestForge
47
+ * controls used to create, reuse, and expose an {@link I18n} instance.
48
+ *
49
+ * These options are passed to `createI18nPlugin()` after the Mount Pipeline
50
+ * has resolved the plugin configuration.
51
+ *
52
+ * Input metadata provided through `withPluginInstance()` is processed
53
+ * before this stage and is not part of the resolved runtime options.
54
+ *
55
+ * @internal
56
+ *
57
+ * @see {@link VueTestI18nOptions}
58
+ * @see `RuntimePluginOptions` from `@testforgejs/vue-test-core`.
38
59
  */
39
- type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
60
+ type I18nRuntimeOptions = RuntimePluginOptions<I18n, VueTestI18nOptions>;
40
61
 
41
62
  /**
42
63
  * TestForge core type augmentation for Vue I18n integration.
@@ -68,9 +89,10 @@ declare module "@testforgejs/vue-test-core" {
68
89
  /**
69
90
  * Managed Vue I18n plugin module for TestForge.
70
91
  *
71
- * Provides the runtime definition for creating Vue I18n instances
72
- * and exposes the default configuration used by TestForge-managed presets.
92
+ * Provides the runtime definition for creating or reusing Vue I18n
93
+ * instances and exposes a default configuration factory
94
+ * that presets can explicitly opt into.
73
95
  */
74
96
  declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
75
97
 
76
- export { I18N_PLUGIN_NAME as PLUGIN_NAME, type VueTestI18nOptions, i18nPlugin, i18nPlugin as plugin };
98
+ export { type I18nRuntimeOptions, I18N_PLUGIN_NAME as PLUGIN_NAME, type VueTestI18nOptions as PluginOptions, type VueTestI18nOptions, i18nPlugin, i18nPlugin as plugin };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { I18nOptions, I18n } from 'vue-i18n';
2
- import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
2
+ import { RuntimePluginOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
4
  /**
5
5
  * Stable TestForge identifier for the Vue I18n plugin.
@@ -12,8 +12,11 @@ declare const I18N_PLUGIN_NAME: "i18n";
12
12
  /**
13
13
  * Configuration options for the Vue I18n test plugin.
14
14
  *
15
- * Combines standard Vue I18n configuration (`I18nOptions` from `vue-i18n`)
16
- * with TestForge plugin control options.
15
+ * Uses native Vue I18n options for configuring the i18n instance
16
+ * created by TestForge.
17
+ *
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
17
20
  *
18
21
  * @example
19
22
  * Configure the managed Vue I18n plugin for a component test:
@@ -33,10 +36,28 @@ declare const I18N_PLUGIN_NAME: "i18n";
33
36
  * });
34
37
  * ```
35
38
  *
36
- * @see {@link I18nOptions} for configuring locales, fallback languages, and translation messages.
37
- * @see {@link PluginControlOptions} for instance capturing and exposure mechanisms.
39
+ * @see `I18nOptions` from `vue-i18n` for configuring locales,
40
+ * fallback languages, and translation messages.
41
+ */
42
+ type VueTestI18nOptions = I18nOptions;
43
+ /**
44
+ * Resolved runtime options for the managed Vue I18n test plugin.
45
+ *
46
+ * Combines {@link VueTestI18nOptions} with the internal TestForge
47
+ * controls used to create, reuse, and expose an {@link I18n} instance.
48
+ *
49
+ * These options are passed to `createI18nPlugin()` after the Mount Pipeline
50
+ * has resolved the plugin configuration.
51
+ *
52
+ * Input metadata provided through `withPluginInstance()` is processed
53
+ * before this stage and is not part of the resolved runtime options.
54
+ *
55
+ * @internal
56
+ *
57
+ * @see {@link VueTestI18nOptions}
58
+ * @see `RuntimePluginOptions` from `@testforgejs/vue-test-core`.
38
59
  */
39
- type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
60
+ type I18nRuntimeOptions = RuntimePluginOptions<I18n, VueTestI18nOptions>;
40
61
 
41
62
  /**
42
63
  * TestForge core type augmentation for Vue I18n integration.
@@ -68,9 +89,10 @@ declare module "@testforgejs/vue-test-core" {
68
89
  /**
69
90
  * Managed Vue I18n plugin module for TestForge.
70
91
  *
71
- * Provides the runtime definition for creating Vue I18n instances
72
- * and exposes the default configuration used by TestForge-managed presets.
92
+ * Provides the runtime definition for creating or reusing Vue I18n
93
+ * instances and exposes a default configuration factory
94
+ * that presets can explicitly opt into.
73
95
  */
74
96
  declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
75
97
 
76
- export { I18N_PLUGIN_NAME as PLUGIN_NAME, type VueTestI18nOptions, i18nPlugin, i18nPlugin as plugin };
98
+ export { type I18nRuntimeOptions, I18N_PLUGIN_NAME as PLUGIN_NAME, type VueTestI18nOptions as PluginOptions, type VueTestI18nOptions, i18nPlugin, i18nPlugin as plugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testforgejs/vue-test-plugin-i18n",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
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.4"
47
+ "@testforgejs/vue-test-core": "1.0.0-beta.6"
48
48
  },
49
49
  "devDependencies": {
50
50
  "vue-i18n": "^11.4.8",
51
- "@testforgejs/vue-test-core": "1.0.0-beta.4"
51
+ "@testforgejs/vue-test-core": "1.0.0-beta.6"
52
52
  },
53
53
  "testforge": {
54
54
  "plugin": {