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 lazy-controller detection when controller contain static properties (update acorn ECMAScript version) #93

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

ameotoko
Copy link
Contributor

@ameotoko ameotoko commented Jan 5, 2025

Fixes #84

acorn should be configured to use ECMAScript version 2022 instead of 2020, which does not support static class properties.

See #84 (comment) for explanation.

Copy link
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

Thanks @ameotoko, can you add a test to ensure it works as expected and to prevent regressions?

Thanks 🙏🏻

@Kocal Kocal added the Bug Bug Fix label Jan 6, 2025
@ameotoko
Copy link
Contributor Author

ameotoko commented Jan 7, 2025

@Kocal I have zero experience with JS tests, but this should do it. Can you take a look please?

@Kocal
Copy link
Member

Kocal commented Jan 8, 2025

That's perfect, thanks!

@Kocal Kocal changed the title Update ECMAScript version in acorn config Fix lazy-controller detection when controller contain static properties (update acorn ECMAScript version) Jan 8, 2025
@Kocal
Copy link
Member

Kocal commented Jan 8, 2025

Thanks @ameotoko.

@Kocal Kocal merged commit a5fcd7e into symfony:main Jan 8, 2025
2 checks passed
@ameotoko
Copy link
Contributor Author

ameotoko commented Jan 8, 2025

@Kocal this also fixes #91 (duplicate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stimulusFetch: 'lazy' doesn't work if the controller has any static property
2 participants