Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

CI test for dependencies to have the same version #1556

Merged
merged 21 commits into from
Feb 5, 2019

Conversation

xianny
Copy link
Contributor

@xianny xianny commented Jan 30, 2019

Description

Add failing CI if there are dependencies with multiple versions.
Can specify dependencies or packages to ignore in /package.json

Testing instructions

Checkout branch, run yarn remove_node_modules && yarn install. Then try to build and test everything.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

packages/instant/package.json Outdated Show resolved Hide resolved
packages/monorepo-scripts/src/deps_versions.ts Outdated Show resolved Hide resolved
packages/monorepo-scripts/src/deps_versions.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@fragosti fragosti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am SO HAPPY you're doing this. The last two website crashes were caused by this. Specifically, they were cause by multiple versions of react-dom being present.

To illustrate:

This is caused by react-highlight in this case, but in the past it has been caused by some of our packages like react-shared. I just merged https://github.com/0xProject/react-highlight/pull/3 which does this for react-highlight. If you could change the version of react-highlight in react-shared to 0xproject/react-highlight#fix/peer-dependencies that would be great. I think all React packages that are meant to imported into other React projects should be using peerDependencies to specify they depend on React. Let the parent project decide the version of react-dom.

@xianny
Copy link
Contributor Author

xianny commented Feb 4, 2019

@fragosti thanks for checking! Is there a reason you specifically want to point to the branch 0xproject/react-highlight#fix/peer-dependencies instead of just 0xproject/react-highlight?

Peer deps are new to me, just wanna check I understand before I do it 😌

@fabioberger
Copy link
Contributor

@xianny He want's to point to a specific branch, not to the master branch of @0xproject/react-highlight (which is our fork of that library.)

@xianny
Copy link
Contributor Author

xianny commented Feb 4, 2019

yep, gotcha! I was wondering why we don't use master - do we keep a different state indefinitely on the branches on that repo? Also, looks like that branch got deleted. I'm pointing to master to fix CI for now. I think this is OK but @fragosti please let me know if you need us to do something different.

@xianny
Copy link
Contributor Author

xianny commented Feb 4, 2019

works locally but fails on CI 🤔

@fragosti
Copy link
Contributor

fragosti commented Feb 4, 2019

From the build it looks like the types for React might be the wrong version? Not sure.

@xianny
Copy link
Contributor Author

xianny commented Feb 5, 2019

Yeah :/ React versions in instant. I reverted versions to what they were before this PR, and it still fails. The last time it worked was with @types/react:* and @types/react-dom:*.

@xianny xianny merged commit 703aa38 into development Feb 5, 2019
@fabioberger fabioberger deleted the feature/ci-dependency-version-check branch February 5, 2019 11:03
fabioberger added a commit that referenced this pull request Feb 5, 2019
* development:
  update error msg for dependency version check
  CI test for dependencies to have the same version (#1556)
  Add missing comma
  Decode NULL as false
  Update blog link to not be /latest, and use constant in mobile nav
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants