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 Node 4 support (and Node 6 and Node 8) #3919

Closed
lipis opened this issue Feb 7, 2018 · 45 comments
Closed

Drop Node 4 support (and Node 6 and Node 8) #3919

lipis opened this issue Feb 7, 2018 · 45 comments
Assignees
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Milestone

Comments

@lipis
Copy link
Member

lipis commented Feb 7, 2018

The official support for Node 4 is ending soon (April 2018) and from time to time we have quite a few issues like #3875 with the failed automated tests.

What can possibly go wrong?!

(It was also discussed in the #3503, but I'm not sure how far we are with that one)

@lipis lipis added the status:needs discussion Issues needing discussion and a decision to be made before action can be taken label Feb 7, 2018
@lipis
Copy link
Member Author

lipis commented Feb 7, 2018

Already discussed: #3503 (comment)

@lipis lipis closed this as completed Feb 7, 2018
@j-f1
Copy link
Member

j-f1 commented May 4, 2018

I still think we should do this, although we might want to give people a little time to migrate away from the soon-to-be-insecure Node 4. On the other hand, since Prettier doesn’t go into production code (unless I’m missing something), we could move on and say that people who need Node 4 support can just use an older version of Prettier with Node 4 support until they can migrate.

@j-f1 j-f1 reopened this May 4, 2018
@alexander-akait
Copy link
Member

I agree, some parsers can require minimum nodejs 6 and problems will be corrected only for the version 6 version

@duailibe
Copy link
Member

duailibe commented May 4, 2018

I think we can "oficially" drop support for node 4, but not necessarily we have to make it stop working for node 4.

@j-f1
Copy link
Member

j-f1 commented May 4, 2018

How about switching Travis to 6/node instead of 4/node?

@TrySound
Copy link
Contributor

TrySound commented May 5, 2018

stable is deprecated use node instead
https://github.com/creationix/nvm#usage

@j-f1
Copy link
Member

j-f1 commented May 5, 2018

Thanks for pointing that out @TrySound! Fixed.

@duailibe
Copy link
Member

duailibe commented May 5, 2018

@j-f1 Actually I was thinking about still running node 4 tests, but maybe installing the dependencies with --ignore-engines (only for node 4) and see if it still works.

@azz
Copy link
Member

azz commented May 5, 2018

A concern is that libs using Prettier still support Node 4, and they'll be running Prettier in their CI on Node 4.

@TrySound
Copy link
Contributor

TrySound commented May 5, 2018

Maybe this users should just use current major instead of the next one?

@suchipi
Copy link
Member

suchipi commented May 5, 2018

I don't think it's safe to drop node 4 support without bumping to 2.0.

@duailibe
Copy link
Member

@azz @suchipi What if we only support node 4 in the published build?

i.e. we'll stop supporting people installing prettier directly from the repo using node 4, which I believe it's unusual

@suchipi
Copy link
Member

suchipi commented May 16, 2018

That sounds reasonable. Then we could transpile for npm, but only have the src in the git repo. Great solution

@duailibe
Copy link
Member

duailibe commented May 16, 2018

I don't even mean transpiling our own code, just our dependencies (so we'd still use node 4 supported syntax). If users want to install directly from the repo they can use the "ignore engine" yarn feature (or npm if they have that too) - if the dependency still works.

@duailibe
Copy link
Member

Babel has already dropped Node 4 support so we'll have to do something because we'll eventually need to upgrade babylon

@brodybits
Copy link
Contributor

brodybits commented Jan 3, 2019

I am looking forward to this idea, which would need to be done in a major release such as 2.0 (#3503). I find it really ugly cryptic (non-obvious) that package.json specifies "node": ">=6" while generated dist/package.json specifies "node": ">=4".

@duailibe
Copy link
Member

duailibe commented Jan 8, 2019

@brodybits why is it ugly? I believe our current solution works fine

@brodybits
Copy link
Contributor

Let me rephrase it to "cryptic (non-obvious)" then (I already updated my comment). I am looking forward to the new release, with no Node.js 4 support baggage. A side point is that Node.js 6 maintenance will end pretty soon, as I reported in #5711.

@j-f1
Copy link
Member

j-f1 commented Jan 8, 2019

We’ll probably drop Node 6 support when Node does, but not for the production version.

@duailibe
Copy link
Member

duailibe commented Jan 9, 2019

I believe the majority of our users won't even know (or care) that we have different configurations. I'm obviously biased but I don't see any downsides in doing that (or benefits removing it).

I don't have any data on Node 4 usage, but if it's not too much trouble to continue supporting it for the near future, I don't see a problem with it

EDIT: there are a few problems, like updating libs (like Jest) but we were able to workaround them.

@duailibe
Copy link
Member

duailibe commented Aug 8, 2019

I really wonder is there anyone install prettier from this repo instead of install from npm?

@fisker We have explained this numerous times already but here it is:

  1. we'd like to easy support for forking Prettier and so people can just fork and install directly from their fork
  2. we want to make it easy for people to use fixes and features in master before we cut a new release

we should not support that

@fisker Why not?

@brodybits
Copy link
Contributor

@brodybits What are the dependencies that are incompatible and why do we need to update them?

get-stream@5.1.0 was one; I thought there were some others. I would have to check again.

Outdated dependencies can miss security updates and other bug fixes. Outdated dependencies can also be harder to update in the future.

there anyone install prettier from this repo
[...]
we should not support that

@fisker Why not?

  • additional testing burden
  • makes it harder to update dependencies without breaking this functionality

I would personally favor we support this functionality for recent Node.js versions only.

@fisker
Copy link
Member

fisker commented Aug 8, 2019

Outdated dependencies can also be harder to update in the future

Agree, last time when I try to upgrade rollup, I have to look for very old docs and issues and changlog

@fisker
Copy link
Member

fisker commented Aug 8, 2019

we'd like to easy support for forking Prettier and so people can just fork and install directly from their fork

why not fork, change, build, install from bundle? this is what I would do, if I want to change something

@duailibe
Copy link
Member

Outdated dependencies can miss security updates and other bug fixes. Outdated dependencies can also be harder to update in the future.

@brodybits Maybe, but practically that hasn't happened. All the "security updates" GitHub warned so far didn't affect us at all. Specially since this project is just a formatter.

I would personally favor we support this functionality for recent Node.js versions only.

@brodybits There may be people running a forked Prettier in CI's with old Node.js versions.

Agree, last time when I try to upgrade rollup, I have to look for very old docs and issues and changlog

@fisker Was it necessary to update rollup though? Did we have any benefits from upgrading it?

why not fork, change, build, install from bundle?

@fisker How to install from bundle? Where will you keep this bundle?

@fisker
Copy link
Member

fisker commented Aug 12, 2019

Was it necessary to update rollup though? Did we have any benefits from upgrading it?

@duailibe You're the one want it updated #6154 #6200

@alexander-akait
Copy link
Member

@duailibe some parsers can drop support node@4 and it will be problem for us

@duailibe
Copy link
Member

duailibe commented Aug 12, 2019

@fisker Forgot about that 👍 The comment is valid for everything else

@evilebottnawi There are some dependencies that have dropped support and that doesn't affect us because we transpile everything.

And I'll repeat:

Dropping Node 4 is already planned, but it's a breaking change, it'll go out with 2.0. It needs to be coordinated.

I'll release 1.19 soon and then start the necessary changes for 2.0.

@lipis lipis removed the status:needs discussion Issues needing discussion and a decision to be made before action can be taken label Aug 12, 2019
@j-f1
Copy link
Member

j-f1 commented Aug 18, 2019

@duailibe You dropped Node 4 support for installing Prettier directly from GitHub. Do you think it would be reasonable to also drop Node 6 support for direct-from-GitHub installs?

@brodybits
Copy link
Contributor

brodybits commented Oct 24, 2019

Do you think it would be reasonable to also drop Node 6 support for direct-from-GitHub installs?

I would personally consider this to be a breaking change if we want to be strictly semver compliant, which I would favor.

I really hope we can start targeting the new major release and update the dependencies soon. Supporting the old Node.js versions seems to divert attention and resources away from highly desired updates and bug fixes.

P.S. I am taking back my comment about the breaking change since install from GitHub is an undocumented feature (typescript-eslint/typescript-eslint#1108 (comment)). But my comment about supporting old Node.js versions continues to stand.

@alexander-akait

This comment has been minimized.

@thorn0

This comment has been minimized.

@alexander-akait

This comment has been minimized.

@thorn0

This comment has been minimized.

@alexander-akait

This comment has been minimized.

@thorn0

This comment has been minimized.

@alexander-akait

This comment has been minimized.

@thorn0

This comment has been minimized.

@alexander-akait

This comment has been minimized.

@lydell lydell changed the title Drop Node 4 support Drop Node 4 support (and Node 6 and Node 8) Nov 9, 2019
@lydell lydell modified the milestones: 2.0 (maybe/old/stretch), 2.0 Nov 9, 2019
@sosukesuzuki
Copy link
Member

#6907 #6908 #7302 has been merged into next.
What else should we do for this issue? Or can we close this issue?

@lipis lipis closed this as completed Jan 22, 2020
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Apr 25, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests