@formatjs/cli-lib 7.4.2 → 7.4.3

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.
@@ -2,6 +2,6 @@ export { default as extractAndWrite, extract } from './src/extract';
2
2
  export type { ExtractCLIOptions, ExtractOpts } from './src/extract';
3
3
  export type { MessageDescriptor } from '@formatjs/ts-transformer';
4
4
  export type { FormatFn, CompileFn } from './src/formatters/default';
5
- export type { Element, Comparator } from 'json-stable-stringify';
5
+ export type { Comparator } from 'json-stable-stringify';
6
6
  export { default as compileAndWrite, compile } from './src/compile';
7
7
  export type { CompileCLIOpts, Opts as CompileOpts } from './src/compile';
@@ -67,10 +67,10 @@ Message from ${inputFile}: ${compiled[id]}
67
67
  }
68
68
  }
69
69
  }
70
- return stringify(ast ? messageAsts : messages, {
70
+ return (stringify(ast ? messageAsts : messages, {
71
71
  space: 2,
72
72
  cmp: formatter.compareMessages || undefined,
73
- });
73
+ }) ?? '');
74
74
  }
75
75
  /**
76
76
  * Aggregate `inputFiles` into a single JSON blob and compile.
@@ -170,10 +170,10 @@ ${JSON.stringify(message, undefined, 2)}`);
170
170
  if (typeof formatter.serialize === 'function') {
171
171
  return formatter.serialize(formatter.format(results));
172
172
  }
173
- return stringify(formatter.format(results), {
173
+ return (stringify(formatter.format(results), {
174
174
  space: 2,
175
175
  cmp: formatter.compareMessages || undefined,
176
- });
176
+ }) ?? '');
177
177
  }
178
178
  /**
179
179
  * Extract strings from source files, also writes to a file.
package/package.json CHANGED
@@ -1,37 +1,28 @@
1
1
  {
2
2
  "name": "@formatjs/cli-lib",
3
3
  "description": "Lib for CLI for formatjs.",
4
- "version": "7.4.2",
5
- "license": "MIT",
4
+ "version": "7.4.3",
6
5
  "author": "Linjie Ding <linjie@airtable.com>",
7
- "engines": {
8
- "node": ">= 16"
9
- },
6
+ "bugs": "https://github.com/formatjs/formatjs/issues",
10
7
  "dependencies": {
8
+ "@formatjs/icu-messageformat-parser": "2.11.3",
9
+ "@formatjs/icu-skeleton-parser": "1.8.15",
10
+ "@formatjs/ts-transformer": "3.14.1",
11
11
  "@types/estree": "^1.0.6",
12
12
  "@types/fs-extra": "^11.0.4",
13
- "@types/json-stable-stringify": "^1.1.0",
14
13
  "@types/node": "^22.0.0",
15
14
  "chalk": "^4.1.2",
16
15
  "commander": "^13",
17
16
  "fast-glob": "^3.3.2",
18
17
  "fs-extra": "^11.2.0",
19
- "json-stable-stringify": "^1.1.1",
18
+ "json-stable-stringify": "^1.3.0",
20
19
  "loud-rejection": "^2",
21
20
  "tslib": "^2.8.0",
22
- "typescript": "^5.6.0",
23
- "@formatjs/icu-skeleton-parser": "1.8.14",
24
- "@formatjs/icu-messageformat-parser": "2.11.2",
25
- "@formatjs/ts-transformer": "3.14.0"
21
+ "typescript": "5.8.3"
26
22
  },
27
- "peerDependencies": {
28
- "@glimmer/syntax": "^0.94.9",
29
- "@vue/compiler-core": "^3.5.12",
30
- "content-tag": "^3.0.0",
31
- "ember-template-recast": "^6.1.5",
32
- "vue": "^3.5.12"
23
+ "engines": {
24
+ "node": ">= 16"
33
25
  },
34
- "bugs": "https://github.com/formatjs/formatjs/issues",
35
26
  "homepage": "https://github.com/formatjs/formatjs",
36
27
  "keywords": [
37
28
  "cli",
@@ -50,7 +41,15 @@
50
41
  "translate",
51
42
  "translation"
52
43
  ],
44
+ "license": "MIT",
53
45
  "main": "index.js",
46
+ "peerDependencies": {
47
+ "@glimmer/syntax": "^0.95.0",
48
+ "@vue/compiler-core": "^3.5.12",
49
+ "content-tag": "^3.0.0",
50
+ "ember-template-recast": "^6.1.5",
51
+ "vue": "^3.5.12"
52
+ },
54
53
  "peerDependenciesMeta": {
55
54
  "vue": {
56
55
  "optional": true