Node.js 最新版本 v12.0.0 已发布,这是非 LTS 版本,不过带来了比较大的改动,包括针对断言、http、模块和进程等功能的改动。 值得关注的变更: assert: validate required arguments (Ruben Bridgewater) #26641 adjust loose assertions (Ruben Bridgewater) #25008 async_hooks: remove deprecated emitBefore and emitAfter (Matteo Collina) #26530 remove promise object from resource (Andreas Madsen) #23443 bootstrap: make Buffer and process non-enumerable (Ruben Bridgewater) #24874 buffer: use stricter range checks (Ruben Bridgewater) #27045 harden SlowBuffer creation (ZYSzys) #26272 harden validation of buffer allocation size (ZYSzys) #26162 do proper error propagation in addon methods (Anna Henningsen) #23939 http: validate timeout in ClientRequest() (cjihrig) #26214 return HTTP 431 on HPE_HEADER_OVERFLOW error (Albert Still) #25605 switch default parser to llhttp (Anna Henningsen) #24870 Runtime-deprecate outgoingMessage._headers and outgoingMessage._headerNames (Morgan Roderick) #24167 module: remove unintended access to deps/ (Anna Henningsen) #25138 improve error message for MODULE_NOT_FOUND (Ali Ijaz Sheikh) #25690 requireStack property for MODULE_NOT_FOUND (Ali Ijaz Sheikh) #25690 remove dead code (Ruben Bridgewater) #26983 make require('.') never resolve outside the current directory (Ruben Bridgewater) #26973 throw an error for invalid package.json main entries (Ruben Bridgewater) #26823 don't search in require.resolve.paths (cjihrig) #23683 process: make global.process, global.Buffer getters (Guy Bedford) #26882 move DEP0062 (node --debug) to end-of-life (Joyee Cheung) #25828 exit on --debug and --debug-brk after option parsing (Joyee Cheung) #25828 improve --redirect-warnings handling (Ruben Bridgewater) #24965 下载地址:https://nodejs.org/en/download/current/ (责任编辑:IT) |