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

Lock to the last compatible version of the @ckeditor/ckeditor5-dev-build-tools package #193

Merged
merged 1 commit into from
Sep 30, 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
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ const getPackageVersion = require( './get-package-version' );
module.exports = function getDependenciesVersions( logger, dev ) {
logger.process( 'Collecting the latest CKEditor 5 packages versions...' );

// Due to the release of breaking changes in the `@ckeditor/ckeditor5-dev-*` packages, package generator must lock
// a version of the `@ckeditor/ckeditor5-dev-build-tools` package to the last compatible version: ^43.0.0.
// Package generator will be able to use latest stable version of the `@ckeditor/ckeditor5-dev-build-tools` when
// all blockers specified in https://github.com/ckeditor/ckeditor5-package-generator/issues/192 are resolved.
const ckeditor5DevBuildToolsVersion = '43.0.0';

return {
ckeditor5: getPackageVersion( 'ckeditor5' ),
ckeditor5PremiumFeatures: getPackageVersion( 'ckeditor5-premium-features' ),
ckeditor5Inspector: getPackageVersion( '@ckeditor/ckeditor5-inspector' ),
ckeditor5DevBuildTools: getPackageVersion( '@ckeditor/ckeditor5-dev-build-tools' ),
ckeditor5DevBuildTools: ckeditor5DevBuildToolsVersion,
eslintConfigCkeditor5: getPackageVersion( 'eslint-config-ckeditor5' ),
stylelintConfigCkeditor5: getPackageVersion( 'stylelint-config-ckeditor5' ),
packageTools: dev ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe( 'lib/utils/get-dependencies-versions', () => {
stubs.getPackageVersion.withArgs( 'ckeditor5' ).returns( '30.0.0' );
stubs.getPackageVersion.withArgs( '@ckeditor/ckeditor5-package-tools' ).returns( '1.0.0' );
stubs.getPackageVersion.withArgs( '@ckeditor/ckeditor5-inspector' ).returns( '4.0.0' );
stubs.getPackageVersion.withArgs( '@ckeditor/ckeditor5-dev-build-tools' ).returns( '7.0.0' );
stubs.getPackageVersion.withArgs( 'eslint-config-ckeditor5' ).returns( '5.0.0' );
stubs.getPackageVersion.withArgs( 'stylelint-config-ckeditor5' ).returns( '3.0.0' );

Expand Down Expand Up @@ -58,7 +59,12 @@ describe( 'lib/utils/get-dependencies-versions', () => {
expect( returnedValue.ckeditor5 ).to.equal( '30.0.0' );
} );

it( 'returns an object with a version of the "eslint-config-ckeditor5', () => {
it( 'returns an object with a last compatible version of the "@ckeditor/ckeditor5-dev-build-tools" instead of the latest one', () => {
const returnedValue = getDependenciesVersions( stubs.logger, false );
expect( returnedValue.ckeditor5DevBuildTools ).to.equal( '43.0.0' );
} );

it( 'returns an object with a version of the "eslint-config-ckeditor5"', () => {
const returnedValue = getDependenciesVersions( stubs.logger, false );
expect( returnedValue.eslintConfigCkeditor5 ).to.equal( '5.0.0' );
} );
Expand Down