-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
title: 2024/03/04〜2024/03/10の最新情報 | ||
tags: | ||
- jsr | ||
- Deno | ||
- deno_std | ||
- Svelte | ||
categories: | ||
- news | ||
date: 2024-03-10 | ||
description: Deno v1.41.2 (deno addでnpmパッケージやバージョン指定がサポート) | ||
--- | ||
|
||
## Deno v1.41.2 | ||
|
||
[Deno v1.41.2](https://github.com/denoland/deno/releases/tag/v1.41.2)がリリースされています。 | ||
|
||
### jsr | ||
|
||
#### `deno add`でnpmパッケージがサポート | ||
|
||
`deno add`の引数に`npm:<パッケージ名>`の形式でパッケージを指定すると、対象のnpmパッケージが`deno.json`に追加されます。 | ||
|
||
```shell | ||
$ deno add npm:chalk@5.3.0 | ||
``` | ||
|
||
#### `deno add`でパッケージのバージョン指定がサポート | ||
|
||
`deno add`でパッケージを追加する際に、以下のような形式などでバージョンを指定できます。 | ||
|
||
```shell | ||
$ deno add @std/ulid@0.219.1 | ||
$ deno add @oak/oak@14 | ||
``` | ||
#### `deno publish` - `include`/`exclude`に関する挙動の改善 | ||
|
||
`deno publish`がJSRにパッケージを公開する際に、パッケージに含めるまたは除外するファイルを決定する際の挙動が改善されています。 | ||
|
||
- 祖先のディレクトリの`.gitignore`も参照されるように挙動が変更されています | ||
- `.gitignore`や`exclude`で除外されたファイルのunexcludeがサポートされています | ||
|
||
```json | ||
{ | ||
"publish": [ | ||
"exclude": [ | ||
"!tmp/generated" | ||
] | ||
], | ||
"exclude": [ | ||
"tmp" | ||
] | ||
} | ||
``` | ||
|
||
--- | ||
|
||
- [fix(publish): make include and exclude work #22720](https://github.com/denoland/deno/pull/22720) | ||
|
||
#### `deno publish --dry-run` - GitHub Actionsのパーミッションに関する改善 | ||
|
||
GitHub Actionsで`deno publish --dry-run`を実行する際に、GitHub Actionsのパーミッションなしで動作するように改善されました。 | ||
|
||
#### `deno publish` - コミットされていないファイルがあった際に失敗するように | ||
|
||
コミットされてないファイルがあったら`deno publish`によるパッケージの公開が失敗するように挙動が変更されました。 | ||
|
||
この挙動は`--allow-dirty`オプションにより無効化できるようです。 | ||
|
||
### `deno lsp` | ||
|
||
#### `jsr:`URLのhoverの改善 | ||
|
||
`import`における`jsr:`URLに対してhoverした際にJSRレジストリ上における該当パッケージのURLが表示されるように挙動が改善されました。 | ||
|
||
#### リモートモジュールのシンボルをリネームした際のバグの修正 | ||
|
||
リモートモジュールからnamed importされているシンボルをリネームしようとすると、リモートモジュール内のファイルのシンボルもリネームされてしまう問題が修正されています。 | ||
|
||
--- | ||
|
||
- [Renaming named imports mutates remote modules #1068](https://github.com/denoland/vscode_deno/issues/1068) | ||
|
||
### Node.js互換性の改善 | ||
|
||
- `node:util`: `styleText`が実装されました ([nodejs/node#51850](https://github.com/nodejs/node/pull/51850)) | ||
- `node:worker_threads`: `Worker#ref`/`unref`の基本的な実装が追加されました | ||
- `node:async_hooks`: `AsyncLocalStorage#enterWith`が実装されました | ||
- これによりSvelteKitが動くようになったらしいです | ||
|
||
### `unstable: ["temporal"]`のサポート | ||
|
||
`deno.json`で[`Temporal`]({{< ref "articles/deno/v1.40.md" >}})の有効化がサポートされました。 | ||
|
||
今まで`Temporal`を使用するには`--unstable-temporal`を指定する必要がありましたが、今後は`deno.json`でも有効化を制御できそうです。 | ||
|
||
```json | ||
{ | ||
"unstable": ["temporal"] | ||
} | ||
``` |