@lingui/conf 5.0.0-next.4 → 5.0.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.cjs CHANGED
@@ -366,6 +366,10 @@ function validateLocales(config) {
366
366
  }
367
367
  const pipe = (...functions) => (args) => functions.reduce((arg, fn) => fn(arg), args);
368
368
 
369
+ function defineConfig(config) {
370
+ return config;
371
+ }
372
+
369
373
  function configExists(path2) {
370
374
  return path2 && fs__default.existsSync(path2);
371
375
  }
@@ -428,5 +432,6 @@ function getConfig({
428
432
  );
429
433
  }
430
434
 
435
+ exports.defineConfig = defineConfig;
431
436
  exports.getConfig = getConfig;
432
437
  exports.makeConfig = makeConfig;
package/dist/index.d.cts CHANGED
@@ -202,10 +202,15 @@ declare function makeConfig(userConfig: Partial<LinguiConfig>, opts?: {
202
202
  skipValidation?: boolean;
203
203
  }): LinguiConfigNormalized;
204
204
 
205
+ /**
206
+ * Type helper for lingui.config.ts, returns {@link LinguiConfig} object
207
+ */
208
+ declare function defineConfig(config: LinguiConfig): LinguiConfig;
209
+
205
210
  declare function getConfig({ cwd, configPath, skipValidation, }?: {
206
211
  cwd?: string;
207
212
  configPath?: string;
208
213
  skipValidation?: boolean;
209
214
  }): LinguiConfigNormalized;
210
215
 
211
- 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, getConfig, makeConfig };
216
+ 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 };
package/dist/index.d.mts CHANGED
@@ -202,10 +202,15 @@ declare function makeConfig(userConfig: Partial<LinguiConfig>, opts?: {
202
202
  skipValidation?: boolean;
203
203
  }): LinguiConfigNormalized;
204
204
 
205
+ /**
206
+ * Type helper for lingui.config.ts, returns {@link LinguiConfig} object
207
+ */
208
+ declare function defineConfig(config: LinguiConfig): LinguiConfig;
209
+
205
210
  declare function getConfig({ cwd, configPath, skipValidation, }?: {
206
211
  cwd?: string;
207
212
  configPath?: string;
208
213
  skipValidation?: boolean;
209
214
  }): LinguiConfigNormalized;
210
215
 
211
- 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, getConfig, makeConfig };
216
+ 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 };
package/dist/index.d.ts CHANGED
@@ -202,10 +202,15 @@ declare function makeConfig(userConfig: Partial<LinguiConfig>, opts?: {
202
202
  skipValidation?: boolean;
203
203
  }): LinguiConfigNormalized;
204
204
 
205
+ /**
206
+ * Type helper for lingui.config.ts, returns {@link LinguiConfig} object
207
+ */
208
+ declare function defineConfig(config: LinguiConfig): LinguiConfig;
209
+
205
210
  declare function getConfig({ cwd, configPath, skipValidation, }?: {
206
211
  cwd?: string;
207
212
  configPath?: string;
208
213
  skipValidation?: boolean;
209
214
  }): LinguiConfigNormalized;
210
215
 
211
- 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, getConfig, makeConfig };
216
+ 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 };
package/dist/index.mjs CHANGED
@@ -358,6 +358,10 @@ function validateLocales(config) {
358
358
  }
359
359
  const pipe = (...functions) => (args) => functions.reduce((arg, fn) => fn(arg), args);
360
360
 
361
+ function defineConfig(config) {
362
+ return config;
363
+ }
364
+
361
365
  function configExists(path2) {
362
366
  return path2 && fs.existsSync(path2);
363
367
  }
@@ -420,4 +424,4 @@ function getConfig({
420
424
  );
421
425
  }
422
426
 
423
- export { getConfig, makeConfig };
427
+ export { defineConfig, getConfig, makeConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/conf",
3
- "version": "5.0.0-next.4",
3
+ "version": "5.0.0",
4
4
  "sideEffects": false,
5
5
  "description": "Get lingui configuration from package.json",
6
6
  "keywords": [
@@ -38,9 +38,9 @@
38
38
  "/dist"
39
39
  ],
40
40
  "devDependencies": {
41
- "@lingui/jest-mocks": "^3.0.3",
41
+ "@lingui/jest-mocks": "*",
42
42
  "tsd": "^0.26.1",
43
43
  "unbuild": "^2.0.0"
44
44
  },
45
- "gitHead": "7b9ca5b479be4acd58ed95bff841e89efba06279"
45
+ "gitHead": "14fa4d76eb6ff9df8600e23f2ea8fc989a750195"
46
46
  }