Skip to content

feat: introduce twoslash-svelte - #57

Merged
antfu merged 52 commits into
twoslashes:mainfrom
Hugos68:feat/svelte
Jun 5, 2026
Merged

antfu merged 52 commits into
twoslashes:mainfrom
Hugos68:feat/svelte

Conversation

@Hugos68

@Hugos68 Hugos68 commented Oct 29, 2024 •

Copy link
Copy Markdown
Contributor

This PR attempts to create twoslash-svelte which is an extension of twoslashthat supports Svelte.

@netlify

netlify Bot commented Oct 29, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for twoslash ready!

Name Link
🔨 Latest commit b3e4639
🔍 Latest deploy log https://app.netlify.com/sites/twoslash/deploys/67e119f1d636fc000882f10f
😎 Deploy Preview https://deploy-preview-57--twoslash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Hugos68
Hugos68 marked this pull request as draft October 30, 2024 09:13
@Hugos68

Hugos68 commented Oct 31, 2024 •

Copy link
Copy Markdown
Contributor Author

@antfu @orta
A review would be appreiciated, I'm now at a point where I feel confident I have the code working. I was able to copy some code from twoslash-vue as it works similarly (convert source to tsx then typecheck and use sourcemaps to backtrack the original location).

All that's left is tests.

@Hugos68
Hugos68 marked this pull request as ready for review October 31, 2024 09:35
@orta

orta commented Oct 31, 2024

Copy link
Copy Markdown
Member

From a high level, this looks very cool to me!

@Hugos68

Hugos68 commented Dec 19, 2024

Copy link
Copy Markdown
Contributor Author

@dominikg, I might need some help as you're one of the maintainers of svelte2tsx correct?
When compiling the tsx coming from svelte2tsx how can I include the .d.ts files? I've tried many methods but can't find a consistent way where the user can install svelte2tsx and the twoslash-svelte package can use those files.

@Hugos68
Hugos68 marked this pull request as draft January 20, 2025 10:44
@ghost

ghost commented Feb 2, 2025 •

Copy link
Copy Markdown

@dominikg, I might need some help as you're one of the maintainers of svelte2tsx correct?

sorry for not responding sooner. I do not maintain svelte2tsx, @dummdidumm would be the best person to reach out to, you can try #editor-tools-questions on https://svelte.dev/chat

@Hugos68

Hugos68 commented Feb 2, 2025

Copy link
Copy Markdown
Contributor Author

No problem, and thanks, will do!

@Hugos68
Hugos68 marked this pull request as ready for review March 24, 2025 09:00
@Hugos68

Hugos68 commented Mar 24, 2025

Copy link
Copy Markdown
Contributor Author

@antfu This is ready for review

@Hugos68 Hugos68 changed the title Feat: twoslash-svelte feat: twoslash-svelte Mar 24, 2025
@PuruVJ

PuruVJ commented Apr 5, 2025

Copy link
Copy Markdown

Side comment, do remember to add svelte to dependencies or peers dependencies or devDependency :)

@Hugos68

Hugos68 commented Apr 5, 2025

Copy link
Copy Markdown
Contributor Author

@PuruVJ Good call! Thanks, will do.

antfu added 2 commits June 4, 2026 22:08
- bump version to match monorepo
- fix variable naming for source vs generated converters
- await vitest snapshots
- export alias `createTwoslasherSvelte`
- update snapshots
@netlify

netlify Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for twoslash ready!

Name Link
🔨 Latest commit 6384a37
🔍 Latest deploy log https://app.netlify.com/projects/twoslash/deploys/6a22142bec81a70009c1b272
😎 Deploy Preview https://deploy-preview-57--twoslash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@codecov

codecov Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.60000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.50%. Comparing base (b85ea15) to head (6384a37).

Files with missing lines Patch % Lines
packages/twoslash-svelte/src/index.ts 86.29% 15 Missing and 2 partials ⚠️
packages/twoslash-vue/src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
- Coverage   91.17%   90.50%   -0.67%     
==========================================
  Files          16       17       +1     
  Lines         918     1043     +125     
  Branches      298      332      +34     
==========================================
+ Hits          837      944     +107     
- Misses         77       93      +16     
- Partials        4        6       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@antfu

antfu commented Jun 5, 2026

Copy link
Copy Markdown
Member

Thanks a lot for the PR, and sorry for the late (very late) review

@antfu antfu changed the title feat: twoslash-svelte feat: introduce twoslash-svelte Jun 5, 2026
@antfu
antfu merged commit 7765c5c into twoslashes:main Jun 5, 2026
9 of 11 checks passed
@Hugos68

Hugos68 commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor Author

@antfu No problem and thank you! When do you expect this package will release?

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.

4 participants