-
Notifications
You must be signed in to change notification settings - Fork 152
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
Easier linking between force/reaction #4475
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4475 +/- ##
========================================
+ Coverage 79.3% 79.3% +<.1%
========================================
Files 1269 1269
Lines 35404 35493 +89
Branches 2059 2063 +4
========================================
+ Hits 28097 28178 +81
- Misses 6262 6277 +15
+ Partials 1045 1038 -7 |
6f90584
to
00c6968
Compare
@zephraph - can you update the main description with the full flow (for the everyday user) of how this works with reaction? I'm not following exactly, assuming i'm working from force. Also not following what needs to be done re linking / unlinking, or why, etc. |
@damassi updated. Does that answer your questions? |
Yup, thank you 👍 |
For more context on this PR, see artsy/reaction#2758. These two PRs should be merged together.
Essentially this adds a mechanism that when in reaction the user can run
yarn integrate force
to automatically link and start both force and reaction. At the time of this PR, there's no support for starting the linking process while in force.If you need to do work in force, you'll have to go to react first to run the command. Adding a command in force will be a follow up.
The linking process leaves the package.json/yarn.lock file of force in a dirty state because it actually updates the reference of the linked package (like reaction) to point to a local reference. Running
yarn unlink-all
will clean up those references. There's a pre-commit hook that will fail if the user tries to commitpackage.json
oryarn.lock
in a bad state and give the command to clean it up.This PR adds a few things:
quicklink
which controls the linking behavior of a package being linked to force. It is designed to coverreaction
but likely will seamlessly handlepalette
as well.lint-staged
hook onpackage.json
andyarn.lock
that fails a commit if linking is still active. The process of linking actually makes a change to the package.json and yarn.lock to point the package to the published package directory.yarn unlink-all
command to easily clean up linkingThrough the whole process the tool (yalc) that handles this new linking is kind of abstracted away from the user. I don't yet have a yarn command to directly link a package like
reaction
from inside force. If that becomes a need we can add it later.