Conversation
- Add @wasm-fmt/ruff_fmt as devDependency for build-time bundling - Add static import hint in main.ts so ncc can detect the package - Bundle WASM binary (ruff_fmt_bg.wasm) to dist for runtime usage - Add Jest mock to prevent test failures with ESM-only package This fixes the "Cannot find package '@wasm-fmt/ruff_fmt'" error that occurred when gitstream-core 2.1.216+ tried to initialize Python formatting. The solution works for both environments: - GitHub Actions: WASM bundled by ncc, loaded via dynamic import - Lambda: WASM loaded from node_modules via dynamic import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
EladKohavi
approved these changes
Nov 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a runtime error where the GitHub Action failed with "Cannot find package '@wasm-fmt/ruff_fmt'" when using gitstream-core 2.1.216 or later.
What Changed
When gitstream-core added WASM-based Python formatting support, the GitHub Action couldn't find the required WASM package at runtime because it wasn't being bundled by ncc.
This PR:
Testing
Related
https://linearb.atlassian.net/browse/LINBEE-20287
CHANGELOG
🐛 Bug Fixes