chore: remove the dead charts-gen tool (2 criticals) - #11550
Conversation
`packages/cubejs-playground/charts-gen` is unreachable dead code carrying its own stale yarn.lock, which is the only thing keeping two critical alerts open: #8233 decompress <= 4.2.1 no patch exists #7227 @babel/traverse < 7.23.2 Evidence it is dead, rather than merely quiet: - **Nothing references it.** No hit for `charts-gen` anywhere outside the directory itself — not in source, not in `.github/**`, and the only package.json match is its own `"name"` field. - **It is not a workspace member.** Root workspaces are `rust/*` and `packages/*`; this sits one level deeper, at `packages/cubejs-playground/charts-gen`, so it is outside the glob and its lockfile is never installed by a normal build. - **cubejs-playground never invokes it.** None of its scripts (`build`, `build:lib`, `build:vizard`, `build:playground`, …) mention charts or chunks. - **It cannot run as checked in.** Its README requires hand-creating a symlink into `node_modules/.tmp` pointing at a separate repo, cube-js/cube-playground-templates — which was last pushed 2022-12-06. Deleting the directory removes 19 files and closes both alerts outright, since the vulnerabilities live only in a lockfile nothing resolves. Same shape as the earlier `packages/load-test` removal. If chart-renderer generation is ever revived it should come back as a real workspace with a current toolchain, not a resurrected 2022 tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @bsod90's task in 1m 25s —— View job Review: approve — deletion is safe. 0 blocking, 1 note worth recordingFull review — verification of each claim, plus one caveat about
|
| Claim | Result |
|---|---|
| No references outside the directory | ✅ git grep -l charts-gen returns nothing repo-wide after deletion |
| Not a workspace member | ✅ root workspaces.packages = ["rust/*", "packages/*"]; the dir sits at packages/cubejs-playground/charts-gen, one level too deep — its yarn.lock is never resolved |
| Playground scripts don't invoke it | ✅ unit, dev, serve, watch, build:lib, build:vizard, build, build:playground — none touch charts or chunks |
| Cannot run as checked in | ✅ env.js points at cube-js/cubejs-playground-templates and the README requires a hand-made symlink into node_modules/.tmp |
The security argument holds: both advisories are anchored in a lockfile that no install path resolves, so deleting the file closes them outright rather than masking them.
One caveat the description doesn't mention (not blocking)
The tool's output still has a live consumer. react/build.sh etc. wrote into ../public/chart-renderers/<framework>/, and that path is loaded at runtime:
packages/cubejs-playground/src/components/ChartRenderer/ChartRenderer.tsx:248
src={`/chart-renderers/${framework}/index.html#queryId=${queryId}`}So this PR removes the only (already-broken) mechanism for regenerating those assets. It doesn't change behavior today, because:
public/chart-renderersis not committed (git ls-files→ 0 matches) and isn't in.gitignore— only/charts-distis;packages/cubejs-playground/README.md:51-52tells developers to copy the directory out ofnode_modules/@cubejs-client/playground/public/chart-renderers, i.e. from a previously published tarball;- the matching e2e spec
packages/cubejs-testing/cypress/e2e/chart-renderers.spec.jsisdescribe.skip(...)with an emptychartTypeByQueryarray, so nothing exercises it in CI either.
In other words the regeneration path was already dead by the time of this PR — the assets are inherited from an old publish. Worth being explicit about in the PR body so the next person who needs to rebuild a chart renderer knows the recipe left with this commit, and that it would have to be rebuilt from scratch on a current toolchain (as the description already concludes).
Other review dimensions
Nothing to review for error handling, input sanitization, performance, or API docs — the change is pure deletion of unreferenced code. No tests to add; no build/lint/CI config referenced the directory, so there is correctly nothing to update alongside. Commit message follows the repo's conventional-commit convention.
Deletes
packages/cubejs-playground/charts-gen— 19 files, 2164 deletions, of which1129 are its own stale
yarn.lock. That lockfile is the only thing keeping two criticalsopen:
decompress <= 4.2.1@babel/traverse < 7.23.2Both close outright, because the vulnerabilities live only in a lockfile nothing resolves.
Why this is dead code, not merely quiet
I checked four independent things rather than relying on "looks unused":
charts-genanywhere outside the directory — not in source, not in.github/**. The onlypackage.jsonmatch is its own"name"field.workspacesarerust/*andpackages/*. This sits one level deeper (packages/cubejs-playground/charts-gen), so it falls outside the glob and its lockfile is never installed by a normal build — which is also why it has been quietly accumulating advisories.cubejs-playgroundnever invokes it. None of its scripts —build,build:lib,build:vizard,build:playground,dev,serve,watch,unit— mention charts or chunks.node_modules/.tmppointing at a separate repo,cube-js/cube-playground-templates— last pushed 2022-12-06.So even a developer who wanted to use it would need a 3.5-year-stale sibling checkout and a manual symlink.
Same shape as the earlier
packages/load-testremoval.Verification
git grep charts-genafter the deletion returns nothing outside the rootyarn.lockIf chart-renderer generation is ever wanted again, it should return as a real workspace on
a current toolchain rather than a resurrected 2022 tree.
🤖 Generated with Claude Code