Skip to content

feat: add @wterm/svelte package#51

Open
maxffarrell wants to merge 5 commits into
vercel-labs:mainfrom
maxffarrell:feat/svelte
Open

feat: add @wterm/svelte package#51
maxffarrell wants to merge 5 commits into
vercel-labs:mainfrom
maxffarrell:feat/svelte

Conversation

@maxffarrell
Copy link
Copy Markdown

@maxffarrell maxffarrell commented Apr 26, 2026

Summary

  • Adds the @wterm/svelte package — a Svelte 5 component wrapping @wterm/dom
  • Introduces a core prop so callers can supply a pre-constructed TerminalCore (e.g. from @wterm/ghostty) instead of relying on the default WASM binary / wasmUrl
  • Props are fully reactive: cols, rows, and cursorBlink sync to the underlying WTerm instance on change
  • All standard div attributes (class, style, id, ARIA props) are forwarded to the root element
  • Adds TerminalHarness.svelte test helper and Vitest tests covering prop reactivity, the core option, and type-level assertions
  • Updates README and docs to document core as a supported prop

Test plan

  • pnpm test passes in packages/@wterm/svelte
  • Type-check passes (pnpm typecheck / svelte-check)
  • Docs page at /svelte renders correctly and lists all props
  • Verify core prop works end-to-end with @wterm/ghostty binary

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@maxffarrell is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 26, 2026

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 26, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm svelte is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: examples/svelte/package.jsonnpm/svelte@5.55.5

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/svelte@5.55.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm svelte2tsx is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: pnpm-lock.yamlnpm/@sveltejs/package@2.5.7npm/svelte2tsx@0.7.53

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/svelte2tsx@0.7.53. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@maxffarrell maxffarrell marked this pull request as ready for review April 26, 2026 17:14
Comment thread packages/@wterm/svelte/.svelte-kit/__package__/Terminal.svelte Outdated
@maxffarrell maxffarrell changed the title feat: Add Svelte support feat: add @wterm/svelte package Apr 28, 2026
maxffarrell and others added 3 commits April 30, 2026 19:39
Brings in @wterm/ghostty package, v0.2.1 + v0.3.0 release changes, and
workspace:* publish fix from upstream. Kept Svelte package and example
from this branch. Resolved conflicts in README, api-reference, configuration,
and core README by including both Svelte and Ghostty content.

Also fixed a pre-existing @vue/test-utils module resolution failure in pnpm's
isolated node_modules by adding packageExtensions to root package.json, and
updated root devDependencies (vitest, prettier, @vitest/coverage-v8) to latest
per AGENTS.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Forwards the `core` option (a pre-constructed TerminalCore) to WTerm so
callers can supply a custom WASM backend (e.g. @wterm/ghostty) without
providing a wasmUrl.

Adds TerminalHarness.svelte test helper and tests for cols/rows reactivity,
cursor-blink toggling, and the new core prop. Updates README and docs to
list core as a supported prop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Svelte 5 code snippets alongside existing React/Vue/Vanilla examples
for all three package integration guides, completing framework parity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant