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

Remove support for Node 4 #190

Merged
merged 4 commits into from Jun 13, 2019
Merged

Remove support for Node 4 #190

merged 4 commits into from Jun 13, 2019

Conversation

davidtheclark
Copy link
Collaborator

This PR removes support for Node 4 and runs tests in Node 12 on CI.

Here are some reasons I think we may as well remove Node 4 support:

  • Smooth the way going forward. If we want to be able to upgrade or shift dependencies, we are held back by Node 4 — for example, @olsonpm's look into alternative YAML parsers.
  • This library has been very stable, so any consumer that still wants to support Node 4 can, with versions that have already been published.
  • We should publish some type checking of arguments (see Version 5.2.0+ -- TypeError: Cannot read property 'reduce' of undefined #188); and although I think we could do that with a patch release, it's a little nicer to do it with a major release. That opens the gate for removing support for Node 4.

@olsonpm and @sudo-suhas for review, please.

We can follow up with any changes that you think are worthwhile and unblocked by dropping Node 4 support.

@olsonpm
Copy link
Contributor

olsonpm commented Jun 8, 2019

this is awesome. i'm just starting a new job but would like to put some thought into this PR so please give me a couple weeks to find some time.

@davidtheclark
Copy link
Collaborator Author

@olsonpm Sure 👍 I don't think we need to put all the work you might have in mind into this PR, though. This can simply remove support; then we can follow up with refactoring or dependency adjustments.

@sudo-suhas
Copy link
Contributor

sudo-suhas commented Jun 9, 2019

@davidtheclark I agree with you. However, node.js 6 has reached end-of-life as well. Is there any reason to continue supporting node 6?

@davidtheclark
Copy link
Collaborator Author

davidtheclark commented Jun 9, 2019

@sudo-suhas We have some reasons to remove support for Node 4. Do we have any reasons to remove support for Node 6? (Reversing your question.)

It's true that Node 6 is EOL, but it entered that state very, very recently (4/30), so I'm not inclined to remove support, especially unless we have good reasons to do so.

@olsonpm
Copy link
Contributor

olsonpm commented Jun 9, 2019

dependencies moving forward is the only reason i can think of. I don't have an opinion either way though.

@sudo-suhas
Copy link
Contributor

I'm not inclined to remove support, especially unless we have good reasons to do so.

@davidtheclark That makes sense, no objections from me. I suggested removing support because:

  • The rationale for removing node 4 support kinda applies to node 6 as well:

    This library has been very stable, so any consumer that still wants to support Node 4 can, with versions that have already been published.

  • Since node 6 is now deprecated, it is reasonable to assume that other libraries would also drop support for it. Although I don't foresee this as a problem for us, dropping node 6 would be a sure shot way to ensure we don't.

Copy link
Contributor

@sudo-suhas sudo-suhas left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisblossom
Copy link
Contributor

If you are going to do a major semver and drop node 4, I think you should also remove support for node 6. As @sudo-suhas pointed out it is end of life and I think libraries holding on to old versions of node are doing the community a disservice by not promoting moving forward. Also, as @olsonpm said, dependencies have already started dropping node 6 support.

Already requires node 8:
sindresorhus/parse-json (dependency)
sindresorhus/del
eslint-plugin-node
eslint-plugin-flowtype
husky
lint-staged
sindresorhus/make-dir
sindresorhus/parent-module

Soon to drop support:
sindresorhus/import-fresh (dependency)
jest 25
eslint v6

I think a good idea would be to support node 4 and 6 on the current version with bug fixes only.

@olsonpm
Copy link
Contributor

olsonpm commented Jun 11, 2019

regardless of whether going forward with v6 or v8 support is the right choice, "doing the community a disservice" is a little strong. Bumping node versions takes time, especially for larger projects. There are pros and cons for pushing the supported version forward, and one major drawback is forcing open source devs into volunteering more time to bump the node version.

@chrisblossom
Copy link
Contributor

regardless of whether going forward with v6 or v8 support is the right choice, "doing the community a disservice" is a little strong

Sorry I wasn't trying to come off as attacking, just an opinion of mine. I actually thought the same thing as @davidtheclark not long ago when a lot of my dependencies on my projects were dropping node 6 support (mainly sindresorhus's modules). But I thought about it more and think it is actually a good thing to support the community to move forward by giving it a little push where you can.

Crazy to think that node 6 was released in 2016 (seems like yesterday)...

one major drawback is forcing open source devs into volunteering more time to bump the node version.

The opposite is true as well, forcing open source devs to support an old version of node.

@davidtheclark
Copy link
Collaborator Author

@chrisblossom's dependency list helps a lot. Ok, I feel fine about removing support for Node 6 — as noted above: this is stable; we could release bug fixes for older versions if pressured to; we haven't had bug reports so not too worried about that.

I'll get around to this within the next couple of days, I think.

@davidtheclark
Copy link
Collaborator Author

Ok, Node 6 support is removed, also, for the next release.

@davidtheclark davidtheclark merged commit d49dad0 into master Jun 13, 2019
@davidtheclark davidtheclark deleted the no-node-4 branch June 13, 2019 03:24
davidtheclark pushed a commit that referenced this pull request Nov 2, 2019
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.

None yet

4 participants