-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Make ckeditor5 a peer dependency of all other packages #1061
Comments
I'm leaving this as a "discussion" because we haven't made a final decision yet. I want to track it, though. |
BTW, it came to my mind what we could put in Since adding |
@pomek, could you test whether out release tools will properly bump version of I've been also thinking a bit about releasing all this and it seems that... we'll need to release all packages at the same time – |
You're right. This tool does not touch |
The release tool now supports updating the I also introduced I was able to generate changelogs for all packages (I used the I also didn't have any troubles with executing the whole release process. I'm preparing pull requests now. |
Some findings...
Initial conclusions
Other considerationsI've checked that webpack uses In webpack, the version of webpack in its plugins
It's always This is important because we were thinking with @pomek whether we should always bump
Now, in step2, if we'll go webpack's way, Which means that we have three options:
For now, I'm inclined towards the last option. However, in general, all this means that it doesn't make sense to make any changes now. As long as plugins depend on the Final conclusions
|
Works fine. |
It's a very nice idea. In fact, many commands define only Some plugins also have a very strong dependency between command and editing part of the plugin. For such plugins, it might be a better idea to keep the whole logic in a single file. |
Feature: The release tool supports updating the `peerDependencies` in `package.json`. Introduced a `dryRun` mode which allows testing the whole release process without publishing anything. The changelog generator for sub-repositories accepts the `newVersion` parameter. All generated changelog will use the version instead of analyzing a history of commits in a given repository. See ckeditor/ckeditor5#1061. Dry run mode for release sub-repositories: - `npm version` will not create a tag (only the commit will be made), - `npm pack` will be called instead of `npm publish` (it packs the whole release to a ZIP archive), - `git push` will be replaced with a log on the screen, - creating a release on GitHub will be replaced with a log that will contain a URL to the release, - every called command will be displayed.
I improved the error message in ckeditor/ckeditor5-dev@263f37b. The next step:
|
Regarding a possibly different approach regarding peer dependencies. I made a private "contrib" emoji plugin and was wondering on how to resolve the trouble of outdated dependencies. I don't want to update my plugin whenever the new version of CKEditor 5 is out. At the same time leaving outdated dependencies may lead to problems. I made my plugin based on the link plugin, so initially I put into the dependencies the same packages (core, engine, ui). Then I realised that these packages are actually so common and should be present in any editor build, that it probably makes no point in listing them as dependencies. Maybe such dependencies should go into peerDependencies? |
I've been so focused on making ckeditor5 a peer dependecy of other packges that I missed that it can be much simpler, like you proposed. The engine, core and the UI libs are part of the "framework" and need to be installed by the integrator (just like you install webpack). Not by plugins. I really like this! |
BTW, you could test it by updating your plugin :) |
I published an updated version of a package, but due to defining there the latest peerDependencies, the only setup that I may check at this stage is a project in which outdated core/engine/ui dependencies are used together with the emoji plugin which defines the latest stable versions as peerDependencies.
peerDependencies of the emoji plugin:
dummy project without any dependencies(a warning that dependencies are missing, cool) dummy project with
|
One more comment: defining peerDependencies with caret ranges ( Thus, I believe, 3rd party plugin maintainers should rather use
At least this is what I will be doing from now. I know that this is not safe as one never knows if the plugin will work with all the future versions of the editor, but overall this should result in less issues. |
I don't like this idea. You don't know what will happen in the next major version. Pinging the author to update package's deps and check the package is a better idea than installing broken package and pinging the author to fix it. |
And waiting a week? Month? A year? :P Realistically speaking, 90%+ packages will never be updated after having their initial release. |
We already had a chance to test it once back in CKEditor 4 when we introduced an incompatible change which required updates in skins in the addons repository. The reply from maintainers was very poor even if we told them precisely what has to be changed in their skins. So in reality this does not work simply. |
I agree with @wwalc and @Reinmar, actually wanted to propose the same. We should recommend using |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it). |
The next iteration (iteration19) will contain some breaking changes (e.g. #1038, https://github.com/ckeditor/ckeditor5-core/issues/64), so it's a good moment to squeeze some more breaking/infrastructural things too.
There's one idea about making
ckeditor5
a peer dependency of other source packages (and a real dependency of builds). I explained it in #667 (comment).I'm not sure whether we'll be able to also work on reducing dependency on other pkgs, but those changes will be a progressive enhancement, so we can do them later on. Adding
ckeditor5
everywhere, though, is something which will affect other people, so we should do it now.The text was updated successfully, but these errors were encountered: