From 794a21aca6d1e763f237d00899b8b09b614a7f6b Mon Sep 17 00:00:00 2001 From: bre1470 <40056287+bre1470@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:42:31 +0100 Subject: [PATCH 1/2] Tools: Fixed ES5 in scripts task. --- tools/gulptasks/scripts.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/gulptasks/scripts.js b/tools/gulptasks/scripts.js index 6431aa646eb..9b4df2f505b 100644 --- a/tools/gulptasks/scripts.js +++ b/tools/gulptasks/scripts.js @@ -161,14 +161,16 @@ function task() { shouldRun() || processLib.isRunning('scripts_incomplete') ) { - fsLib.deleteDirectory('code', true); - processLib.isRunning('scripts_incomplete', true, true); + fsLib.deleteDirectory('code', true); + gulp.series( - 'scripts-ts', 'scripts-css', - argv.assembler ? 'scripts-js' : 'scripts-webpack' + 'scripts-ts', + 'scripts-es5', + argv.assembler ? 'scripts-js' : 'scripts-webpack', + 'scripts-code' )( function (error) { From 3da3f5ae59c13d9fe2c6f6b00e533e416fec5bf6 Mon Sep 17 00:00:00 2001 From: bre1470 <40056287+bre1470@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:44:05 +0100 Subject: [PATCH 2/2] Tools: Fixed dist compiling scripts. --- tools/gulptasks/dist-release.js | 10 ++++++++-- tools/gulptasks/dist.js | 11 ++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/gulptasks/dist-release.js b/tools/gulptasks/dist-release.js index 9566b5c0c2a..30897ca2bea 100644 --- a/tools/gulptasks/dist-release.js +++ b/tools/gulptasks/dist-release.js @@ -7,7 +7,7 @@ const gulp = require('gulp'); const log = require('../libs/log'); const fs = require('fs-extra'); // const fs = require('fs'); -// const libFS = require('../libs/fs'); +// const fsLib = require('../libs/fs'); const { join } = require('path'); const readline = require('readline'); const argv = require('yargs').argv; @@ -141,7 +141,7 @@ function updateJSONFiles(version, name) { const json = JSON.parse(fileData); json.types = ( json.main ? - json.main.replace(/\.js$/, '.d.ts') : + json.main.replace(/\.js$/u, '.d.ts') : 'highcharts.d.ts' ); json.version = version; @@ -304,6 +304,12 @@ function checkIfLoggedInOnNpm() { async function release() { const products = await getProductsJs(); const version = products[PRODUCT_NAME].nr; + + if (!fs.existsSync('code/highcharts.js')) { + log.starting('Compiling one more time.'); + await gulp.series('scripts', 'scripts-compile'); + } + log.starting(`Initiating release of ${PRODUCT_NAME} version ${version}.`); if (argv.push) { diff --git a/tools/gulptasks/dist.js b/tools/gulptasks/dist.js index 28096bac6b4..278dad6c683 100644 --- a/tools/gulptasks/dist.js +++ b/tools/gulptasks/dist.js @@ -29,11 +29,7 @@ Gulp.task( Gulp.series( 'lint-ts', 'scripts-clean', - 'scripts-css', - 'scripts-ts', - 'scripts-js', - 'scripts-code', - 'scripts-es5', + 'scripts', 'scripts-compile', 'dist-clean', 'dist-copy', @@ -47,10 +43,7 @@ Gulp.task( Gulp.series( 'lint-ts', 'scripts-clean', - 'scripts-css', - 'scripts-ts', - 'scripts-code', - 'scripts-webpack', + 'scripts', 'scripts-compile', 'dist-clean', 'dist-copy',