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

chore: bump swc #901

Merged
merged 4 commits into from
Sep 28, 2024
Merged

chore: bump swc #901

merged 4 commits into from
Sep 28, 2024

Conversation

himself65
Copy link
Sponsor Contributor

@himself65 himself65 commented Sep 25, 2024

Fixes: #845

Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Sep 28, 2024 3:14am

Copy link

codesandbox-ci bot commented Sep 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -88,7 +88,7 @@
},
"devDependencies": {
"@netlify/functions": "^2.8.1",
"@swc/cli": "^0.4.0",
"@swc/cli": "0.4.1-nightly.20240914",
Copy link
Owner

Choose a reason for hiding this comment

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

Does it conflict if we keep using 0.4.0?

Copy link
Owner

Choose a reason for hiding this comment

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

oh, it is the latest.

const createIdentifier = (value: string): swc.Identifier => ({
type: 'Identifier',
value,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
ctxt: 0,
Copy link
Owner

Choose a reason for hiding this comment

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

Hm, we need it in this position... So, if swc fixes the TS type, the @ts-expect-error will be gone?

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

yes

optional: false,
span: { start: 0, end: 0, ctxt: 0 },
span: createEmptySpan(),
Copy link
Owner

Choose a reason for hiding this comment

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

Just to confirm, does it work if this is span: { start: 0, end: 0 }? Or, does TS complain?

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

span: { start: 0, end: 0 }. swc type is broken

Copy link
Owner

Choose a reason for hiding this comment

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

How is it likely that swc will fix this type issue sometime soon-ish?

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

@dai-shi
Copy link
Owner

dai-shi commented Sep 26, 2024

swc-project/swc#9587

Thanks for opening the upstream issue. It seems like nobody else is using swc like us. 😄
I hope it will be fixed upstream soon.

Actually, there is another issue already filed: swc-project/swc#9564

@himself65
Copy link
Sponsor Contributor Author

well, they recommend write rust

@himself65
Copy link
Sponsor Contributor Author

not sure If I should put rust version of parser to a higher prority.

@dai-shi
Copy link
Owner

dai-shi commented Sep 27, 2024

I don't think it's a priority, unless it's the bottleneck of the performance.

@dai-shi
Copy link
Owner

dai-shi commented Sep 28, 2024

our final goal would be rolldown, maybe?
meanwhile, we can keep using swc from js, or migrate to esbuild??

@dai-shi dai-shi merged commit 49d1ae7 into dai-shi:main Sep 28, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update @swc/core package
2 participants