Skip to content
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

feat(diagnostic): support JSONError diagnostic in resolver #9566

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Mar 5, 2025

Summary

Support printing JSONError diagnostic in resolver error.

offset is computed based on the column and line of serde_json::Error. If the matching character is a BOM, a more friendly diagnostic will be reported:

ERROR in ./index.js 1:8-20
  × JSON parse error: BOM character found in '<TEST_TOOLS_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-bom/node_modules/bommodule/package.json'
   ╭─[1:0]
 1 │ {
   · ▲
 2 │   "name": "bommodule"
 3 │ }
   ╰────

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Mar 5, 2025
Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit c1d1a1a
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67c83bacabb8ec0008f28964

@h-a-n-a h-a-n-a enabled auto-merge (squash) March 5, 2025 11:47
@h-a-n-a h-a-n-a requested a review from chenjiahan March 5, 2025 12:14
Copy link

codspeed-hq bot commented Mar 5, 2025

CodSpeed Performance Report

Merging #9566 will not alter performance

Comparing feat/json-print (c1d1a1a) with main (71f783c)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 7 untouched benchmarks

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome👍

@h-a-n-a h-a-n-a merged commit bde3645 into main Mar 6, 2025
26 checks passed
@h-a-n-a h-a-n-a deleted the feat/json-print branch March 6, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants