Node.js 16.14.0 (LTS) 发布

栏目: 软件资讯 · 发布时间: 3年前

内容简介:Node.js 16.14.0 (LTS) 已发布。 值得关注的变化: 导入 JSON 模块现在要求使用实验性的 import assertions 语法 此版本增加了对 import assertions(处于 stage 3 阶段的提案)的实验性支持。 为了使 Node.js ES...

Node.js 16.14.0 (LTS) 已发布。

值得关注的变化:

  • 导入 JSON 模块现在要求使用实验性的 import assertions 语法

此版本增加了对 import assertions(处于 stage 3 阶段的提案)的实验性支持。

为了使 Node.js ESM 实现尽可能与 HTML 规范兼容,现在需要使用 import assertions 语法来导入 JSON 模块:

import info from `./package.json` assert { type: `json` };

或使用动态导入:

const info = await import(`./package.json`, { assert: { type: `json` } });

其他值得关注的变化包括:

  • async_hooks:
    • (SEMVER-MINOR) expose async_wrap providers #40760
  • child_process:
    • (SEMVER-MINOR) cp.fork添加对 URL 的支持 #41225
  • v8:
    • (SEMVER-MINOR) 多租户 promise hook api (Stephen Belanger) #39283

更多内容查看发布公告


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Rapid Web Applications with TurboGears

Rapid Web Applications with TurboGears

Mark Ramm、Kevin Dangoor、Gigi Sayfan / Prentice Hall PTR / 2006-11-07 / USD 44.99

"Dear PHP, It's over between us. You can keep the kitchen sink, but I want my MVC. With TurboGears, I was able to shed the most heinous FileMaker Pro legacy 'solu-tion' imaginable. It has relationshi......一起来看看 《Rapid Web Applications with TurboGears》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具