-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Drop support for Node.js 6 #948
Conversation
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.
Few minor comments, the patch looks good in general 👏
.travis.yml
Outdated
- "8" | ||
|
||
os: | ||
- linux | ||
- osx |
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.
Can we leave osx
support out of this patch please?
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.
Yeah I was in the process of removing it :)
.travis.yml
Outdated
node_js: | ||
- "8" | ||
os: | ||
- linux |
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.
Ditto.
packages/rest/src/parser.ts
Outdated
const parseJsonBody: (req: ServerRequest) => Promise<MaybeBody> = promisify( | ||
jsonBody, | ||
); | ||
const jsonBodyAsync = promisify(require('body/json')); |
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.
Please preserve the name parseJsonBody
, method/function names should start with a verb.
Also please verify that the compiler is correctly inferring the type of promisify(require('body/json'))
and does not fall back to any
. If it does not, then you need to preserve some of the type definitions above.
17ed9de
to
0c9b09a
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.
Oh, hang on. I just realized that we need to remove build:dist6
scripts from our package.json
files. There is no point in transpiling for ES2015 (Node.js 6.x) when we no longer support it.
On the second thought - when we remove I am no longer sure what's the right approach here. Does anybody else have any opinion? The only important thing that remains is to ensure the commit message landing these changes contains For example:
|
I am no longer sure it's necessary to remove dist6 as part of this PR.
Need to add a |
@bajtos re: #948 (comment), perhaps we can add 4a62b0e to this PR instead of the other? |
0c9b09a
to
df338ad
Compare
49a4324
to
f90abf2
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.
LGTM,
as long as you fix the Travis stuff.
It does suck that we're losing almost 1% of code coverage because of this change, but that's more indicative of a problem we already had than one we're creating. |
Yeah I'm trying to figure out why there is a sudden drop of coverage :(. |
@virkt25 @kjdelisle Travis should be good now that we landed #949. |
Dropping node 6 support from this PR and util.promisify
I checked Coveralls report. The only relevant change in coverage numbers I can see are for I suspect our coverage numbers by me skewed by the fact that we are reporting coverage for each Node.js platform we are building. Because the code emitted by I personally don't worry about the exact coverage number, especially when it's well over 90%. For me, coverage data is just a tool helping us to spot parts of code that are not sufficiently covered by tests. The Travis setup seems to work wonderfully 👍 Let's get this landed! 🎉 |
@@ -6,7 +6,7 @@ | |||
}, | |||
"version": "4.0.0-alpha.1", | |||
"engines": { | |||
"node": ">=6" | |||
"node": ">=8" |
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.
🎉
Dropping node 6 support from this PR and util.promisify
Dropping node 6 support from this PR and util.promisify
Cherry pick some commits from #945 (see #945 (review)). Related to #611.
Checklist
npm test
passes on your machinepackages/cli
were updatedpackages/example-*
were updated