@lingui/conf 5.6.1 → 5.8.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 +19 -2
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -81,7 +81,14 @@ type CatalogFormatOptions = {
|
|
|
81
81
|
lineNumbers?: boolean;
|
|
82
82
|
disableSelectWarning?: boolean;
|
|
83
83
|
};
|
|
84
|
-
type
|
|
84
|
+
type OrderByFn = (a: {
|
|
85
|
+
messageId: string;
|
|
86
|
+
entry: ExtractedMessageType;
|
|
87
|
+
}, b: {
|
|
88
|
+
messageId: string;
|
|
89
|
+
entry: ExtractedMessageType;
|
|
90
|
+
}) => number;
|
|
91
|
+
type OrderBy = "messageId" | "message" | "origin" | OrderByFn;
|
|
85
92
|
type CatalogConfig = {
|
|
86
93
|
name?: string;
|
|
87
94
|
path: string;
|
|
@@ -213,6 +220,16 @@ type LinguiConfig = {
|
|
|
213
220
|
catalogsMergePath?: string;
|
|
214
221
|
/**
|
|
215
222
|
* Order of messages in catalog
|
|
223
|
+
* You can choose one of: `"messageId" | "message" | "origin"`.
|
|
224
|
+
*
|
|
225
|
+
* - `messageId` — Sorts by the message key. Not recommended if you use the source
|
|
226
|
+
* message as the key, as `messageId` is autogenerated and may lead to
|
|
227
|
+
* unexpected results.
|
|
228
|
+
* - `message` — Sorts by the message text and its context. **Recommended**.
|
|
229
|
+
* Messages are ordered alphabetically.
|
|
230
|
+
* - `origin` — Sorts by the location where the message was first defined.
|
|
231
|
+
*
|
|
232
|
+
* You can also provide a custom sorting function. See {@link OrderByFn} for the function signature.
|
|
216
233
|
*
|
|
217
234
|
* @default "message"
|
|
218
235
|
*/
|
|
@@ -335,4 +352,4 @@ declare function getConfig({ cwd, configPath, skipValidation, }?: {
|
|
|
335
352
|
skipValidation?: boolean;
|
|
336
353
|
}): LinguiConfigNormalized;
|
|
337
354
|
|
|
338
|
-
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, defineConfig, getConfig, makeConfig };
|
|
355
|
+
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, type OrderByFn, defineConfig, getConfig, makeConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -81,7 +81,14 @@ type CatalogFormatOptions = {
|
|
|
81
81
|
lineNumbers?: boolean;
|
|
82
82
|
disableSelectWarning?: boolean;
|
|
83
83
|
};
|
|
84
|
-
type
|
|
84
|
+
type OrderByFn = (a: {
|
|
85
|
+
messageId: string;
|
|
86
|
+
entry: ExtractedMessageType;
|
|
87
|
+
}, b: {
|
|
88
|
+
messageId: string;
|
|
89
|
+
entry: ExtractedMessageType;
|
|
90
|
+
}) => number;
|
|
91
|
+
type OrderBy = "messageId" | "message" | "origin" | OrderByFn;
|
|
85
92
|
type CatalogConfig = {
|
|
86
93
|
name?: string;
|
|
87
94
|
path: string;
|
|
@@ -213,6 +220,16 @@ type LinguiConfig = {
|
|
|
213
220
|
catalogsMergePath?: string;
|
|
214
221
|
/**
|
|
215
222
|
* Order of messages in catalog
|
|
223
|
+
* You can choose one of: `"messageId" | "message" | "origin"`.
|
|
224
|
+
*
|
|
225
|
+
* - `messageId` — Sorts by the message key. Not recommended if you use the source
|
|
226
|
+
* message as the key, as `messageId` is autogenerated and may lead to
|
|
227
|
+
* unexpected results.
|
|
228
|
+
* - `message` — Sorts by the message text and its context. **Recommended**.
|
|
229
|
+
* Messages are ordered alphabetically.
|
|
230
|
+
* - `origin` — Sorts by the location where the message was first defined.
|
|
231
|
+
*
|
|
232
|
+
* You can also provide a custom sorting function. See {@link OrderByFn} for the function signature.
|
|
216
233
|
*
|
|
217
234
|
* @default "message"
|
|
218
235
|
*/
|
|
@@ -335,4 +352,4 @@ declare function getConfig({ cwd, configPath, skipValidation, }?: {
|
|
|
335
352
|
skipValidation?: boolean;
|
|
336
353
|
}): LinguiConfigNormalized;
|
|
337
354
|
|
|
338
|
-
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, defineConfig, getConfig, makeConfig };
|
|
355
|
+
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, type OrderByFn, defineConfig, getConfig, makeConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -81,7 +81,14 @@ type CatalogFormatOptions = {
|
|
|
81
81
|
lineNumbers?: boolean;
|
|
82
82
|
disableSelectWarning?: boolean;
|
|
83
83
|
};
|
|
84
|
-
type
|
|
84
|
+
type OrderByFn = (a: {
|
|
85
|
+
messageId: string;
|
|
86
|
+
entry: ExtractedMessageType;
|
|
87
|
+
}, b: {
|
|
88
|
+
messageId: string;
|
|
89
|
+
entry: ExtractedMessageType;
|
|
90
|
+
}) => number;
|
|
91
|
+
type OrderBy = "messageId" | "message" | "origin" | OrderByFn;
|
|
85
92
|
type CatalogConfig = {
|
|
86
93
|
name?: string;
|
|
87
94
|
path: string;
|
|
@@ -213,6 +220,16 @@ type LinguiConfig = {
|
|
|
213
220
|
catalogsMergePath?: string;
|
|
214
221
|
/**
|
|
215
222
|
* Order of messages in catalog
|
|
223
|
+
* You can choose one of: `"messageId" | "message" | "origin"`.
|
|
224
|
+
*
|
|
225
|
+
* - `messageId` — Sorts by the message key. Not recommended if you use the source
|
|
226
|
+
* message as the key, as `messageId` is autogenerated and may lead to
|
|
227
|
+
* unexpected results.
|
|
228
|
+
* - `message` — Sorts by the message text and its context. **Recommended**.
|
|
229
|
+
* Messages are ordered alphabetically.
|
|
230
|
+
* - `origin` — Sorts by the location where the message was first defined.
|
|
231
|
+
*
|
|
232
|
+
* You can also provide a custom sorting function. See {@link OrderByFn} for the function signature.
|
|
216
233
|
*
|
|
217
234
|
* @default "message"
|
|
218
235
|
*/
|
|
@@ -335,4 +352,4 @@ declare function getConfig({ cwd, configPath, skipValidation, }?: {
|
|
|
335
352
|
skipValidation?: boolean;
|
|
336
353
|
}): LinguiConfigNormalized;
|
|
337
354
|
|
|
338
|
-
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, defineConfig, getConfig, makeConfig };
|
|
355
|
+
export { type CatalogConfig, type CatalogFormat, type CatalogFormatOptions, type CatalogFormatter, type CatalogType, type ExperimentalExtractorOptions, type ExtractedCatalogType, type ExtractedMessage, type ExtractedMessageType, type ExtractorCtx, type ExtractorType, type FallbackLocales, type LinguiConfig, type LinguiConfigNormalized, type MessageOrigin, type MessageType, type OrderBy, type OrderByFn, defineConfig, getConfig, makeConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/conf",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "Get lingui configuration from package.json",
|
|
6
6
|
"keywords": [
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@lingui/jest-mocks": "*",
|
|
46
46
|
"unbuild": "^2.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "83d0513bdda9ff14003a05d376c7fedf860dd7ee"
|
|
49
49
|
}
|