Ckeditor5: Incorrect versions of ckeditor5-* packages in devDeps

Created on 24 Jul 2020  路  2Comments  路  Source: ckeditor/ckeditor5

See https://github.com/ckeditor/ckeditor5/blob/af4d33e619281c48c35ab2d0a02a20527db2a50a/packages/ckeditor5-widget/package.json#L34

This is not a serious problem as this is a dev dep, but it's worrying why this happened.聽

I guess with the new versioning rules this has very little chance to happen, but we should check after the release that everything was bumped just in case.

intro devops bug

Most helpful comment

However, our dependency linter could look for duplicated items between deps and devDeps and report them.

I think we should prevent issues, not fix them when they exist. So, linter prevents anything incorrect getting into the codebase and I'd be for adding this check to it.

All 2 comments

The package is defined as dependencies and devDependencies:

https://github.com/ckeditor/ckeditor5/blob/55d9f6091efd7d1b298390a80d0755fce2d4a19d/packages/ckeditor5-widget/package.json#L14
https://github.com/ckeditor/ckeditor5/blob/55d9f6091efd7d1b298390a80d0755fce2d4a19d/packages/ckeditor5-widget/package.json#L34

The script that "updates dependencies" bumps the version of packages in the specified order: dep, devDep, peerDep:

https://github.com/ckeditor/ckeditor5-dev/blob/81054e00f04815582a39de973f04a9c091fc299d/packages/ckeditor5-dev-env/lib/release-tools/utils/updatedependenciesversions.js#L21-L27

We have two solutions/tasks here:

  1. updateDependenciesVersions() function should update everything (not only the first match)
  2. Remove duplicated items. dependencies is more important than devDependencies and I guess, npm will install the package in the version specified in the first object.

However, our dependency linter could look for duplicated items between deps and devDeps and report them.

However, our dependency linter could look for duplicated items between deps and devDeps and report them.

I think we should prevent issues, not fix them when they exist. So, linter prevents anything incorrect getting into the codebase and I'd be for adding this check to it.

Was this page helpful?
0 / 5 - 0 ratings