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(parser): export_named_type should parse default as normal #4903

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

fireairforce
Copy link
Member

closes: #4765

Summary

The following code:

export { type default as CrsMeta } from './crs-meta.js'

it should be parsed without error.

I just add a simple judge when parser meet T![default], and deal this to type alias, so it can be parsed successfully.

Test Plan

i add test case.

@github-actions github-actions bot added A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Jan 17, 2025
@fireairforce fireairforce force-pushed the fix-4765 branch 2 times, most recently from f0b123b to 293ba94 Compare January 17, 2025 10:11
@github-actions github-actions bot added the A-Formatter Area: formatter label Jan 17, 2025
Copy link

codspeed-hq bot commented Jan 17, 2025

CodSpeed Performance Report

Merging #4903 will not alter performance

Comparing fix-4765 (176d6f2) with next (c377f6b)

Summary

✅ 95 untouched benchmarks

@fireairforce

This comment was marked as resolved.

@@ -0,0 +1,13 @@
---
biome_js_parser: patch
Copy link
Member

Choose a reason for hiding this comment

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

You must add the cli package too. Please read the contribution guide regarding the changesets

Copy link
Member Author

Choose a reason for hiding this comment

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

done, thanks for the reminder.

@fireairforce fireairforce force-pushed the fix-4765 branch 2 times, most recently from a6af0c9 to 339feb4 Compare January 20, 2025 07:58
@fireairforce
Copy link
Member Author

it seems the ci not stable...

@@ -2,7 +2,6 @@

use biome_console::markup;
use biome_parser::AnyParse;
use std::cmp::Ordering;
Copy link
Member

Choose a reason for hiding this comment

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

I think you made a mistake and added a commit/change from the other PR

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry, my git broken, i fix this

@@ -954,6 +954,7 @@ where
// { type as } // name: `as` type-export: `true`
// { type as as } // name: `type` type-export: `false` (aliased to `as`)
// { type as as as } // name: `as` type-export: `true`, aliased to `as`
// { type default as as } // name: 'as' type-export: `true`, aliased to `as`
Copy link
Member

Choose a reason for hiding this comment

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

We don't use inline tests anymore. They were left there after we moved to a new testing infrastructure, so there's no need to add new comments like this one

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@fireairforce fireairforce merged commit 2a80687 into next Jan 20, 2025
12 checks passed
@fireairforce fireairforce deleted the fix-4765 branch January 20, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants