You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Category X: jschardet pulled in by @codingame/monaco-vscode-api #4461
`jschardet` (npm) is LGPL-2.1, an ASF Category X license, and cannot ship in an Apache binary distribution. It is pulled in transitively by the direct dependency `@codingame/monaco-vscode-api` (declared in `frontend/package.json` as `"vscode": "npm:@codingame/[email protected]"`).
Texera's own source never references jschardet (verified with grep -r jschardet frontend/src — no matches). The package is pulled in by @codingame/monaco-vscode-api and shipped to the production bundle only because webpack resolves the import from Monaco's code paths. Since those code paths are not exercised by Texera's editor integration, we can replace jschardet with a tiny no-op stub at bundle time and the package will stop appearing in the shipped bundle (and therefore in 3rdpartylicenses.txt and LICENSE-binary).
Suggested change
Add a stub at frontend/stubs/jschardet.js:
// jschardet is LGPL-2.1 and pulled in transitively by @codingame/monaco-vscode-api.// Texera never calls it, so bundle-time aliasing replaces it with a no-op to keep// LGPL code out of the shipped binary distribution.module.exports={detect: ()=>({encoding: "UTF-8",confidence: 1}),detectAll: ()=>[{encoding: "UTF-8",confidence: 1}],};
Extend the existing frontend/custom-webpack.config.js with a resolve.alias entry:
grep -n jschardet frontend/dist/3rdpartylicenses.txt returns no matches (confirming it is no longer bundled).
The jschardet entry can be removed from LICENSE-binary's ASF Category X section once the content PR lands.
Alternatives considered
yarn patch @codingame/monaco-vscode-api to delete jschardet imports upstream. More invasive; harder to maintain across upstream updates.
Replace @codingame/monaco-vscode-api with plain monaco-editor. Would lose VS Code API extensions that Texera's editor depends on.
Yarn resolutions → portal: stub package. Cleaner at install time, but finicky across CI environments.
The webpack-alias approach has the smallest diff, touches only files Texera already maintains, and keeps the LGPL code strictly out of the shipped artifact.
We don't need character encoding auto-detection from jschardet in the code editor, so I'm okay with removing it.
I don't like the proposed solution; it's too hacky. I made a PR for another solution.
Activity
bobbai00 commentedon Apr 22, 2026
Proposed fix (By Claude Code)
Texera's own source never references
jschardet(verified withgrep -r jschardet frontend/src— no matches). The package is pulled in by@codingame/monaco-vscode-apiand shipped to the production bundle only because webpack resolves the import from Monaco's code paths. Since those code paths are not exercised by Texera's editor integration, we can replacejschardetwith a tiny no-op stub at bundle time and the package will stop appearing in the shipped bundle (and therefore in3rdpartylicenses.txtandLICENSE-binary).Suggested change
frontend/stubs/jschardet.js:frontend/custom-webpack.config.jswith aresolve.aliasentry:Verification
After the change:
yarn --cwd frontend run buildcompletes.grep -n jschardet frontend/dist/3rdpartylicenses.txtreturns no matches (confirming it is no longer bundled).jschardetentry can be removed fromLICENSE-binary's ASF Category X section once the content PR lands.Alternatives considered
yarn patch @codingame/monaco-vscode-apito delete jschardet imports upstream. More invasive; harder to maintain across upstream updates.@codingame/monaco-vscode-apiwith plainmonaco-editor. Would lose VS Code API extensions that Texera's editor depends on.resolutions→ portal: stub package. Cleaner at install time, but finicky across CI environments.The webpack-alias approach has the smallest diff, touches only files Texera already maintains, and keeps the LGPL code strictly out of the shipped artifact.
bobbai00 commentedon Apr 22, 2026
@aglinxinyuan I would like to have your inputs on this
aglinxinyuan commentedon Apr 22, 2026
We don't need character encoding auto-detection from jschardet in the code editor, so I'm okay with removing it.
I don't like the proposed solution; it's too hacky. I made a PR for another solution.
chore(dependencies): Remove jschardet from the frontend dependency gr…
bobbai00 commentedon Apr 23, 2026
Reopening: PR #4475 didn't actually remove
jschardet.Reproduced by:
chore(license): drop jschardet from LICENSE-binary
bobbai00 commentedon Apr 23, 2026
@aglinxinyuan can you take another look?
aglinxinyuan commentedon Apr 23, 2026
Working on the fix.
aglinxinyuan commentedon Apr 23, 2026
Made another attempt to fix.
fix(dependencies): remove jschardet from the frontend dependency graph (
chore(license): drop jschardet from LICENSE-binary
chore(dependencies): Remove jschardet from the frontend dependency gr…
fix(dependencies): remove jschardet from the frontend dependency graph (