chore: use path.resolve to find tree-sitter wasm files#407
Merged
Strum355 merged 1 commit intoMar 11, 2026
Conversation
Review Summary by QodoUse path.resolve for tree-sitter WASM file loading
WalkthroughsDescription• Replace CommonJS require.resolve with path.resolve for WASM file resolution • Improve webpack compatibility by using explicit path resolution • Remove unnecessary createRequire import and usage Diagramflowchart LR
A["CommonJS require.resolve"] -->|Replace with| B["path.resolve"]
C["createRequire import"] -->|Remove| D["path import"]
B -->|Load WASM| E["Language.load"]
File Changes1. src/providers/requirements_parser.js
|
Code Review by Qodo
1. Broken WASM resolution
|
Strum355
enabled auto-merge (squash)
March 11, 2026 16:43
Strum355
force-pushed
the
nsc/requirements-txt-treesitter-3
branch
from
March 11, 2026 16:54
65c0c03 to
d7338b5
Compare
Strum355
force-pushed
the
nsc/requirements-txt-treesitter-3
branch
from
March 11, 2026 17:00
d7338b5 to
28746ce
Compare
ruromero
approved these changes
Mar 11, 2026
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.
Description
The existing way seemed to be problematic for webpack when trying to integrate into https://github.com/fabric8-analytics/fabric8-analytics-vscode-extension/, this approach appears to work correctly (I've found an approach to testing integrating this library into the vscode extension that should correctly catch these kinds of issues via
npm pack)Checklist