皇上,还记得我吗?我就是1999年那个Linux伊甸园啊-----24小时滚动更新开源资讯,全年无休!

Node 16.17.0 (LTS) 发布

Node 16.17.0 (LTS) 发布

Notable Changes

Experimental command-line argument parser API

Adds util.parseArgs helper for higher level command-line argument parsing.

Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi, Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband – #42675

Experimental ESM Loader Hooks API

Node.js ESM Loader hooks now support multiple custom loaders, and composition is achieved via “chaining”: foo-loader calls bar-loader calls qux-loader (a custom loader must now signal a short circuit when intentionally not calling the next). See the ESM docs for details.

Real-world use-cases are laid out for end-users with working examples in the article Custom ESM loaders: Who, what, when, where, why, how.

Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias – #42623

Experimental test runner

The node:test module, which was initially introduced in Node.js v18.0.0, is now available with all the changes done to it up to Node.js v18.7.0.

Improved interoperability of the Web Crypto API

To better align Node.js’ experimental implementation of the Web Crypto API with other runtimes, several changes were made:

  • Support for CFRG curves was added, with the 'Ed25519''Ed448''X25519', and 'X448' algorithms.
  • The proprietary 'NODE-DSA''NODE-DH''NODE-SCRYPT''NODE-ED25519''NODE-ED448''NODE-X25519', and 'NODE-X448' algorithms were removed.
  • The proprietary 'node.keyObject' import/export format was removed.

Contributed by Filip Skokan – #42507#43310

Dependency updates

  • Updated Corepack to 0.12.1 – #43965
  • Updated ICU to 71.1 – #42655
  • Updated npm to 8.15.0 – #43917
  • Updated Undici to 5.8.0 – #43886

Other notable changes

  • [5f1e9e2030] – (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
  • [934077a137] – (SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816
  • [7683e9623c] – (SEMVER-MINOR) dns: export error code constants from dns/promises (Feng Yu) #43176
  • [302a134b83] – doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
  • [4884f18ce5] – (SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
  • [90f395dda9] – (SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) #41008
  • [7a5de2cc0c] – (SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
  • [087adbb7a3] – (SEMVER-MINOR) events: add CustomEvent (Daeyeon Jeong) #43514
  • [979c98a3cb] – (SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008
  • [e04c8a4921] – (SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008
  • [464830993e] – (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
  • [3d7808ec3f] – (SEMVER-MINOR) fs: add read(buffer[, options]) versions (LiviaMedeiros) #42768
  • [082a2630fd] – (SEMVER-MINOR) http: add drop request event for http server (theanarkh) #43806
  • [5a74939770] – (SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) #43580
  • [f05fd1a423] – (SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) #43361
  • [9d1b4b7e29] – (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
  • [fa5ac5a2eb] – (SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) #41008
  • [94070f152e] – (SEMVER-MINOR) http2: compat support for array headers (OneNail) #42901
  • [36dd39dec0] – (SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008
  • [8adf7d5e91] – (SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) #40951
  • [3c1ed86840] – (SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
  • [e6186af5cc] – (SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) #43396
  • [3d851d6d6b] – (SEMVER-MINOR) module,repl: support ‘node:’-only core modules (Colin Ihrig) #42325
  • [303bd08d88] – (SEMVER-MINOR) net: add drop event for net server (theanarkh) #43582
  • [da03e9f484] – (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
  • [73f852e1e3] – (SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510
  • [6dcdcd7f50] – (SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) #42725
  • [5750358872] – (SEMVER-MINOR) report: add more heap infos in process report (theanarkh) #43116
  • [e7b99e8c8d] – (SEMVER-MINOR) src: add –openssl-legacy-provider option (Daniel Bevenius) #40478
  • [1281a48b89] – (SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757
  • [9ea9797d34] – (SEMVER-MINOR) src,doc,test: add –openssl-shared-config option (Daniel Bevenius) #43124
  • [046debaee0] – (SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) #41008
  • [6641fda10a] – (SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) #41849
  • [edec73032c] – (SEMVER-MINOR) stream: add writableAborted (Robert Nagy) #40802
  • [2aae868fa2] – (SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) #41008
  • [513f52445b] – (SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) #43329
  • [a8eca74450] – (SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) #42784
  • [845279e331] – (SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) #42849

更多 Node v16.17.0 (LTS) | Node.js (nodejs.org)