From 14659741d9865a006b8dde916ec4373561c7ab70 Mon Sep 17 00:00:00 2001 From: Ilya Vinogradov Date: Fri, 8 Sep 2023 06:42:01 +0400 Subject: [PATCH] Scheduler: Fix build --- packages/devextreme/build/gulp/generator/gulpfile.js | 8 ++++++-- packages/devextreme/build/gulp/transpile.js | 7 +++++-- packages/devextreme/build/gulp/typescript/compiler.js | 4 ++-- packages/devextreme/js/__internal/tsconfig.json | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/devextreme/build/gulp/generator/gulpfile.js b/packages/devextreme/build/gulp/generator/gulpfile.js index b46a2f53e3bc..55faac948fcb 100644 --- a/packages/devextreme/build/gulp/generator/gulpfile.js +++ b/packages/devextreme/build/gulp/generator/gulpfile.js @@ -47,6 +47,10 @@ const knownErrors = [ // #endregion ]; +const GENERATE_COMPONENTS_OPTIONS = { + excludePathPatterns: ['__internal'], +}; + function deleteJQueryComponents(cb) { del.sync(jQueryComponentsGlob); cb(); @@ -66,7 +70,7 @@ function generateJQueryComponents(isWatch) { )) : gulp.src(SRC); return pipe - .pipe(generateComponents(generator)) + .pipe(generateComponents(generator, GENERATE_COMPONENTS_OPTIONS)) .pipe(plumber(()=>null)) .pipe(gulp.dest('js/renovation/')); } @@ -93,7 +97,7 @@ function generateInfernoComponents(distPath = './', babelConfig = transpileConfi return gulp.src(SRC, { base: 'js' }) .pipe(gulpIf(dev, cached('generate-inferno-component'))) - .pipe(generateComponents(generator)) + .pipe(generateComponents(generator, GENERATE_COMPONENTS_OPTIONS)) .pipe(plumber(() => null)) .pipe(tsProject({ error: processErrors(knownErrors, errors), diff --git a/packages/devextreme/build/gulp/transpile.js b/packages/devextreme/build/gulp/transpile.js index 49866a120fce..e72a74999c3e 100644 --- a/packages/devextreme/build/gulp/transpile.js +++ b/packages/devextreme/build/gulp/transpile.js @@ -45,6 +45,9 @@ const esmTranspileSrc = src.concat([ ]); const srcTsPattern = 'js/__internal/**/*.ts'; +const srcTsIgnorePatterns = [ + '**/__tests__/**/*' +]; const srcDir = path.join(process.cwd(), './js'); const generatedTs = [ @@ -109,8 +112,8 @@ const createModuleConfig = (name, dir, filePath, dist) => { }; const transpileTs = (compiler, src) => { - const task = () => compiler - .compileTs(src) + const task = async() => (await compiler + .compileTs(src, srcTsIgnorePatterns)) .pipe(gulp.dest(TS_OUTPUT_BASE_DIR)); task.displayName = 'transpile TS'; diff --git a/packages/devextreme/build/gulp/typescript/compiler.js b/packages/devextreme/build/gulp/typescript/compiler.js index fa8c39126f70..771d44cacde2 100644 --- a/packages/devextreme/build/gulp/typescript/compiler.js +++ b/packages/devextreme/build/gulp/typescript/compiler.js @@ -95,8 +95,8 @@ const createTsCompiler = async(compilerConfig) => { ); // --- public --- - const compileTs = (fileNamePattern) => { - const fileNames = glob.sync(fileNamePattern); + const compileTs = (fileNamePattern, ignorePatterns) => { + const fileNames = glob.sync(fileNamePattern, { ignore: ignorePatterns }); const configFilePath = getTsConfigPath(absolutePaths.tsConfigDir); const { config } = tsCompiler.readConfigFile(configFilePath, tsCompiler.sys.readFile); const { options } = tsCompiler.parseJsonConfigFileContent(config, tsCompiler.sys, absolutePaths.tsBaseDir); diff --git a/packages/devextreme/js/__internal/tsconfig.json b/packages/devextreme/js/__internal/tsconfig.json index 7cf40d99d826..66948c3f9281 100644 --- a/packages/devextreme/js/__internal/tsconfig.json +++ b/packages/devextreme/js/__internal/tsconfig.json @@ -4,6 +4,7 @@ "module": "es6", "target": "es6", "baseUrl": "../", + "skipLibCheck": true, "allowJs": true, "noEmitOnError": true, "resolveJsonModule": false,