Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the listr2 due to the recent ESM changes #17214

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
"@ckeditor/ckeditor5-slash-command": "43.2.0",
"@ckeditor/ckeditor5-template": "43.2.0",
"@ckeditor/ckeditor5-track-changes": "43.2.0",
"@inquirer/prompts": "^6.0.0",
"@listr2/prompt-adapter-inquirer": "^2.0.16",
"@ocular-d/vale-bin": "^2.29.1",
"@webspellchecker/wproofreader-ckeditor5": "^3.0.0",
"@wiris/mathtype-ckeditor5": "^8.10.0",
Expand Down
10 changes: 6 additions & 4 deletions scripts/release/preparepackages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { EventEmitter } from 'events';
import * as releaseTools from '@ckeditor/ckeditor5-dev-release-tools';
import { tools } from '@ckeditor/ckeditor5-dev-utils';
import { Listr } from 'listr2';
import { ListrInquirerPromptAdapter } from '@listr2/prompt-adapter-inquirer';
import { confirm } from '@inquirer/prompts';
import updateVersionReferences from './utils/updateversionreferences.mjs';
import buildPackageUsingRollupCallback from './utils/buildpackageusingrollupcallback.mjs';
import buildTsAndDllForCKEditor5Root from './utils/buildtsanddllforckeditor5root.mjs';
Expand Down Expand Up @@ -97,10 +99,10 @@ const tasks = new Listr( [
return fs.emptyDir( RELEASE_DIRECTORY );
}

const shouldContinue = await task.prompt( {
type: 'Confirm',
message: 'The release directory must be empty. Continue and remove all files?'
} );
const shouldContinue = await task.prompt( ListrInquirerPromptAdapter )
.run( confirm, {
message: 'The release directory must be empty. Continue and remove all files?'
} );

if ( !shouldContinue ) {
return Promise.reject( 'Aborting as requested.' );
Expand Down
5 changes: 4 additions & 1 deletion scripts/release/publishpackages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import upath from 'upath';
import fs from 'fs-extra';
import * as releaseTools from '@ckeditor/ckeditor5-dev-release-tools';
import { Listr } from 'listr2';
import { ListrInquirerPromptAdapter } from '@listr2/prompt-adapter-inquirer';
import { confirm } from '@inquirer/prompts';
import validateDependenciesVersions from './utils/validatedependenciesversions.mjs';
import parseArguments from './utils/parsearguments.mjs';
import { CKEDITOR5_ROOT_PATH } from '../constants.mjs';
Expand Down Expand Up @@ -47,7 +49,8 @@ const tasks = new Listr( [
return true;
}

return task.prompt( { type: 'Confirm', message: 'Do you want to continue?' } );
return task.prompt( ListrInquirerPromptAdapter )
.run( confirm, { message: 'Do you want to continue?' } );
},
optionalEntries: {
// The `#default` key is used for all packages that do not have own definition.
Expand Down