Node.js Here comes the official release note for V14

Time:2020-9-20

Crazy technology house

By Michael Dawson & Bethany Griggs

https://medium.com/@nodejs/no…

No reprint without permission

This article was written by Michael Dawson and Bethany Griggs, and Node.js Community committees and Node.js The Technical Steering Committee also contributed.

Node.js  Here comes the official release note for V14

We are pleased to announce that, Node.js 14 released today! The focus of this release includes improved diagnostics, V8 upgrade, experimental asynchronous local storage API, enhancement of streaming API, removal of experimental module warnings, and removal of some obsolete APIs.

Node.js 14 replaced Node.js 13 as our current release. According to release schedule( https://github.com/nodejs/Rel… , Node.js 14 is for the next six monthsCurrentVersion, which will be upgraded to long term support (LTS) by October 2020. Enterprise users should wait until October Node.js When upgrading to LTS, it is used for production deployment. But now it is Node.js 14 the best time to test your program and try new features.

Remind me—— Node.js 12 and Node.js 10 will maintain long-term support until April 2022 and April 2021 (see here for more details on the LTS strategy).

Start now! Learn how to download the latest version here: https://nodejs.org/en/downloa…

Before delving into the new features in this release, it is important to note that new features added to the main release quickly flow into the current version. This means that important features can be used in minor versions. We would like to take this opportunity to highlight Node.js Some features in version 14, even though they may have been migrated to earlier versions.

The diagnosis report became stable

Diagnostic reports will be available at Node.js 14 as a stable function (in Node.js 12 as an experimental function). This is an important step in the ongoing work of the project, which aims to establish the use of Node.js Most of the work is done by Node.js The diagnostic working group was promoted.

Diagnostic reporting enables you to generate reports on demand or when certain events occur. The report contains information that can help diagnose problems in production, including crashes, performance degradation, memory leaks, high CPU utilization, unexpected errors, and so on. For more information about the diagnostic reporting feature, see https://medium.com/the-node-j… 。 As a stable feature, there will be fewer command line options required to enable diagnostic reporting, and users should be more likely to enable diagnostic reporting in a production environment.

Upgrade from V8 to V8 8.1

As always, the new version of the V8 JavaScript engine brings performance tuning and improvements, and enables Node.js Consistent with continuous improvements in language and runtime. And the naming of version 8 (“V8 of V8”) also brings some fun.

Highlights of the new JavaScript features include:

The new JavaScript features focus on:

  • MDN – optional chain
  • Nullish merge – MDN
  • Intl.DisplayNames — MDN
  • byIntl.DateTimeFormat EnablecalendarandnumberingSystemOptions – MDN

For more information about the new features in V8, see Node.js V8 blog: https://v8.dev/blog.

Experimental asynchronous local storage API

The project has been working on APIs that help manage asynchronous call contexts between multiple versions. The experimental async hooks API was introduced in earlier versions. One of the key use cases for async hook is asynchronous local storage (also known as continuous local storage). There are many NPM modules that provide APIs that can meet this requirement, but for many years, these modules are difficult to implement Node.js Maintenance outside the kernel; and the project has reached a consensus that Node.js It would be more reasonable to provide APIs. Version 14. X brings experimental async local storage API (also back ported to 13.10) https://nodejs.org/api/async_ …。 We are looking for communities that can try out the API and provide us with feedback on abstract models, API interfaces, use case coverage, functional stability, naming, documentation, etc., so that we can take it out of experimentation in future versions. The best way to provide feedback is here( https://github.com/nodejs/dia… )Open a question with the title “experience report with asynclocalstorage API”.

flow

This version contains a number of Node.js Changes marked as semver major in the streams implementation. These changes are designed to improve the consistency of the streams API to disambiguate and simplify Node.js The behavior of each part of the core. For example,http.OutgoingMessageAndstream.Writableandnet.SocketIs exactly the same asstream.Duplex。 One significant change is thatautoDestroyOption is now set to true by default, so that the flow always calls after the end_destroy。 Although we don’t think that these major changes to semver will affect most programs, because they only change the edge conditions, if you are heavily dependent on stream, it’s best to Node.js 14 is the current version to test for future releases. Node.js 14 will become LTS in October 2020.

Experimental web assembly system interface

Written in web assembly Node.js Packages offer opportunities for better performance and cross platform support for some use cases. Version 14. X includes an experimental implementation of the web assembly system interface (Wasi) to help support these use cases. Yes Node.js V14 is not new, but it’s worth noting because Wasi has the potential to significantly simplify the experience of native modules. You can learn more about it in the API documentation: https://nodejs.org/api/wasi.html 。

Remove lab module warning

In Node.js In 13, we no longer need to include- experimental-modulesSign, but in the Node.js Running ECMAScript modules in will still generate a warningExperimentalWarning: The ESM module loader is experimental

From Node.js Start at 14 Node.js This warning no longer appears when ESM is used in. But Node.js The implementation of ESM in is still in the experimental stage. According to our stability index: “this feature is not constrained by semantic version control rules. Backward compatible changes or deletions may occur in any future release. ” Users should be cautious when using this feature in a production environment.

Remember, Node.js The implementation of ESM in is different from your familiar development experience. Most transformation workflows support Node.js ESM implements features that are not supported, such as optional file extensions or JSON modules. Modules from the translation environment are likely to require some degree of refactoring in order to Node.js In China. It is worth mentioning that many of our design decisions have two main objectives. Specification compliance and web compatibility. We believe that the current implementation provides a future proof model for writing ESM modules, which pave the way for the move towards universal JavaScript. Please read more in the documentation.

Node.js The ESM implementation in is still in the experimental phase, but we believe that we are very close to being able to Node.js ESM is called “stable” state in. The elimination of warnings is an important step in this direction.

New compiler and platform minimum requirements

Node.js Pre built binaries are provided for a variety of different platforms. For each major release, where appropriate, an assessment is made and the minimum tool chain is proposed.

This version does not work with older versions of MacOS on MacOS Node.js Users have a negative impact. about Node.js 14, we raised the minimum MacOS target version to MacOS 10.13 (high Sierra).

On Linux based platforms, for Node.js 14, the minimum GCC version is still GCC 6, but we plan to build and publish binaries for some platforms that use GCC 8.

Node.js 14 will not run on an end of life windows distribution.

For more details, see Node.js BUILDING.md 。

Call for action

In the six months into the “current” phase, Node.js 14 will get Node.js Contribution to the latest features. Over the next six months, this release is perfect for trying out the latest features, test projects, and the latest Node.js Updated compatibility and feedback, so the release is ready to transition to LTS in October.

To download, visit: https://nodejs.org/en/downloa…

thank you!

We would like to take this opportunity to all contributors and Node.js Thank you very much. We also want to thank you Node.js The build team ensures that we have the infrastructure to create and test releases, and Node.js 14 tool chain for the necessary upgrade.

Node.js The publisher of v14.0.0 is Bethany Griggs. You can use the v14.0.0 release( https://github.com/nodejs/nod… )For a complete list of features.


This article starts with WeChat official account: front-end pioneer.

Welcome to scan the two-dimensional code to pay attention to the official account, and push you every day to send fresh front-end technical articles.

Node.js  Here comes the official release note for V14

Welcome to read the other great articles in this column:

  • Deep understanding of shadow DOM v1
  • Step by step teaching you to use webvr to realize virtual reality games
  • 13 modern CSS frameworks to improve your development efficiency
  • Fast start bootstrap Vue
  • How does the JavaScript engine work? Everything you need to know from call stack to promise
  • Websocket: real time communication between node and react
  • 20 interview questions about Git
  • In depth analysis Node.js Of console.log
  • Node.js What is it?
  • 30 minutes Node.js Build an API server
  • Object copy of JavaScript
  • Programmer 30 years old before the monthly salary is less than 30K, where to go
  • 14 best JavaScript data visualization Libraries
  • 8 top-level vs code extensions for the front end
  • Node.js A complete guide to multithreading
  • Four schemes and implementation of transforming HTML into PDF

  • More articles

Recommended Today

Large scale distributed storage system: Principle Analysis and architecture practice.pdf

Focus on “Java back end technology stack” Reply to “interview” for full interview information Distributed storage system, which stores data in multiple independent devices. Traditional network storage system uses centralized storage server to store all data. Storage server becomes the bottleneck of system performance and the focus of reliability and security, which can not meet […]