fix(text): inline title case mapping to avoid JSON import attribute#7129
fix(text): inline title case mapping to avoid JSON import attribute#7129tomas-zijdemans wants to merge 1 commit intodenoland:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7129 +/- ##
==========================================
+ Coverage 94.61% 94.62% +0.01%
==========================================
Files 634 635 +1
Lines 51801 51938 +137
Branches 9329 9329
==========================================
+ Hits 49011 49148 +137
Misses 2216 2216
Partials 574 574 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Isn't that more a vite or jsr bug than a std problem? Shouldn't this be resolved by a request |
Fair point. This is a practical change in std, but the better fix would likely be in the vite json plugin (if possible) |
Fixes: #7128
When Vite resolves @std/text/unstable-to-title-case, it follows that import to JSR and ends up requesting https://jsr.io/@std/text/1.0.18/title_case_mapping.json?import. The catch: hitting that URL in an HTTP client returns the JSR registry's HTML browse page for the file, not the raw JSON
Vite no longer needs to fetch a .json file from JSR when bundling @std/text/unstable-to-title-case, so the builtin:vite-json "expected value at line 1 column 1" crash from #7128 goes away. No public API change.
PS: There are other cases like this in the code as well, but not many