Node.js is open source en platformonafhankelijk, en is gericht op het ontwikkelen van server-sidewebapplicaties. Die applicaties worden geschreven in JavaScript en uitgevoerd binnen de Node.js runtime op de server. Het biedt een event-gedreven omgeving aan waarbij non-blocking i/o een belangrijk uitgangspunt is geweest. Voor meer informatie verwijzen we naar deze pagina. Het ontwikkelteam heeft versie 14.0 vrijgegeven en de belangrijkste verbeteringen die hierin zijn aangebracht zijn hieronder voor je op een rijtje gezet:
DeprecationsECMAScript Modules - Experimental Warning Removal
- crypto: move pbkdf2 without digest to EOL #31166
- fs: deprecate closing FileHandle on garbage collection #28396
- http: move OutboundMessage.prototype.flush to EOL #31164
- lib: move GLOBAL and root aliases to EOL #31167
- os: move tmpDir() to EOL #31169
- src: remove deprecated wasm type check #32116
- stream: move _writableState.buffer to EOL #31165
- doc: deprecate process.mainModule #32232
- doc: deprecate process.umask() with no arguments #32499
- module: remove experimental modules warning #31974
In Node.js 13 we removed the need to include the --experimental-modules flag, but when running EcmaScript Modules in Node.js, this would still result in a warning ExperimentalWarning: The ESM module loader is experimental.
As of Node.js 14 there is no longer this warning when using ESM in Node.js. However, the ESM implementation in Node.js remains experimental. As per our stability index: “The feature is not subject to Semantic Versioning rules. Non-backward compatible changes or removal may occur in any future release.” Users should be cautious when using the feature in production environments.
Please keep in mind that the implementation of ESM in Node.js differs from the developer experience you might be familiar with. Most transpilation workflows support features such as optional file extensions or JSON modules that the Node.js ESM implementation does not support. It is highly likely that modules from transpiled environments will require a certain degree of refactoring to work in Node.js. It is worth mentioning that many of our design decisions were made with two primary goals. Spec compliance and Web Compatibility. It is our belief that the current implementation offers a future proof model to authoring ESM modules that paves the path to Universal JavaScript. Please read more in our documentation.
The ESM implementation in Node.js is still experimental but we do believe that we are getting very close to being able to call ESM in Node.js “stable”. Removing the warning is a huge step in that direction.
New V8 ArrayBuffer API
- src: migrate to new V8 ArrayBuffer API #30782
Multiple ArrayBuffers pointing to the same base address are no longer allowed by V8. This may impact native addons.
Toolchain and Compiler Upgrades
- build: update macos deployment target to 10.13 for 14.x #32454
- doc: update cross compiler machine for Linux armv7 #32812
- doc: update Centos/RHEL releases use devtoolset-8 #32812
- doc: remove SmartOS from official binaries #32812
- win: block running on EOL Windows versions #31954
It is expected that there will be an ABI mismatch on ARM between the Node.js binary and native addons. Native addons are only broken if they interact with
Update to V8 8.1std::shared_ptr
. This is expected to be fixed in a later version of Node.js 14. - #30786Other Notable Changes:
- (SEMVER-MAJOR) deps: update V8 to 8.1.307.20 #32116
Semver-Major Commits
- cli, report: move --report-on-fatalerror to stable #32496
- deps: upgrade to libuv 1.37.0 #32866
- fs: add fs/promises alias module #31553
Semver-Minor Commits
- [
5360dd151d
] - assert: handle (deep) equal(NaN, NaN) as being identical #30766- [
a621608f12
] - build: update macos deployment target to 10.13 for 14.x #32454- [
e65bed1b7e
] - child_process: create proper public API forchannel
#30165- [
1b9a62cff4
] - crypto: make DH error messages consistent #31873- [
bffa5044c5
] - crypto: move pbkdf2 without digest to EOL #31166- [
10f5fa7513
] - crypto: forbid setting the PBKDF2 iter count to 0 #30578- [
2883c855e0
] - deps: update V8 to 8.1.307.20 #32116- [
1b2e2944bc
] - dgram: don't hide implicit bind errors #31958- [
1a1ce93317
] - doc: update cross compiler machine for Linux armv7 #32812- [
dad96e4fc1
] - doc: update Centos/RHEL releases use devtoolset-8 #32812- [
5317202aa1
] - doc: remove SmartOS from official binaries #32812- [
75ee5b2622
] - doc: deprecate process.umask() with no arguments #32499- [
afe353061b
] - doc: fs.write is not longer coercing strings #31030- [
a45c1aa39f
] - doc: fix mode and flags being mistaken in fs #27044- [
331d636240
] - errors: remove unused ERR_SOCKET_CANNOT_SEND error #31958- [
b8e41774d4
] - fs: add fs/promises alias module #31553- [
fb6df3bfac
] - fs: validate the input data to be of expected types #31030- [
2d8febceef
] - fs: deprecate closing FileHandle on garbage collection #28396- [
67e067eb06
] - fs: watch signals for recursive incompatibility #29947- [
f0d2df41f8
] - fs: change streams to always emit close by default #31408- [
a13500f503
] - fs: improve mode and flags validation #27044- [
535e9571f5
] - fs: make FSStatWatcher.start private #29971- [
c1b2f6afbe
] - http: detach socket from IncomingMessage on keep-alive #32153- [
173d044d09
] - http: align OutgoingMessage and ClientRequest destroy #32148- [
d3715c76b5
] - http: move OutboundMessage.prototype.flush to EOL #31164- [
c776a37791
] - http: end with data can cause write after end #28666- [
ff2ed3ec85
] - http: remove unused hasItems() from freelist #30744- [
d247a8e1dc
] - http: emit close on socket re-use #28685- [
6f0ec79e42
] - http,stream: make virtual methods throw an error #31912- [
ec0dd6fa1c
] - lib: move GLOBAL and root aliases to EOL #31167- [
d7452b7140
] - module: warn on using unfinished circular dependency #29935- [
eeccd52b4e
] - net: make readable/writable start as true #32272- [
ab4115f17c
] - os: move tmpDir() to EOL #31169- [
8c18e91c8a
] - process: remove undocumentednow
argument from emitWarning() #31643- [
84c426cb60
] - repl: properly handlerepl.repl
#30981- [
4f523c2c1a
] - src: migrate to new V8 ArrayBuffer API #30782- [
c712fb7cd6
] - src: add abstractIsolatePlatformDelegate
#30324- [
1428a92492
] - stream: make pipeline try to wait for 'close' #32158- [
388cef61e8
] - stream: align stream.Duplex with net.Socket #32139- [
7cafd5f3a9
] - stream: fix finished w/ 'close' before 'end' #31545- [
311e12b962
] - stream: fix multiple destroy calls #29197- [
1f209129c7
] - stream: throw invalid argument errors #31831- [
d016b9d708
] - stream: finished callback for closed streams #31509- [
e559842188
] - stream: make readable & writable computed #31197- [
907c07fa85
] - stream: move _writableState.buffer to EOL #31165- [
66f4e4edcb
] - stream: do not emit 'end' after 'error' #31182- [
75b30c606c
] - stream: emit 'error' asynchronously #29744- [
4bec6d13f9
] - stream: enable autoDestroy by default #30623- [
20d009d2fd
] - stream: pipe should not swallow error #30993- [
67ed526ab0
] - stream: error state cleanup #30851- [
e902fadc5e
] - stream: do not throw multiple callback errors in writable #30614- [
e13a37e49d
] - stream: ensure finish is emitted in next tick #30733- [
9d09969f4c
] - stream: always invoke end callback #29747- [
0f78dcc86d
] - util: escape C1 control characters and switch to hex format #29826- [
cb8898c48f
] - win: block running on EOL Windows versions #31954- [
a9401439c7
] - zlib: align with streams #32220Semver-Patch Commits
- [
63f0dd1ab9
] - async_hooks: merge run and exit methods #31950- [
a683e87cd0
] - async_hooks: prevent sync methods of async storage exiting outer context (Stephen Belanger) #31950- [
f571b294f5
] - doc: deprecate process.mainModule #32232- [
e04f599258
] - doc: add basic embedding example documentation #30467- [
e93503be83
] - embedding: provide hook for custom process.exit() behaviour #32531- [
a8cf886de7
] - src: shutdown platform from FreePlatform() #30467- [
0e576740dc
] - src: fix what a dispose without checking (Jichan) #30467- [
887b6a143b
] - src: allow non-Node.js TracingControllers #30467- [
7e0264d932
] - src: add ability to look up platform based onEnvironment\*
#30467- [
d7f11077f1
] - src: make InitializeNodeWithArgs() official public API #30467- [
821e21de8c
] - src: add unique_ptr equivalent of CreatePlatform #30467- [
7dead8440c
] - src: add LoadEnvironment() variant taking a string #30467- [
c44edec4da
] - src: provide a variant of LoadEnvironment taking a callback #30467- [
a9fb51f9be
] - src: align worker and main thread code with embedder API #30467- [
084c379648
] - src: associate is_main_thread() with worker_context() #30467- [
64c01222d9
] - src: move worker_context from Environment to IsolateData #30467- [
288382a4ce
] - src: fix memory leak in CreateEnvironment when bootstrap fails #30467- [
d7bc5816a5
] - src: makeFreeEnvironment()
perform all necessary cleanup #30467- [
43d32b073f
] - src,test: add full-featured embedder API test #30467- [
2061c33670
] - test: add extended embedder cctest #30467- [
2561484dcb
] - test: re-enable cctest that was commented out #30467
- [
9b6e797379
] - Revert "assert: fix line number calculation after V8 upgrade" #32116- [
c740fbda9d
] - buffer: add type check in bidirectionalIndexOf #32770- [
c8e3470e53
] - buffer: mark pool ArrayBuffer as untransferable #32759- [
f2c22db580
] - build: remove .git folders when testing V8 #32877- [
c0f43bfda8
] - build: add configure flag to build V8 with DCHECKs #32787- [
99e7f878ce
] - build: re-enable ASAN Action using clang #32776- [
3e55284e9b
] - build: use same flags as V8 for ASAN #32776- [
4e5ec41024
] - build: add build from tarball #32129- [
6a349019da
] - build: temporarily skip ASAN build #32116- [
da92f15413
] - build: reset embedder string to "-node.0" #32116- [
e883059c24
] - cli, report: move --report-on-fatalerror to stable #32496- [
bf86f55e22
] - deps: patch V8 to 8.1.307.30 #32693- [
b5bbde8cf1
] - deps: upgrade to libuv 1.37.0 #32866- [
7afe24dba6
] - deps: upgrade to libuv 1.36.0 #32866- [
1cd235d1a0
] - deps: patch V8 to run on Xcode 8 #32116- [
5d867badd0
] - deps: V8: silence irrelevant warnings #32116- [
8d2c441e4d
] - deps: V8: cherry-pick 931bdbd76f5b #32116- [
049160dfb6
] - deps: V8: cherry-pick 1e36e21acc40 #32116- [
0220c298c5
] - deps: bump minimum icu version to 65 #32116- [
f90eba1d91
] - deps: make v8.h compatible with VS2015 #32116- [
56b6a4f732
] - deps: V8: forward declaration ofRtl\*FunctionTable
#32116- [
40c9419b35
] - deps: V8: patch register-arm64.h #32116- [
55407ab73e
] - deps: patch V8 to run on older XCode versions #32116- [
990bc9adb4
] - deps: V8: un-cherry-pick bd019bd (Refael Ackermann) #32116- [
17a6def4e8
] - deps: update V8 dtrace & postmortem metadata #32116- [
0f14123186
] - deps: V8: stub backport fast API call changes #32885- [
bf412ed77b
] - deps: V8: stub backport d5b444bc5a84 #32885- [
fdaa365b0b
] - deps: V8: stub backport 65238018ca4b and 8d08318e1a85 #32885- [
8198e7882c
] - deps: V8: stub backport 9e52d5c5d717 #32885- [
a27852ae7c
] - deps: V8: cherry-pick 98b1ef80c722 #32885- [
e8c7b7a2df
] - deps: V8: cherry-pick b5c917ee80cb #32885- [
552cee0cc0
] - deps: V8: cherry-pick 700b1b97e9ab #32885- [
9b7a1b048a
] - deps: V8: cherry-pick e8ba5699c648 #32885- [
1f02617b05
] - deps: V8: cherry-pick 55a01ec7519a #32885- [
da728c482c
] - deps: V8: cherry-pick 9f0f2cb7f08d #32885- [
2ee8b4a512
] - deps: V8: cherry-pick e395d1698453 #32885- [
dfc66a6af4
] - deps: V8: cherry-pick d1253ae95b09 #32885- [
c3ecbc758b
] - deps: V8: cherry-pick fa3e37e511ee #32885- [
9568fbc7cd
] - deps: V8: cherry-pick f0057afc2fb6 #32885- [
07d4372d5a
] - deps: V8: cherry-pick 94723c197199 #32885- [
4a11a54f9a
] - deps: V8: backport 844fe8f7d965 #32885- [
1b7878558a
] - deps: V8: cherry-pick 2db93c023379 #32885- [
122937fc67
] - deps: V8: cherry-pick 4b1447e4bb0e #32885- [
01573ba4ae
] - deps: remove duplicated postmortem metadata entry #32521- [
9290febefa
] - deps: patch V8 to 8.1.307.26 #32521- [
a9e4cec70d
] - Revert "deps: V8: cherry-pick f9257802c1c0" #32521- [
77542a5d57
] - deps: revert whitespace changes on V8 #32587- [
9add24ecd3
] - doc: missing brackets (William Bonawentura) #32657- [
1796cc0df5
] - doc: improve consistency in usage of NULL #32726- [
2662b0c9e3
] - doc: improve net docs #32811- [
5d940de17b
] - doc: note that signatures of binary may be from subkeys #32591- [
3c8dd6d0c3
] - doc: add transform stream destroy() return value #32788- [
39368b34eb
] - doc: updated guidance for n-api changes #32721- [
cba6e5dc09
] - doc: remove warning fromresponse.writeHead
#32700- [
8f7fd8d6aa
] - doc: improve AsyncLocalStorage sample #32757- [
a7c75f956f
] - doc: documentbuffer.from
returns internal pool buffer #32703- [
f6a91156c7
] - doc: add puzpuzpuz to collaborators #32817- [
1db8da21f2
] - doc: split process.umask() entry into two #32711- [
6ade42bb3c
] - doc: stream.end(cb) cb can be invoked with error #32238- [
edb3ffb003
] - doc: fix os.version() Windows API #32156- [
a777cfa843
] - doc: remove repetition #31868- [
7c524fb092
] - doc: fix Writable.write callback description #31812- [
43fb664701
] - doc: fix missing changelog corrections #31854- [
a2d6f98e1a
] - doc: fix typo #31675- [
17e3f3be76
] - doc: update pr-url for DEP0022 EOL #31675- [
cd0f5a239e
] - doc: update pr-url for DEP0016 EOL #31675- [
5170daaca5
] - doc: fix changelog for v10.18.1 #31358- [
d845915d46
] - doc: mark Node.js 8 End-of-Life in CHANGELOG #31152- [
009a9c475b
] - doc,src,test: assign missing deprecation code #31674- [
ed4fbefb71
] - fs: use finished over destroy w/ cb #32809- [
3e9302b2b3
] - fs: validate the input data before opening file #31731- [
1a3e358a1d
] - http: refactor agent 'free' handler #32801- [
399749e4d8
] - lib: created isValidCallback helper #32665- [
bc55b57e64
] - lib: fix few comment typos in fs/watchers.js #31705- [
f98668ade3
] - module: remove experimental modules warning #31974- [
fe1bda9aeb
] - module: fix memory leak when require error occurs #32837- [
076ba3150d
] - Revert "n-api: detect deadlocks in thread-safe function" #32880- [
1092bb94f4
] - process: suggest --trace-warnings when printing warning #32797- [
d19a2c33b3
] - src: migrate measureMemory to new v8 api #32116- [
a63db7fb5e
] - src: remove deprecated wasm type check #32116- [
c080b2d821
] - src: avoid calling deprecated method #32116- [
7ed0d1439e
] - src: remove use of deprecated Symbol::Name() #32116- [
59eeb3b5b9
] - src: stop overriding deprecated V8 methods #32116- [
339c192ddb
] - src: update NODE_MODULE_VERSION to 83 #32116- [
6681a685a9
] - src: remove unused using in node_worker.cc #32840- [
b9d9f91a80
] - src: use basename(argv0) for --trace-uncaught suggestion #32798- [
24e1e28b38
] - src: ignore GCC -Wcast-function-type for v8.h #32679- [
a946189ccd
] - src: add AliasedStruct utility #32778- [
457f1f1ed0
] - src: remove unused v8 Array namespace #32749- [
b68e26ee70
] - src: flush V8 interrupts from Environment dtor #32523- [
96bf137cca
] - src: use env->RequestInterrupt() for inspector MainThreadInterface #32523- [
72da426780
] - src: use env->RequestInterrupt() for inspector io thread start #32523- [
99c9b2368c
] - src: fix cleanup hook removal for InspectorTimer #32523- [
6dffd6b3de
] - src: makeEnvironment::interrupt\_data\_
atomic #32523- [
8c5ad1392f
] - src: initialize inspector before RunBootstrapping() #32672- [
eafd64b1c8
] - src: consistently declare BindingData class #32677- [
78c82a38ac
] - src: move fs state out of Environment #32538- [
7005670f34
] - src: move http parser state out of Environment #32538- [
19b671506c
] - src: move v8 stats buffers out of Environment #32538- [
4df24f040d
] - src: move HTTP/2 state out of Environment #32538- [
1fc3de908e
] - src: make creating per-binding data structures easier #32538- [
0e9f9b7592
] - src: include AsyncWrap provider strings in snapshot #32572- [
effebf87ab
] - src: remove unused v8 namespace #32375- [
d23eed256b
] - src: remove calls to deprecated ArrayBuffer methods #32358- [
f3682102dc
] - src: give Http2Session JS fields their own backing store #31648- [
90f7a5c010
] - src: set arraybuffer_untransferable_private_symbol #31053- [
d06efafe6b
] - src: explicitly allocate backing stores for v8 stat buffers #30946- [
917fedd21a
] - src: unset NODE_VERSION_IS_RELEASE from master #30584- [
69f19f4ccd
] - src: remove uses of deprecated wasm TransferrableModule #30026- [
acac5df260
] - src,doc: add documentation for per-binding state pattern #32538- [
ad4c10e824
] - stream: improve comments regarding end() errors #32839- [
6e5c23b6c8
] - stream: update comment to indicate unused API #32808- [
21bd6679ce
] - stream: fix finished typo #31881- [
85c6fcd1cd
] - stream: avoid writing to writable #31805- [
0875837417
] - stream: fix async iterator destroyed error order #31700- [
b9a7625fdf
] - stream: removed outdated TODO #31701- [
68e1288e00
] - test: mark addons/zlib-bindings/test flaky on arm #32885- [
a09bf3ad5f
] - test: replace console.log/error() with debuglog #32692- [
d1b41bbd86
] - test: only detect uname on supported os#32833- [
4bb29ed044
] - test: mark cpu-prof-dir-worker flaky on all #32828- [
e18a40e42d
] - test: replace equal with strictEqual #32727- [
320f297a35
] - test: mark test-worker-prof flaky on arm #32826- [
4b5658b536
] - test: mark test-http2-reset-flood flaky on all #32825- [
ead51be541
] - test: cover node entry type in perf_hooks #32751- [
9e5189a560
] - test: use symlinks to copy shells #32129- [
c5763e8dc1
] - test: wait for message from parent in embedding cctest #32563- [
c3204a8787
] - test: use common.buildType in embedding test #32422- [
f2cc28aec3
] - test: use InitializeNodeWithArgs in cctest #32406- [
df1592d2e9
] - test: async iterate destroyed stream #28995- [
5100e84f4b
] - test: fix flaky test-fs-promises-file-handle-close #31687- [
52944b834a
] - test: remove test #32116- [
119fdf6813
] - test: remove checks for deserializing wasm #32116- [
add5f6e5cd
] - tls: provide default cipher list from command line #32760- [
405ae1909b
] - tools: update V8 gypfiles for 8.1 #32116- [
7fe61222ef
] - worker: mention argument name in type check message #32815- [
7147df53e8
] - worker: fix type check in receiveMessageOnPort #32745- [
0c545f0f72
] - zlib: emits 'close' event after readable 'end' #32050