-
Notifications
You must be signed in to change notification settings - Fork 99
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
Conversation
.npmrc
Outdated
@@ -1 +0,0 @@ | |||
package-lock=false |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
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 usingyarn
get exactly the same dependencies regardless of when they are installed.