-
Notifications
You must be signed in to change notification settings - Fork 16
feat(buildFetchUrl): enable optional ids via question mark #13
feat(buildFetchUrl): enable optional ids via question mark #13
Conversation
Hi @PatNeedham can you also include an update the readme ? |
ff7f5ce
to
b22a7ae
Compare
8f4f563
to
1ae6f83
Compare
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.
Some questions about trailing ?
and a stylistic change. We really appreciate your contribution.
__tests__/helpers/url.spec.js
Outdated
query: { userId: 'questionable?' }, | ||
}, | ||
}); | ||
expect(url).toBe('http://api.domain.com/users?userId=questionable?'); |
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.
What use case would require a trailing ?
?
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.
Honestly not sure, I was mainly trying to think of all the possible cases that could cause it to fail, regardless of how realistic they are.
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.
Gotcha. Okay, Im thinking one more unit test for this case would be good: http://api.domain.com/users/:user?/comments
and pass:
opts: {
query: { someModifier: 'questionable?' },
},
without a :user
defined and see if:
expect(url).toBe('http://api.domain.com/users/comments?someModifier=questionable?')
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.
@PatNeedham you will need to amend your last commit as its causing the build to fail. |
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.
Add one more test case and rebase and reword commits that dont follow Conventional Commits https://www.conventionalcommits.org/en/v1.0.0/#summary Thanks again!
Since this change from the first commit is no longer taking place (as the replace is now being called on the This one becomes no longer necessary. |
@PatNeedham Yeah definitely go ahead and squash commits in this PR and reword the commit to follow convention. That will fix things. Thanks! |
7277c52
to
dd2aee8
Compare
🎉 This PR is included in version 1.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.