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(es/ast): Add definite and is_override to AutoAccessor #8436

Merged
merged 21 commits into from
Jan 19, 2024

Conversation

dsherret
Copy link
Contributor

@dsherret dsherret commented Dec 19, 2023

Description:

Adds a definite and is_override property to AutoAccessor as they were missing.

Also fixes codegen for AutoAccessor when emitting TypeScript (which is the main reason I need this PR).

BREAKING CHANGE:

Adds a definite and is_override property.

Related issue (if exists):

Closes #8344

@dsherret dsherret requested a review from a team as a code owner December 19, 2023 22:20
if n.accessibility != Some(Accessibility::Public) {
self.emit_accessibility(n.accessibility)?;
}
self.emit_accessibility(n.accessibility)?;
Copy link
Contributor Author

@dsherret dsherret Dec 19, 2023

Choose a reason for hiding this comment

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

This will internally handle whether to emit the accessibility or not (it's better if we emit the AST as-is as it allows someone to add public keywords if they'd like to and this change aligns this node with the other nodes).

@kdy1 kdy1 added this to the Planned milestone Dec 21, 2023
@dsherret dsherret requested a review from kdy1 December 21, 2023 14:10
@dsherret
Copy link
Contributor Author

dsherret commented Dec 21, 2023

Some feedback I've given in the past: the CI that fails every time in the SWC project makes it difficult to spot actionable CI failures. If the CI only failed when there was a mistake in the code I could be alerted to it faster instead of needing to go and manually check back.

Edit: Oh, maybe I only thought it worked this way because the CI was actually failing on the dep check.

Edit 2: Ah, this does sometimes still error asking for a bump comment.

@dsherret dsherret changed the title fix(es/ast): Add definite to AutoAccessor fix(es/ast): Add definite and is_override to AutoAccessor Dec 22, 2023
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks! I'll merge this along with other AST-breaking changes.


swc-bump:

  • swc_ecma_ast --breaking

@kdy1 kdy1 changed the base branch from main to dev January 19, 2024 05:07
@kdy1
Copy link
Member

kdy1 commented Jan 19, 2024

I'll merge this into a new branch named dev and publish crates once all AST-breaking changes are ready.

@kdy1 kdy1 merged commit 347e03b into swc-project:dev Jan 19, 2024
142 checks passed
@dsherret dsherret deleted the fix_auto_accessor_definite branch January 19, 2024 17:00
@kdy1 kdy1 modified the milestones: Planned, v1.3.105 Jan 21, 2024
kdy1 pushed a commit that referenced this pull request Jan 21, 2024
**Description:**

Adds a `definite` and `is_override` property to `AutoAccessor` as they were missing.
It also fixes codegen for `AutoAccessor` when emitting TypeScript (which is the main reason I need this PR).

**BREAKING CHANGE:**

Adds a `definite` and `is_override` property.

**Related issue:**

 - Closes #8344
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AutoAccessor missing "definite" in AST
2 participants