Posted in

Deno 添加工作区以管理单仓库_AI阅读总结 — 包阅AI

包阅导读总结

1. 关键词:Deno、Workspaces、Node.js 兼容性、Monorepos、Runtime

2. 总结:

Deno 最新更新至 1.45 版本,增加了用于管理单体仓库的工作区支持,还改进了与 Node.js 的兼容性,包括对 Node-API 的改进等,同时优化了 NPM 支持。

3. 主要内容:

– Deno 1.45 于 7 月 11 日推出

– 引入管理单体仓库的工作区

– 有两种支持形式:Deno-first 工作区(在 deno.json 中定义)和向后兼容的 NPM 工作区

– 全局配置应用于每个成员包,但成员可覆盖

– 可混合搭配 NPM 和 Deno 工作区

– 改进 Node.js 兼容性

– 修复 prisma、sqlite3 等包的问题

– 支持 dd.trace 、fs.lutimes 和 fs.lutimesSync

– 添加 node:crypto 和 node:zlib

– 更新 node:http 模块,实现优雅关闭

– 减少 node:vm 内存消耗

– 优化 NPM 支持,优先使用包自带的类型而非 @types 范围的类型

思维导图:

文章地址:https://www.infoworld.com/article/2518733/deno-adds-workspaces-for-managing-monorepos.html

文章来源:infoworld.com

作者:InfoWorld

发布时间:2024/7/17 18:02

语言:英文

总字数:304字

预计阅读时间:2分钟

评分:84分

标签:Deno,TypeScript,JavaScript,WebAssembly,Node.js


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

The latest update to the Deno TypeScript /JavaScript and WebAssembly runtime features workspace support along with Node.js compatibility improvements.

Deno 1.45 was introduced July 11. The release introduces workspaces for managing monorepos, simplifying dependency management, configuration sharing, and module organization across large code bases, Deno Land said. There are two forms of supported workspaces: Deno-first workspaces defined in deno.json and backwards-compatible NPM workspaces. Global configuration for these workspaces is applied to each member package but can be overridden by members. Developers can mix and match NPM and Deno workspaces, with an NPM package inside a Deno workspace or vice versa.

For Node.js compatibility, Node-API support has been revamped, fixing issues with packages such as prisma, sqlite3, and paper. Other Node.js compatibility improvements include working on support for dd.trace and support for fs.lutimes and fs.lutimesSync. Also, node:crypto and node:zlib were added.The node:http module was updated, with capabilities such as Server#close() now doing a graceful shutdown, allowing in-flight requests to finish. In another improvement, the node:vm will consume less memory. For NPM support, types shipped with the package are now preferred over types from @types scope.