current position:Home>Quick report ~ node JS 18 coming! Let's see what's new
Quick report ~ node JS 18 coming! Let's see what's new
2022-04-29 20:27:31【Time time】
Preface
Once a year again Node.js It's time for the community to release a new version ,Node.js v18
stay 4 month 19 No. was quietly released !Node.js v18
Will be in 2020 year 10 Month be LTS edition ( Leave to v16 There's not much time , cry /(ㄒoㄒ)/~~, Now it's still 14 Version of youmuyou ····), Yes v18 LTS Your support will continue until 2025 year 4 month . But in the official release LTS Before the release , There are still some ecological environments that are not covered by , Officials will continue to test and feedback , Therefore, at this stage, it is still necessary to eat carefully , Let's see what new tricks this new version brings !
Node.js18 New characteristics
experimental Fetch
The good news ! The good news !!Node.js
At last fetch Request function !
Fetch API Provides a simple 、 reasonable JavaScript Handle HTTP How to request , It has already become Web Standards for API. But for a long time ,Node I won't support it fetch request . If we want to send HTTP request , You have to use third-party plug-ins ( Such as node-fetch) Write or request from scratch . But now it's affected by undici Inspired by the (node-fetch Plugins are also based on undici-fetch),Node Also achieved as close as possible Web The standard Fetch standard , However, some features that need to be supported by the browser environment are ignored .
however Node Medium Fetch API It is also experimental , Further tests are needed to follow up .
Undici library
It's mentioned above that Node Fetch The implementation is based on undici, therefore Node Add a undici Is the library all right ??(doge) So what exactly is this library ? In fact, that is Node.js Provided by the team , One use Nodejs Compiling 、 complete 、 ripe HTTP1.1 client .
Experimental test modular
node:test
Modules can be created JavaScript test , Provides a quick 、 direct , There is no need to install other dependencies (Jset
or Mocha
) Can meet our simple testing needs , It uses TAP Output the test results according to the specifications , This is also widely used by many testing tools , Easier to understand and accept . But it is still in the development stage , It can't completely replace mature Jset
or Mocha
.
import test from 'node:test'; // Must be node: As a prefix , Indicates that... Is loaded node Core module , Otherwise, the third-party module may be loaded
Copy code
Platform support
- Linux: As long as it's based on glibc 2.28 Or a higher version , Such as Debian 10、 RHEL 8 and Ubuntu 20.04
- MacOS need 10.15 Or higher
- Because in Node.js Created in v8 There are problems with dependencies ,win 32 The system will not be able to get updates at the first time
Node.js v18
edition
For more support details, please stamp here
V8 The new version
Node Introduced V8 The engine has been updated to 10.1 Version of the , Improved and added some new features :
- stay
Node.js v17.9.0
It already has , for examplefindLast()
、findLastIndex()
, This is in Web The end is still in the proposal stage , At present, we still need to pass lodash Use it
- Improves the performance of classes and private methods on classes ( Their initialization speed is now as fast as normal attribute storage ).
- Added
Intl.supportedValuesOf(param)
Method , The supported parameters arecalendar
,collation
,currency
,numberingSystem
,timeZone
, andunit
.
Intl.supportedValuesOf('calendar')
// ['buddhist', 'chinese', 'coptic', 'dangi', ...]
Intl.supportedValuesOf('collation')
// ['big5han', 'compat', 'dict', 'emoji', ...]
Intl.supportedValuesOf('currency')
// ['ADP', 'AED', 'AFA', 'AFN', 'ALK', 'ALL', 'AMD', ...]
Intl.supportedValuesOf('numberingSystem')
// ['adlm', 'ahom', 'arab', 'arabext', 'bali', ...]
Intl.supportedValuesOf('timeZone')
// ['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', ...]
Intl.supportedValuesOf('unit')
// ['acre', 'bit', 'byte', 'celsius', 'centimeter', ...]
Copy code
- More about V8 Engine V9.9 For version details, please refer to here
Abandoned or removed API
fs : runtime deprecate string coercion in fs.write, fs.writeFileSync (Livia Medeiros) #42607
dns : remove dns.lookup and dnsPromises.lookup options type coercion (Antoine du Hamel) #41431
process : runtime deprecate multipleResolves (Benjamin Gruenbaum) #41896
stream : remove thenable support (Robert Nagy) #40773
tls : move tls.parseCertString to end-of-life (Tobias Nießen) #41479
Copy code
Thank you for reading ~ That's about Node.js v18
The whole content of , If you have any ideas, come and discuss them together
Reference resources :
copyright notice
author[Time time],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/04/202204292027263816.html
The sidebar is recommended
- Who is bunk, the new hero of endless dungeon? Introduction to new hero bunk skills
- Front end entry first bullet | development tools and configuration
- Nice HTML login page
- Vue error prone summary
- Summary of material resources website (icon | wallpaper | Adobe plug-in | jQuery plug-in | badge | online conversion | color splicing | continuous update)
- Step by step, configure nodesjs environment with hbuilder for Vue JS development
- Vue sets the global websocket and accepts message notification processing on the corresponding page
- Solve the problem that vuex data is reset during page refresh
- Java data structures and algorithms lesson 2 - generics
- Leetcode-82 - delete duplicate Element II in the sorting linked list
guess what you like
[front end] quickly create HTML
Vue router routing navigation
Vue router redirection and alias
Vue router named routes, (nested) named views
Dynamic components & slots & custom instructions for getting started with Vue Foundation
JavaScript algorithm -- heap sorting
K8s deployment-43-take you to learn ingress nginx (Part 2)
Detailed breakdown of actual combat of CMS background system project (VII)
Explore the store | new architecture blessing, performance and safety. This style is super personality_ Integra_ Honda_ platform
Sports kit blessing / replacement of four cylinder engine Chevrolet chuangku RS live shooting analysis_ Aspect_ Display screen_ Complete vehicle
Random recommended
- Talking about nodejs server
- Node. js< I & gt—— Encounter node and repl usage
- Vue basic API: calculation attribute + filter + listener
- 1-stm32 + mn316 (nb-iot) remote upgrade OTA (self built Internet of things platform) - STM32 uses HTTP to download program files and upgrade programs through mn316 (MCU program rotation check and update)
- Vue Axios response interception
- vue3 ref
- How does Vue transfer the data from the parent component to the child component intact?
- The back-end interface developed by springboot in idea and the Vue front-end developed by vscode. How to integrate Vue code into springboot?
- Fried cold rice series 4: scope and closure in JavaScript
- Typescript type compatibility learning
- Summary of bugs encountered in front-end development
- Chrome developer tool: performance analysis using web panel
- Collation of common semantic elements and global attributes in HTML
- Life cycle in Vue
- 5.1 fear of traffic jam? With a budget of less than 100000, these cars with adaptive cruise make it easy for you to travel
- Docker compose deploy nginx configure SSL
- The content of element type “mapper“ must match “(cache-ref|cache|resultMap*|parameterMap*|sql*|inse
- -CSS-
- Vue uses two-way binding to implement the user registration page
- Is Infiniti qx60 worth less than 400000 yuan? It depends on the discount
- "Element Fangjian: first heart version" public beta welfare release, go to the great God app to receive red envelopes and prizes
- What is the role of webpack cli in webpack packaging
- Vue3 configuration method using Axios
- How to configure Google reverse proxy on nginx server
- Volume comparison between Vue and react
- What are the three ways to define components in react
- How to install and configure the blogging program Typecho on the nginx server
- How to configure load balancing for TCP in nginx server
- How to configure nginx server under Windows system
- How to configure AB to do stress testing for nginx server
- Analysis of location configuration in nginx server
- How to integrate Linux and redmine into the redmine system
- How to build the production environment of nginx + PHP with PHP FPM
- How to optimize the performance of nginx supporting SSL
- How to configure nginx server to prevent flood attack
- [Axios learning] basic use of Axios
- [Axios learning] Axios request mode, concurrent request, global configuration, instance and interceptor
- Use the virtual queue implemented by list to view the first element of the queue in Python without taking it out
- This dependency was not found and to install it, you can run: NPM install score JS
- Front end serial communication