Introduce @tus/utils to simplify building/publishing #567
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 Version Packages #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.