Skip to content

Update frontend stack#7651

Open
denisov-vlad wants to merge 36 commits intogetredash:masterfrom
denisov-vlad:node24
Open

Update frontend stack#7651
denisov-vlad wants to merge 36 commits intogetredash:masterfrom
denisov-vlad:node24

Conversation

@denisov-vlad
Copy link
Member

@denisov-vlad denisov-vlad commented Mar 1, 2026

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

  • Node version updated to 24
  • Switched from yarn to pnpm to increase build speed
  • Updated some dependencies

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Copilot AI review requested due to automatic review settings March 1, 2026 16:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the frontend toolchain to Node 24 and pnpm, refreshes key build dependencies (Webpack/Babel/TypeScript/Jest/ESLint), and updates various webpack + TypeScript codepaths to be compatible with the newer stack (including replacing legacy webpack loaders and cleaning up TS migration annotations).

Changes:

  • Switch package management from yarn to pnpm (workspace setup, scripts, CI, Docker, Netlify).
  • Update Node version targets to 24 across developer tooling and pipelines.
  • Modernize webpack configuration (asset modules, less-loader options, ESLintWebpackPlugin) and adjust viz-lib code/tsconfig for newer TypeScript.

Reviewed changes

Copilot reviewed 65 out of 69 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
webpack.config.js Enables symlink resolution for pnpm workspaces; replaces deprecated loaders with webpack asset modules; adds ESLintWebpackPlugin.
viz-lib/tsconfig.json Pins several TS compiler options to maintain compatibility with upgraded TypeScript.
viz-lib/src/visualizations/word-cloud/Renderer.tsx Adjusts typings to reduce TS migration suppression.
viz-lib/src/visualizations/table/Renderer.tsx Refactors defaultProps typing to avoid typeof Component.defaultProps typing issues.
viz-lib/src/visualizations/table/Editor/ColumnEditor.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/sunburst/initSunburst.ts Replaces TS migration suppressions with broader any typing for hierarchy building.
viz-lib/src/visualizations/registeredVisualizations.ts Reduces TS migration suppressions by typing visualization entries as any.
viz-lib/src/visualizations/pivot/Renderer.tsx Adds inline TS ignore note for PivotTableUI type mismatch.
viz-lib/src/visualizations/pivot/Editor.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/funnel/Renderer/FunnelBar.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/details/Editor/ColumnEditor.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/counter/Editor/GeneralSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/counter/Editor/FormatSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/cohort/Cornelius.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/choropleth/maps/convert-projection.ts Removes TS suppression around d3.geo access.
viz-lib/src/visualizations/choropleth/Renderer/utils.ts Adds casting to satisfy TS when accessing data[code].value.
viz-lib/src/visualizations/choropleth/Renderer/Legend.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/choropleth/Editor/GeneralSettings.tsx Adds casting for index access to satisfy TS.
viz-lib/src/visualizations/choropleth/Editor/FormatSettings.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/chart/plotly/prepareLayout.ts Adds casts for arithmetic on index to satisfy TS.
viz-lib/src/visualizations/chart/getChartData.ts Adds cast to satisfy TS when reading zIndex.
viz-lib/src/visualizations/chart/Renderer/initChart.ts Tightens process return type and adds any typing for result object.
viz-lib/src/visualizations/chart/Renderer/CustomPlotlyChart.tsx Removes obsolete TS suppression comments for Plotly purge calls.
viz-lib/src/visualizations/chart/Editor/YAxisSettings.tsx Removes redundant TS suppression comments.
viz-lib/src/visualizations/chart/Editor/XAxisSettings.tsx Removes redundant TS suppression comments.
viz-lib/src/visualizations/chart/Editor/SeriesSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/chart/Editor/PieColorsSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/chart/Editor/DefaultColorsSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/chart/Editor/CustomChartSettings.tsx Removes redundant TS suppression comment.
viz-lib/src/visualizations/chart/Editor/ColumnMappingSelect.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/chart/Editor/ChartTypeSelect.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/chart/Editor/AxisSettings.tsx Refactors defaultProps typing pattern.
viz-lib/src/visualizations/box-plot/d3box.ts Replaces several TS suppressions with explicit any annotations.
viz-lib/src/components/visualizations/editor/withControlLabel.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/visualizations/editor/createTabbedEditor.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/visualizations/editor/Switch.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/visualizations/editor/Section.tsx Refactors defaultProps typing pattern for Section and Title.
viz-lib/src/components/visualizations/editor/ContextHelp.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/sortable/index.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/json-view-interactive/JsonViewInteractive.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/TextAlignmentSelect/index.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/ErrorBoundary.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/ColorPicker/index.tsx Refactors defaultProps typing pattern and loosens typing around triggerProps.
viz-lib/src/components/ColorPicker/Swatch.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/ColorPicker/Label.tsx Refactors defaultProps typing pattern.
viz-lib/src/components/ColorPicker/Input.tsx Refactors defaultProps typing pattern.
viz-lib/package.json Updates scripts from yarn→pnpm and bumps build/test toolchain dependencies.
viz-lib/README.md Updates installation instructions from yarn→pnpm.
viz-lib/.gitignore Replaces yarn debug logs with pnpm debug log.
viz-lib/.babelrc Updates Babel plugin to @babel/plugin-transform-class-properties.
scripts/webpack/color-rgba-compat.js Adds a shim intended to address ESM/CJS interop for color-rgba under pnpm hoisting.
pnpm-workspace.yaml Adds pnpm workspace configuration and built-dependency allowlist.
package.json Switches scripts from yarn→pnpm, updates dependency versions, and configures pnpm workspace dependency for @redash/viz.
netlify.toml Updates Netlify build to use pnpm + Node 24.
client/cypress/cypress.js Updates usage text to pnpm.
client/.eslintrc.js Adjusts prettier/TS-eslint integration and disables camelcase via core rule.
client/.babelrc Updates Babel plugin to @babel/plugin-transform-class-properties.
Makefile Updates frontend targets to use pnpm.
Dockerfile Updates frontend builder stage to Node 24 and installs pnpm; uses BuildKit cache mounts for pnpm store.
.yarn/.gitignore Removes yarn-specific ignore file content.
.nvmrc Updates local Node version to v24.
.npmrc Adds pnpm-related settings (auto peer install + shameful hoist) and normalizes engine-strict.
.github/workflows/preview-image.yml Updates preview workflow to Node 24 and pnpm caching/setup.
.github/workflows/ci.yml Updates CI Node version to 24, switches yarn steps to pnpm.
.ci/Dockerfile.cypress Switches Cypress image dependency install steps to pnpm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 69 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Dockerfile">

<violation number="1" location="Dockerfile:1">
P1: The frontend builder image is upgraded to Node 24, but the documented project dependency range is `node@>16.0 <21.0`. This mismatch can break installs/builds for dependencies that expect Node <21. Use a Node version within the supported range or update the documented constraint as part of the change.</violation>
</file>

<file name="package.json">

<violation number="1" location="package.json:96">
P2: @types/react/@types/react-dom are bumped to v17 while React remains 16.14.0. Align the React type versions with the React runtime (or upgrade React) to avoid TypeScript incompatibilities.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

"@types/prop-types": "^15.7.3",
"@types/react": "^16.14.2",
"@types/react-dom": "^16.9.10",
"@types/react": "^17.0.0",
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 1, 2026

Choose a reason for hiding this comment

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

P2: @types/react/@types/react-dom are bumped to v17 while React remains 16.14.0. Align the React type versions with the React runtime (or upgrade React) to avoid TypeScript incompatibilities.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 96:

<comment>@types/react/@types/react-dom are bumped to v17 while React remains 16.14.0. Align the React type versions with the React runtime (or upgrade React) to avoid TypeScript incompatibilities.</comment>

<file context>
@@ -79,84 +77,82 @@
     "@types/prop-types": "^15.7.3",
-    "@types/react": "^16.14.2",
-    "@types/react-dom": "^16.9.10",
+    "@types/react": "^17.0.0",
+    "@types/react-dom": "^17.0.0",
     "@types/sql-formatter": "^2.3.0",
</file context>
Fix with Cubic

Copy link
Member Author

@denisov-vlad denisov-vlad Mar 1, 2026

Choose a reason for hiding this comment

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

That's ok, react17 is backward-compatible

Copy link

Choose a reason for hiding this comment

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

Thanks for the feedback! I've saved this as a new learning to improve future reviews.

Copy link

Choose a reason for hiding this comment

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

Got it, thanks for the clarification—I'll remember this for future reviews.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 18 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="viz-lib/package.json">

<violation number="1" location="viz-lib/package.json:108">
P2: The Jest transform now references `babel-jest`, but `babel-jest` is not listed in devDependencies. Tests will fail with "Cannot find module 'babel-jest'" unless it is added.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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.

3 participants