-
-
Notifications
You must be signed in to change notification settings - Fork 737
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
Solves #920 #921
Solves #920 #921
Conversation
This change introduced a bug that surfaced at hoodiehq/hoodie-store-server-api#21, I’m investigating |
Actually the specs are wrong and your fix showed that for the first time 👏 |
See relevant changes at nock/nock#921
See relevant changes at nock/nock#921
What what?! 👏 Thanks @edorivai! |
nock 9.0.19 started enforcing the specified request body (nock/nock#921), so tighten up our tests to cope with that.
nock 9.0.19 started enforcing the specified request body (nock/nock#921), so tighten up our tests to cope with that.
Why does this change not count as a breaking change? This broke my tests and I had to dig to this pull request to find out why. |
I have experience with some linters (e.g. jscs) which took an extremely strict interpretation of semver which said "a new error is a breaking change". However, for most libraries, fixing behavior that was previously outright incorrect is not usually a breaking change. Since this change seems to have a high ecosystem impact, perhaps we should consider reverting it and re-shipping it with a major version change. Alternatively we could make sure the intended behavior is clear in the changelog. I agree that developers shouldn't have to come to the PR. |
@CodeMan99 welcome to open source, it never is perfect, but we are all in this together :) we are all volunteering our time here, please keep that in mind 🤗 |
@gr2m Was just an honest question, wasn't trying to be firm or abrasive. Sorry. |
No worries :) I understand your frustration, it caused the same for several of my projects and caused some work. We’ll soon automate releases with better changelogs, that should help a little. |
A few tips if you unexpectedly hit this and don't know what to do.
nock(host).post("/", (body) => {
console.log("Actual body: ", JSON.stringify(body, null, 2)); // fixme
return true;
})
const tmatch = require("tmatch");
nock(host).post("/", (body) => tmatch(body, {key1: "foo", key2: /^z/})) If you use the pattern above a lot, you may want to factor out a helper function. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you! |
Straightforward fix of #920