All Posts
News bits
Deno v2.0
Deno v2.0
Deno v2 がリリースされた。
window オブジェクトの削除
ブラウザ互換を目的としてグローバルに追加されたが混乱の元になっていたため削除された。 現在は globalThis の利用を推奨している。
process オブジェクトのグローバルへの追加
Node.js 互換を目的として、グローバルに追加された。
今までnode:processからのインポートする必要があった。
deno addのプレフィックス指定
deno addでパッケージをインストールする際に、JSR と NPM どちらのレジストリを利用するかjsr:またはnpm:のプレフィックスの指定が必須になった。省略した場合、JSR にあればjsr:が提案され、NPM にしかなければnpm:が提案される。
$ deno add @hono/hono
error: @hono/hono is missing a prefix. Did you mean `deno add jsr:@hono/hono`?また、npm:を指定し、package.jsonが存在する場合、deno.jsonではなくpackage.jsonに依存関係が追加されるようになった。
deno removeの追加
依存関係を削除するdeno removeコマンドが追加された。
プレフィックスの指定は不要。package.jsonがある場合、package.jsonから削除される。
deno install --entrypointの追加
エントリーポイントとして指定したファイルで使われているモジュール全てをインストール出来るdeno install --entrypointが追加された。
その他
他にimport assertionやdeno bundle、deno vendorなど非推奨であった機能の廃止、--unstableや--lock-writeなどの CLI フラグの非推奨化、既存の機能の改善や、Node.js との互換性強化などが行われている。
Deno の高速化については、公式の発表を見ると Bun より速いように見えるが、現状個人で検証している方のデータを参照および自身で軽く試してところ、Bun より高速ということはないように思う。
Deno による JSDoc によるドキュメント勧め
Deno による JSDoc によるドキュメント勧め
JSR では、JSDoc を元にドキュメントを生成する。
How to document your JavaScript package
特に Storybook のページで説明されているイメージはないが、Storybook も JSDoc をドキュメントとして扱ってくれる。
Deno 1.42: Better dependency management with JSR
Deno 1.42: Better dependency management with JSR
2024 年 3 月 28 日に Deno 1.42 がリリースされました。
Deno 1.42: Better dependency management with JSR
deno publish を利用した JSR へのパッケージの公開、 deno add を利用した JSR 及び npm からのインストールが可能になりました。
またリントを自動修正する deno lint --fixの追加など。
著者について
Hi there. I'm hrdtbs, a frontend expert and technical consultant. I started my career in the creative industry over 13 years ago, learning on the job as a 3DCG modeler and game engineer in the indie scene.
In 2015 I began working as a freelance web designer and engineer. I handled everything from design and development to operation and advertising, delivering comprehensive solutions for various clients.
In 2016 I joined Wemotion as CTO, where I built the engineering team from the ground up and led the development of core web and mobile applications for three years.
In 2019 I joined matsuri technologies as a Frontend Expert, and in 2020 I also began serving as a technical manager supporting streamers and content creators.
I'm so grateful to be working in this field, doing something that brings me so much joy. Thanks for stopping by.