@lingui/format-json 4.4.1 → 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/json.cjs CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  const R = require('ramda');
4
4
 
5
- function _interopNamespaceDefault(e) {
5
+ function _interopNamespaceCompat(e) {
6
+ if (e && typeof e === 'object' && 'default' in e) return e;
6
7
  const n = Object.create(null);
7
8
  if (e) {
8
9
  for (const k in e) {
@@ -13,7 +14,7 @@ function _interopNamespaceDefault(e) {
13
14
  return n;
14
15
  }
15
16
 
16
- const R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
17
+ const R__namespace = /*#__PURE__*/_interopNamespaceCompat(R);
17
18
 
18
19
  const serializeMinimal = R__namespace.map(
19
20
  (message) => message.translation || ""
@@ -0,0 +1,25 @@
1
+ import { CatalogFormatter } from '@lingui/conf';
2
+
3
+ type JsonFormatterOptions = {
4
+ /**
5
+ * Print places where message is used
6
+ *
7
+ * @default true
8
+ */
9
+ origins?: boolean;
10
+ /**
11
+ * Print line numbers in origins
12
+ *
13
+ * @default true
14
+ */
15
+ lineNumbers?: boolean;
16
+ /**
17
+ * Different styles of how information could be printed
18
+ *
19
+ * @default "lingui"
20
+ */
21
+ style?: "lingui" | "minimal";
22
+ };
23
+ declare function formatter(options?: JsonFormatterOptions): CatalogFormatter;
24
+
25
+ export { type JsonFormatterOptions, formatter };
@@ -0,0 +1,25 @@
1
+ import { CatalogFormatter } from '@lingui/conf';
2
+
3
+ type JsonFormatterOptions = {
4
+ /**
5
+ * Print places where message is used
6
+ *
7
+ * @default true
8
+ */
9
+ origins?: boolean;
10
+ /**
11
+ * Print line numbers in origins
12
+ *
13
+ * @default true
14
+ */
15
+ lineNumbers?: boolean;
16
+ /**
17
+ * Different styles of how information could be printed
18
+ *
19
+ * @default "lingui"
20
+ */
21
+ style?: "lingui" | "minimal";
22
+ };
23
+ declare function formatter(options?: JsonFormatterOptions): CatalogFormatter;
24
+
25
+ export { type JsonFormatterOptions, formatter };
package/dist/json.d.ts CHANGED
@@ -22,4 +22,4 @@ type JsonFormatterOptions = {
22
22
  };
23
23
  declare function formatter(options?: JsonFormatterOptions): CatalogFormatter;
24
24
 
25
- export { JsonFormatterOptions, formatter };
25
+ export { type JsonFormatterOptions, formatter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/format-json",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "description": "JSON format for Lingui Catalogs",
5
5
  "main": "./dist/json.cjs",
6
6
  "module": "./dist/json.mjs",
@@ -39,12 +39,12 @@
39
39
  "dist/"
40
40
  ],
41
41
  "dependencies": {
42
- "@lingui/conf": "4.4.1",
42
+ "@lingui/conf": "4.5.0",
43
43
  "ramda": "^0.28.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "tsd": "^0.28.0",
47
- "unbuild": "^1.1.2"
47
+ "unbuild": "^2.0.0"
48
48
  },
49
- "gitHead": "e7103c9f06a493e5871086e121f037309b0b742c"
49
+ "gitHead": "62c92d1f8c60b3890bdda870f307fa780d423080"
50
50
  }