diff --git a/_i18n/ja/_posts/2023/2023-10-03-node-v20.8.0-vitest-v1.0.0-beta.0-instant.devrails-inspired-ormmigrations.md b/_i18n/ja/_posts/2023/2023-10-03-node-v20.8.0-vitest-v1.0.0-beta.0-instant.devrails-inspired-ormmigrations.md new file mode 100644 index 00000000000..344b23deb2d --- /dev/null +++ b/_i18n/ja/_posts/2023/2023-10-03-node-v20.8.0-vitest-v1.0.0-beta.0-instant.devrails-inspired-ormmigrations.md @@ -0,0 +1,198 @@ +--- +title: "2023-10-03のJS: Node v20.8.0、Vitest v1.0.0-beta.0、instant.dev(Rails-inspired ORM/Migrations)" +author: "azu" +layout: post +date : 2023-10-03T13:10:21.794Z +category: JSer +tags: +- nodejs +- UI +- npm +- cloudflare +- API + +--- + +JSer.info #663 - Node.js 20.8.0がリリースされました。 + +- [Node v20.8.0 (Current) | Node.js](https://nodejs.org/en/blog/release/v20.8.0) + +`stream`に関するフラグをビットマップで管理することでメモリ消費量とパフォーマンスが改善されています。 + +- [stream: use bitmap in readable state by benjamingr · Pull Request #49745 · nodejs/node](https://github.com/nodejs/node/pull/49745) + +`vm`に`importModuleDynamically`オプションを追加、主にJestなどで起きていた`vm`のメモリリークの問題を修正なども含まれています。 + +Node.jsのアップデートが起因でJestのメモリリークが起きる問題としては、次のIssueがあります。 +こちらのIssueは、Node.js 20.8.0ではまだ修正されていません。 + +- [[Bug]: Memory consumption issues on Node JS 16.11.0+ · Issue #11956 · jestjs/jest](https://github.com/jestjs/jest/issues/11956#issuecomment-1740360337) + +こちらの問題は、次のPull Requestで解決されるようです。 + +- [vm: use default host-defined options when importModuleDynamically is not set by joyeecheung · Pull Request #49950 · nodejs/node](https://github.com/nodejs/node/pull/49950) + +📝 Node.js 20.x は2023-10-24からLTSとなります。 + +- [nodejs/Release: Node.js Release Working Group](https://github.com/nodejs/release#release-schedule) + +--- + +Vitest v1.0.0-beta.0がリリースされました。 + +- [Release v1.0.0-beta.0 · vitest-dev/vitest](https://github.com/vitest-dev/vitest/releases/tag/v1.0.0-beta.0) + +今までは`node:worker_threads`を使った並列実行のみがサポートされていましたが、今回`node:child_process`を使った並列実行をサポートが追加されています。 +これは、`node:worker_threads`ではnative moduleを含むコードを実行すると、Segmentation faultになるケースがあるためです。次のIssueで詳しく解説されています。 + +- [Feature: Support `child_process` runtime · Issue #64 · tinylibs/tinypool](https://github.com/tinylibs/tinypool/issues/64) + +この変更により、`--threads`などのフラグが廃止され、代わりとなる`--pool`と`--poolOptions`フラグが追加されています。 + +--- + +RailsをインスパイアしたORMマッパーとマイグレーション管理ツールである instant.dev が公開されています。 + +- [instant-dev/instant: Build APIs with a Rails-inspired JavaScript ORM and Migrations for Postgres](https://github.com/instant-dev/instant) + +モデルの生成やマイグレーションの管理を行うInstant CLIと、ORMである[Instant ORM](https://github.com/instant-dev/orm)からなつツールになっています。 + + +---- + +{% include inline-support.html %} + +---- + +

ヘッドライン

+ +---- + +## Node v20.8.0 (Current) | Node.js +[nodejs.org/en/blog/release/v20.8.0](https://nodejs.org/en/blog/release/v20.8.0 "Node v20.8.0 (Current) | Node.js") +

nodejs ReleaseNote

+ +Node.js v20.8.0リリース。 +Streamのパフォーマンス改善、`vm`に`importModuleDynamically`オプションを追加、主にJestなどで起きていた`vm`のメモリリークの問題を修正など + + +---- + +## Lit 3.0 Prerelease 2 and more! – Lit +[lit.dev/blog/2023-09-27-lit-3.0-prerelease-2/](https://lit.dev/blog/2023-09-27-lit-3.0-prerelease-2/ "Lit 3.0 Prerelease 2 and more! – Lit") +

JavaScript UI library ReleaseNote

+ +Lit 3.0.0-pre.1リリース。 +Lit 3.0では、IE11のサポート終了、ECMAScript Proposal Stage 3のDecoratorの対応などが含まれる。 + +- [Release lit@3.0.0-pre.1 · lit/lit](https://github.com/lit/lit/releases/tag/lit%403.0.0-pre.1 "Release lit@3.0.0-pre.1 · lit/lit") + +---- + +## npm provenance general availability - The GitHub Blog +[github.blog/changelog/2023-09-26-npm-provenance-general-availability/](https://github.blog/changelog/2023-09-26-npm-provenance-general-availability/ "npm provenance general availability - The GitHub Blog") +

npm news

+ +npm provenanceを使ってパッケージを公開できるようになった。 +CI/CDからパッケージを公開する際に、コミットとパッケージを紐づけて公開できるようになる。 + + +---- + +## Release 3.33.0 - 2023.10.02 · zloirock/core-js +[github.com/zloirock/core-js/releases/tag/v3.33.0](https://github.com/zloirock/core-js/releases/tag/v3.33.0 "Release 3.33.0 - 2023.10.02 · zloirock/core-js") +

JavaScript polyfill ReleaseNote

+ +core-js v3.33.0リリース。 +`RegExp.escape`の追加、compat dataのアップデートなど + + +---- + +## Release v1.0.0-beta.0 · vitest-dev/vitest +[github.com/vitest-dev/vitest/releases/tag/v1.0.0-beta.0](https://github.com/vitest-dev/vitest/releases/tag/v1.0.0-beta.0 "Release v1.0.0-beta.0 · vitest-dev/vitest") +

JavaScript testing library ReleaseNote

+ +vitest v1.0.0-beta.0リリース。 +`node:child_process`を使った並列実行をサポート、`pool`と`poolOptions`をサポートし関連する古いフラグを削除など + +- [Feature: Support \`child\_process\` runtime · Issue #64 · tinylibs/tinypool](https://github.com/tinylibs/tinypool/issues/64 "Feature: Support \`child\_process\` runtime · Issue #64 · tinylibs/tinypool") + +---- + +## Bun v1.0.4 | Bun Blog +[bun.sh/blog/bun-v1.0.4](https://bun.sh/blog/bun-v1.0.4 "Bun v1.0.4 | Bun Blog") +

Bun ReleaseNote

+ +Bun v1.0.4リリース。 +`Bun.serve()`のメモリ消費量の削減、`server.requestIP()`の追加、`Bun.plugin`でのvirtual modulesのサポート。 +Fetchのtimeoutのデフォルト値を30秒から5分へ変更、DNS解決のバグを修正など + + +---- +

アーティクル

+ +---- + +## A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect() +[blog.cloudflare.com/socket-api-works-javascript-runtimes-wintercg-polyfill-connect/](https://blog.cloudflare.com/socket-api-works-javascript-runtimes-wintercg-polyfill-connect/ "A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()") +

nodejs cloudflare API article

+ +WinterCGで策定しているSocket APIについて + +- [Sockets API](https://sockets-api.proposal.wintercg.org/ "Sockets API") + +---- +

ソフトウェア、ツール、ライブラリ関係

+ +---- + +## runk/node-chardet: Character encoding detection tool for NodeJS +[github.com/runk/node-chardet](https://github.com/runk/node-chardet "runk/node-chardet: Character encoding detection tool for NodeJS") +

JavaScript library

+ +文字コード判定ライブラリ + + +---- + +## instant-dev/instant: Build APIs with a Rails-inspired JavaScript ORM and Migrations for Postgres +[github.com/instant-dev/instant](https://github.com/instant-dev/instant "instant-dev/instant: Build APIs with a Rails-inspired JavaScript ORM and Migrations for Postgres") +

JavaScript library database

+ +Rails/ActiveRecordをインスパイアしたORMマッパー、マイグレーション管理ツール。 + + +---- + +## aidenybai/pattycake: Zero-runtime pattern matching +[github.com/aidenybai/pattycake](https://github.com/aidenybai/pattycake "aidenybai/pattycake: Zero-runtime pattern matching") +

TypeScript Tools performance

+ +ts-patternのパターンマッチをインライン化して、Runtimeライブラリの依存をなくすツール。 + +- [gvergnaud/ts-pattern: 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.](https://github.com/gvergnaud/ts-pattern "gvergnaud/ts-pattern: 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.") + +---- + +## tldraw/tldraw: a very good whiteboard +[github.com/tldraw/tldraw](https://github.com/tldraw/tldraw "tldraw/tldraw: a very good whiteboard") +

JavaScript library illust diagram communication

+ +共同編集できるホワイトボードライブラリ。 + + +---- +

書籍関係

+ +---- + +## Learning Vue +[learning.oreilly.com/library/view/learning-vue/9781492098812/](https://learning.oreilly.com/library/view/learning-vue/9781492098812/ "Learning Vue") +

Vue JavaScript book

+ +2023年12月発売 +Vueについての書籍 + + +----