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: Depcrate SourceMapGetter, move methods to ModuleLoader #823

Merged

Conversation

bartlomieju
Copy link
Member

This commit deprecates SourceMapGetter trait, JsRuntime::source_map_getter
option and updates ModuleLoader trait to have the same methods as
SourceMapGetter.

In real usage it's always implementor of ModuleLoader that also implements
SourceMapGetter. It makes little sense to keep these two trait separate.

This will open up doors for native source map support that is being
developed in #819.

SourceMapGetter is scheduled to be removed in 0.297.0.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 57.14286% with 15 lines in your changes missing coverage. Please review.

Project coverage is 81.53%. Comparing base (0c7f83e) to head (562768e).
Report is 60 commits behind head on main.

Files Patch % Lines
core/source_map.rs 50.00% 8 Missing ⚠️
core/modules/loaders.rs 30.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #823      +/-   ##
==========================================
+ Coverage   81.43%   81.53%   +0.09%     
==========================================
  Files          97       98       +1     
  Lines       23877    24324     +447     
==========================================
+ Hits        19445    19833     +388     
- Misses       4432     4491      +59     

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

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM

littledivy

This comment was marked as duplicate.

@bartlomieju bartlomieju merged commit b4d48a1 into denoland:main Jul 15, 2024
18 checks passed
@bartlomieju bartlomieju deleted the source_map_getter_deprecations branch July 15, 2024 20:30
bartlomieju added a commit that referenced this pull request Jul 16, 2024
…827)

Fixes `SourceMapper` API that was changed in
#823.

Now the source lines are correctly mapped even if deprecated
`SourceMapGetter` API is not used.
bartlomieju added a commit that referenced this pull request Jul 25, 2024
This trait was deprecated in
#823 and is
scheduled to be removed in 0.300.0
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.

3 participants