@discord/intl-message-database 0.22.1 → 0.23.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/index.d.ts +6 -11
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export declare class IntlMessagesDatabase {
|
|
|
18
18
|
* map is the hashed name and the value is the original.
|
|
19
19
|
*/
|
|
20
20
|
getSourceFileKeyMap(filePath: string): Record<string, string>
|
|
21
|
+
/**
|
|
22
|
+
* Return file paths for all definitions files with a translations path meta value that would
|
|
23
|
+
* include the given `translationPath`. This can be used to add reverse dependencies, and
|
|
24
|
+
* safely cache translations files with appropriate change detection.
|
|
25
|
+
*/
|
|
26
|
+
getDefinitionsFilesForTranslationsPath(translationsPath: string): Array<string>
|
|
21
27
|
getMessage(key: string): IntlMessage
|
|
22
28
|
generateTypes(sourceFilePath: string, outputFilePath: string): void
|
|
23
29
|
precompile(filePath: string, locale: string, outputPath: string, options?: IntlMessageBundlerOptions | undefined | null): void
|
|
@@ -27,13 +33,6 @@ export declare class IntlMessagesDatabase {
|
|
|
27
33
|
getSourceFileMessageValues(filePath: string): Record<string, IntlMessageValue | undefined>
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
export declare class Message {
|
|
31
|
-
key: string
|
|
32
|
-
value: string
|
|
33
|
-
line: number
|
|
34
|
-
col: number
|
|
35
|
-
}
|
|
36
|
-
|
|
37
36
|
export declare function hashMessageKey(key: string): string
|
|
38
37
|
|
|
39
38
|
export declare const enum IntlCompiledMessageFormat {
|
|
@@ -132,7 +131,3 @@ export declare function isMessageDefinitionsFile(key: string): boolean
|
|
|
132
131
|
|
|
133
132
|
export declare function isMessageTranslationsFile(key: string): boolean
|
|
134
133
|
|
|
135
|
-
export declare function parseJson(text: string): Message[]
|
|
136
|
-
|
|
137
|
-
export declare function parseJsonFile(filePath: string): Message[]
|
|
138
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discord/intl-message-database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Rust-based Node extension module for parsing, extracting, and managing messages and translations across a project.",
|
|
6
6
|
"author": "Jon Egeland",
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"url": "https://github.com/discord/discord-intl"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@discord/intl-message-database-darwin-
|
|
19
|
-
"@discord/intl-message-database-darwin-
|
|
20
|
-
"@discord/intl-message-database-linux-arm64-gnu": "0.
|
|
21
|
-
"@discord/intl-message-database-linux-arm64-musl": "0.
|
|
22
|
-
"@discord/intl-message-database-linux-x64-gnu": "0.
|
|
23
|
-
"@discord/intl-message-database-
|
|
24
|
-
"@discord/intl-message-database-
|
|
25
|
-
"@discord/intl-message-database-win32-ia32-msvc": "0.
|
|
26
|
-
"@discord/intl-message-database-win32-
|
|
18
|
+
"@discord/intl-message-database-darwin-arm64": "0.23.1",
|
|
19
|
+
"@discord/intl-message-database-darwin-x64": "0.23.1",
|
|
20
|
+
"@discord/intl-message-database-linux-arm64-gnu": "0.23.1",
|
|
21
|
+
"@discord/intl-message-database-linux-arm64-musl": "0.23.1",
|
|
22
|
+
"@discord/intl-message-database-linux-x64-gnu": "0.23.1",
|
|
23
|
+
"@discord/intl-message-database-win32-x64-msvc": "0.23.1",
|
|
24
|
+
"@discord/intl-message-database-linux-x64-musl": "0.23.1",
|
|
25
|
+
"@discord/intl-message-database-win32-ia32-msvc": "0.23.1",
|
|
26
|
+
"@discord/intl-message-database-win32-arm64-msvc": "0.23.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@napi-rs/cli": "^2.18.3",
|
|
30
|
-
"@discord/intl-ast": "0.
|
|
30
|
+
"@discord/intl-ast": "0.23.1"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">= 10"
|