@formatjs/cli-lib 8.0.1 → 8.0.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formatjs/cli-lib",
3
3
  "description": "Lib for CLI for formatjs.",
4
- "version": "8.0.1",
4
+ "version": "8.0.4",
5
5
  "license": "MIT",
6
6
  "author": "Linjie Ding <linjie@airtable.com>",
7
7
  "type": "module",
@@ -20,9 +20,9 @@
20
20
  "loud-rejection": "^2",
21
21
  "tslib": "^2.8.0",
22
22
  "typescript": "^5.6.0",
23
- "@formatjs/icu-messageformat-parser": "3.0.1",
24
- "@formatjs/ts-transformer": "4.0.1",
25
- "@formatjs/icu-skeleton-parser": "2.0.1"
23
+ "@formatjs/icu-messageformat-parser": "3.0.4",
24
+ "@formatjs/ts-transformer": "4.0.4",
25
+ "@formatjs/icu-skeleton-parser": "2.0.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@glimmer/syntax": "^0.95.0",
package/src/cli.js CHANGED
@@ -6,8 +6,8 @@ import compileFolder from './compile_folder.js';
6
6
  import { debug } from './console_utils.js';
7
7
  import extract from './extract.js';
8
8
  import { verify } from './verify/index.js';
9
- import { readFileSync } from 'fs-extra';
10
9
  import { resolve } from 'path';
10
+ import { readFileSync } from 'fs';
11
11
  const KNOWN_COMMANDS = ['extract'];
12
12
  async function main(argv) {
13
13
  loudRejection();
package/src/compile.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parse } from '@formatjs/icu-messageformat-parser';
2
- import { outputFile, readJSON } from 'fs-extra';
2
+ import { outputFile, readJSON } from 'fs-extra/esm';
3
3
  import * as stringifyNs from 'json-stable-stringify';
4
4
  import { debug, warn, writeStdout } from './console_utils.js';
5
5
  import { resolveBuiltinFormatter } from './formatters/index.js';
@@ -1,4 +1,4 @@
1
- import { outputFile } from 'fs-extra';
1
+ import { outputFile } from 'fs-extra/esm';
2
2
  import { basename, join } from 'path';
3
3
  import { compile } from './compile.js';
4
4
  export default async function compileFolder(files, outFolder, opts = {}) {
package/src/extract.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { interpolateName, } from '@formatjs/ts-transformer';
2
- import { outputFile, readFile } from 'fs-extra';
2
+ import { outputFile } from 'fs-extra/esm';
3
3
  import { debug, getStdinAsString, warn, writeStdout } from './console_utils.js';
4
4
  import * as stringifyNs from 'json-stable-stringify';
5
5
  import { parse } from '@formatjs/icu-messageformat-parser';
@@ -7,6 +7,7 @@ import { hoistSelectors } from '@formatjs/icu-messageformat-parser/manipulator.j
7
7
  import { printAST } from '@formatjs/icu-messageformat-parser/printer.js';
8
8
  import { resolveBuiltinFormatter } from './formatters/index.js';
9
9
  import { parseScript } from './parse_script.js';
10
+ import { readFile } from 'fs/promises';
10
11
  const stringify = stringifyNs.default || stringifyNs;
11
12
  function calculateLineColFromOffset(text, start) {
12
13
  if (!start) {
@@ -2,7 +2,7 @@ import { basename } from 'path';
2
2
  import { debug } from '../console_utils.js';
3
3
  import { checkMissingKeys } from './checkMissingKeys.js';
4
4
  import { checkExtraKeys } from './checkExtraKeys.js';
5
- import { readJSON } from 'fs-extra';
5
+ import { readJSON } from 'fs-extra/esm';
6
6
  import { checkStructuralEquality } from './checkStructuralEquality.js';
7
7
  export async function verify(files, { sourceLocale, missingKeys, extraKeys, structuralEquality }) {
8
8
  debug('Checking translation files:');