enhance: remove Takumi Vite plugin by kane50613 · Pull Request #1008 · TanStack/tanstack.com · GitHub
Skip to content

enhance: remove Takumi Vite plugin#1008

Open
kane50613 wants to merge 1 commit into
TanStack:mainfrom
kane50613:migrate-og-takumi-v2
Open

enhance: remove Takumi Vite plugin#1008
kane50613 wants to merge 1 commit into
TanStack:mainfrom
kane50613:migrate-og-takumi-v2

Conversation

@kane50613

@kane50613 kane50613 commented Jun 25, 2026

Copy link
Copy Markdown

Drop the @takumi-rs/* v1 packages for takumi-js 2.0.0-beta.14. and remove the hacky wasm import plugin

Follow up on #893 (comment)

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Improved social preview (Open Graph) image generation by switching to the newer response library and updating embedded “island” PNG handling for more reliable rendering.
  • Chores

    • Updated package dependencies to replace the older scoped Takumi libraries with takumi-js.
    • Simplified Vite build/SSR configuration by removing the custom WASM import plugin and related WASM resolution/optimization exclusions.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtakumi-js@​2.0.0-beta.147510010096100

View full report

@socket-security

socket-security Bot commented Jun 25, 2026

Copy link
Copy Markdown

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 @takumi-rs/wasm is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/takumi-js@2.0.0-beta.14npm/@takumi-rs/wasm@2.0.0-beta.14

ℹ 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/@takumi-rs/wasm@2.0.0-beta.14. 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 Medium
Low adoption: npm @takumi-rs/core-darwin-x64

Location: Package overview

From: pnpm-lock.yamlnpm/takumi-js@2.0.0-beta.14npm/@takumi-rs/core-darwin-x64@2.0.0-beta.14

ℹ Read more on: This package | This alert | What are unpopular packages?

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: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@takumi-rs/core-darwin-x64@2.0.0-beta.14. 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 Medium
Low adoption: npm @takumi-rs/core-win32-arm64-msvc

Location: Package overview

From: pnpm-lock.yamlnpm/takumi-js@2.0.0-beta.14npm/@takumi-rs/core-win32-arm64-msvc@2.0.0-beta.14

ℹ Read more on: This package | This alert | What are unpopular packages?

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: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@takumi-rs/core-win32-arm64-msvc@2.0.0-beta.14. 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

@kane50613

kane50613 commented Jun 25, 2026

Copy link
Copy Markdown
Author

@AlemTuzlak please take a look at this follow up PR if you could thanks!

Btw you can go a step further if you want to try the new on-demand google fonts feature to get rid of those static font assets

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

107-107: 📐 Maintainability & Code Quality | 🔵 Trivial

Pin the beta version exactly to ensure reproducible builds.

The caret range ^2.0.0-beta.10 allows NPM to install any version from 2.0.0-beta.10 up to <3.0.0. Since npm defaults to the latest dist-tag (version 1.8.7) and may skip over specific pre-release versions unless explicitly targeted or updated to newer betas (e.g., 2.0.0-beta.11) if available, using a range with unstable pre-1.0 releases risks introducing breaking changes during standard installs. Pin the version to maintain consistency.

📌 Proposed change
-    "takumi-js": "^2.0.0-beta.10",
+    "takumi-js": "2.0.0-beta.10",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 107, The takumi-js dependency is using a caret beta
range, which can vary across installs and reduce build reproducibility. Update
the dependency declaration in package.json to pin takumi-js exactly to the
current beta version instead of using the ^2.0.0-beta.10 range, keeping the
package specification stable for deterministic installs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Line 107: The takumi-js dependency is using a caret beta range, which can vary
across installs and reduce build reproducibility. Update the dependency
declaration in package.json to pin takumi-js exactly to the current beta version
instead of using the ^2.0.0-beta.10 range, keeping the package specification
stable for deterministic installs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 781fc453-203f-4492-bfe1-8e8f24c806cd

📥 Commits

Reviewing files that changed from the base of the PR and between 3bf7280 and cd1aa16.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • package.json
  • src/server/og/generate.server.ts
  • vite.config.ts
💤 Files with no reviewable changes (1)
  • vite.config.ts

@kane50613 kane50613 force-pushed the migrate-og-takumi-v2 branch from cd1aa16 to 672fe1b Compare June 25, 2026 08:41
@AlemTuzlak

Copy link
Copy Markdown
Contributor

@kane50613 looks good, before i merge I just wanted to clarify for myself, why is the wasm hack not required anymore?

@kane50613

kane50613 commented Jun 25, 2026

Copy link
Copy Markdown
Author

Drop the @takumi-rs/* packages for takumi-js 2.0.0-beta.14. The umbrella
package selects its backend from `#backend` import conditions, so workerd
resolves to wasm on its own — removing the manual vite plugin, alias, and
optimizeDeps plumbing that forced the wasm runtime. As of beta.14
`@takumi-rs/wasm/auto` also ships a `workerd` export condition, so the
runtime-path alias is redundant.

Claude-Session: https://claude.ai/code/session_01D3zuhNfMa88CFL7MBLHmfP
@kane50613 kane50613 force-pushed the migrate-og-takumi-v2 branch from 274d1b2 to 65f2fc1 Compare June 26, 2026 17:31
@kane50613 kane50613 changed the title feat: migrate OG generation to takumi-js v2 enhance: remove Takumi Vite plugin Jun 26, 2026
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.

2 participants