-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ビルドツールの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の仕様に追加され、FirefoxやDenoで実装され、Chrome、Safari、core-jsで実装が進められています。
この
structuredClone()
はJSON.parse
/JSON.strinfigy
がサポートしていないオブジェクト(MapやRegExpなど)もサポートしていため、DOM以外の部分でも有用です。structuredClone()
で複製ができない場合はDOMException
を例外として投げる仕様であるため、DOMException
も合わせて実装されています。Node 17にはNode 16の変更点も含まれるので、その他の変更は次の記事を参照してください。