@testforgejs/vue-test-plugin-i18n 1.0.0-beta.3 → 1.0.0-beta.5
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 +2 -1
- package/dist/index.d.cts +47 -24
- package/dist/index.d.ts +47 -24
- package/dist/index.js +2 -1
- package/package.json +3 -3
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,26 +1,51 @@
|
|
|
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
|
-
*
|
|
10
|
-
*
|
|
15
|
+
* Combines native Vue I18n options with TestForge-specific
|
|
16
|
+
* controls for managed plugin instances.
|
|
17
|
+
*
|
|
18
|
+
* TestForge control options are validated as part of the plugin
|
|
19
|
+
* configuration and are not forwarded to the native Vue I18n factory.
|
|
11
20
|
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
21
|
+
* @example
|
|
22
|
+
* Configure the managed Vue I18n plugin for a component test:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* factory({}, {
|
|
26
|
+
* plugins: {
|
|
27
|
+
* i18n: {
|
|
28
|
+
* locale: "en",
|
|
29
|
+
* messages: {
|
|
30
|
+
* en: {
|
|
31
|
+
* hello: "Hello World",
|
|
32
|
+
* },
|
|
33
|
+
* },
|
|
34
|
+
* },
|
|
35
|
+
* },
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see `I18nOptions` from `vue-i18n` for configuring locales, fallback languages, and translation messages.
|
|
40
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
|
|
14
41
|
*/
|
|
15
42
|
type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
|
|
16
43
|
|
|
17
44
|
/**
|
|
18
45
|
* TestForge core type augmentation for Vue I18n integration.
|
|
19
46
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @module I18nAugmentation
|
|
47
|
+
* Registers the public plugin configuration and runtime instance types
|
|
48
|
+
* used by TestForge's managed plugin APIs.
|
|
24
49
|
*/
|
|
25
50
|
declare module "@testforgejs/vue-test-core" {
|
|
26
51
|
/**
|
|
@@ -28,28 +53,26 @@ declare module "@testforgejs/vue-test-core" {
|
|
|
28
53
|
*/
|
|
29
54
|
interface PluginOptionsMap {
|
|
30
55
|
/**
|
|
31
|
-
* Configuration
|
|
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
|
-
* ```
|
|
56
|
+
* Configuration accepted by the managed `i18n` plugin.
|
|
45
57
|
*/
|
|
46
58
|
[I18N_PLUGIN_NAME]: VueTestI18nOptions;
|
|
47
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Global map for managed plugin runtime instances.
|
|
62
|
+
*/
|
|
63
|
+
interface PluginInstanceMap {
|
|
64
|
+
/**
|
|
65
|
+
* Runtime Vue I18n instance created by the managed `i18n` plugin.
|
|
66
|
+
*/
|
|
67
|
+
[I18N_PLUGIN_NAME]: I18n;
|
|
68
|
+
}
|
|
48
69
|
}
|
|
49
70
|
|
|
50
71
|
/**
|
|
51
|
-
* Vue I18n plugin module
|
|
52
|
-
*
|
|
72
|
+
* Managed Vue I18n plugin module for TestForge.
|
|
73
|
+
*
|
|
74
|
+
* Provides the runtime definition for creating Vue I18n instances
|
|
75
|
+
* and exposes the default configuration used by TestForge-managed presets.
|
|
53
76
|
*/
|
|
54
77
|
declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
|
|
55
78
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,51 @@
|
|
|
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
|
-
*
|
|
10
|
-
*
|
|
15
|
+
* Combines native Vue I18n options with TestForge-specific
|
|
16
|
+
* controls for managed plugin instances.
|
|
17
|
+
*
|
|
18
|
+
* TestForge control options are validated as part of the plugin
|
|
19
|
+
* configuration and are not forwarded to the native Vue I18n factory.
|
|
11
20
|
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
21
|
+
* @example
|
|
22
|
+
* Configure the managed Vue I18n plugin for a component test:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* factory({}, {
|
|
26
|
+
* plugins: {
|
|
27
|
+
* i18n: {
|
|
28
|
+
* locale: "en",
|
|
29
|
+
* messages: {
|
|
30
|
+
* en: {
|
|
31
|
+
* hello: "Hello World",
|
|
32
|
+
* },
|
|
33
|
+
* },
|
|
34
|
+
* },
|
|
35
|
+
* },
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see `I18nOptions` from `vue-i18n` for configuring locales, fallback languages, and translation messages.
|
|
40
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
|
|
14
41
|
*/
|
|
15
42
|
type VueTestI18nOptions = I18nOptions & PluginControlOptions<I18n>;
|
|
16
43
|
|
|
17
44
|
/**
|
|
18
45
|
* TestForge core type augmentation for Vue I18n integration.
|
|
19
46
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @module I18nAugmentation
|
|
47
|
+
* Registers the public plugin configuration and runtime instance types
|
|
48
|
+
* used by TestForge's managed plugin APIs.
|
|
24
49
|
*/
|
|
25
50
|
declare module "@testforgejs/vue-test-core" {
|
|
26
51
|
/**
|
|
@@ -28,28 +53,26 @@ declare module "@testforgejs/vue-test-core" {
|
|
|
28
53
|
*/
|
|
29
54
|
interface PluginOptionsMap {
|
|
30
55
|
/**
|
|
31
|
-
* Configuration
|
|
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
|
-
* ```
|
|
56
|
+
* Configuration accepted by the managed `i18n` plugin.
|
|
45
57
|
*/
|
|
46
58
|
[I18N_PLUGIN_NAME]: VueTestI18nOptions;
|
|
47
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Global map for managed plugin runtime instances.
|
|
62
|
+
*/
|
|
63
|
+
interface PluginInstanceMap {
|
|
64
|
+
/**
|
|
65
|
+
* Runtime Vue I18n instance created by the managed `i18n` plugin.
|
|
66
|
+
*/
|
|
67
|
+
[I18N_PLUGIN_NAME]: I18n;
|
|
68
|
+
}
|
|
48
69
|
}
|
|
49
70
|
|
|
50
71
|
/**
|
|
51
|
-
* Vue I18n plugin module
|
|
52
|
-
*
|
|
72
|
+
* Managed Vue I18n plugin module for TestForge.
|
|
73
|
+
*
|
|
74
|
+
* Provides the runtime definition for creating Vue I18n instances
|
|
75
|
+
* and exposes the default configuration used by TestForge-managed presets.
|
|
53
76
|
*/
|
|
54
77
|
declare const i18nPlugin: PluginModuleWithDefaults<I18n, VueTestI18nOptions>;
|
|
55
78
|
|
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
|
+
"version": "1.0.0-beta.5",
|
|
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.
|
|
47
|
+
"@testforgejs/vue-test-core": "1.0.0-beta.5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"vue-i18n": "^11.4.8",
|
|
51
|
-
"@testforgejs/vue-test-core": "1.0.0-beta.
|
|
51
|
+
"@testforgejs/vue-test-core": "1.0.0-beta.5"
|
|
52
52
|
},
|
|
53
53
|
"testforge": {
|
|
54
54
|
"plugin": {
|