Skip to content

Use addParams where it would improve code #491

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

Merged
merged 1 commit into from
Sep 11, 2017
Merged

Conversation

wchargin
Copy link
Contributor

@wchargin wchargin commented Sep 6, 2017

Summary:
This commit replaces uses like base + "?things" (when base is not
known to not already contain a query component), or that fail to call
encodeURIComponent on the things, with uses of addParams.

I generated this commit by running git grep '[&?].*=' and
investigating each occurrence. I ignored all occurrences in the graph
and projector plugins, as they have their own mini-ecosystems. I also
ignored the unique occurrence in the profile plugin, because (a) I can’t
test it, and (b) its inputs are hard-coded such that this change
provably would not fix any bugs.

Test Plan:
I verified the behavior of all existing plugins.

wchargin-branch: use-add-params

@wchargin
Copy link
Contributor Author

wchargin commented Sep 6, 2017

Well, it looks like Eventual Consistency Wins Again. This PR is supposed to come before #492.

@wchargin wchargin force-pushed the wchargin-use-add-params branch 2 times, most recently from 00a39dc to 060abf6 Compare September 6, 2017 23:06
@wchargin wchargin mentioned this pull request Sep 6, 2017
@wchargin wchargin force-pushed the wchargin-add-params branch from 90afe93 to 151112b Compare September 7, 2017 12:23
@wchargin wchargin force-pushed the wchargin-use-add-params branch from 060abf6 to 7cecc1c Compare September 7, 2017 12:23
@wchargin wchargin force-pushed the wchargin-add-params branch 2 times, most recently from aa77ba5 to f79f72f Compare September 8, 2017 21:55
@wchargin wchargin changed the base branch from wchargin-add-params to master September 8, 2017 22:08
Summary:
This commit replaces uses like `base + "?things"` (when `base` is not
known to not already contain a query component), or that fail to call
`encodeURIComponent` on the `things`, with uses of `addParams`.

I generated this commit by running `git grep '[&?].*='` and
investigating each occurrence. I ignored all occurrences in the graph
and projector plugins, as they have their own mini-ecosystems. I also
ignored the unique occurrence in the profile plugin, because (a) I can’t
test it, and (b) its inputs are hard-coded such that this change
provably would not fix any bugs.

Test Plan:
I verified the behavior of all existing plugins.

wchargin-branch: use-add-params
@wchargin wchargin force-pushed the wchargin-use-add-params branch from 7cecc1c to 720a3ed Compare September 8, 2017 22:08
@wchargin
Copy link
Contributor Author

wchargin commented Sep 8, 2017

@chihuahua PTAL—maybe you missed this one? (You approved PR494 and PR495, but they depend on this.)

@wchargin wchargin merged commit 693c07c into master Sep 11, 2017
@wchargin
Copy link
Contributor Author

@dandelionmane thanks!

@wchargin wchargin deleted the wchargin-use-add-params branch September 11, 2017 19:38
@chihuahua
Copy link
Member

This looks great. Thanks, William!

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.

3 participants