@formatjs/cli 6.13.3 → 6.14.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.
Files changed (2) hide show
  1. package/bin/formatjs +20 -4
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -230621,6 +230621,10 @@ works. This option does not do that so it's less safe.`,
230621
230621
  becomes "{count, plural, one{I have a dog} other{I have many dogs}}".
230622
230622
  The goal is to provide as many full sentences as possible since fragmented
230623
230623
  sentences are not translator-friendly.`
230624
+ ).option(
230625
+ "--follow-links",
230626
+ `Whether to follow symbolic links when traversing directories. Defaults to true for compatibility with pnpm symlinked node_modules. Use --no-follow-links to disable.`,
230627
+ true
230624
230628
  ).action(async (filePatterns, cmdObj) => {
230625
230629
  debug("File pattern:", filePatterns);
230626
230630
  debug("Options:", cmdObj);
@@ -230628,7 +230632,8 @@ sentences are not translator-friendly.`
230628
230632
  if (filePatterns.length) {
230629
230633
  files.push(
230630
230634
  ...globSync(filePatterns, {
230631
- ignore: cmdObj.ignore
230635
+ ignore: cmdObj.ignore,
230636
+ followSymbolicLinks: cmdObj.followLinks ?? true
230632
230637
  })
230633
230638
  );
230634
230639
  }
@@ -230685,10 +230690,16 @@ This is especially useful to convert from a TMS-specific format back to react-in
230685
230690
  ).option(
230686
230691
  "--ignore-tag",
230687
230692
  `Whether the parser to treat HTML/XML tags as string literal instead of parsing them as tag token. When this is false we only allow simple tags without any attributes.`
230693
+ ).option(
230694
+ "--follow-links",
230695
+ `Whether to follow symbolic links when traversing directories. Defaults to true for compatibility with pnpm symlinked node_modules. Use --no-follow-links to disable.`,
230696
+ true
230688
230697
  ).action(async (filePatterns, opts) => {
230689
230698
  debug("File pattern:", filePatterns);
230690
230699
  debug("Options:", opts);
230691
- const files = globSync(filePatterns);
230700
+ const files = globSync(filePatterns, {
230701
+ followSymbolicLinks: opts.followLinks ?? true
230702
+ });
230692
230703
  if (!files.length) {
230693
230704
  throw new Error(`No input file found with pattern ${filePatterns}`);
230694
230705
  }
@@ -230745,13 +230756,18 @@ This is especially useful to convert from a TMS-specific format back to react-in
230745
230756
  `Whether to check that target locales don't have extra keys not present in the source locale.`
230746
230757
  ).option(
230747
230758
  "--structural-equality",
230748
- `Whether to check for structural equality of messages between source and target locale.
230759
+ `Whether to check for structural equality of messages between source and target locale.
230749
230760
  This makes sure translations are formattable and are not missing any tokens.`
230761
+ ).option(
230762
+ "--follow-links",
230763
+ `Whether to follow symbolic links when traversing directories. Defaults to true for compatibility with pnpm symlinked node_modules. Use --no-follow-links to disable.`,
230764
+ true
230750
230765
  ).action(async (filePatterns, opts) => {
230751
230766
  debug("File pattern:", filePatterns);
230752
230767
  debug("Options:", opts);
230753
230768
  const files = globSync(filePatterns, {
230754
- ignore: opts.ignore
230769
+ ignore: opts.ignore,
230770
+ followSymbolicLinks: opts.followLinks ?? true
230755
230771
  });
230756
230772
  if (!files.length) {
230757
230773
  throw new Error(`No input file found with pattern ${filePatterns}`);
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@formatjs/cli",
3
3
  "description": "A CLI for formatjs.",
4
- "version": "6.13.3",
4
+ "version": "6.14.0",
5
5
  "license": "MIT",
6
6
  "author": "Linjie Ding <linjie@airtable.com>",
7
7
  "engines": {
8
8
  "node": ">= 20.12.0"
9
9
  },
10
10
  "devDependencies": {
11
- "@formatjs/cli-lib": "8.4.0"
11
+ "@formatjs/cli-lib": "8.5.0"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@glimmer/syntax": "^0.84.3 || ^0.95.0",