Deno v2がリリース
Deno v2が正式にリリースされました。公式ブログとYoutubeでアナウンスが行われています:
新しい発表について
大きな点として、LTSリリースチャネルが発表されています。Deno v2.1からLTSチャネル向けにリリースから6ヶ月間の間は、重要度の高いバグ修正などがバックポートされ続ける想定のようです。
また、Webサイトだけ先に公開されていたDeno for Enterpriseについても正式に発表されました。
周辺ライブラリでの対応
Oakではすでに対応が行われており、v17.1.0にてすでにDeno v2サポートがリリースされています:
Honoについてもまだリリースはされていなさそうですが、早速、Deno v2の対応が入れられています (ci: use Deno v2 #3506)
各種パッケージマネージャーを抽象化してくれるni.zshでも、Deno v2のリリースに合わせて、Denoのサポートが導入されたようです (v1.3.0)
deno_stdのリリース
deno_stdがリリースされています。
@std/cbor
新規パッケージとして@std/cborが追加されています。CBORの実装が提供されます。
@std/collections@1.0.8
@std/collections@1.0.8がリリースされています。
Iterableのサポート
@std/collections@1.0.7に続けて、以下のAPIでもIterableオブジェクトのサポートが追加されています:
takeLastWhile(@std/collections/unstable-take-last-while)dropWhile(@std/collections/unstable-drop-while)intersect(@std/collections/unstable-intersect)dropLastWhile(@std/collections/unstable-drop-last-while)
@std/async@1.0.6
@std/async@1.0.6がリリースされています。
@std/async/unstable-mux-async-iteratorが追加
@std/async/unstable-mux-async-iteratorではMuxAsyncIteratorが提供されており、振る舞いとしては既存の@std/async/mux-async-iteratorにおける同名APIと同じですが、コンストラクタ引数に複数のAsyncIterableを可変長引数として渡すことができる点が異なります。
@std/streams@1.0.7
@std/streams@1.0.7がリリースされています。
@std/streams/unstable-to-byte-stream
toByteStream (@std/streams/unstable-to-byte-stream)が追加されています。ReadableStream<Uint8Array>をreadable byte streamへ変換してくれます。
@std/io@0.225.0
@std/io@0.225.0がリリースされています。
非推奨APIの削除
非推奨化された以下のAPIが削除されています。APIによっては@std/streamsに対応するものがあるため、そちらへの移行が推奨されます。
| 削除対象 | 移行先 | 補足 |
|---|---|---|
StringReader | Buffer.readable(@std/streams/buffer) | |
StringWriter | Buffer.writable(@std/streams/buffer) | |
MultiReader | mergeReadableStreams(@std/streams/merge-readable-streams) | |
LimitedReader | ByteSliceStream (@std/streams/byte-slice-stream) + toText (@std/streams/to-text) | ByteSliceStreamのstartパラメーターに0, endパラメーターにLimitedReaderのlimitパラメーターよりも1小さい値を設定し、toTextへ渡す |
LimitedReader | DelimiterStream (@std/streams/delimiter-stream) | |
BufWriter | Buffer(@std/streams/buffer) | |
BufReader | Buffer(@std/streams/buffer) | |
readShort | ||
readInt | ||
readLong | ||
readStringDelim | TextDelimiterStream (@std/streams/text-delimiter-stream) | |
readRange | ByteSliceStream (@std/streams/byte-slice-stream) + toBytes (@std/streams/unstable-to-bytes) | |
sliceLongToBytes | ||
copyN | ByteSliceStream | ByteSliceStreamのstartパラメーターに0, endパラメーターにcopyNのsizeパラメーターよりも1小さい値を設定 |
readLines | toLines (@std/streams/unstable-to-lines) |
@std/log@0.224.9
@std/log@0.224.9がリリースされています。
Loggerの非公開メソッドの削除
本来は非公開APIだったものの、意図せずして公開されていた以下のメソッドが削除されています:
Logger#asStringLogger#applyColors
UnJSプロジェクト
UnJSのプロジェクトにおいて、Denoサポートを進めていくことが検討されているようです:
🦖 We will push for more first-class support for @deno_land soon.
— Pooya Parsa 🦋 (@_pi0_) October 4, 2024
✅ https://t.co/poz4FHukDC has zero-config Deno presets
✅ Layers such as https://t.co/c4MrErvjMy allow to switch to Deno with zero changes.
🍏 https://t.co/ybPpjkfFGo support is planned
🍏 The next version of… https://t.co/eUo93hQrUi
Denoのサポートが進められていたNitro (Nitro v2.5.0)に加えて、現在ではcrosswsでもDenoのサポートが導入されているようです。
今後リリース予定のh3のv2ではWeb標準のAPIをベースとすることで、Denoでも動作できるようにすることが想定されているようです。
また、jsrへのパッケージの公開も検討されているようです。
これらの対応が進むと、NuxtなどのプロジェクトがDenoでより動かしやすくなりそうな気がしています。