Scheduler depends on common packages #13020
Merged
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.
This adds common dependencies to scheduler.
fbjs
avoids duplication of invariant/warning between React and the scheduler package. This fixes the FB bundle too so that it doesn't ship a differentinvariant
than the one we use normally.object-assign
is not currently used but it will be if we add anObject.assign()
call. In that case, if we don't specify it in dependencies, the polyfill will be inlined (which we don't want).We can choose to drop these dependencies later by removing their use, but seems safer to add them now as we're not focused on the code size yet, and React already uses both of them anyway.
Test plan:
yarn build scheduler --type=NODE,FB
shouldn't includeinvariant
orwarning
implementations in any bundles.