Skip to content
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

Merged
merged 4 commits into from
Feb 2, 2018
Merged

Drop support for Node.js 6 #948

merged 4 commits into from
Feb 2, 2018

Conversation

b-admike
Copy link
Contributor

@b-admike b-admike commented Feb 1, 2018

Cherry pick some commits from #945 (see #945 (review)). Related to #611.

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Related API Documentation was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in packages/example-* were updated

@b-admike b-admike changed the title Chore/drop node6 Drop support for Node.js 6 Feb 1, 2018
@b-admike b-admike removed the request for review from virkt25 February 1, 2018 14:09
@b-admike b-admike mentioned this pull request Feb 1, 2018
6 tasks
Copy link
Member

@bajtos bajtos left a 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
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

const parseJsonBody: (req: ServerRequest) => Promise<MaybeBody> = promisify(
jsonBody,
);
const jsonBodyAsync = promisify(require('body/json'));
Copy link
Member

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.

bajtos
bajtos previously requested changes Feb 1, 2018
Copy link
Member

@bajtos bajtos left a 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.

@bajtos
Copy link
Member

bajtos commented Feb 1, 2018

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 build:dist6, then we must change package-level index.js files too, because we can no longer forward to dist6, at which point we may be too close to #945?

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 BREAKING CHANGE footer, so that our release notes explicitly mention this change. See https://conventionalcommits.org/

For example:

BREAKING CHANGE: Support for Node.js version lower than 8.0 has been dropped.
Please upgrade to the latest Node.js 8.x LTS version.

@bajtos bajtos dismissed their stale review February 1, 2018 15:07

I am no longer sure it's necessary to remove dist6 as part of this PR.

@virkt25
Copy link
Contributor

virkt25 commented Feb 1, 2018

Need to add a Test stage for Travis because right now only thing running is Commit Lint because not having a os field or multiple versions of node means there is no longer a default stage Travis generates. Right now the only thing Travis is doing is commit message linting.

@b-admike
Copy link
Contributor Author

b-admike commented Feb 1, 2018

@bajtos re: #948 (comment), perhaps we can add 4a62b0e to this PR instead of the other?

Copy link
Contributor

@kjdelisle kjdelisle left a 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.

@kjdelisle
Copy link
Contributor

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.

@b-admike
Copy link
Contributor Author

b-admike commented Feb 1, 2018

Yeah I'm trying to figure out why there is a sudden drop of coverage :(.

@b-admike
Copy link
Contributor Author

b-admike commented Feb 1, 2018

@virkt25 @kjdelisle Travis should be good now that we landed #949.

virkt25 added a commit that referenced this pull request Feb 2, 2018
Dropping node 6 support from this PR and util.promisify
@virkt25 virkt25 mentioned this pull request Feb 2, 2018
6 tasks
@bajtos
Copy link
Member

bajtos commented Feb 2, 2018

t 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.

I checked Coveralls report. The only relevant change in coverage numbers I can see are for rest/src/parser.ts.

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 tsc is different, especially for Node.js 6.x with no support for async/await, I suspect the coverage transformed via sourcemaps could provide slightly different data on each Node.js version.

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! 🎉

screen shot 2018-02-02 at 10 26 29

@bajtos bajtos merged commit 05de86c into master Feb 2, 2018
@bajtos bajtos deleted the chore/drop-node6 branch February 2, 2018 09:34
@@ -6,7 +6,7 @@
},
"version": "4.0.0-alpha.1",
"engines": {
"node": ">=6"
"node": ">=8"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

virkt25 added a commit that referenced this pull request Feb 5, 2018
Dropping node 6 support from this PR and util.promisify
virkt25 added a commit that referenced this pull request Feb 6, 2018
Dropping node 6 support from this PR and util.promisify
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.

6 participants