From 14962d0d5d72aed37c9c07f28ecd63dd17643298 Mon Sep 17 00:00:00 2001 From: Ben Scott <227292+BPScott@users.noreply.github.com> Date: Fri, 11 Jun 2021 10:49:24 -0700 Subject: [PATCH] Update lib/target for base/dom configs to target es2020 (#239) The functionality in esnext.asynciterable was standardised and is included in es2018 --- packages/typescript-configs/CHANGELOG.md | 6 +++++- packages/typescript-configs/base.json | 2 +- packages/typescript-configs/dom.json | 7 +++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/typescript-configs/CHANGELOG.md b/packages/typescript-configs/CHANGELOG.md index 51a798b9..38cbd9e9 100644 --- a/packages/typescript-configs/CHANGELOG.md +++ b/packages/typescript-configs/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +### Breaking Change + +Increased the target and lib definitions to es2020 in both `base.json` and `dom.json`. This allows for a greater range of standard features to be defined and used. We expect typescript will be ran through Babel to downlevel/polyfill all features required for your target environment [[#239](https://github.com/Shopify/web-configs/pull/239)] ## 4.0.0 - 2021-02-24 diff --git a/packages/typescript-configs/base.json b/packages/typescript-configs/base.json index 4a121989..34cdc333 100755 --- a/packages/typescript-configs/base.json +++ b/packages/typescript-configs/base.json @@ -4,7 +4,7 @@ "esModuleInterop": true, "isolatedModules": true, "experimentalDecorators": true, - "lib": ["dom", "es2018", "esnext.asynciterable"], + "lib": ["dom", "es2020"], "moduleResolution": "node", "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/packages/typescript-configs/dom.json b/packages/typescript-configs/dom.json index c17a0c86..2b24ef59 100644 --- a/packages/typescript-configs/dom.json +++ b/packages/typescript-configs/dom.json @@ -5,12 +5,11 @@ "lib": [ "dom", "dom.iterable", - "es2017", - "esnext.asynciterable", - "scripthost" + "scripthost", + "es2020" ], "module": "esnext", - "target": "es2017" + "target": "es2020" }, "files": ["./definitions/images.d.ts", "./definitions/styles.d.ts"] }