Skip to content
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

fix: Make 'react' a peer dependency, use yarn lock file #4

Merged
merged 6 commits into from
Oct 2, 2018

Conversation

jahredhope
Copy link
Member

@jahredhope jahredhope commented Oct 1, 2018

Peer dependencies

react has been shifted to peer dependencies. This allows consuming apps to define their own React dependency, ensuring that duplicate versions of React are not used.

Lock file

We've added a yarn.lock file that ensures that installs using yarn get exactly the same dependencies regardless of when they are installed.

.npmrc Outdated
@@ -1 +0,0 @@
package-lock=false
Copy link
Member

Choose a reason for hiding this comment

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

Since we're using Yarn, wouldn't we need to keep this setting to disable npm's package locking?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was under the incorrect impression that yarn honoured this setting.
Have tested and confirmed it doesn't. I'll add this back in. Thanks

package.json Outdated
},
"peerDependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0"
Copy link
Member

@markdalgleish markdalgleish Oct 2, 2018

Choose a reason for hiding this comment

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

I don't think react-dom is a peer dependency. We only import react in our package code.

@markdalgleish markdalgleish changed the title fix(dependencies): Use yarn lock file for dependencies fix: Make 'react' a peer dependency, use yarn lock file Oct 2, 2018
@markdalgleish markdalgleish merged commit dee1715 into master Oct 2, 2018
@markdalgleish markdalgleish deleted the lock-file branch October 2, 2018 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants