Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2021-10-20のJS: Parcel v2、Node v17.0.0、Nuxt 3 beta #922

Merged
merged 20 commits into from Oct 20, 2021
Merged

Conversation

azu
Copy link
Member

@azu azu commented Oct 20, 2021

ビルドツールのParcel v2がリリースされました。

Parcelは設定なしで動作することを目的にしているため、v1ではプラグインの仕組みは薄い形になっていました。
Parcel v2ではプラグインの仕組みを刷新し、様々なケースに対応できるようになっています。

また、Tree Shakingをデフォルト化、SWCベースのJavaScriptコンパイラに変更、ModernとLegacyビルドの出し分け、Image optimizerの追加されています。
その他にも、bundleのインライン化、ライブラリ向けのビルドのサポート、C++やRustでコアモジュールの一部を書き直し、ビルドパフォーマンスの改善なども含まれています。

Parcel v1からマイグレーションについてのドキュメントも公開されています。


Node.js 17.0.0がリリースされました。

Nodeの奇数バージョンはLTSとはなりませんが、Currentバージョンが17.xとなります。
現在のNodeのLTSは12と14ですが、2021-10-26にNode 16がLTSに追加されます。

Node.js 17では、readlineモジュールのPromise対応、OpenSSL 3.0へのアップデート、V8 9.5へアップデート、npm 8.0.0へのアップデート、スタックトレースにNodeバージョンを表示などの変更が含まれています。
またウェブ標準のstrcturedClone()DOMExceptionをサポートが追加されています。

structuredClone()postMessageなどで内部的に使われていた(DOMを含む)オブジェクトの複製のメカニズムを関数として公開したメソッドです。
最近、WHATWG HTMLの仕様に追加され、FirefoxDenoで実装され、ChromeSafaricore-jsで実装が進められています。

このstructuredClone()JSON.parse/JSON.strinfigyがサポートしていないオブジェクト(MapやRegExpなど)もサポートしていため、DOM以外の部分でも有用です。

structuredClone()で複製ができない場合はDOMExceptionを例外として投げる仕様であるため、DOMExceptionも合わせて実装されています。

Node 17にはNode 16の変更点も含まれるので、その他の変更は次の記事を参照してください。

@azu azu merged commit 109ad7c into develop Oct 20, 2021
@azu azu deleted the jser-week-562 branch October 20, 2021 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant