Skip to content

Commit

Permalink
docs: add articles/2025/02/02 (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
uki00a authored Feb 2, 2025
1 parent 478acaa commit 0bfa6de
Showing 1 changed file with 221 additions and 0 deletions.
221 changes: 221 additions & 0 deletions content/articles/2025/02/02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
---
title: 2025/01/27〜2025/02/02の最新情報
tags:
- Deno
- deno_std
categories:
- news
date: 2025-02-02
description: >
Deno v2.1.8/v2.1.9 (OpenTelemetry - HTTPSエンドポイントのサポート, ワークスペースの各メンバーごとにcompilerOptionsが定義できるよう改善, ホームディレクトリの.npmrcに関するサポート, など), DenoにおけるTypeScript v5.7のサポートについて, deno_stdのリリース (TypeScript v5.7向けの調整, @std/logの非推奨化について, @std/[email protected] - Spinnerで標準エラー出力がサポート, など)
---

## Deno v2.1.8/v2.1.9

[Deno v2.1.8](https://github.com/denoland/deno/releases/tag/v2.1.8)[v2.1.9](https://github.com/denoland/deno/releases/tag/v2.1.9)がリリースされています。

### OpenTelemetry

#### HTTPSエンドポイントのサポート

HTTPSエンドポイントへのSignalsの送信がサポートされています ([#27743](https://github.com/denoland/deno/pull/27743))

以下の環境変数によって設定が可能です:

- `OTEL_EXPORTER_OTLP_CERTIFICATE`
- `OTEL_EXPORTER_OTLP_CLIENT_KEY`
- `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`

### `deno check`

#### ワークスペースの各メンバーでの`compilerOptions`のサポート

[ワークスペース]({{< ref "articles/deno/v1.45.md" >}})の各メンバーの`deno.json`における`compilerOptions`の定義がサポートされています ([#27785](https://github.com/denoland/deno/pull/27785))

今まではワークスペースのルートでしか`compilerOptions`を定義できませんでしたが、今後は各メンバーごとに柔軟に型チェックなどに関する振る舞いを設定できそうです。

#### npmパッケージに含まれる`.ts`ファイルの取り扱いの改善

型チェックにおけるnpmパッケージ中の`.ts`ファイルの取り扱いが改善されています ([#27853](https://github.com/denoland/deno/pull/27853))

`deno check`の実行時に限定して、型チェック時に`.d.ts`が見つからない際は追加で`.ts`ファイルも探索してくれるようです。

### `deno install`

#### `-g`が指定され かつ `deno.json`が検出された際の警告について

`deno install -g`の実行時に`deno.json`が検出され かつ`--config`オプションが指定されていない場合に以下の警告が表示されるよう改善されています ([#27745](https://github.com/denoland/deno/pull/27745))

```shell
Warning discovered config file will be ignored in the installed command. Use the --config flag if you wish to include it.
```
### `deno lsp`
#### Ambient modulesに関する修正
Ambient modulesに対する`import`でエラーが発生しないように修正されています ([#27855](https://github.com/denoland/deno/pull/27855))
SvelteKitなどを使用したプロジェクトを想定した修正のようです。
### `deno publish`
#### `.d.ts`に関する改善
jsrパッケージのモジュール内で[sloppy imports]({{< ref "articles/deno/v1.39.md" >}})が使用されており かつ 対応する`.d.ts`ファイルが存在する場合に、_unfurling_ (specifierの正規化)が行われるよう改善されています ([#27793](https://github.com/denoland/deno/pull/27793))
例えば、`export type { foo } from './foo'` かつ `./foo.d.ts`が存在されば、パッケージ公開時に`export type { foo } from './foo.d.ts'`へ変換されます。
### Deno API
#### `Deno.readDirSync()`の型定義の改善
`Deno.readDirSync()`の戻り値の型が`Iterable<Deno.DirEntry>`から`IteratorObject<Deno.DirEntry>`へ変更されています ([#27805](https://github.com/denoland/deno/pull/27805))
### Web Crypto API
#### `SubtleCrypto#exportKey`の改善
`SubtleCrypto#exportKey`でX25519形式の秘密鍵をJWK形式でエクスポート出来るように改善されています ([#27828](https://github.com/denoland/deno/pull/27828))
### Node.js互換性の改善
#### ホームディレクトリの`.npmrc`に関するサポート
ホームディレクトリに`.npmrc`が存在する場合、プロジェクトの`.npmrc`と設定内容がマージされるよう改善されています ([#27119](https://github.com/denoland/deno/pull/27119))
#### Playwrightサポートの改善
`BrowserType#launch` (`chromium.launch()`など)が動作しない問題が修正されています ([#27779](https://github.com/denoland/deno/pull/27779))
`playwright install`コマンドや`chromium.launch()`のテストも追加されており、Playwrightの動作に関する安定性が改善されています。
#### `node:process`
##### `process.env.TZ`の取り扱いの改善
`process.env.TZ`の設定時に時刻の変換情報が初期化(`tzset()`が呼ばれます)されるよう修正されています ([#27826](https://github.com/denoland/deno/pull/27826))
#### `node:http`
##### `ClientRequest`の改善
`ClientRequest``information`イベントがサポートされています ([#27381](https://github.com/denoland/deno/pull/27381))
##### `Server`の改善
`Server``checkContinue`/`checkExpectation`イベントがサポートされています ([#27381](https://github.com/denoland/deno/pull/27381))
#### `node:zlib`
##### `brotliDecompress()`の改善
`brotliDecompress()``callback`引数がサポートされています ([#27815](https://github.com/denoland/deno/pull/27815))
##### `crc32()`のバグ修正
`crc32()`の実行時に`ReferenceError`が発生する問題が修正されています ([#27777](https://github.com/denoland/deno/pull/27777))
#### `node:util`
##### `debuglog()`の改善
`debuglog()`でメッセージが`'...'`で囲まれて表示されないよう修正されています ([#27772](https://github.com/denoland/deno/pull/27772))
#### `node:crypto`
#### 新規API
以下のAPIやアルゴリズムが実装されています:
- `X509Certificate#checkHost` ([#27821](https://github.com/denoland/deno/pull/27821))
- `hash()` ([#27858](https://github.com/denoland/deno/pull/27858))
- `aes-128-ctr`/`aes-192-ctr`/`aes-256-ctr` ([#27630](https://github.com/denoland/deno/pull/27630))
##### `aes-128-gcm`/`aes-256-gcm`に関するバグ修正
`aes-128-gcm`/`aes-256-gcm`の使用時に不正なサイズのキーが指定されたら、プロセスがパニックする問題が修正されています ([#27818](https://github.com/denoland/deno/pull/27818))
#### `ws`パッケージに関する修正
[Deno v2.1.5]({{< ref "articles/2025/01/12.md" >}})から[`ws`](https://github.com/websockets/ws)パッケージのWebSocketクライアントが動作しなくなっていた問題が修正されています ([#27792](https://github.com/denoland/deno/pull/27792))
#### `node_modules`中のTypeScriptファイルを含むnpmパッケージに関する修正
`node_modules`中のnpmパッケージにTypeScriptモジュールが含まれていた際に、Node.jsと同様の`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`エラーが発生するよう改善されています ([#27809](https://github.com/denoland/deno/pull/27809))
## DenoにおけるTypeScript v5.7のサポートについて
まだリリースはされていないものの、Deno本体のTypeScriptをv5.7にアップデートするPRが`main`ブランチへマージされています:
- [feat: TypeScript 5.7 (#27857)](https://github.com/denoland/deno/pull/27857)
おそらく、Deno v2.2でリリースされるのではないかと思います。
このPRでは、新しくサポートされた`es2024`ターゲット向けに`TypedArray`に関連する型定義の修正が実施されています。後述する`deno_std`においてもTypeScript v5.7に向けた対応が進められています。
---
- [Announcing TypeScript 5.7 - TypeScript](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/)
## `deno_std`のリリース
`deno_std`のリリースが実施されています ([release-2025.01.31](https://github.com/denoland/std/releases/tag/release-2025.01.31))
### TypeScript 5.7に向けた対応
Deno本体におけるTypeScript 5.7サポートに合わせて、以下のパッケージがリリースされています:
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
- [`@std/[email protected]`](https://jsr.io/@std/[email protected])
TypeScript v5.7における`TypedArray`の型定義の変更に合わせ、各APIの型定義が調整されています ([#6372](https://github.com/denoland/std/pull/6372))
### `@std/[email protected]`
[`@std/[email protected]`](https://jsr.io/@std/[email protected])がリリースされています。
#### `@std/log`の非推奨化について
このリリースでは実装などの変更は行われていませんが、ドキュメントの修正が行われています:
- [docs(log): mention potential deprecation of @std/log #6364](https://github.com/denoland/std/pull/6364)
Deno本体での[OpenTelemetryサポート]({{< ref "articles/deno/v2.1.md" >}})に合わせて、今後、`@std/log`は削除されることが検討されているようです。以下のissueで議論などが行われいます:
- [Remove logging framework #6124](https://github.com/denoland/std/issues/6124)
### `@std/[email protected]`
[`@std/[email protected]`](https://jsr.io/@std/[email protected])がリリースされています。
#### `@std/cli/unstable-spinner` - 標準エラー出力のサポート
`Spinner``output`オプションが追加されています。
このオプションにはデフォルト値として`Deno.stdout`が設定されており、任意で`Deno.stderr`を指定することによりスピナーを標準エラー出力へ表示できます。
### `@std/[email protected]`
[`@std/[email protected]`](https://jsr.io/@std/[email protected])がリリースされています。
#### `@std/fmt/printf`と`@std/fmt/colors`の併用
`@std/fmt/printf``@std/fmt/colors`と併用すると、意図せぬ内容が出力される問題が修正されています ([#6360](https://github.com/denoland/std/pull/6360))
### `@std/[email protected]`
[`@std/[email protected]`](https://jsr.io/@std/[email protected])がリリースされています。
#### Node.js向けサポートの改善
[`@std/fs`のNode.jsサポートの改善]({{< ref "articles/2024/12/15.md" >}})に向けて、以下のモジュールが追加されています:
- `@std/fs/unstable-read-link` (`readLink()`/`readLinkSync()`が提供されます)
- `@std/fs/unstable-link` (`link()`/`linkSync()`が提供されます)
- `@std/fs/unstable-real-path` (`realPath()`/`realPathSync()`が提供されます)

0 comments on commit 0bfa6de

Please sign in to comment.