replace request with axios#128
Conversation
|
I've iterated on running the backend test suite (CTS) with these changes, fixing bugs, rinse-repeat, and everything looks good to me now. Some request-vs-axios differences that this process highlighted:
I now just need to update the tests to reflect the new behavior. |
|
Another notable difference: We now use export class CoronerClient { /* ... */ }where we used to have module.exports = CoronerClient;So now when you // This:
const { CoronerClient } = require("backtrace-morgue/dist/lib/coroner.js");
// Or this:
// const CoronerClient = require("backtrace-morgue/dist/lib/coroner.js").CoronerClient;
// But NOT this old way:
// const CoronerClient = require("backtrace-morgue/dist/lib/coroner.js");
// ... trying to do `new CoronerClient()` will raise an exception stating that `CoronerClient` is not (of course) a constructor.In light of the aforementioned implementation choices (and rationale given), I see this as a benefit: if someone blindly updates the version |
|
If we want to do a non-alpha release, we should bump the major version, for the sake of anyone using |
Fixes:
SyntaxError: Cannot use import statement outside a module
fe8b670 to
5a8cbfd
Compare
|
Confirmed this morning that all CTS tests pass. Performed an interactive rebase to clean up the commit history. |
5a8cbfd to
70aedad
Compare
|
I just published 2.0.0-alpha.0 with these changes. |
We're going to have a lot of churn if we don't eventually get a consistent style/format enforced, so to minimize future merge conflicts (or, put another way, increase how quickly I can wrap up this PR and any future work), the bulk of this PR starts with commits to set up automatic formatting (using Google's style guides), increase type coverage, etc.
The last two commits (as of now):
requestimplementationrequestwithaxiosand amends the tests as required (e.g. updates the mocks)