feat(@formatjs/cli): add --follow-links flag for symlink traversal in glob patterns by longlho · Pull Request #6174 · formatjs/formatjs
… glob patterns Fixes #6173. The Rust CLI's WalkDir does not follow symlinks by default, causing glob patterns like `node_modules/**/dist/lang/en.json` to fail with pnpm (which symlinks packages). This adds a `--follow-links` flag (default: true) to the compile, extract, and verify commands in both the Rust and TypeScript CLIs, matching fast-glob's default behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bot reviewed Mar 20, 2026
Creates the node_modules directory structure on the fly in a temp dir to avoid Bazel glob() excluding node_modules directories. This reproduces the exact scenario from the issue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n test Creates a temp dir mimicking pnpm's layout where the real package lives in node_modules/.pnpm/some-pkg@1.0.0/node_modules/some-pkg and node_modules/some-pkg is a symlink to it. This is the exact scenario from #6173 that fails without --follow-links. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The static fixture wasn't available in the remote Bazel executor. The on-the-fly node_modules and pnpm symlink tests cover the same scenario without relying on static fixtures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
longlho
deleted the
feat/follow-links-6173
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters