Closed Murderlon closed 9 months ago
I don't understand how @tus/utils helps with the peerDependencies
issue. Can you elaborate on this? Or is not addressed by this PR?
As seen in the diff, there are no peer dependencies anymore and thus no problems anymore associated with them. All packages now have @tus/utils
in dependencies
. Similar to how this was solved in Uppy with @uppy/utils
.
Problems:
@tus/server
inpeerDependencies
but also indevDependencies
(for tests).peerDependencies
changes aren't noticed by package install unless it's a major. This is whychangeset
(our versioning and release tool) always bumps all stores to a major for any kind of release toserver
. See #566file-store
depends onserver
butserver
tests depend onfile-store
. We can't create a circular dependency so we omitfile-store
as dev but then changes aren't picked up.Solution:
@tus/utils
, have it independencies
everywhere. All things that are shared between all packages are in here. Remove@tus/server
frompeerDependencies
everywhere.Now we have correct dependency graphs for
turbo
and we can publish more correctly and easily withchangesets
.This is arguably a breaking change, but I'd argue it isn't. It only is if you update one package but not the other. However that can happen all time the time in monorepo setups like this. Whether it's a bug fix that is coordinated between packages, or a feature that needs detecting in a store, you can't expect all changes to work if you don't upgrade packages together. In Uppy, our policy is it's not a breaking change if we don't change exports and no public methods and properties a are changed.