@lingui/conf 3.14.0 → 3.16.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/CHANGELOG.md ADDED
@@ -0,0 +1,378 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [3.16.0](https://github.com/lingui/js-lingui/compare/v3.15.0...v3.16.0) (2023-01-18)
7
+
8
+ **Note:** Version bump only for package @lingui/conf
9
+
10
+
11
+
12
+
13
+
14
+ # [3.15.0](https://github.com/lingui/js-lingui/compare/v3.14.0...v3.15.0) (2022-11-07)
15
+
16
+
17
+ ### Features
18
+
19
+ * Switch to cosmiconfig-typescript-loader [#1247](https://github.com/lingui/js-lingui/issues/1247) ([118d183](https://github.com/lingui/js-lingui/commit/118d183805d6cfe160e6160ebd6cf6b4ed338c03))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.14.0](https://github.com/lingui/js-lingui/compare/v3.13.3...v3.14.0) (2022-06-22)
26
+
27
+ **Note:** Version bump only for package @lingui/conf
28
+
29
+
30
+
31
+
32
+
33
+ ## [3.13.3](https://github.com/lingui/js-lingui/compare/v3.13.2...v3.13.3) (2022-04-24)
34
+
35
+ **Note:** Version bump only for package @lingui/conf
36
+
37
+
38
+
39
+
40
+
41
+ ## [3.13.2](https://github.com/lingui/js-lingui/compare/v3.13.1...v3.13.2) (2022-01-24)
42
+
43
+ **Note:** Version bump only for package @lingui/conf
44
+
45
+
46
+
47
+
48
+
49
+ ## [3.13.1](https://github.com/lingui/js-lingui/compare/v3.13.0...v3.13.1) (2022-01-21)
50
+
51
+ **Note:** Version bump only for package @lingui/conf
52
+
53
+
54
+
55
+
56
+
57
+ # [3.13.0](https://github.com/lingui/js-lingui/compare/v3.12.1...v3.13.0) (2021-11-26)
58
+
59
+ **Note:** Version bump only for package @lingui/conf
60
+
61
+
62
+
63
+
64
+
65
+ ## [3.12.1](https://github.com/lingui/js-lingui/compare/v3.12.0...v3.12.1) (2021-09-28)
66
+
67
+ **Note:** Version bump only for package @lingui/conf
68
+
69
+
70
+
71
+
72
+
73
+ # [3.12.0](https://github.com/lingui/js-lingui/compare/v3.11.1...v3.12.0) (2021-09-28)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * Add missing babel properties to config validation ([#1135](https://github.com/lingui/js-lingui/issues/1135)) ([6b2d662](https://github.com/lingui/js-lingui/commit/6b2d6622b715e95b914b14df17501cc486ec45f4))
79
+
80
+
81
+
82
+
83
+
84
+ ## [3.11.1](https://github.com/lingui/js-lingui/compare/v3.11.0...v3.11.1) (2021-09-07)
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * cli and conf needed hotfix for [#1110](https://github.com/lingui/js-lingui/issues/1110) ([1c6378d](https://github.com/lingui/js-lingui/commit/1c6378daa84f77757f99f6e592f6cb0e1fe02ebd))
90
+
91
+
92
+
93
+
94
+
95
+ # [3.11.0](https://github.com/lingui/js-lingui/compare/v3.10.4...v3.11.0) (2021-09-07)
96
+
97
+
98
+ ### Bug Fixes
99
+
100
+ * extractors CLI validation and accept require and require.resolve ([#1126](https://github.com/lingui/js-lingui/issues/1126)) ([c50a06e](https://github.com/lingui/js-lingui/commit/c50a06eac65d71853ec2c29905a0c4883a5cc70d))
101
+ * fix testing suite [#1098](https://github.com/lingui/js-lingui/issues/1098) ([1144cc7](https://github.com/lingui/js-lingui/commit/1144cc782b25113366245922131e58bc40b2047d))
102
+ * sideEffects to false for shrinking bundle size ([#1129](https://github.com/lingui/js-lingui/issues/1129)) ([57cd2e5](https://github.com/lingui/js-lingui/commit/57cd2e576945ba30aea30d5cf5bcb27d1f77fe4c))
103
+ * unicode chars were removed from .po files when extracting ([#1125](https://github.com/lingui/js-lingui/issues/1125)) ([d688329](https://github.com/lingui/js-lingui/commit/d688329c0457a080d5cd485a95e94ffa5e00c5ae))
104
+
105
+
106
+ ### Features
107
+
108
+ * Cloud service providers & Translation.io ([#1107](https://github.com/lingui/js-lingui/issues/1107)) ([cbc87b5](https://github.com/lingui/js-lingui/commit/cbc87b5dab8daf0cd2217b2a2525dfd12dad7272))
109
+
110
+
111
+
112
+
113
+
114
+ ## [3.10.4](https://github.com/lingui/js-lingui/compare/v3.10.3...v3.10.4) (2021-06-16)
115
+
116
+ **Note:** Version bump only for package @lingui/conf
117
+
118
+
119
+
120
+
121
+
122
+ ## [3.10.3](https://github.com/lingui/js-lingui/compare/v3.10.2...v3.10.3) (2021-06-14)
123
+
124
+ **Note:** Version bump only for package @lingui/conf
125
+
126
+
127
+
128
+
129
+
130
+ ## [3.10.2](https://github.com/lingui/js-lingui/compare/v3.10.1...v3.10.2) (2021-06-08)
131
+
132
+ **Note:** Version bump only for package @lingui/conf
133
+
134
+
135
+
136
+
137
+
138
+ ## [3.10.1](https://github.com/lingui/js-lingui/compare/v3.10.0...v3.10.1) (2021-06-08)
139
+
140
+ **Note:** Version bump only for package @lingui/conf
141
+
142
+
143
+
144
+
145
+
146
+ # [3.10.0](https://github.com/lingui/js-lingui/compare/v3.9.0...v3.10.0) (2021-06-08)
147
+
148
+ **Note:** Version bump only for package @lingui/conf
149
+
150
+
151
+
152
+
153
+
154
+ # [3.9.0](https://github.com/lingui/js-lingui/compare/v3.8.10...v3.9.0) (2021-05-18)
155
+
156
+
157
+ ### Features
158
+
159
+ * configurable and extendable extractors with Lingui config ([#1065](https://github.com/lingui/js-lingui/issues/1065)) ([263ee59](https://github.com/lingui/js-lingui/commit/263ee59163c94220f5ba3999aa60ca40dc352e0c))
160
+
161
+
162
+
163
+
164
+
165
+ ## [3.8.10](https://github.com/lingui/js-lingui/compare/v3.8.9...v3.8.10) (2021-04-19)
166
+
167
+ **Note:** Version bump only for package @lingui/conf
168
+
169
+
170
+
171
+
172
+
173
+ ## [3.8.9](https://github.com/lingui/js-lingui/compare/v3.8.8...v3.8.9) (2021-04-09)
174
+
175
+ **Note:** Version bump only for package @lingui/conf
176
+
177
+
178
+
179
+
180
+
181
+ ## [3.8.8](https://github.com/lingui/js-lingui/compare/v3.8.7...v3.8.8) (2021-04-09)
182
+
183
+ **Note:** Version bump only for package @lingui/conf
184
+
185
+
186
+
187
+
188
+
189
+ ## [3.8.7](https://github.com/lingui/js-lingui/compare/v3.8.6...v3.8.7) (2021-04-09)
190
+
191
+ **Note:** Version bump only for package @lingui/conf
192
+
193
+
194
+
195
+
196
+
197
+ ## [3.8.6](https://github.com/lingui/js-lingui/compare/v3.8.5...v3.8.6) (2021-04-08)
198
+
199
+ **Note:** Version bump only for package @lingui/conf
200
+
201
+
202
+
203
+
204
+
205
+ ## [3.8.5](https://github.com/lingui/js-lingui/compare/v3.8.4...v3.8.5) (2021-04-08)
206
+
207
+ **Note:** Version bump only for package @lingui/conf
208
+
209
+
210
+
211
+
212
+
213
+ ## [3.8.4](https://github.com/lingui/js-lingui/compare/v3.8.3...v3.8.4) (2021-04-08)
214
+
215
+
216
+ ### Bug Fixes
217
+
218
+ * typescript loader config ([#1029](https://github.com/lingui/js-lingui/issues/1029)) ([93afb72](https://github.com/lingui/js-lingui/commit/93afb72c1d6235df1516655d5ab4eea0eeb606ee))
219
+
220
+
221
+
222
+
223
+
224
+ ## [3.8.3](https://github.com/lingui/js-lingui/compare/v3.8.2...v3.8.3) (2021-04-05)
225
+
226
+ **Note:** Version bump only for package @lingui/conf
227
+
228
+
229
+
230
+
231
+
232
+ ## [3.8.2](https://github.com/lingui/js-lingui/compare/v3.8.1...v3.8.2) (2021-03-31)
233
+
234
+ **Note:** Version bump only for package @lingui/conf
235
+
236
+
237
+
238
+
239
+
240
+ ## [3.8.1](https://github.com/lingui/js-lingui/compare/v3.8.0...v3.8.1) (2021-03-23)
241
+
242
+
243
+ ### Bug Fixes
244
+
245
+ * fallback locales default not overwritten ([78e4576](https://github.com/lingui/js-lingui/commit/78e45766fda0c147b77f96d71e9d775743ee8d18))
246
+
247
+
248
+
249
+
250
+
251
+ # [3.8.0](https://github.com/lingui/js-lingui/compare/v3.7.2...v3.8.0) (2021-03-23)
252
+
253
+
254
+ ### Features
255
+
256
+ * allow to disable lineNumbers ([#1007](https://github.com/lingui/js-lingui/issues/1007)) ([fe67e0f](https://github.com/lingui/js-lingui/commit/fe67e0f7986188bff2c102703c4df3507506e0f2))
257
+
258
+
259
+
260
+
261
+
262
+ ## [3.7.2](https://github.com/lingui/js-lingui/compare/v3.7.1...v3.7.2) (2021-03-14)
263
+
264
+ **Note:** Version bump only for package @lingui/conf
265
+
266
+
267
+
268
+
269
+
270
+ ## [3.7.1](https://github.com/lingui/js-lingui/compare/v3.7.0...v3.7.1) (2021-03-07)
271
+
272
+ **Note:** Version bump only for package @lingui/conf
273
+
274
+
275
+
276
+
277
+
278
+ # [3.7.0](https://github.com/lingui/js-lingui/compare/v3.6.0...v3.7.0) (2021-03-04)
279
+
280
+ **Note:** Version bump only for package @lingui/conf
281
+
282
+
283
+
284
+
285
+
286
+ # [3.6.0](https://github.com/lingui/js-lingui/compare/v3.5.1...v3.6.0) (2021-02-23)
287
+
288
+ **Note:** Version bump only for package @lingui/conf
289
+
290
+
291
+
292
+
293
+
294
+ ## [3.5.1](https://github.com/lingui/js-lingui/compare/v3.5.0...v3.5.1) (2021-02-09)
295
+
296
+
297
+ ### Bug Fixes
298
+
299
+ * runtimeConfigModule config validation ([#972](https://github.com/lingui/js-lingui/issues/972)) ([5656c95](https://github.com/lingui/js-lingui/commit/5656c95b8b2ecfdfe903a941918c60abe16e1691))
300
+
301
+
302
+
303
+
304
+
305
+ # [3.5.0](https://github.com/lingui/js-lingui/compare/v3.4.0...v3.5.0) (2021-02-02)
306
+
307
+
308
+ ### Bug Fixes
309
+
310
+ * @lingui/conf lodash.get dependency ([#950](https://github.com/lingui/js-lingui/issues/950)) ([f7b59ab](https://github.com/lingui/js-lingui/commit/f7b59abbcfc8bd797478a549641ca9e3b97a9701))
311
+
312
+
313
+
314
+
315
+
316
+ # [3.4.0](https://github.com/lingui/js-lingui/compare/v3.3.0...v3.4.0) (2021-01-13)
317
+
318
+
319
+ ### Bug Fixes
320
+
321
+ * compilerBabelOptions warning with jest-validate ([#938](https://github.com/lingui/js-lingui/issues/938)) ([087ec1f](https://github.com/lingui/js-lingui/commit/087ec1fe45076bcfc8ea3a6f7657f39bbe1c1d58))
322
+
323
+
324
+ ### Features
325
+
326
+ * Lingui compiles to typescript files ([#942](https://github.com/lingui/js-lingui/issues/942)) ([10bce7d](https://github.com/lingui/js-lingui/commit/10bce7dc890f208dc71bcf81dc34e57d389544fe))
327
+ * Support lingui config in multiple formats ([#941](https://github.com/lingui/js-lingui/issues/941)) ([8631111](https://github.com/lingui/js-lingui/commit/8631111a83c5f2fb87e7b6d794a279dbf7e8579d))
328
+
329
+
330
+
331
+
332
+
333
+ # [3.3.0](https://github.com/lingui/js-lingui/compare/v3.2.3...v3.3.0) (2020-12-08)
334
+
335
+
336
+ ### Features
337
+
338
+ * add support for runtimeConfigModule w/ Trans ([#895](https://github.com/lingui/js-lingui/issues/895)) ([23b06b5](https://github.com/lingui/js-lingui/commit/23b06b5dfbf0db306cdfab83801898caceb5a8b0))
339
+ * config accepts compilerBabelOptions ([#906](https://github.com/lingui/js-lingui/issues/906)) ([38d01ef](https://github.com/lingui/js-lingui/commit/38d01ef13a7867460b68ab709f94a17176a21f25))
340
+ * Implement gettext plurals for PO files ([#677](https://github.com/lingui/js-lingui/issues/677)) ([415b90e](https://github.com/lingui/js-lingui/commit/415b90e0abfb24bb7170a5ba7630a4ead94898dd))
341
+
342
+
343
+
344
+
345
+
346
+ ## [3.2.3](https://github.com/lingui/js-lingui/compare/v3.2.2...v3.2.3) (2020-11-22)
347
+
348
+ **Note:** Version bump only for package @lingui/conf
349
+
350
+
351
+
352
+
353
+
354
+ ## [3.2.2](https://github.com/lingui/js-lingui/compare/v3.2.1...v3.2.2) (2020-11-20)
355
+
356
+
357
+ ### Bug Fixes
358
+
359
+ * fallbackLocales overriden if parent found ([a53e12f](https://github.com/lingui/js-lingui/commit/a53e12f19cebeb6412debc9dace0b4a45aa17624))
360
+
361
+
362
+
363
+
364
+
365
+ # [3.2.0](https://github.com/lingui/js-lingui/compare/v3.1.0...v3.2.0) (2020-11-12)
366
+
367
+ **Note:** Version bump only for package @lingui/conf
368
+
369
+
370
+
371
+
372
+
373
+ # [3.1.0](https://github.com/lingui/js-lingui/compare/v3.0.3...v3.1.0) (2020-11-10)
374
+
375
+
376
+ ### Features
377
+
378
+ * use fallback locales from cldr ([#820](https://github.com/lingui/js-lingui/issues/820)) ([2d9e124](https://github.com/lingui/js-lingui/commit/2d9e124b91f1ba7a65e9f997a3ba952679c6c23a))
package/build/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Tomáš Ehrlich
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,120 @@
1
+ import type { GeneratorOptions } from "@babel/core";
2
+
3
+ export declare type CatalogFormat = "lingui" | "minimal" | "po" | "csv" | "po-gettext";
4
+ export type CatalogFormatOptions = {
5
+ origins?: boolean;
6
+ lineNumbers?: boolean;
7
+ }
8
+ export declare type OrderBy = "messageId" | "origin";
9
+ declare type CatalogConfig = {
10
+ name?: string;
11
+ path: string;
12
+ include: string[];
13
+ exclude?: string[];
14
+ };
15
+
16
+ export type LocaleObject = {
17
+ [locale: string]: string[] | string
18
+ }
19
+
20
+ export type DefaultLocaleObject = {
21
+ default: string
22
+ }
23
+
24
+ export declare type FallbackLocales = LocaleObject | DefaultLocaleObject
25
+
26
+ declare type CatalogService = {
27
+ name: string;
28
+ apiKey: string;
29
+ }
30
+
31
+ declare type ExtractorType = {
32
+ match(filename: string): boolean;
33
+ extract(filename: string, targetDir: string, options?: any): void;
34
+ }
35
+
36
+ export declare type LinguiConfig = {
37
+ catalogs: CatalogConfig[];
38
+ compileNamespace: "es" | "cjs" | "ts" | string;
39
+ extractBabelOptions: Record<string, unknown>;
40
+ compilerBabelOptions: GeneratorOptions;
41
+ fallbackLocales: FallbackLocales;
42
+ format: CatalogFormat;
43
+ extractors?: ExtractorType[];
44
+ prevFormat: CatalogFormat;
45
+ formatOptions: CatalogFormatOptions;
46
+ localeDir: string;
47
+ locales: string[];
48
+ catalogsMergePath: string;
49
+ orderBy: OrderBy;
50
+ pseudoLocale: string;
51
+ rootDir: string;
52
+ runtimeConfigModule: [source: string, identifier?: string] | {
53
+ i18n?: [source: string, identifier?: string]
54
+ Trans?: [source: string, identifier?: string]
55
+ };
56
+ sourceLocale: string;
57
+ service: CatalogService;
58
+ };
59
+ export declare const defaultConfig: LinguiConfig;
60
+ export declare function getConfig({ cwd, configPath, skipValidation, }?: {
61
+ cwd?: string;
62
+ configPath?: string;
63
+ skipValidation?: boolean;
64
+ }): LinguiConfig;
65
+ export declare const configValidation: {
66
+ exampleConfig: {
67
+ extractBabelOptions: {
68
+ extends: string;
69
+ rootMode: string;
70
+ plugins: string[];
71
+ presets: string[];
72
+ };
73
+ compilerBabelOptions: GeneratorOptions;
74
+ catalogs: CatalogConfig[];
75
+ compileNamespace: "es" | "ts" | "cjs" | string;
76
+ fallbackLocales: FallbackLocales;
77
+ format: CatalogFormat;
78
+ formatOptions: CatalogFormatOptions;
79
+ locales: string[];
80
+ orderBy: OrderBy;
81
+ pseudoLocale: string;
82
+ rootDir: string;
83
+ runtimeConfigModule: LinguiConfig['runtimeConfigModule'];
84
+ sourceLocale: string;
85
+ service: CatalogService;
86
+ };
87
+ deprecatedConfig: {
88
+ fallbackLocale: (config: LinguiConfig & DeprecatedFallbackLanguage) => string;
89
+ localeDir: (config: LinguiConfig & DeprecatedLocaleDir) => string;
90
+ srcPathDirs: (config: LinguiConfig & DeprecatedLocaleDir) => string;
91
+ srcPathIgnorePatterns: (config: LinguiConfig & DeprecatedLocaleDir) => string;
92
+ };
93
+ comment: string;
94
+ };
95
+ export declare function replaceRootDir(config: LinguiConfig, rootDir: string): LinguiConfig;
96
+ /**
97
+ * Replace fallbackLocale with fallbackLocales
98
+ *
99
+ * Released in lingui-conf 0.9
100
+ * Remove anytime after 4.x
101
+ */
102
+ declare type DeprecatedFallbackLanguage = {
103
+ fallbackLocale: string | null;
104
+ };
105
+
106
+ export declare function fallbackLanguageMigration(config: LinguiConfig & DeprecatedFallbackLanguage): LinguiConfig;
107
+ /**
108
+ * Replace localeDir, srcPathDirs and srcPathIgnorePatterns with catalogs
109
+ *
110
+ * Released in @lingui/conf 3.0
111
+ * Remove anytime after 4.x
112
+ */
113
+ declare type DeprecatedLocaleDir = {
114
+ localeDir: string;
115
+ srcPathDirs: string[];
116
+ srcPathIgnorePatterns: string[];
117
+ };
118
+ export declare function catalogMigration(config: LinguiConfig & DeprecatedLocaleDir): LinguiConfig;
119
+ export {};
120
+ //# sourceMappingURL=index.d.ts.map