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

Update dependencies with david #787

Merged
merged 7 commits into from
Jan 9, 2017
Merged

Conversation

doug-wade
Copy link
Collaborator

Since we merged #732, greenkeeper hasn't been keeping our deps up-to-date, and it never updated our packages dependencies. Use david to update our dependencies instead, and upgrade most of them (chunk-manifest-webpack-plugin is for webpack 2, for instance) to the most recent available version

@@ -8,11 +8,13 @@
"nuke": "asini clean && rm -r node_modules",
"changelog": "asini-changelog",
"debug": "cat asini-debug.log && for d in packages/*/npm-debug.log*; do echo $d; cat $d; done",
"postinstall": "npm run bootstrap-no-i"
"postinstall": "npm run bootstrap-no-i",
"update-dependencies": "asini exec david u"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also run david on the repo root? Then we could disable the GreenKeeper integration and just manage everything with david?

@gigabo
Copy link
Contributor

gigabo commented Dec 9, 2016

Wow, thanks for dealing with this @doug-wade!

This seems like a generally pretty high-risk change... 🤔

Any additional testing we should do for this?

@gigabo gigabo added the enhancement New functionality. label Dec 9, 2016
@gigabo gigabo changed the title Replace greenkeeper with david Update dependencies with david Dec 9, 2016
@gigabo
Copy link
Contributor

gigabo commented Dec 9, 2016

(Edited the title to reflect that this PR actually updates deps)

@doug-wade
Copy link
Collaborator Author

@gigabo I've done all the testing I think I can -- it's passing ci, I linked up all the examples and ran them, and I ran through the test pages. I agree there are risks, but I think we should try to keep the ecosystem up-to-date as much as reasonable.

@gigabo
Copy link
Contributor

gigabo commented Jan 9, 2017

@doug-wade Thanks for manually regressing. Bombs away! 💣

@gigabo gigabo merged commit bc4130f into redfin:master Jan 9, 2017
"routr": "0.1.3",
"winston": "2.2.0"
"request-local-storage": "^1.1.1",
"routr": "^2.1.0",
Copy link
Collaborator

@drewpc drewpc Jan 16, 2017

Choose a reason for hiding this comment

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

@doug-wade @gigabo The upgrade of routr from version 0.1.3 to >1.0 introduced some breaking changes that impact us. These changes and the bug in #312 are related, so I'll track it there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how do those changes affect us? and why didn't the automated tests catch the problems?

Copy link
Collaborator

@drewpc drewpc Jan 16, 2017

Choose a reason for hiding this comment

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

See #837 and #312. The change had a few impacts:

  1. Routr no longer does anything with the navigate option in https://github.com/redfin/react-server/blob/master/packages/react-server/core/context/Navigator.js#L53. I have NO idea what the type variable is really referring to in our code...it seems super weird to me. The Routr project said in their commit message: "If needed, the navigation logic should happen at a higher level or remove that special case."
  2. According to Requests other than "get" is not working #312, we have never been passing the HTTP method information to Routr anyway, so Routr never checked the method properties.
  3. We are improperly encoding the page attribute method in the routes_(client|server).js file because our documentation says it can be an array or string (Routr now supports an array), but we're encoding it as a string only.

Copy link
Collaborator

@drewpc drewpc Jan 16, 2017

Choose a reason for hiding this comment

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

The tests didn't catch this because all of our tests only send GET requests, no POST/HEAD/etc. I added some unit tests in #837, but we should probably add full integration tests for at least POST requests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let me rephrase this. The breaking change in Routr may or may not impact us. It all has to do with what we use/expect regarding the type property on this line. Our tests might not catch this for two reasons: we don't have test coverage of this case or the change in Routr actually doesn't impact us.

Secondly, the bug identified in #312 means that we're not even passing the HTTP method to Routr for it to check. The fix for their API change and #312 is to pass the HTTP method to Routr. That change is a breaking change for our project because now people will have to allow POST requests in their routesFile or else Routr won't select them.

@drewpc drewpc modified the milestone: 0.6.0 Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants