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

fix(useFilenamingConvention): take export renaming into account #4260

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

Conaclos
Copy link
Member

Summary

Fix #4254

To fix the issue, I added to the semantic model the capability of retrieving exports of a given binding.

Unfortunately, this adds 24 bytes of overhead to every binding data.
It should be possible to remove this overhead by distinguishing between read and export references.
However, this is a bigger change than the one I introduced here.
I left it for a future PR, unless the perf impact is visible.

Also, I took the opportunity of introducing a small optimization: instead of iterating over all bindings, we now iterate only over bindings that are actually exported.

Test Plan

I added some tests.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Oct 11, 2024
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 48620 48620 0
Passed 47428 47428 0
Failed 1192 1192 0
Panics 0 0 0
Coverage 97.55% 97.55% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6576 6576 0
Passed 2204 2204 0
Failed 4372 4372 0
Panics 0 0 0
Coverage 33.52% 33.52% 0.00%

ts/babel

Test result main count This PR count Difference
Total 680 680 0
Passed 608 608 0
Failed 72 72 0
Panics 0 0 0
Coverage 89.41% 89.41% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18474 18474 0
Passed 14147 14147 0
Failed 4327 4327 0
Panics 0 0 0
Coverage 76.58% 76.58% 0.00%

Copy link

codspeed-hq bot commented Oct 11, 2024

CodSpeed Performance Report

Merging #4260 will improve performances by 10.86%

Comparing conaclos/iseFilenamingConvention-4254 (1939d00) with main (773f5b0)

Summary

⚡ 2 improvements
✅ 103 untouched benchmarks

Benchmarks breakdown

Benchmark main conaclos/iseFilenamingConvention-4254 Change
react.production.min_3378072959512366797.js[cached] 2 ms 1.9 ms +7.13%
db_17847247775464589309.json[cached] 14.2 ms 12.8 ms +10.86%

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

I think it's fine. We would have added the exports anyway in the future

@ematipico ematipico merged commit 4d3e6cd into main Oct 12, 2024
13 checks passed
@ematipico ematipico deleted the conaclos/iseFilenamingConvention-4254 branch October 12, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useFilenamingConvention fails for export
2 participants