-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Bug]: 2.1.x StarterKit imports 2.2.x dependencies #4863
Comments
@nperez0111 this issue is still relevant. The StarterKit should probably import dependencies for its own version, eg 2.2.0 should use the |
I created draft PR #5191 for this but don't have time to properly fill it out at the moment. |
Eh I'm not certain that I agree with you here @Nantris, the reason that we declare version ranges is about compatibility. The starter-kit is mostly just a conglomeration of other packages, using a very tiny subset of their API's (essentially just a pass through to I recommend that if you need for a version to be locked to a specific version, NPM and other package managers have lockfiles to ensure that only a specific version of a package is include. Another option is to not rely on NPM's automatic installation of sub deps (i.e. install the sub deps on your own). As long as they are compatible with the version specified, they will be respected and not duplicated in your project. As such, I don't think that we will accept this PR, most of the time we want people to move off of older versions. And there is increased maintenance burden to backporting bug fixes & security updates to every minor we have released. I think we prefer only to support major release. I hope this is made clear to you @Nantris have a good day! |
Thanks for taking the time to explain the rationale. I understand wanting to move people off of older versions, but that should be as much in the end-developer's hands as possible in my view, since upgrades aren't always as clean as one originally hopes. It's very confusing that a user could end up with a mismash of package versions if they define something like below. Regarding:
The case below isn't avoided by lockfiles due to the reliance on the carets instead of the tildes. "@tiptap/core": "~2.1.0",
"@tiptap/extension-blockquote": "~2.1.0",
"@tiptap/extension-code-block-lowlight": "~2.1.0",
"@tiptap/extension-focus": "~2.1.0",
"@tiptap/starter-kit": "~2.1.0", What they actually end up with is some We don't rely on it anymore as of yesterday evening, so I have no dog in this race, but I really do think that the If the team disagrees with this opinion then feel free to close this issue and the associated PR. Thanks again for your hard work @nperez0111. |
I'm sorry, but this is standard practice among packages. For an example, see react-redux. You say:
But this is in your control with a lockfile. A lockfile specifically locks your package version to a specific version that it was installed with. I understand that this may not be expected for you, but again, if you want specifically 2.1.0 in your app, then you need to specifically include that restriction in your package.json. Otherwise, npm will respect our package configuration to install the latest minors.
Ultimately, as an app dev you have control in installing things however fine-grained you like. This is standard practice for libraries that ship packages. Locking package versions causes duplication of packages where they were not intended despite being compatible with one another and unnecessarily bloats an app bundle. |
Which packages did you experience the bug in?
starter-kit
What Tiptap version are you using?
2.1.13
What’s the bug you are facing?
Perhaps this is intentional - StarterKit imports
2.2.1
version dependencies, eg"@tiptap/starter-kit#@tiptap/extension-italic@2.2.1"
This seems unexpected.
We don't actually use StarterKit anymore but we have it in our dependencies for the sake of
git bisect
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
2.1.x
dependencies would be segregated from2.2.x
Anything to add? (optional)
I have to lie about "Did you update your dependencies" as we can't due to #4862.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: