From 5f53d053386fde632edbf70f01660a1e4876b937 Mon Sep 17 00:00:00 2001 From: EugeniyKiyashko Date: Tue, 6 Oct 2026 13:09:43 +0400 Subject: [PATCH 1/2] React: import the template types relatively `src/core/template` resolved only through the package tsconfig baseUrl and was copied verbatim into the published cjs/core/configuration/react/templates.d.ts, where a consumer with skipLibCheck: false gets TS2307. The import is type-only, the emitted JS does not change. --- .../devextreme-react/src/core/configuration/react/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/devextreme-react/src/core/configuration/react/templates.ts b/packages/devextreme-react/src/core/configuration/react/templates.ts index 34d7d6b7a196..82d262961b19 100644 --- a/packages/devextreme-react/src/core/configuration/react/templates.ts +++ b/packages/devextreme-react/src/core/configuration/react/templates.ts @@ -1,4 +1,4 @@ -import { ITemplateMeta, ITemplateProps } from 'src/core/template'; +import { ITemplateMeta, ITemplateProps } from '../../template'; import { ITemplate } from '../../types'; function getAnonymousTemplate( From 4113b82725f995d587bc335ef9953d4f20634acb Mon Sep 17 00:00:00 2001 From: EugeniyKiyashko Date: Tue, 6 Oct 2026 13:09:46 +0400 Subject: [PATCH 2/2] Wrappers: verify the published React and Vue declarations with the consumer floor compiler A new verify:dts target runs the check-declarations executor over npm/cjs/**/*.d.ts with typescript-min (4.9.5), baseUrl pointing at npm/ so that workspace-only specifiers (src/..., devextreme/artifacts/npm/...) cannot resolve, and devextreme/* mapped to the built devextreme package. Wrappers Tests runs it after pack for react and vue. typescript-min becomes a devDependency of both wrappers so the executor resolves the floor compiler from the package. --- .github/workflows/wrapper_tests.yml | 4 ++++ packages/devextreme-react/package.json | 1 + packages/devextreme-react/project.json | 20 ++++++++++++++++++++ packages/devextreme-vue/package.json | 1 + packages/devextreme-vue/project.json | 20 ++++++++++++++++++++ pnpm-lock.yaml | 6 ++++++ 6 files changed, 52 insertions(+) diff --git a/.github/workflows/wrapper_tests.yml b/.github/workflows/wrapper_tests.yml index d701f6757a7a..c0933a7b2ea0 100644 --- a/.github/workflows/wrapper_tests.yml +++ b/.github/workflows/wrapper_tests.yml @@ -242,3 +242,7 @@ jobs: - name: Pack ${{ matrix.framework }} run: pnpm exec nx pack devextreme-${{ matrix.framework }} + + - name: Verify ${{ matrix.framework }} declarations + if: matrix.framework != 'angular' + run: pnpm exec nx verify:dts devextreme-${{ matrix.framework }} diff --git a/packages/devextreme-react/package.json b/packages/devextreme-react/package.json index 748d6b5609df..9ceb7ca1b13a 100644 --- a/packages/devextreme-react/package.json +++ b/packages/devextreme-react/package.json @@ -77,6 +77,7 @@ "react-dom": "18.3.1", "ts-jest": "29.4.12", "typescript": "catalog:tools", + "typescript-min": "npm:typescript@4.9.5", "eslint": "catalog:", "@babel/eslint-parser": "catalog:", "@eslint/eslintrc": "catalog:", diff --git a/packages/devextreme-react/project.json b/packages/devextreme-react/project.json index 0d298f795ac2..9e04ea0b498d 100644 --- a/packages/devextreme-react/project.json +++ b/packages/devextreme-react/project.json @@ -156,6 +156,26 @@ ], "inputs": ["default"] }, + "verify:dts": { + "executor": "devextreme-nx-infra-plugin:check-declarations", + "options": { + "mode": "modules", + "modulesPattern": "./npm/cjs/**/*.d.ts", + "typescriptModule": "typescript-min", + "compilerOptions": { + "types": [], + "lib": ["ES2020", "DOM"], + "baseUrl": "./npm", + "paths": { "devextreme/*": ["../../devextreme/artifacts/npm/devextreme/*"] } + } + }, + "dependsOn": ["build:cjs"], + "inputs": [ + "{projectRoot}/npm/cjs/**/*.d.ts", + "{workspaceRoot}/packages/devextreme/artifacts/npm/devextreme/**/*.d.ts" + ], + "cache": true + }, "test": { "executor": "nx:run-script", "options": { diff --git a/packages/devextreme-vue/package.json b/packages/devextreme-vue/package.json index a8f5053e5f55..5c265be21d9e 100644 --- a/packages/devextreme-vue/package.json +++ b/packages/devextreme-vue/package.json @@ -72,6 +72,7 @@ "jest-environment-jsdom": "30.4.1", "ts-jest": "29.4.12", "typescript": "catalog:tools", + "typescript-min": "npm:typescript@4.9.5", "vue": "3.2.47", "@vue/shared": "3.4.26", "vue-router": "4.2.5", diff --git a/packages/devextreme-vue/project.json b/packages/devextreme-vue/project.json index 29a3ec6940eb..6273cc029a6b 100644 --- a/packages/devextreme-vue/project.json +++ b/packages/devextreme-vue/project.json @@ -178,6 +178,26 @@ ], "inputs": ["default"] }, + "verify:dts": { + "executor": "devextreme-nx-infra-plugin:check-declarations", + "options": { + "mode": "modules", + "modulesPattern": "./npm/cjs/**/*.d.ts", + "typescriptModule": "typescript-min", + "compilerOptions": { + "types": [], + "lib": ["ES2020", "DOM"], + "baseUrl": "./npm", + "paths": { "devextreme/*": ["../../devextreme/artifacts/npm/devextreme/*"] } + } + }, + "dependsOn": ["build:cjs"], + "inputs": [ + "{projectRoot}/npm/cjs/**/*.d.ts", + "{workspaceRoot}/packages/devextreme/artifacts/npm/devextreme/**/*.d.ts" + ], + "cache": true + }, "test": { "executor": "nx:run-script", "options": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 611eb81c9ead..519b89805c6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1845,6 +1845,9 @@ importers: typescript: specifier: catalog:tools version: 5.9.3 + typescript-min: + specifier: npm:typescript@4.9.5 + version: typescript@4.9.5 publishDirectory: npm packages/devextreme-scss: @@ -2037,6 +2040,9 @@ importers: typescript: specifier: catalog:tools version: 5.9.3 + typescript-min: + specifier: npm:typescript@4.9.5 + version: typescript@4.9.5 vue: specifier: 3.2.47 version: 3.2.47