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

refactor(parser/js): rename import assertions to import attributes #4373

Conversation

dyc3
Copy link
Contributor

@dyc3 dyc3 commented Oct 23, 2024

Summary

Renames things related to import "assertions" to import "attributes"

closes #4372

Test Plan

CI should pass.

@github-actions github-actions bot added A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages labels Oct 23, 2024
@dyc3 dyc3 changed the base branch from main to next October 23, 2024 22:11
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 48420 48420 0
Passed 47220 47228 ✅ ⏫ +8
Failed 1200 1192 ✅ ⏬ -8
Panics 0 0 0
Coverage 97.52% 97.54% +0.02%
🎉 Fixed (8):
test/language/identifiers/part-unicode-16.0.0-class-escaped.js
test/language/identifiers/part-unicode-16.0.0-class.js
test/language/identifiers/part-unicode-16.0.0-escaped.js
test/language/identifiers/part-unicode-16.0.0.js
test/language/identifiers/start-unicode-16.0.0-class-escaped.js
test/language/identifiers/start-unicode-16.0.0-class.js
test/language/identifiers/start-unicode-16.0.0-escaped.js
test/language/identifiers/start-unicode-16.0.0.js

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 6580 6580 0
Passed 2205 2205 0
Failed 4375 4375 0
Panics 0 0 0
Coverage 33.51% 33.51% 0.00%

ts/babel

Test result main count This PR count Difference
Total 680 680 0
Passed 607 607 0
Failed 73 73 0
Panics 0 0 0
Coverage 89.26% 89.26% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18507 18507 0
Passed 14167 14165 ❌ ⏬ -2
Failed 4340 4342 ❌ ⏫ +2
Panics 0 0 0
Coverage 76.55% 76.54% -0.01%
🔥 Regression (2):
conformance/importAssertion/importAssertion1.ts
conformance/moduleResolution/resolutionModeTypeOnlyImport1.ts

Copy link

codspeed-hq bot commented Oct 23, 2024

CodSpeed Performance Report

Merging #4373 will degrade performances by 7.25%

Comparing 10-23-refactor_parser_js_rename_import_assertions_to_import_attributes (15726c5) with next (270cf3c)

Summary

❌ 1 regressions
✅ 100 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark next 10-23-refactor_parser_js_rename_import_assertions_to_import_attributes Change
react.production.min_3378072959512366797.js[uncached] 2.1 ms 2.2 ms -7.25%

@dyc3 dyc3 force-pushed the 10-23-refactor_parser_js_rename_import_assertions_to_import_attributes branch 2 times, most recently from 93ab39d to 1afed06 Compare October 24, 2024 15:01
@dyc3 dyc3 force-pushed the 10-23-refactor_parser_js_rename_import_assertions_to_import_attributes branch from 1afed06 to 15726c5 Compare October 24, 2024 17:50
@dyc3 dyc3 marked this pull request as ready for review October 24, 2024 18:41
@dyc3 dyc3 requested review from a team October 24, 2024 18:42
Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

I wonder if we should rename JsImportAttribute into JsImportWithClause, attribute into with_clause and drop Entry of the remaining nodes. What do you think?

@dyc3
Copy link
Contributor Author

dyc3 commented Oct 24, 2024

I think JsImportAttribute is more searchable because that's the language used in the proposal: https://github.com/tc39/proposal-import-attributes

@dyc3 dyc3 merged commit f5f38dc into next Oct 25, 2024
11 of 12 checks passed
@dyc3 dyc3 deleted the 10-23-refactor_parser_js_rename_import_assertions_to_import_attributes branch October 25, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Linter Area: linter A-Parser Area: parser A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Renane JsImportAssertion into JsImportAttribute
3 participants