- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章Node.js v17 来了,看看都有哪些新功能?由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
Node.js v17 版本已发布,取代了 v16 做为当前版本,新的 v17 版本提供了一些新功能:基于 Promise 的其它核心模块 API、错误堆栈尾部增加 Node.js 版本信息、OpenSSL 3.0 支持、v8 JavaScript 引擎更新至 9.5.
Node.js 项目的一项持续性战略计划是为 Node.js 核心模块提供基于 Promise 的 API 支持,近年来已为 timer、stream 模块提供了 Promise API 支持.
Node.js v17 版本为 readline 模块提供了基于 Promise 的 API 支持。该模块提供了一个接口用于从一个可读流对象逐行读取数据.
结合 process.stdin 可读取用户在终端输入的数据。如下例所示:
运行之后,效果如下所示:
readline 模块的更多信息参考 readline_readline.
堆栈跟踪是诊断应用程序错误信息的重要组成部分,在 Node.js v17 版本中,如果因为一些致命的错误导致进程退出,在错误堆栈的尾部将包含 Node.js 的版本信息.
如果想忽略该信息,运行时在命令行指定 --no-extra-info-on-fatal-exception 标志.
Node.js v17 版本包含了近期发布的 OpenSSL 3.0,根据 OpenSSL 的发布策略,OpenSSL 1.1.1 将在 2023-09-11 结束支持,这个日期也在 Node.js v18 LTS 结束日期之前.
因为 OpenSSL 3.0 对允许的算法和密钥大小增加了严格的限制,预计会对生态系统造成一些影响,在 Node.js v17 版本包含 OpenSSL 3.0 以便在下一个 LTS 版本之前为用户的测试和反馈留出时间.
例如,md4 这是 OpenSSL 3.0 默认不再允许的一个算法,如果是在 Node.js 17 之前的 Node 版本中,应用程序是可以正常运行的,但在 Node.js v17 中将抛出一个 error code 为 ERR_OSSL_EVP_UNSUPPORTED 的错误信息.
Node.js v17 版本下运行之后得到如下错误信息.
一个临时的解决方法是运行时增加 --openssl-legacy-provider 标志,应用程序不在报错.
v8 在 8.1 版本开启了 Intl.DisplayNames API,支持语言、区域、货币、脚本四种类型,现在添加了两种新的类型:calendar、dateTimeField,分别返回不同的日历类型和日期时间字段的显示名称。对于国际化应用很有帮助.
日期时间字段国际化名称展示.
Intl.DateTimeFormat API 在 v8 9.5 版本中为 timeZoneName 选项新增加了四个值:shortGeneric、longGeneric、shortOffset、longOffset.
通过以下代码示例可看到之间的区别.
参见 v8 9.5 release 文档 阅读更多信息.
按照 Node.js 发布时间表,Node.js v12 将于 2022 年 4 月结束生命周期。Node.js v16 在 2021 年 10 月 26 升级为 LTS,即长期支持版本.
Node.js 的奇数版本不是稳定的版本(例如,当前的 Node.js v17 ),它的生命周期很短,不要用于生产环境.
对 Node.js 版本信息不了的、不知道如何安装 Node.js 的参考文章 “Node.js 版本知多少?又该如何选择?”.
Reference 。
https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382 。
https://nodejs.org/en/blog/release/v17.0.0/ 。
原文链接:https://mp.weixin.qq.com/s/JliFSL-118HOrlliBkJiiQ 。
最后此篇关于Node.js v17 来了,看看都有哪些新功能?的文章就讲到这里了,如果你想了解更多关于Node.js v17 来了,看看都有哪些新功能?的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我有一个 k*n矩阵 X 和 k*k矩阵A。对于X的每一列,我想计算标量 X[:, i].T.dot(A).dot(X[:, i]) (或者,数学上, Xi' * A * Xi )。 目前,我有一个
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我是 VueJS 的新手。我已经使用 vuetify/webpack-ssr 模板创建了一个项目,现在我想创建一个登录页面,但是没有显示表单,控制台给了我以下信息: [Vue warn]: Unkno
我尝试将 value 插入到 C++ vector v 之前的第 i 元素(或元素 (i-1) 之后) )。代码很简单 v.insert(v.begin() + i, value); 我确信当 i 介
我需要显示使用合并排序算法排序的 vector 。然而,当我使用 v.begin() 时,我的 friend 使用 v.data() 来传递 vector 。他的代码运行良好,而我的却不行。请解释。
这是我的命令(url1、url2、url3、url4 是占位符): ffmpeg -i url1 -i url2 -i url3 -i url4 -filter_complex “[1:v:0] [1
我以前用过Vue,我知道怎么用v-for渲染元素序列,v-if或v-show有条件地显示元素,并且 v-model例如,控制段落的内容。 但现在我需要对 DOM 进行更精细的控制: 我有一个range
我正在学习所有权和借用。 borrow1 和borrow2 的区别在于在borrow2 打印时使用了&: fn borrow1(v: &Vec) { println!("{}", &v[10]
我找不到一种方法来选择不同的选项来渲染 v-for 中的文本。是否有可能或者我是否需要以不同的方式构建逻辑来执行类似于下面的代码的操作? // i
Iterable 的三个直接子类型是 Map , Seq , 和 Set .除了性能问题之外,似乎还有一个 Seq是从整数到值的映射,以及 Set是从值到 bool 值的映射(如果值在集合中,则为 t
我想应用一个计算方法,如果键存在则增加值,否则将 1。有 Map map = new HashMap<>(); 我不明白为什么 for (int i = 0; i v != null ? v++ :
标准(IEEE 754/C)是否保证以下代码断言永远不会失败? int main() { for ( /* all possible float / double values */ )
代码由Vue语言编写,使用Element-ui框架, 如果一个对象包含某些内容,则会显示该内容,如果不包含则禁用菜单按钮。 输出应该是这样的: a、b(禁用)、c、d、e 但我的是这样的: a、a(禁
如果我这样做: {{ morevalue }} {{ value }} v-else 中的跨度也会在第二个 V-FOR 上循环,即使它上面没有任何 v-for,为什么? 这是
如果我这样做: {{ morevalue }} {{ value }} v-else 中的跨度也会在第二个 V-FOR 上循环,即使它上面没有任何 v-for,为什么? 这是
我将 Vue.js 与 Vuetify 一起使用,我正在尝试使用 v-data-table 从后端加载菜单列表并使用 对其设置一些权限v-switches 但我在尝试 v-model 数组时遇到问题:
我在 Java 的流式操作中努力维护我想要的数据结构,这很可能是由于缺乏正确的理解和实践。 public class Main { public static void main(String
我正在尝试为匹配中的每个匹配呈现一些 HTML,但是,我不太确定 实际上是正确的。 更具体地说,我不确定我是否可以使用 v-bind:match='match'在与循环相同的元素上 v-for='ma
所以我想知道为什么这个 v-if 和 v-else 语句不起作用,为什么我要以不同的方式解决它。 代码如下 Required: Select a Workflow {{ isChain ?
我有一个 VueJS 组件 ,我在同一个模板中使用了两次来显示两组不同的数据。每个都显示在自己的 使用 v-if 切换的容器在导航选项卡上。 似乎这些组件被实例化为同一个实例。我调用 console
我是一名优秀的程序员,十分优秀!