差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
public:it:nodejs [2025/03/28 11:11] – [NodeJS/Javascript] oakfirepublic:it:nodejs [2025/08/11 11:07] (当前版本) – [2025 改进] oakfire
行 21: 行 21:
   * Nodejs v4.0.0 之后的版本需要 gcc 4.7版本以上来进行 addon 编译.  GCC 4.7 or newer is required due to V8 using the template alias feature in C++.   * Nodejs v4.0.0 之后的版本需要 gcc 4.7版本以上来进行 addon 编译.  GCC 4.7 or newer is required due to V8 using the template alias feature in C++.
 </WRAP> </WRAP>
 +===== 截止 2025 年的改进 =====
 +  * 截止2025年,NodeJS 的改进:
 +    * 模块:ESM 代替 CommonJS 方式,增加 "node:" 的前缀:<code> import { readFile } from 'node:fs/promises';  // require -> import</code>
 +        * 动态加载模块 ''await import''
 +    * 高级异步:''Promise/async/await''
 +    * 异步迭代器:''AsyncIterators''
 +    * 内置Web API:减少外部依赖,内置''fetch'' 取代第三方 ''axios''
 +    * 优雅的取消操作:''AbortController''
 +    * 内置的测试运行器: ''node:test'' 替代第三方 ''mocha''等。
 +    * 流:''node:stream''
 +    * 工作线程:''node:worker_threads''
 +    * 开发工具完善:''--watch'' 替代第三方 ''nodemon'', ''--env-file'' 替代第三方 ''dotenv'',内置性能监控 ''node:perf_hooks'', 诊断''node:diagnostics_channel'', 权限限制等
 +
  
 ===== 1. V8 GC ===== ===== 1. V8 GC =====
  • public/it/nodejs.1743131492.txt.gz
  • 最后更改: 2025/03/28 11:11
  • oakfire