长期支持(LTS)和稳定版本的Node.js有什么区别? [英] What are the differences between Long Term Support (LTS) and Stable versions of Node.js?

查看:1753
本文介绍了长期支持(LTS)和稳定版本的Node.js有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初问:具有LTS(长期支持)的Node.js 4.x分支与5.x分支(列为稳定版)之间有什么区别?

但这与理解6.x和7.x之间的区别以及将来的8.x和9.x之间的区别同样重要

But this is equally relevant to understanding the difference between 6.x and 7.x and, in the future, 8.x and 9.x

通常,我总是倾向于功能和性能的最新版本(因为我现在做很多ES6/ES7).是否有关于稳定"分支准备就绪的任何信息?

Generally, I always lean towards the latest version for features and performance (as I now do a lot of ES6 / ES7). Is there any information on how production ready the "stable" branches are?

推荐答案

要了解这些区别,您需要了解为什么存在Node的长期支持(LTS)版本.

To understand the difference you need to understand why a Long Term Support (LTS) version of Node exists.

Node LTS主要针对企业用户,因为它们可能对频繁更新,广泛的采购程序以及冗长的测试和质量要求有更大的抵制.

Node LTS is primarily aimed at enterprise use where there may be more resistance to frequent updates, extensive procurement procedures and lengthy test and quality requirements.

来自Node LTS工作组成员Rod Vagg:

From Rod Vagg a member of the Node LTS working group:

为Node制定LTS计划的重点是,通过以可预见的时间表交付具有明确定义的扩展支持生命周期的新版本,在现有稳定发行周期的基础上进行构建.尽管这似乎与开源的早发布,经常发布"的传统背道而驰,但这是企业应用程序开发和运营团队的基本要求.它还会影响为Node.js提供专业支持的公司.

The point of establishing an LTS plan for Node is to build on top of an existing stable release cycle by delivering new new versions on a predictable schedule that have a clearly defined extended support lifecycle. While this may seem at odds with the open source tradition of "release early, release often" it is an essential requirement for enterprise application development and operations teams. It also affects companies ... that provide professional support for Node.js.

https://medium.com/@nodesource/essential-steps-long-term-support-for-node-js-8ecf7514dbd#.za353bn08

其中一条评论中提到的官方Node帖子也很好地解释了这一点:

The official Node post mentioned in one of the comments also does a fine job of explaining this:

https://nodejs.org/en/blog/community/node-v5 /

有时会误解为奇数版本号(v5,v7)是下一个LTS版本的"beta".这是其他项目中使用的约定,而不是Node中使用的约定,在某种程度上具有误导性.实际上,下一个LTS版本是从当前版本的特定版本中选择的,并且通常是偶数版本(v6,v8).并不是说最新版本是beta版-而是LTS版本满足某些组织的特定需求.

It is sometimes misunderstood that odd version number releases (v5, v7) are a "beta" of the next LTS release. This is a convention used in other project but not in Node and is somewhat misleading. In fact, the next LTS release is chosen from a specific point release of the current version, and this will usually be an even version release (v6, v8). It's not that the latest versions are betas - it's that the LTS releases fulfil a specific need some organisations have.

作为参考,请查看Firefox的扩展支持版本( https://www.mozilla.org/zh-CN/firefox/organizations/faq/)或Ubuntu的LTS版本( https://wiki.ubuntu.com/LTS ).我认为没有人会建议最新版本的Firefox是Beta版,并且大多数用户都应该坚持使用较旧的ERS版本.

For a point of reference look at Firefox's Extended Support Releases (https://www.mozilla.org/en-US/firefox/organizations/faq/) or Ubuntu's LTS releases (https://wiki.ubuntu.com/LTS). I don't think anyone would suggested the latest version of Firefox was a beta and that most users should stick with the older ERS versions.

通常,如果您能够跟上最新的稳定版本和将来的Node版本,则应该这样做.这些是稳定的版本,可以提供生产就绪版本,并得到社区的大力支持.不稳定的和试验性的功能保留在生成和运行时标志的后面,不应影响您的日常操作.

Generally if you are able to keep up with the latest stable and future Node releases you should do so. These are stable and production ready releases with excellent community support. Unstable and experimental functionality is kept behind build and runtime flags and should not affect your day to day operations.

通常,我始终倾向于最新版本的功能和性能(就像我现在分配ES6/ES7一样)

Generally I always lean towards the latest version for features and performance (as I now do allot of ES6 / ES7)

这将向我建议稳定版本及以后的版本将非常适合您的需求.这将使您能够访问底层JavaScript引擎(V8或Chakra)提供的最新和最强大的语言功能

This would suggest to me that stable versions and beyond will suit your needs well. This will give you access to the latest and greatest language features provide by the underlying JavaScript engine (V8 or Chakra)

值得注意的是:v4(或更早版本)与v5之间的显着区别是v4随npm v2一起提供,而v5随npm v3一起提供. npm的v3对于您的项目在处理peerDependancies的方式方面可能会有一些重大突破.现在,npm v3尝试尽可能平坦地安装依赖关系,并避免重复安装依赖关系的方式可能会影响您的项目,但对Windows用户而言却是一大福音,因此这也可能会影响您的决策.

Of note: A significant difference between v4 (and earlier) and v5 is that v4 ships with npm v2 whereas v5 ships with npm v3. v3 of npm has some potentially breaking changes for your project in how it handles peerDependancies. The way npm v3 now tries to install a dependancies own dependancies as flat as possible and avoid duplicates may affect your projects but has been a big boon for Windows users so this may also impact your decision making.

这篇关于长期支持(LTS)和稳定版本的Node.js有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆