Skip to content

fix: use makePathRegexSafe with globSync#2242

Merged
andrii-bodnar merged 1 commit intolingui:mainfrom
taku-hatano:2241-glog-sync-with-file-based-routing
May 1, 2025
Merged

fix: use makePathRegexSafe with globSync#2242
andrii-bodnar merged 1 commit intolingui:mainfrom
taku-hatano:2241-glog-sync-with-file-based-routing

Conversation

@taku-hatano
Copy link
Contributor

@taku-hatano taku-hatano commented Apr 30, 2025

close #2241

Description

When using catalog's input with file-base routing systems, [] is not escaped.
So globSync can't get path under the dynamic route, like app/[lang]/page.tsx

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Apr 30, 2025 0:30am

@github-actions
Copy link

size-limit report 📦

Path Size
packages/core/dist/index.mjs 2.91 KB (0%)
packages/detect-locale/dist/index.mjs 618 B (0%)
packages/react/dist/index.mjs 1.35 KB (0%)

@timofei-iatsenko timofei-iatsenko self-requested a review April 30, 2025 13:16
@timofei-iatsenko
Copy link
Collaborator

Nice catch, thanks for contribution

@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.72%. Comparing base (6bb8983) to head (b01f47d).
Report is 188 commits behind head on main.

Files with missing lines Patch % Lines
packages/cli/src/api/catalog.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2242      +/-   ##
==========================================
- Coverage   77.05%   76.72%   -0.33%     
==========================================
  Files          84       88       +4     
  Lines        2157     2488     +331     
  Branches      555      648      +93     
==========================================
+ Hits         1662     1909     +247     
- Misses        382      463      +81     
- Partials      113      116       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrii-bodnar andrii-bodnar merged commit 7a8256c into lingui:main May 1, 2025
12 checks passed
timofei-iatsenko added a commit that referenced this pull request Jan 15, 2026
@timofei-iatsenko
Copy link
Collaborator

@taku-hatano i'm reverting this commit here #2396

see for more info and solution here #2352

In your case you should use glob esacping sequence app/\[lang\]/page.tsx, because patterns in include/exclude are globs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't extract with file-based routing systems include path

3 participants