Devextreme: migrate from gulp to nx - #34301
Conversation
63450e8 to
283094c
Compare
1c67ee5 to
7ff07ad
Compare
There was a problem hiding this comment.
Pull request overview
Migrates DevExtreme’s build and packaging pipeline from Gulp-based orchestration to Nx targets/executors, including new watch-capable executors and relocated build assets under packages/devextreme/build/**.
Changes:
- Remove Gulp entrypoints/dependencies and rewire build/dev workflows to Nx (
dev,dev-watch,all:build, etc.). - Add/extend
devextreme-nx-infra-pluginexecutors (pack-npm, concatenate-files multi-pass + watch, babel-transform watch, bundle watch, build-typescript watch, community locale normalization). - Move build templates/config from
build/gulp/**to purpose-named paths underbuild/**, and update all references/tests.
Reviewed changes
Copilot reviewed 85 out of 92 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/update-version.ts | Updates CLI usage message for Nx-based invocation. |
| tools/scripts/pack.ts | Removes legacy pack helper in favor of Nx executor. |
| tools/scripts/inject-descriptions.ts | Adds standalone script used by Nx target to inject API descriptions. |
| tools/scripts/common/nx.ts | Removes cached-project-graph helper (no longer used). |
| tools/scripts/common/index.ts | Removes legacy assert helper (no longer used). |
| tools/scripts/build-all.ts | Removes Gulp-era build orchestrator; replaced by Nx workflows. |
| pnpm-workspace.yaml | Drops gulp-eslint-new from the catalog. |
| packages/workflows/project.json | Adds release build orchestration targets (inject-descriptions, pack-to-artifacts, all:build). |
| packages/nx-infra-plugin/src/utils/watch.ts | Adds shared chokidar-based watch helper for executors. |
| packages/nx-infra-plugin/src/utils/index.ts | Re-exports new watch utilities. |
| packages/nx-infra-plugin/src/utils/file-operations.ts | Makes EOL normalization deterministic (LF) for generated outputs. |
| packages/nx-infra-plugin/src/executors/vectormap/executor.e2e.spec.ts | Updates test fixture paths after removing build/gulp. |
| packages/nx-infra-plugin/src/executors/pack-npm/schema.ts | Defines options for packing + optional copying/version setting. |
| packages/nx-infra-plugin/src/executors/pack-npm/schema.json | Documents pack-npm options in JSON schema. |
| packages/nx-infra-plugin/src/executors/pack-npm/pack-npm.impl.ts | Implements packing, optional version stamping, and tarball copying. |
| packages/nx-infra-plugin/src/executors/pack-npm/executor.e2e.spec.ts | Adds coverage for new pack-npm options. |
| packages/nx-infra-plugin/src/executors/npm-assemble/executor.e2e.spec.ts | Updates license template path from build/gulp to build/. |
| packages/nx-infra-plugin/src/executors/localization/schema.json | Updates default template paths under build/localization-templates. |
| packages/nx-infra-plugin/src/executors/localization/localization.impl.ts | Updates default template constants to new locations. |
| packages/nx-infra-plugin/src/executors/localization/executor.e2e.spec.ts | Updates localization fixture/template locations. |
| packages/nx-infra-plugin/src/executors/generate-community-locales/schema.ts | Adds schema types for community locale normalization. |
| packages/nx-infra-plugin/src/executors/generate-community-locales/schema.json | Adds schema docs/defaults for locale normalization executor. |
| packages/nx-infra-plugin/src/executors/generate-community-locales/generate-community-locales.impl.ts | Adds executor that normalizes locale JSON files against default locale. |
| packages/nx-infra-plugin/src/executors/generate-community-locales/executor.ts | Exposes executor entrypoint. |
| packages/nx-infra-plugin/src/executors/generate-community-locales/executor.e2e.spec.ts | Adds E2E test coverage for locale normalization. |
| packages/nx-infra-plugin/src/executors/dts-modules/executor.e2e.spec.ts | Updates license template path after gulp removal. |
| packages/nx-infra-plugin/src/executors/dts-bundle/executor.e2e.spec.ts | Updates license template path after gulp removal. |
| packages/nx-infra-plugin/src/executors/copy-files/executor.e2e.spec.ts | Updates license template path after gulp removal. |
| packages/nx-infra-plugin/src/executors/concatenate-files/schema.ts | Adds multi-pass + watch options for concatenate-files. |
| packages/nx-infra-plugin/src/executors/concatenate-files/schema.json | Documents multi-pass + watch options. |
| packages/nx-infra-plugin/src/executors/concatenate-files/executor.e2e.spec.ts | Adds tests for additionalPasses and watch mode. |
| packages/nx-infra-plugin/src/executors/concatenate-files/concatenate-files.impl.ts | Implements multi-pass concatenation and watch mode via shared util. |
| packages/nx-infra-plugin/src/executors/check-declarations/executor.e2e.spec.ts | Updates metadata path after gulp removal. |
| packages/nx-infra-plugin/src/executors/check-declarations/check-declarations.impl.ts | Updates default modules metadata path under build/. |
| packages/nx-infra-plugin/src/executors/bundle/schema.ts | Adds watch option to bundle executor. |
| packages/nx-infra-plugin/src/executors/bundle/schema.json | Documents bundle watch option. |
| packages/nx-infra-plugin/src/executors/bundle/executor.e2e.spec.ts | Adds E2E test for bundle watch behavior. |
| packages/nx-infra-plugin/src/executors/bundle/bundle.impl.ts | Implements webpack watch lifecycle + post-build steps. |
| packages/nx-infra-plugin/src/executors/build-typescript/schema.ts | Adds watch option for TS build executor. |
| packages/nx-infra-plugin/src/executors/build-typescript/schema.json | Documents TS watch option. |
| packages/nx-infra-plugin/src/executors/build-typescript/executor.e2e.spec.ts | Adds E2E test for TS watch mode. |
| packages/nx-infra-plugin/src/executors/build-typescript/build-typescript.impl.ts | Implements TS incremental watch emitting + alias resolution per write. |
| packages/nx-infra-plugin/src/executors/babel-transform/schema.ts | Makes configKey optional and adds watch option. |
| packages/nx-infra-plugin/src/executors/babel-transform/schema.json | Documents optional configKey and watch behavior. |
| packages/nx-infra-plugin/src/executors/babel-transform/executor.e2e.spec.ts | Adds coverage for “flat” config and watch mode. |
| packages/nx-infra-plugin/src/executors/babel-transform/babel-transform.impl.ts | Adds watch mode (incremental per-file) via shared chokidar util. |
| packages/nx-infra-plugin/src/executors/add-license-headers/executor.e2e.spec.ts | Updates license template path after gulp removal. |
| packages/nx-infra-plugin/executors.json | Registers new generate-community-locales executor. |
| packages/nx-infra-plugin/AGENTS.md | Updates documentation to reflect full gulp removal and Nx equivalents. |
| packages/devextreme/testing/tests.babelrc.json | Updates CommonJS modules transform plugin name. |
| packages/devextreme/project.json | Rewires build/dev targets to Nx executors and new build asset paths. |
| packages/devextreme/package.json | Drops gulp scripts and points package scripts to Nx targets. |
| packages/devextreme/gulpfile.js | Removes gulp entrypoint entirely. |
| packages/devextreme/build/vectormap-templates/vectormaputils-template.jst | Adds vectormap templates under new non-gulp path. |
| packages/devextreme/build/vectormap-templates/vectormapdata-template.jst | Adds vectormap templates under new non-gulp path. |
| packages/devextreme/build/transpile-config.js | Adds babel transpile config under new non-gulp path. |
| packages/devextreme/build/modules_metadata.json | Adds modules metadata under new non-gulp path. |
| packages/devextreme/build/localization-templates/localization-template.jst | Adds localization template under new non-gulp path. |
| packages/devextreme/build/localization-templates/generated_js.jst | Adds generated JS template under new non-gulp path. |
| packages/devextreme/build/gulp/vectormap.js | Removes old gulp vectormap task implementation. |
| packages/devextreme/build/gulp/utils.js | Removes old gulp build utilities. |
| packages/devextreme/build/gulp/typescript/logger.js | Removes old gulp TS logger. |
| packages/devextreme/build/gulp/typescript/file-change-manager.js | Removes old gulp TS change tracking. |
| packages/devextreme/build/gulp/typescript/compiler.js | Removes old gulp TS compiler wrapper. |
| packages/devextreme/build/gulp/tsconfig.json | Removes old gulp TS build config. |
| packages/devextreme/build/gulp/transpile.js | Removes old gulp transpile/watch task. |
| packages/devextreme/build/gulp/systemjs.js | Removes old gulp systemjs transpile tasks. |
| packages/devextreme/build/gulp/overwrite-renovation-widget.js | Removes old gulp renovation overwrite helper. |
| packages/devextreme/build/gulp/overwrite-qunit-renovation-widget.js | Removes old gulp qunit renovation overwrite helper. |
| packages/devextreme/build/gulp/npm.js | Removes old gulp npm assembly pipeline. |
| packages/devextreme/build/gulp/localization.js | Removes old gulp localization + community locales task. |
| packages/devextreme/build/gulp/license-header.txt | Removes old gulp license template (moved). |
| packages/devextreme/build/gulp/js-bundles.js | Removes old gulp webpack-stream bundle tasks. |
| packages/devextreme/build/gulp/header-pipes.js | Removes old gulp header pipeline code. |
| packages/devextreme/build/gulp/gulp-data-uri.js | Removes old gulp data-uri helper (moved into themebuilder). |
| packages/devextreme/build/gulp/env-variables.js | Removes old gulp env-flag reader. |
| packages/devextreme/build/gulp/context.js | Removes old gulp context/argv parsing. |
| packages/devextreme/build/gulp/bundler-config.js | Removes old gulp bundler-config generation/watch. |
| packages/devextreme-themebuilder/src/metadata/resolve-data-uri.ts | Rehomes data-uri resolution logic previously in gulp helper. |
| packages/devextreme-themebuilder/src/metadata/generate.ts | Switches metadata generation to use package.json version + new data-uri helper. |
| packages/devextreme-scss/package.json | Removes chokidar dependency (now at repo root). |
| packages/devextreme-monorepo-tools/project.json | Switches pack-and-copy to pack-npm executor. |
| package.json | Rewires root scripts to Nx workflows; adds root chokidar dependency. |
| nx.json | Removes gulpfile from devextreme build inputs. |
| e2e/bundlers/generate_entry_files.js | Updates modules metadata path after relocation. |
| CLAUDE.md | Updates docs to reflect Nx watch build instead of gulp. |
| .vscode/launch.json | Removes Gulp watch launch config. |
| .github/workflows/renovation.yml | Updates CI step to run Nx localization target instead of gulp. |
| .github/workflows/packages_publishing.yml | Switches internal build invocation to all:build:internal. |
| .github/renovate.json | Removes renovate rules suppressing gulp package updates. |
| .github/copilot-instructions.md | Updates repo docs to reflect Nx-only pipeline and workflows. |
Signed-off-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Co-authored-by: Andrey Vorobev <738482+vorobey@users.noreply.github.com>
…h helper (#34339) Signed-off-by: Arman Jivanyan <arman.jivanyan@devexpress.com> Co-authored-by: Andrey Vorobev <738482+vorobey@users.noreply.github.com> Co-authored-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
7ff07ad to
26b5b0a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 85 out of 92 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
tools/scripts/update-version.ts:8
- The usage message contains a duplicated "Usage:" prefix and confusing quoting. It should match the actual npm script invocation (arguments must be forwarded after
--).
packages/devextreme/project.json:1847 - This target is defined twice with the same key (
"test-env"). In JSON the latter entry wins, but duplicate keys are error-prone and can break tooling/validation. Remove the duplicate block so thetargetsmap has unique keys.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 85 out of 92 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
packages/nx-infra-plugin/src/executors/bundle/bundle.impl.ts:214
- Per
packages/nx-infra-plugin/AGENTS.md:37, avoidlogger.infofor routine progress output in executors; uselogger.verboseinstead so non-verbose runs stay clean.
packages/nx-infra-plugin/src/executors/bundle/bundle.impl.ts:205 - Per
packages/nx-infra-plugin/AGENTS.md:37, executors should uselogger.verbosefor routine progress output;logger.infois reserved to avoid polluting non-verbose runs. Please switch this watch progress message tologger.verbose.
This issue also appears on line 214 of the same file.
Resolve pnpm-lock.yaml conflict by regenerating the lockfile from the merged package manifests via pnpm install.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 85 out of 92 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
tools/scripts/inject-descriptions.ts:13
- The script deletes a fixed directory outside the repo root ("../doc_tmp") via
rm -rf, which can collide across concurrent runs and is riskier in local environments (it removes a predictable path outside the workspace). Prefer using a unique temp directory underos.tmpdir()(mkdtemp) and avoid the pre-clonerm -rf.
packages/devextreme-themebuilder/src/metadata/resolve-data-uri.ts:15 dataUriRegexmakes thesvgEncodingcapture group optional, buthandlertypes it as a required string. Typing it asstring | undefinedkeeps the callback signature accurate and avoids passing an incorrectly-typed value through tosvg(...).
const handler = (_: string, svgEncoding: string, fileName: string): string => {
packages/nx-infra-plugin/src/executors/pack-npm/pack-npm.impl.ts:16
- The
setVersionFromoption is not necessarily apackage.json(the executor only requires a JSON file with aversionfield). The current error message hard-codes “package.json”, which can be misleading when a different JSON file is provided.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 85 out of 92 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/nx-infra-plugin/src/executors/concatenate-files/schema.json:70
watchPathsis documented as accepting glob patterns, but the executor resolves these patterns to a fixed list of files once at startup (resolveSourceFiles) and then watches only those concrete files. This means new files matching the glob after the watcher starts will not trigger rebuilds. Either update the schema wording to reflect this behavior, or change the watch implementation to watch directories/patterns so additions are observed.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 85 out of 92 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
packages/nx-infra-plugin/src/executors/generate-community-locales/generate-community-locales.impl.ts:47
- The locale key is interpolated into a RegExp without escaping, and the replacement string interpolates
replaceValuedirectly. This can break normalization for keys containing regex metacharacters (e.g..,?,() and for values containing$(treated as replace-group syntax), and escaping only"does not guarantee the resulting JSON string stays valid (backslashes/newlines/etc). Consider JSON-escaping the value and using a replace callback with an escaped key.
packages/devextreme-themebuilder/src/metadata/resolve-data-uri.ts:15 svgEncodingcomes from an optional capture group indataUriRegex, so it can beundefinedat runtime. Typing it asstringhere is inaccurate and can mask bugs (and forces callers to assume the value is always present).
const handler = (_: string, svgEncoding: string, fileName: string): string => {
No description provided.