Skip to content

Commit

Permalink
Merge pull request #193 from ckeditor/i/191
Browse files Browse the repository at this point in the history
Other (generator): Lock to the last compatible version of the `@ckeditor/ckeditor5-dev-build-tools` package due to the upcoming release of breaking changes in the `@ckeditor/ckeditor5-dev-*` packages. Closes #191.
  • Loading branch information
pomek committed Sep 30, 2024
1 parent 9f6a527 commit d031bb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
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

0 comments on commit d031bb0

Please sign in to comment.