@lingui/babel-plugin-extract-messages 4.4.2 → 4.5.0
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 +20 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as BabelTypesNamespace from '@babel/types';
|
|
2
|
+
import { PluginObj } from '@babel/core';
|
|
3
|
+
|
|
4
|
+
type BabelTypes = typeof BabelTypesNamespace;
|
|
5
|
+
type ExtractedMessage = {
|
|
6
|
+
id: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
context?: string;
|
|
9
|
+
origin?: Origin;
|
|
10
|
+
comment?: string;
|
|
11
|
+
};
|
|
12
|
+
type ExtractPluginOpts = {
|
|
13
|
+
onMessageExtracted(msg: ExtractedMessage): void;
|
|
14
|
+
};
|
|
15
|
+
type Origin = [filename: string, line: number, column?: number];
|
|
16
|
+
declare function export_default({ types: t }: {
|
|
17
|
+
types: BabelTypes;
|
|
18
|
+
}): PluginObj;
|
|
19
|
+
|
|
20
|
+
export { type ExtractPluginOpts, type ExtractedMessage, type Origin, export_default as default };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as BabelTypesNamespace from '@babel/types';
|
|
2
|
+
import { PluginObj } from '@babel/core';
|
|
3
|
+
|
|
4
|
+
type BabelTypes = typeof BabelTypesNamespace;
|
|
5
|
+
type ExtractedMessage = {
|
|
6
|
+
id: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
context?: string;
|
|
9
|
+
origin?: Origin;
|
|
10
|
+
comment?: string;
|
|
11
|
+
};
|
|
12
|
+
type ExtractPluginOpts = {
|
|
13
|
+
onMessageExtracted(msg: ExtractedMessage): void;
|
|
14
|
+
};
|
|
15
|
+
type Origin = [filename: string, line: number, column?: number];
|
|
16
|
+
declare function export_default({ types: t }: {
|
|
17
|
+
types: BabelTypes;
|
|
18
|
+
}): PluginObj;
|
|
19
|
+
|
|
20
|
+
export { type ExtractPluginOpts, type ExtractedMessage, type Origin, export_default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,4 +17,4 @@ declare function export_default({ types: t }: {
|
|
|
17
17
|
types: BabelTypes;
|
|
18
18
|
}): PluginObj;
|
|
19
19
|
|
|
20
|
-
export { ExtractPluginOpts, ExtractedMessage, Origin, export_default as default };
|
|
20
|
+
export { type ExtractPluginOpts, type ExtractedMessage, type Origin, export_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/babel-plugin-extract-messages",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Babel plugin for collecting messages from source code for internationalization",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/traverse": "7.20.12",
|
|
45
45
|
"@babel/types": "^7.20.7",
|
|
46
46
|
"@lingui/jest-mocks": "*",
|
|
47
|
-
"unbuild": "
|
|
47
|
+
"unbuild": "2.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "62c92d1f8c60b3890bdda870f307fa780d423080"
|
|
50
50
|
}
|