Speed up generated JS demos check#33782
Open
EugeniyKiyashko wants to merge 7 commits into
Open
Conversation
a3e944d to
f218d20
Compare
f218d20 to
86d38e9
Compare
Contributor
There was a problem hiding this comment.
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: extractprettifyOutputs, 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 topnpm run convert-to-jsviaxargs. - Add type declarations for
devextreme-dist/js/vectormap-data/{world,usa}.jsand adjust astyletyping inDiagram/AdvancedDataBinding/React/App.tsxto 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. |
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.
No description provided.