|
| 1 | +--- |
| 2 | +title: "2021-05-18のJS: Node.js 14.17.0、TypeScript 4.3 RC、Angular v12" |
| 3 | +author: "azu" |
| 4 | +layout: post |
| 5 | +date : 2021-05-18T02:32:50.556Z |
| 6 | +category: JSer |
| 7 | +tags: |
| 8 | +- TypeScript |
| 9 | +- React |
| 10 | +- node.js |
| 11 | +- CSS |
| 12 | +- issue |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +JSer.info #540 - 現在のLTSの最新版であるNode v14.17.0がリリースされました。 |
| 17 | + |
| 18 | +- [Node v14.17.0 (LTS) | Node.js](https://nodejs.org/en/blog/release/v14.17.0/) |
| 19 | + |
| 20 | +Node v14.17.0では、Node.js 15.x で追加された機能やモジュールがバックポートされています。 |
| 21 | + |
| 22 | +診断情報を扱う[diagnostics_channel](https://nodejs.org/api/diagnostics_channel.html)モジュールの追加、UUID v4を生成する`crypto.randomUUID()`が追加されています。 |
| 23 | +`crypto.randomUUID()` はWHATWGで定義されている仕様で、[Chromeにも実装が追加](https://chromium.googlesource.com/chromium/src/+/e70b29ae998ed65902cdaeb0b2418a13d0755773)されています。 |
| 24 | + |
| 25 | +- [WICG/uuid: UUID V4](https://github.com/WICG/uuid) |
| 26 | +- [crypto.randomUUID() - Chrome Platform Status](https://www.chromestatus.com/feature/5689159362543616) |
| 27 | + |
| 28 | +また、` --experimental-abortcontroller`の実験フラグ付きですが、`AbortController`と`AbortSignal`の対応が次のメソッドに追加されています。 |
| 29 | + |
| 30 | +- `child_process.exec` |
| 31 | +- `child_process.execFile` |
| 32 | +- `child_process.fork` |
| 33 | +- `child_process.spawn` |
| 34 | +- `dgram.createSocket` |
| 35 | +- `events.on` |
| 36 | +- `events.once` |
| 37 | +- `fs.readFile` |
| 38 | +- `fs.watch` |
| 39 | +- `fs.writeFile` |
| 40 | +- `http.request` |
| 41 | +- `https.request` |
| 42 | +- `http2Session.request` |
| 43 | +- Promise版の`setImmediate`と`setTimeout` |
| 44 | + |
| 45 | +---- |
| 46 | + |
| 47 | +TypeScript 4.3 RC(リリース候補)がリリースされました。 |
| 48 | + |
| 49 | +- [Announcing TypeScript 4.3 RC | TypeScript](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3-rc/) |
| 50 | + |
| 51 | +基本的な変更内容はBetaのものを含んでいます。 |
| 52 | + |
| 53 | +- [2021-04-06のJS: TypeScript 4.3 Beta、hls.js v1.0.0(Apple Low-Latency HLS)、Storybook 6.2 - JSer.info](https://jser.info/2021/04/06/typescript-4.3-beta-hls.js-v1.0.0apple-low-latency-hls-storybook-6.2/) |
| 54 | + |
| 55 | +RCで新たに追加されたものとして、`--incremental`と`--watch`を使った初回のビルドが遅い問題が解消されています。 |
| 56 | + |
| 57 | +- [Do not calculate signatures if old state is not used by sheetalkamat · Pull Request #43314 · microsoft/TypeScript](https://github.com/microsoft/TypeScript/pull/43314) |
| 58 | +- [Make initial incremental/watch builds as fast normal builds by sokra · Pull Request #42960 · microsoft/TypeScript](https://github.com/microsoft/TypeScript/pull/42960) |
| 59 | + |
| 60 | +また、`--incremental`フラグなどを使った際に生成される[`.tsbuildinfo`のファイルサイズが改善](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3-rc/#tsbuildinfo-size-improvements)されています。 |
| 61 | + |
| 62 | +---- |
| 63 | + |
| 64 | +[6ヶ月ごとにメジャーアップデート](https://angular.io/guide/releases#release-frequency)されるAngularの最新版であるAngular 12がリリースされました。 |
| 65 | + |
| 66 | +- [Angular v12 is now available. It’s that time again, friends — we’re… | by Mark Techson | May, 2021 | Angular Blog](https://blog.angular.io/angular-v12-is-now-available-32ed51fbfd49) |
| 67 | +- [Release 12.0.0 · angular/angular](https://github.com/angular/angular/releases/tag/12.0.0) |
| 68 | + |
| 69 | +View Engineは非推奨となりIvyがデフォルトへと移行、Legacy i18n Message IDsからの移行ツールが公開されています。 |
| 70 | + |
| 71 | +- [Angular - Migrating legacy localization IDs](https://angular.io/guide/migration-legacy-message-id) |
| 72 | + |
| 73 | +以前、開発終了を告知されていたProtractorについても、Angular 12からProtractorはデフォルトでは新規プロジェクトには含めないようになっています。 |
| 74 | + |
| 75 | +- [Future of Angular E2E & Plans for Protractor · Issue #5502 · angular/protractor](https://github.com/angular/protractor/issues/5502#issuecomment-837432362) |
| 76 | + |
| 77 | +また、Angular 12ではIE 11のサポートが非推奨となり警告が出るようになっています。 |
| 78 | +IE 11のサポートはAngular 13で削除される予定です。 |
| 79 | +そのため、AngularでのIEサポートはAngular 12が最後となり、Angular 12のLTS期限である2022年11月で完全にIEサポートが終了する予定となっています。 |
| 80 | + |
| 81 | +- [RFC: Internet Explorer 11 support deprecation and removal · Issue #41840 · angular/angular](https://github.com/angular/angular/issues/41840) |
| 82 | + |
| 83 | +その他には、インラインSaaSのサポートなど。 TypeScript 4.2へのアップデート、webpack 5を実験的にサポートなども含まれています。 |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | +---- |
| 88 | + |
| 89 | +<h1 class="site-genre">ヘッドライン</h1> |
| 90 | + |
| 91 | +---- |
| 92 | + |
| 93 | +## What do you not like about DefinitelyTyped as a user and contributor? · Issue #44030 · microsoft/TypeScript |
| 94 | +[github.com/microsoft/TypeScript/issues/44030](https://github.com/microsoft/TypeScript/issues/44030 "What do you not like about DefinitelyTyped as a user and contributor? · Issue #44030 · microsoft/TypeScript") |
| 95 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">TypeScript</span> <span class="jser-tag">issue</span></p> |
| 96 | + |
| 97 | +DefinitelyTypedへの意見を募集しているIssue |
| 98 | + |
| 99 | + |
| 100 | +---- |
| 101 | + |
| 102 | +## Node v14.17.0 (LTS) | Node.js |
| 103 | +[nodejs.org/en/blog/release/v14.17.0/](https://nodejs.org/en/blog/release/v14.17.0/ "Node v14.17.0 (LTS) | Node.js") |
| 104 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">ReleaseNote</span></p> |
| 105 | + |
| 106 | +Node v14.17.0リリース。 |
| 107 | +試験的に`diagnostics_channel`を追加、`crypto.randomUUID()`の追加。 |
| 108 | +また、Node.js 15で実装されていたコアモジュールにおける`AbortController`と`AbortSignal`の対応をバックポートなど |
| 109 | + |
| 110 | + |
| 111 | +---- |
| 112 | + |
| 113 | +## Deno 1.10 Release Notes | Deno Blog |
| 114 | +[deno.com/blog/v1.10](https://deno.com/blog/v1.10 "Deno 1.10 Release Notes | Deno Blog") |
| 115 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">deno</span> <span class="jser-tag">ReleaseNote</span></p> |
| 116 | + |
| 117 | +Deno 1.10リリース。 |
| 118 | +`deno test`がisolateした状態でparallelにテストを実行、`permissions`の指定に対応、出力の変更、コメントのコードの型チェックに対応など。 |
| 119 | +`Worker.postMessage`がstructured clone algorithmに対応、localStorageなどのWeb Storage APIに対応。 |
| 120 | +`WebAssembly.Memory`が`shared`オプションに対応、`--import-map`へリモートURLを指定できるようになるなど |
| 121 | + |
| 122 | + |
| 123 | +---- |
| 124 | + |
| 125 | +## Announcing TypeScript 4.3 RC | TypeScript |
| 126 | +[devblogs.microsoft.com/typescript/announcing-typescript-4-3-rc/](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3-rc/ "Announcing TypeScript 4.3 RC | TypeScript") |
| 127 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">TypeScript</span> <span class="jser-tag">ReleaseNote</span></p> |
| 128 | + |
| 129 | +TypeScript 4.3 RCリリース。 |
| 130 | +setterにgetterとは異なる型を指定できるように、`override`キーワードの追加、Template String Typeの改善。 |
| 131 | +Private Class Elements(fields/methods/accessors)のサポート、`static` Index Signatureのサポート。 |
| 132 | +`ConstructorParameters`がAbstract classをサポート、Genericsにおける型の絞り込みの改善、Promiseオブジェクトを条件式に渡してしまうミスのチェックを追加。 |
| 133 | +その他には、`.tsbuildinfo`のサイズ改善、watch時の初回ビルドの改善など。 |
| 134 | + |
| 135 | + |
| 136 | +---- |
| 137 | + |
| 138 | +## Angular v12 is now available. It’s that time again, friends — we’re… | by Mark Techson | May, 2021 | Angular Blog |
| 139 | +[blog.angular.io/angular-v12-is-now-available-32ed51fbfd49](https://blog.angular.io/angular-v12-is-now-available-32ed51fbfd49 "Angular v12 is now available. It’s that time again, friends — we’re… | by Mark Techson | May, 2021 | Angular Blog") |
| 140 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">Angular</span> <span class="jser-tag">ReleaseNote</span></p> |
| 141 | + |
| 142 | +Angular 12リリース。 |
| 143 | +View Engineは非推奨となりIvyがデフォルトへと移行、Legacy i18n Message IDsからの移行ツール、インラインSaaSのサポートなど。 |
| 144 | +TypeScript 4.2へのアップデート、webpack 5を実験的にサポート、IE 11サポートの非推奨化など |
| 145 | + |
| 146 | +- [Release 12.0.0 · angular/angular](https://github.com/angular/angular/releases/tag/12.0.0 "Release 12.0.0 · angular/angular") |
| 147 | +- [Angular - Migrating legacy localization IDs](https://angular.io/guide/migration-legacy-message-id "Angular - Migrating legacy localization IDs") |
| 148 | + |
| 149 | +---- |
| 150 | + |
| 151 | +## V8 release v9.1 · V8 |
| 152 | +[v8.dev/blog/v8-release-91](https://v8.dev/blog/v8-release-91 "V8 release v9.1 · V8") |
| 153 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">V8</span> <span class="jser-tag">ReleaseNote</span></p> |
| 154 | + |
| 155 | +V8 v9.1リリース。 |
| 156 | +Top-level awaitのデフォルトサポート、`#foo in obj`のPrivate brand checksのサポートなど |
| 157 | + |
| 158 | + |
| 159 | +---- |
| 160 | + |
| 161 | +## Announcing Docusaurus 2 Beta | Docusaurus |
| 162 | +[docusaurus.io/blog/2021/05/12/announcing-docusaurus-two-beta](https://docusaurus.io/blog/2021/05/12/announcing-docusaurus-two-beta "Announcing Docusaurus 2 Beta | Docusaurus") |
| 163 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">document</span></p> |
| 164 | + |
| 165 | +Docusaurus 2 Betaリリース |
| 166 | + |
| 167 | + |
| 168 | +---- |
| 169 | +<h1 class="site-genre">アーティクル</h1> |
| 170 | + |
| 171 | +---- |
| 172 | + |
| 173 | +## Writing A Type Safe Store | Lachlan Miller |
| 174 | +[lachlan-miller.me/articles/advanced-type-a-type-safe-store-for-vue-3](https://lachlan-miller.me/articles/advanced-type-a-type-safe-store-for-vue-3 "Writing A Type Safe Store | Lachlan Miller") |
| 175 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">Vue</span> <span class="jser-tag">TypeScript</span> <span class="jser-tag">article</span></p> |
| 176 | + |
| 177 | +Vueのステート管理ライブラリであるPiniaのType SafeなStoreの型定義の解説 |
| 178 | + |
| 179 | +- [posva/pinia: 🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support](https://github.com/posva/pinia/ "posva/pinia: 🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support") |
| 180 | + |
| 181 | +---- |
| 182 | + |
| 183 | +## Next Gen CSS: @container | CSS-Tricks |
| 184 | +[css-tricks.com/next-gen-css-container/](https://css-tricks.com/next-gen-css-container/ "Next Gen CSS: @container | CSS-Tricks") |
| 185 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">CSS</span> <span class="jser-tag">article</span></p> |
| 186 | + |
| 187 | +`@container`についての記事。 |
| 188 | +親要素には`contain`プロパティを指定する必要がある点、`@container`でのレスポンシブデザインについて |
| 189 | + |
| 190 | + |
| 191 | +---- |
| 192 | + |
| 193 | +## Cross-browser tracking vulnerablity in Tor, Safari, Chrome and Firefox - FingerprintJS |
| 194 | +[fingerprintjs.com/blog/external-protocol-flooding/](https://fingerprintjs.com/blog/external-protocol-flooding/ "Cross-browser tracking vulnerablity in Tor, Safari, Chrome and Firefox - FingerprintJS") |
| 195 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">browser</span> <span class="jser-tag">security</span> <span class="jser-tag">privacy</span> <span class="jser-tag">article</span></p> |
| 196 | + |
| 197 | +ブラウザからURLスキームでアプリを開くときの挙動を利用してフィンガープリントできるという話。 |
| 198 | +未知のプロトコルを開く際にはダイアログでの確認やユーザインタラクションが必要となっている。 |
| 199 | +しかし、それぞれのブラウザで既知のプロトコルや`about:blank`を使ったSOPでの抜け道で、どのアプリがインストールされているかを判定できるという話 |
| 200 | + |
| 201 | + |
| 202 | +---- |
| 203 | + |
| 204 | +## DocBaseのフロントエンド改修をどのように進めたか – KRAY Inc. |
| 205 | +[kray.jp/blog/how-to-docbase-renewal/](https://kray.jp/blog/how-to-docbase-renewal/ "DocBaseのフロントエンド改修をどのように進めたか – KRAY Inc.") |
| 206 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">CoffeeScript</span> <span class="jser-tag">React</span> <span class="jser-tag">TypeScript</span> <span class="jser-tag">refacoring</span> <span class="jser-tag">article</span></p> |
| 207 | + |
| 208 | +Backbone + Marionette + CoffeeScriptで書かれていたウェブサービスをReact + TypeScriptに一括で移行した話。 |
| 209 | +E2Eを使ったテスト、構造を維持しながらReact化、コンポーネントへの分離などの移行の方法についてなど |
| 210 | + |
| 211 | + |
| 212 | +---- |
| 213 | + |
| 214 | +## Babel is used by millions, so why are we running out of money? · Babel |
| 215 | +[babeljs.io/blog/2021/05/10/funding-update.html](https://babeljs.io/blog/2021/05/10/funding-update.html "Babel is used by millions, so why are we running out of money? · Babel") |
| 216 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">babel</span> <span class="jser-tag">article</span></p> |
| 217 | + |
| 218 | +Babelの資金の状態、ロードマップ、寄付について。 |
| 219 | + |
| 220 | +- [Babel Roadmap · Babel](https://babeljs.io/docs/en/roadmap#babel-2021-roadmap "Babel Roadmap · Babel") |
| 221 | + |
| 222 | +---- |
| 223 | + |
| 224 | +## styled-componentsの採用と既存資産を捨てた理由 - Cybozu Inside Out | サイボウズエンジニアのブログ |
| 225 | +[blog.cybozu.io/entry/2020/06/25/105457](https://blog.cybozu.io/entry/2020/06/25/105457 "styled-componentsの採用と既存資産を捨てた理由 - Cybozu Inside Out | サイボウズエンジニアのブログ") |
| 226 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">CSS</span> <span class="jser-tag">React</span> <span class="jser-tag">article</span> <span class="jser-tag">saas</span></p> |
| 227 | + |
| 228 | +Sassで書かれていたスタイルをCSS in JSに移行する話。 |
| 229 | +styled-componentsを使って書く場合にスタイリングとJSXを分離するためのルール、Sassの変数を抽出して移行するスクリプトについてなど |
| 230 | + |
| 231 | + |
| 232 | +---- |
| 233 | +<h1 class="site-genre">ソフトウェア、ツール、ライブラリ関係</h1> |
| 234 | + |
| 235 | +---- |
| 236 | + |
| 237 | +## coderaiser/simport: Import like with require but using async |
| 238 | +[github.com/coderaiser/simport](https://github.com/coderaiser/simport "coderaiser/simport: Import like with require but using async") |
| 239 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">library</span></p> |
| 240 | + |
| 241 | +ESMなNode.jsで`require`、`__filename`、`__dirname`などのshim機能を提供するライブラリ |
| 242 | + |
| 243 | + |
| 244 | +---- |
0 commit comments