JSer.info #502 - TypeScript 4.0が正式にリリースされました。
Variadic Tuple Types、Labeled Tuple Elements、Class Propertyの型がConstructorから推論されるようになるなどの型機能の改善がされています。
また、ES2021で入る予定のLogical Operators and Assignment Expressionsがサポートされています。
その他にはcatch節のデフォルトがunknownとなるように変更され、jsxFragmentFactoryオプションのサポート、--incrementalと--noEmitの組み合わせをサポートが追加されています。
Babel、PreitterはTypeScript 4.0に対応したバージョンがそれぞれリリースされています。
- 7.11.0 Released: ECMAScript 2021 support in preset-env, TypeScript 4.0 support, printing config and the future of
babel-eslint· Babel - Prettier 2.1: new --embedded-language-formatting option and new JavaScript/TypeScript features! · Prettier
TypeScript-ESLintについては次のIssueを参照してください。
E2EテストフレームワークのCypress 5.0がリリースされました。
cypress-plugin-retriesが非推奨化され、Cypress自体でリトライの設定できるようになっています。
詳しくは次の記事で解説されています。
サポート対象をTypeScript 3.4+、Node.js 10+に変更、テストファイル内に書かれた__dirnameと__filenameの末尾に/が含まれなくなるなどの変更も含まれています。
Electron 10.0がリリースされました。
Release electron v10.0.0 · electron/electron
Chromium 85、V8 8.5、Node.js 12.16へアップデートされています。
またenableRemoteModuleをfalseに変更、app.allowRendererProcessReuseをtrueに変更されています。
remoteモジュールはユーザーランドに移行するため、そのための段階的な変更としてenableRemoteModuleオプションが導入され、デフォルト値がfalse(無効)となりました。
詳しくは次のIssueや予定されている破壊的変更のドキュメントを参照してください。
- Deprecate the 'remote' module and move it to userland · Issue #21408 · electron/electron
- Electron 9.0.0 | Electron Blog
- electron/breaking-changes.md at master · electron/electron
その他には、contents.backgroundThrottlingプロパティの追加、CsameSite情報を取得できるように、worldSafeExecuteJavaScriptオプションが追加されています。
JSer.infoをサポートするには
- 😘 知り合いにJSer.infoをおすすめする
- ❤️ GitHub Sponsorsで@azuのスポンサーになる
- 🐦 X(Twitter)で@jser_infoをフォローする
JSer.info Sponsors
JSer.info SponsorsはGitHub SponsorsとしてJSer.infoを支援してくれている方々です。
ヘッドライン
Release 2.8.0 · pikapkg/snowpack
github.com/pikapkg/snowpack/releases/tag/snowpack%402.8.0
snowpack 2.8.0リリース。
snowpack build --watchの追加、--polyfill-nodeでNodeコアモジュールのpolyfillを追加できるようになるなど
Release v1.3.0 · Polymer/lit-html
github.com/Polymer/lit-html/releases/tag/v1.3.0
lit-html 1.3.0リリース。
Trusted Typesのサポートなど
Announcing TypeScript 4.0 | TypeScript
devblogs.microsoft.com/typescript/announcing-typescript-4-0/
TypeScript 4.0リリース。
Variadic Tuple Types、Labeled Tuple Elements、Class Propertyの型がConstructorから推論されるように。
ES2021で入る予定のLogical Operators and Assignment Expressionsのサポート。
catch節のデフォルトがunknownとなるように、jsxFragmentFactoryオプションのサポート、--incrementalと--noEmitの組み合わせをサポート
axios/CHANGELOG.md at master · axios/axios
github.com/axios/axios/blob/master/CHANGELOG.md#0200-august-20-2020
Axios 0.20.0リリース。
BOMを含むJSONに対応、maxBodyLengthオプションの追加、decompressオプションの追加など
Release 5.0.0 · cypress-io/cypress
github.com/cypress-io/cypress/releases/tag/v5.0.0
Cypress 5.0.0リリース。
cypress-plugin-retriesが非推奨化され、Cypress自体でリトライの設定できるように。
サポート対象をTypeScript 3.4+、Node.js 10+に変更、__dirnameと__filenameの末尾に/が含まれなくなるなど
Release electron v10.0.0 · electron/electron
github.com/electron/electron/releases/tag/v10.0.0
Electron 10.0.0リリース。
Chromium 85、V8 8.5、Node.js 12.16へアップデート。
enableRemoteModuleをfalseに変更、app.allowRendererProcessReuseをtrueに変更。
contents.backgroundThrottlingプロパティの追加、sameSite情報を取得できるように、worldSafeExecuteJavaScriptオプションの追加など
Prettier 2.1: new --embedded-language-formatting option and new JavaScript/TypeScript features! · Prettier
prettier.io/blog/2020/08/24/2.1.0.html
Prettier 2.1リリース。
--embedded-language-formattingフラグの追加、--ignore-unknownフラグの追加、TypeScript 4.0のサポート。
ES ProposalのPipeline operator、Record and Tuple構文のサポートなど
アーティクル
ts-migrate: A Tool for Migrating to TypeScript at Scale | by Sergii Rudenko | Airbnb Engineering & Data Science | Aug, 2020 | Medium
medium.com/airbnb-engineering/ts-migrate-a-tool-for-migrating-to-typescript-at-scale-cd23bfeb5cc
JavaScriptからTypeScriptへのマイグレーションを補助するts-migrateについて。
.jsを.tsにリネーム、codemodベースでのanyなどの型付け、コンパイルエラーになる部分を// @ts-expect-errorコメントで抑制していきマイグレーションする。
What's New In DevTools (Chrome 86) | Web | Google Developers
developers.google.com/web/updates/2020/08/devtools
Chrome 86のDevToolsの変更点について。
Mediaパネルの追加、コンテキストメニューから要素のスクリーンショットを撮影できるように。
WebFontでlocal()がない場合をエミュレート、Idle Detectionのエミュレート、prefers-reduced-dataのエミュレート機能の追加。
Lighthouse 6.2へアップデート、ApplicationパネルにFrameの情報を追加、X-Client-Dataのデコードをサポートなど
Protect your resources from web attacks with Fetch Metadata
Fetch MetadataのSec-Fetch-*ヘッダの解説。
Same-OriginとCross-Siteの区別、それぞれのSec-Fetch-*ヘッダの解説、クロスサイトリクエストを使った攻撃の判定と対策などについて
サイト、サービス、ドキュメント
HexEd.it - Browser-based Online and Offline Hex Editing
ブラウザベースのバイナリエディタ
ソフトウェア、ツール、ライブラリ関係
azu/kvs: Key-Value storage library for Browser, Node.js, and In-Memory.
ブラウザとNode.jsで動作するUniversalなKey-ValueなStorageライブラリ。
同じインターフェイスをもつIndexedDBやファイルベースなどの実装があり、マイグレーションをサポートしている。
それぞれの実装は個別に分かれていて、それぞれのパッケージは1kb(gzip)程度のサイズとなっている。
Elderjs/elderjs: Elder.js is an opinionated static site generator and web framework for Svelte built with SEO in mind.
Svelteを使った静的サイトジェネレーター。
規約ではなくroute.jsによる柔軟なパーマネントリンクの生成、data.jsでビルドに必要なものをまとめて取得して、静的なサイトを生成するためのツール。
keiya01/react-performance-testing: A library to test runtime performance in React
github.com/keiya01/react-performance-testing
Reactコンポーネントのレンダリング回数やレンダリング時間を計測できるライブラリ。
Reactにmonkey patchを当てて計測している。
