Skip to content

Speed up generated JS demos check#33782

Open
EugeniyKiyashko wants to merge 7 commits into
DevExpress:26_1from
EugeniyKiyashko:26_1_generated_demos
Open

Speed up generated JS demos check#33782
EugeniyKiyashko wants to merge 7 commits into
DevExpress:26_1from
EugeniyKiyashko:26_1_generated_demos

Conversation

@EugeniyKiyashko
Copy link
Copy Markdown
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko force-pushed the 26_1_generated_demos branch 4 times, most recently from a3e944d to f218d20 Compare June 2, 2026 07:46
@github-actions github-actions Bot added the .d.ts label Jun 2, 2026
@EugeniyKiyashko EugeniyKiyashko marked this pull request as ready for review June 2, 2026 10:44
@EugeniyKiyashko EugeniyKiyashko requested a review from a team as a code owner June 2, 2026 10:44
Copilot AI review requested due to automatic review settings June 2, 2026 10:44
@EugeniyKiyashko EugeniyKiyashko requested a review from a team as a code owner June 2, 2026 10:44
Copy link
Copy Markdown
Contributor

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

Speeds up the "Check generated JS demos" CI step by (1) running the TS→JS conversion only when there are changed React demos, (2) batching prettier/eslint formatting across all generated outputs in chunks of 50 instead of per-demo, and (3) parallelizing demo conversions with a configurable concurrency. Also adds error propagation so failed conversions cause the job to exit non‑zero, adds module declaration files needed for two VectorMap React demos to compile, and reduces the visual-tests matrix from 5 to 2 shards.

Changes:

  • Refactor converter.ts/cli.ts: extract prettifyOutputs, run conversions in concurrent batches (CONVERT_TO_JS_CONCURRENCY, default 8), surface failures via exit code, and stream tsc stdout/stderr on failure.
  • Simplify workflow: pre-compute changed React demo list once, gate all dependent steps on has-react-demos, and feed the list to pnpm run convert-to-js via xargs.
  • Add type declarations for devextreme-dist/js/vectormap-data/{world,usa}.js and adjust a style typing in Diagram/AdvancedDataBinding/React/App.tsx to support TS→JS conversion.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/demos/utils/ts-to-js-converter/converter.ts Adds shell-quoting/posix helpers, chunked prettifyOutputs, returns boolean from converter, prints tsc output on failure, sets preserveSymlinks.
apps/demos/utils/ts-to-js-converter/cli.ts Adds concurrency-controlled batching, collects out dirs, runs prettifyOutputs once at the end, exits non‑zero on failures.
.github/workflows/visual-tests-demos.yml Pre-detects changed React demos, gates steps on the result, calls converter once via xargs; visualtests matrix changed from 5 to 2 shards.
apps/demos/Demos/Diagram/AdvancedDataBinding/React/App.tsx Replaces React.CSSProperties typing with a plain object shape for itemStyleExpr.
apps/demos/Demos/VectorMap/MultipleLayers/React/devextreme-vectormap-data.d.ts New ambient module declaration for world.js vector map data.
apps/demos/Demos/VectorMap/ImageMarkers/React/devextreme-vectormap-data.d.ts New ambient module declaration for usa.js vector map data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants