星期二 05 下午 一月 7o 2025
Unflagged TypeScript support is just around the corner
#561 — January 7, 2025
Happy New Year! We’re now back every week all the way till mid February, so if you’ve got anything you want to submit for inclusion in a future issue, now’s a great time to hit Reply and let me know :-)
__
Peter Cooper
Together with
Node.js Now Supports TypeScript By Default — It’s been possible to run TypeScript directly with Node.js since v22.6 introduced experimental ‘type stripping’ support, but in the to-be-released-at-any-moment Node 23.6 (or the current Node nightly) you’ll be able to run node yourapp.ts
and it’ll Just Work™. Matt provides some details on how it works and what you’ll be able to do.
Matt Pocock
Memetria K/V: Efficient Redis & Valkey Hosting — Memetria K/V hosts Redis OSS and Valkey for Node.js apps, featuring large key tracking and detailed analytics to manage and optimize application data effectively.
Memetria sponsor
Tackling the ‘1 Billion Row Challenge’ with Node — The 1 Billion Row Challenge (1BRC) arose about a year ago to see how quickly different languages and techniques can be used to aggregate data from a 1 billion line text file. Here’s what one developer learnt trying to optimize the task with Node.
Jacky Efendi
IN BRIEF:
The Node project will soon be issuing a CVE for ‘end of life’ Node.js versions, essentially as an official way to notify users of Node 16 and below that they are very much unmaintained and may pose a security risk.
As an aside, we learn from the above item that Node 16 is still being downloaded 11 million times a month, despite being EOL for over a year.
📺 A few months ago, Node.js creator Ryan Dahl gave a talk at GOTO Chicago 2024 about Deno 2, covering Deno’s differences to Node and what Deno 2.0 (and JSR) has to offer JavaScript developers, complete with live demos.
Node v23.5.0 (Current) Released — A Node release that slipped in just before 2024 ended. WebCryptoAPI’s Ed25519 and X25519 algorithms are now stable and on-thread hooks are now back.
Antoine du Hamel
Introducing @smoores/epub
: A Package for Working with EPUB Files — EPUB is a popular e-book file format and this new library provides a way to both read and write them. npm package link.
Shane Friedman
Securing Node.js Express APIs with Clerk and React — A guide that teaches you how to authenticate API requests using ClerkExpressWithAuth()
and ClerkExpressRequireAuth()
middleware.
Clerk sponsor
📄 Build Your Own Site Speed Testing Tool with Puppeteer Henry Price
📄 A Gentle Introduction to Using a Vector Database – Written for Bun, but the approach taken can be used from Node too. Steve Kinney
📄 From Scratch to Server: Creating and Hosting a Node App with SVR.JS – SVR.JS is a full featured configurable HTTP(/2) server with built-in security and compression features. SVR.JS
📄 Shallow Clones vs Structured Clones Phil Nash
🛠 Code & Tools
zx 8.3: A Tool for Writing Better Shell Scripts — zx
is an alternative way to run Node that makes it more useful for shell scripting by offering various niceties like process management, argument handling, and commonly used packages like Chalk. v8.3 makes it possible to iterate over a processes’ output using for await
(thanks to Symbol.asyncIterator
), plus there are enhancements to using pipes.
Release It 18.0: A CLI Tool to Automate Package Publishing Tasks — Think things like bumping versions, tagging, creating releases at GitHub or GitLab, changelog generation, etc.
Lars Kappert
MicroDiff 1.5: No Dependency Object and Array Comparison Library — Given two objects or arrays, it returns the differences (think diff
but for JavaScript objects). Boasts high performance and TypeScript support. There’s also an article from 2022 about how it works.
AsyncBanana
jsesc: Get a Stringified, ASCII-Safe Representation of Any Data — Think JSON.stringify()
but instead it returns JavaScript meaning it can support things like maps, sets, and BigInt
s.
Mathias Bynens
CSV Parse: Convert CSV Text into Arrays / Objects — Extends Node’s native transform stream API so you can get up and running quickly – see some example code. Part of a suite of CSV libraries that can also generate and transform CSV more generally.
Adaltas
node-datachannel: libdatachannel Bindings for Node.js — libdatachannel
is a standalone C++17-based implementation of various WebRTC standards, as well as WebSockets, for use on POSIX platforms.
Murat Doğan
📰 Classifieds
🚀 Start the year with fewer flakes, faster merges, and less frustration. Don’t let flaky tests disrupt CI — join us live!
🔹 Sell to enterprise with a few lines of code with WorkOS — the modern, flexible identity platform for B2B SaaS. Integrate SSO, SCIM and FGA in minutes, not months.
Schemalint: A Linter for Postgres Schemas — A linter that lets you raise errors on a variety of common matters like name casing, enforcing row level security, or the presence of mandatory columns (so think more like ESLint than a basic formatter). You can also write your own custom rules.
Kristian Dupont
sqs-consumer 11.3: Build Amazon SQS-Based Apps Without Boilerplate — Build SQS-based (Simple Queue Service) apps without the boilerplate. Just define an async function to handle the SQS message processing. If it’s good enough for the BBC..
BBC
Fast HTML Parser 7.0 – ‘Very fast’ HTML parser, generating a simplified DOM, with basic element query support.
node-libcurl 4.1 – libcurl bindings for Node. Now comes with prebuilt binaries for Node 22 and Electron 31-33.
Node Serialport 13.0 – Access serial ports from Node on multiple platforms.
Prisma 6.1 – Popular ORM for Node.js and TypeScript. Tracing is now GA.
Mercurius 16.0 – Implement GraphQL servers and gateways atop Fastify.
Discordeno 21.0 – Discord API library for Node, Deno and Bun.
Ts.ED 8.4 – Node + TypeScript framework on top of Express.
express-rate-limit 7.5 – Basic rate limiting for Express apps.
ignore 7.0 – .gitignore
parsing and filtering library.
Commander.js 13.0 – Node.js CLI app framework.
Strapi 5.6 – Popular Node.js headless CMS.
Undici 7.2 – Node’s HTTP/1.1 client library.
Pino 9.6 – Fast JSON-oriented logger.
Got a link for us? Reply and tell us. We can’t include everything but we’ll look at anything you send. Thanks!
Sponsorship: Email [kristina@cooperpress.com](mailto:kristina@cooperpress.com)
for details.
Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
#561 — 2025 年 1 月 7 日
新年快乐!我们现在每周都会回来,直到二月中旬,所以如果您有任何想要提交的内容以包含在未来的期刊中,现在是点击“回复”并让我知道的好时机:-)
__
彼得·库珀
连同
[](https://nodeweekly. com/link/163867/0a4070b383)
Node.js 现在默认支持 TypeScript — 自 v22.6 引入以来,可以直接使用 Node.js 运行 TypeScript 实验性“类型剥离”支持,但在随时发布的 Node 23.6(或当前的 Node nightly)你将能够运行 node yourapp.ts
并且它会正常工作™。马特提供了一些有关“如何”运作以及您将能够做什么的详细信息。
马特·波科克
[](https://nodeweekly.com/link/163867/0a4070b383 )
Memetria K/V:高效的 Redis 和 Valkey 托管 — Memetria K/V 为 Node.js 应用程序托管 Redis OSS 和 Valkey,具有大型关键跟踪和详细分析功能,可有效管理和优化应用程序数据。
Memetria赞助商
用 Node 应对“10 亿行挑战” — [10 亿行挑战](https://nodeweekly.com/link /163872/0a4070b383) (1BRC) 大约一年前出现,旨在了解不同语言和技术如何快速地聚合来自10 亿行文本文件。以下是一位开发人员在尝试使用 Node 优化任务时学到的知识。
杰基·埃芬迪
简而言之:
Node 项目很快就会为“生命周期结束”的 Node.js 版本发布 CVE,本质上是作为通知用户 Node 16 和低于此值的情况下,它们非常缺乏维护,可能会带来安全风险。
顺便说一句,我们从上面的内容中了解到,尽管 Node 16 已经停产一年多了,但每月的下载量仍然达到 1100 万次。
📺 几个月前,Node.js 创建者 Ryan Dahl 在 GOTO Chicago 2024 上发表了关于 Deno 2 的演讲,涵盖了 Deno 与 Node 的差异以及什么Deno 2.0 (和 JSR)必须为 JavaScript 开发人员提供完整的现场演示。
Node v23.5.0(当前)已发布 — Node 版本在 2024 年结束之前发布。 WebCryptoAPI 的 Ed25519 和 X25519 算法现已稳定,并且线程挂钩 现已回归。
安托万·杜·哈梅尔
介绍@smoores/epub
:用于处理 EPUB 文件的包 — [EPUB](https://nodeweekly.com/ link/163879/0a4070b383)是一种流行的电子书文件格式,这个新库提供了一种读写方式 他们。 npm 包链接。
肖恩·弗里德曼
使用 Clerk 和 React 确保 Node.js Express API 的安全 — 教您如何使用 ClerkExpressWithAuth() 验证 API 请求的指南
和 ClerkExpressRequireAuth()
中间件。
文员赞助人
📄 使用 Puppeteer 构建您自己的网站速度测试工具 Henry Price
📄 使用矢量数据库的简单介绍 – 为 Bun 编写,但所采用的方法也可以在 Node 中使用。史蒂夫·金尼
📄 从头到服务器:使用 SVR.JS 创建和托管 Node 应用程序 – SVR.JS 是一个[全功能](https://nodeweekly. com/link/163885/0a4070b383)可配置的 HTTP(/2) 服务器,具有内置安全和压缩功能。支持者VR
📄 浅层克隆与结构化克隆 Phil Nash
🛠 代码和工具
zx 8.3:编写更好的 Shell 脚本的工具 — [zx
](https://nodeweekly.com/link/163888 /0a4070b383) 是运行 Node 的另一种方法,它通过提供各种细节(如进程管理、参数处理、以及常用的包,如 Chalk. v8.3 使得可以使用 for wait
迭代进程的输出(感谢 Symbol.asyncIterator
),此外还有使用管道的增强功能。
谷歌
Release It 18.0:自动执行包发布任务的 CLI 工具 — 想想诸如碰撞版本、标记、在 GitHub 或 GitLab 创建版本之类的事情,变更日志生成等
拉尔斯·卡佩特
MicroDiff 1.5:无依赖对象和数组比较库 — 给定两个对象或数组,它返回差异(想想 diff
但对于JavaScript 对象)。拥有高性能和 TypeScript 支持。还有一篇 2022 年的文章关于它的工作原理。
异步香蕉
jsesc:获取任何数据的字符串化、ASCII 安全表示 — 想想 JSON.stringify()
但它返回 JavaScript 含义它可以支持映射、集合和“BigInt”等内容。
马蒂亚斯·拜恩斯
CSV Parse:将 CSV 文本转换为数组/对象 — 扩展 Node 的本机转换流 API,以便您可以快速启动和运行 —请参阅一些示例代码。一套 CSV库,它还可以更普遍地生成和转换 CSV。
阿达尔塔斯
node-datachannel: Node.js 的 libdatachannel 绑定 — libdatachannel
是各种 WebRTC 标准的基于 C++17 的独立实现以及 WebSocket,用于 POSIX 平台。
穆拉特·多安
📰 分类广告
🚀 以更少的碎片、更快的合并和更少的挫败感开始新的一年。不要让不稳定的测试扰乱 CI — 实时加入我们!
🔹 使用 WorkOS — 适用于 B2B SaaS 的现代、灵活的身份平台,通过几行代码向企业销售。只需几分钟(而不是几个月)即可集成 SSO、SCIM 和 FGA。
Schemalint:Postgres 模式的 Linter — 一个 linter,可让您针对各种常见问题(例如名称大小写、强制行级别)提出错误安全性,或者强制列的存在(所以更像 ESLint,而不是基本格式化程序)。您还可以编写您自己的自定义规则。
克里斯蒂安·杜邦
sqs-consumer 11.3:在没有样板的情况下构建基于 Amazon SQS 的应用程序 — 在没有样板的情况下构建基于 SQS(简单队列服务)的应用程序。只需定义一个异步函数来处理 SQS 消息处理即可。如果 BBC 足够好的话..
英国广播公司
快速 HTML 解析器 7.0 – “非常快” HTML 解析器,生成简化的 DOM,并支持基本元素查询。
node-libcurl 4.1 – libcurl Node 的绑定。现在附带适用于 Node 22 和 Electron 31-33 的预构建二进制文件。
Node Serialport 13.0 – 在多个平台上从 Node 访问串行端口。
Prisma 6.1 – 适用于 Node.js 和 TypeScript 的流行 ORM。追踪现已正式发布。
Mercurius 16.0 – 在 Fastify 之上实施 GraphQL 服务器和网关。
Discordeno 21.0 – 适用于 Node、Deno 和 Bun 的 Discord API 库。
Ts.ED 8.4 – Express 之上的 Node + TypeScript 框架。
express-rate-limit 7.5 – Express 应用的基本速率限制。
ignore 7.0 – .gitignore
解析和过滤库。
Commander.js 13.0 – Node.js CLI 应用框架。
Strapi 5.6 – 流行的 Node.js 无头 CMS。
Undici 7.2 – Node 的 HTTP/1.1 客户端库。
Pino 9.6 – 快速的面向 JSON 的记录器。
有我们的链接吗? 回复并告诉我们。我们无法包含所有内容,但我们会查看您发送的所有内容。 谢谢!
赞助: 发送电子邮件至“<kristina@cooperpress.com>”了解详细信息。
由库珀出版社有限公司出版
费尔菲尔德企业中心, 劳斯, LN11 0LS, 英国
发布者