-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use PHET_CORE/merge instead of _.extend #71
Comments
I posted to the dev channel:
|
I made a way to automatically convert usages of Here are the steps to reproduce:
I ran this process for the sims I am responsible for, mainly as a test, and things went very well. In fact, the validation in I am not recommending that anyone else do these steps, but I thought it was important to keep good notes. Likely I will try to convert other repos until we can think of a reason not too (i.e. see #73). |
Also note that I added a lint rule for this purpose, which supports the "fix" option, but I don't necessarily think it should stick around. |
I updated documentation in phetsims/phet-info@0d075cb and ed3bb6b |
#73 is a prerequisite to global replacement of |
@pixelzoom, after looking through #73, does the global replacement seem good for you? |
yes, commented in the issue and closed it. |
Add one more to the bug catch count! |
That indicates that there is a missing test in mergeTest.js. Should we correct that? |
I do not think so. It was a faulty usage, not faulty merge code. |
#74 is a prerequisite to global replacement of |
I'm in the process of fixing all active runnables not already touched currently, and it is going well. The scripts above are doing their job, and I will just make sure to test well, and monitor CT this afternoon. Commits likely coming soon. |
There is a no-extend lint rule that isn't turned on. I'm not sure how hard it would be to get this going in our post es6-modules. I'll take a look. |
This was covered by the bad-sim-text lint rule, so I deleted it. |
All that is left is a review on the sim-specific cases. |
I reviewed phetsims/capacitor-lab-basics@2493d0c and HingePointNode looks good in that sim. Usages in ESP are also good. Closing. |
This issue is to discuss and implement the conversion of our extending pattern of options from using
_.extend()
tomerge()
. At today's design pattern meeting, there were no objections towards moving to a "always use merge" pattern.Action items:
merge
instead of_.extends
._.extends
torequire( 'PHET_CORE/merge')
The text was updated successfully, but these errors were encountered: