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(codemods): Codemods create extra parentheses #1727

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

pavelklibani
Copy link
Contributor

@pavelklibani pavelklibani commented Oct 23, 2024

Description

Sometimges codemods are adding extra parentheses around component and it should not.

There is a bug in recast library used by jscodeshift(codemod library) casing this behaviour.

Additional context

It will happen when there is return statement in the component.

More info can be found here:
facebook/jscodeshift#534
benjamn/recast#1406

Issue reference

Codemods are adding extra parentheses

@github-actions github-actions bot added the bug Something isn't working label Oct 23, 2024
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for spirit-design-system ready!

Name Link
🔨 Latest commit ed08f81
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system/deploys/67477110c8860c0008ccb2f9
😎 Deploy Preview https://deploy-preview-1727--spirit-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 91 (no change from production)
Best Practices: 100 (no change from production)
SEO: 91 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for spirit-design-system-storybook canceled.

Name Link
🔨 Latest commit ed08f81
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/67477110c843a30008917614

@pavelklibani pavelklibani force-pushed the fix/ds-1529-codemod-paretheses branch from 99e5996 to 77f43f0 Compare October 23, 2024 19:25
@crishpeen crishpeen force-pushed the integration/BC-v3-design-tokens branch from fa33a68 to bab5113 Compare November 5, 2024 12:47
@crishpeen crishpeen force-pushed the fix/ds-1529-codemod-paretheses branch from 77f43f0 to 3dfd2a0 Compare November 5, 2024 12:57
@crishpeen crishpeen force-pushed the integration/BC-v3-design-tokens branch from c1a59e5 to cf52609 Compare November 12, 2024 14:49
@crishpeen crishpeen force-pushed the fix/ds-1529-codemod-paretheses branch from 3dfd2a0 to 76e0978 Compare November 12, 2024 14:57
@crishpeen crishpeen force-pushed the integration/BC-v3-design-tokens branch from 3a41dee to 271af54 Compare November 19, 2024 18:50
@crishpeen crishpeen force-pushed the fix/ds-1529-codemod-paretheses branch from c51d9a0 to 1033949 Compare November 19, 2024 18:59
@literat literat force-pushed the integration/BC-v3-design-tokens branch from e6acc7f to 45fe689 Compare November 22, 2024 16:30
@pavelklibani pavelklibani changed the base branch from integration/BC-v3-design-tokens to main November 27, 2024 18:57
@pavelklibani pavelklibani force-pushed the fix/ds-1529-codemod-paretheses branch 2 times, most recently from 3c68cd9 to eeeb900 Compare November 27, 2024 19:14
- codemods were adding extra parentheses to the
code when there was return statement
@pavelklibani pavelklibani force-pushed the fix/ds-1529-codemod-paretheses branch from eeeb900 to ed08f81 Compare November 27, 2024 19:20
@pavelklibani pavelklibani marked this pull request as ready for review November 28, 2024 09:59
@pavelklibani pavelklibani merged commit 9130a33 into main Dec 2, 2024
20 checks passed
@pavelklibani pavelklibani deleted the fix/ds-1529-codemod-paretheses branch December 2, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants