-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Breaking Change in 2.1.1 #2111
Comments
Node v4+ is supported with This is why |
We definitely don't support, nor want to encourage, insecure versions of node. |
I understand that Node 10 is now EOL, but making this change in a patch release has broken our build via dependencies in a way that we could not catch. Because this is being installed in our environment via According to your documentation, a patch release should be backwards compatible.
In the case of 2.1.1, there is definitively a breaking of compatibility. Using my environment I used to be able to install Yes, our project should be updating to a supported version of Node, but that is not a process that we can do overnight as it would require us to make a major release in order to broadcast to our dependents that they cannot just accept the latest minor/patch version because trying to do so would break their builds. To suggest that I would ask that you please consider reverting this change to |
Marked v2.1.1 does work in node v10 therefore there are no breaking changes. The engines field has no absolute spec as far as I know (if it does please share a link). It does different things depending on what installer is used. The burden of creating a new major version is no different in marked than in other packages. Yarn has ways of pinning dependencies. |
Based on my reading of the There are ways to mitigate this error, but modifying the install behavior in a way that causes my CI build to fail seems to be a breaking change from my perspective. It is also surprising such a change was introduced in a patch release. If you do not have a significant opinion in the value of the |
I have advocated for removing it but some in the community believe it is necessary. @styfle I personally don't use yarn very often so it doesn't affect me one way or the other. |
I advocate for dropping support for a Node.js version in semver major to avoid all these issues. The reason why engines is useful is to indicate which versions are supported in a formal way. |
I second this - @styfle beat me to this. It may also be beneficial for transparency to define our EOL strategy. How long will versions of Node be supported? Up to EOL? EOL + 6 months? And so on. |
This is the type of thing we wouldn't need to worry about if we remove the I'm only willing to support latest lts and latest node versions, and a few of my projects were still using node v12 (I have updated them since) which is why I submitted a PR to fix v12 from v2.1.0. If there is a person willing to review PRs and make sure they work with node v8 they should be able to. |
I don't believe that is true which is why issue #2106 was created. The issue was that Node 12 wasn't tested.
I don't think we need to designate a person, this is the job of CI. As long as the lowest common denominator is running the tests automatically (Node.js 12), it shouldn't be a problem. The only step remaining is to ensure that semver major is bumped when removing Node 12 from CI. |
Which is going to be in a few years because no one is going to remember to remove it when node v12 EOL comes around. The biggest problem with hard coding node versions in CI is that no one remembers to update them. When node v16 becomes lts than we will be testing node v12, v16 and v17 not v14 any more. And we probably aren't going to test v14 until something breaks it. If this were a project backed by a company like react or babel and had people working on it every day it might be a different story. For those projects I think
exactly, so the |
Or alternatively... We just utilize Babel provide a version of Marked that by default is compatible with older Node versions without having to manage those node versions ourselves. |
Or we say marked works with lts and latest node and tell dependents they need to transpile marked if they need it to work with a specific version of node. |
But there is no harm with not updating CI because then we continue supporting old Node.js versions and thats okay. The problem is when we're not testing a specific Node.js version and accidentally remove support for it. |
Right, like when we accidentally remove support for v14 because we forget to update the ci to test for it. Testing v12 does not mean v14 will always work. |
Babel routinely drops support for older platforms including Node as they age out, and garuntees that our code will work on supported versions of Node. We wouldn't even have to think about it as long as we keep Babel up to date. ... right? |
Than we would have to make sure we use a version of babel that supports the versions of node that we support. That seems like more work than maintaining ci to test all versions we support. |
If we already agree that we only support active versions of Node, then keeping Babel up to date does that for us. There will be no need to have CI testing for different Node versions since Babel already garuntees our code will work. Babel only seems to drop support for node versions with a major version bump, so we can even keep an eye out for that and update our own version accordingly if we really want to.
|
That could work. I do recall @styfle sharing this article a while ago which, if I remember correctly, argues that we should only support the latest version of node and let whoever wants to maintain marked for other versions do it themselves (similar to what I have been saying). Not that I agree with it 100% but there are some good points. |
I don’t remember sharing that article 🤔 I’m still in favor of bumping semver major when dropping a version. |
It was in a team discussion in 2018
I agree but I think we need to determine what constitutes "dropping" a version. Currently marked v2.1.1 still works on all the same node versions as marked v2.0.7. The only difference is the |
Then it sounds like we need to change the engines field 🙂 |
Right, but to what? Do we go with accuracy? What is the minimum version that marked works on? Does it work on every version after that? or is there some bug in node that prevents it from working on some versions? Do we set it back to what it was at before v2.1.1 even though it was inaccurate? Do we go with an arbitrary value like I don't think any person wants to do the work to make sure it is accurate which is why I think we should just remove it. |
How about PR #2119? |
Regarding the article, I think we're reading it differently. The way I read it was essentially this quote:
Meaning, if you ship 2.1.1 and then you ship 3.0.0, you don't ever need to ship 2.1.2 because that release line is no longer maintained. |
I think this is the part of the article that sums up my arguments the best. |
Or this:
|
Personally I completely agree it wouldn't be fair or reasonable to expect work to support my increasingly outdated version of Node. If you decided to stop development on v2 and put effort exclusively into v3, I would not mind. But if you drop support for a particular version of Node, I would prefer that to be communicated as a major version to prevent users from being surprised. |
🎉 This issue has been resolved in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Marked version: 2.1.1
Describe the bug
Version 2.1.1 drops support both for Node 8 and Node 10, mandating Node 12 and higher. This is a sudden change that violates semantic versioning by cutting off support for previously working versions. Doing this change to the
engines
field in a patch makes it very hard to catch ahead of time, but does result in breaking our CI pipeline via Typedoc. Our library and Typedoc both have a minimum of Node 10.To Reproduce
Steps to reproduce the behavior:
nvm use 10.18.0
)typedoc@^0.20.0
ormarked@^2.00
yarn
Expected behavior
A clear and concise description of what you expected to happen.
I expect that a patch release will maintain existing support for Node platforms and that any deprecation is both clearly documented and breaking changes are placed in a major release.
Can you please revert this change to
engines
and release a 2.1.2 as soon as possible? I understand the value in dropping older versions, but this change was sudden and are having effects on dependents.The text was updated successfully, but these errors were encountered: