Skip to content

fix: remove unraw dependency #2271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

yslpn
Copy link

@yslpn yslpn commented Jun 23, 2025

Description

Replace the unraw library with a lightweight custom implementation for decoding escape sequences.

unraw functionality is too redundant and is not used in the code now. We use a regular expression that only finds valid escape sequences. So I propose to use a more lightweight and simple implementation and remove the unraw dependency. This will not change the behavior for the user.

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

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)

Copy link

vercel bot commented Jun 23, 2025

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

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Jun 24, 2025 10:31am

Copy link

github-actions bot commented Jun 23, 2025

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%)

@yslpn
Copy link
Author

yslpn commented Jun 23, 2025

Something is wrong with the size-limit report in pull requests. Locally on the branch, I get different numbers that look more like the truth. We got rid of 250 lines of unminified js code, which is about 1 kb.

Any ideas?)

image

@timofei-iatsenko
Copy link
Collaborator

@yslpn it checks out master (main) in the PR, probably because of the trigger, pull_request_target instead of pull_request

Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.82%. Comparing base (6bb8983) to head (2d7d257).
Report is 195 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/src/i18n.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2271      +/-   ##
==========================================
- Coverage   77.05%   76.82%   -0.24%     
==========================================
  Files          84       89       +5     
  Lines        2157     2498     +341     
  Branches      555      650      +95     
==========================================
+ Hits         1662     1919     +257     
- 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.

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.

2 participants