From a56f7513acd6a6d637bf1eae8cfa2d76adcff20b Mon Sep 17 00:00:00 2001 From: Ben Scott Date: Mon, 23 Aug 2021 19:21:45 -0700 Subject: [PATCH] Remove the esnext folder This folder was a relic from a time before sewing-kit supported reading esnext entrypoints from the `esnext` key in package.json, which was added in sewing-kit 0.135.0 (released Aug 2020). The configuration that forced sewing-kit to always read from this folder (instead of looking at the esnext entrypoint) was removed in https://github.com/Shopify/sewing-kit/pull/2566 and released as sewing-kit 0.152.0 (released Mar 2021). If you are building an app using sewing-kit, you must use sewing-kit 0.152.0 or newer if you want esnext build support. --- UNRELEASED.md | 1 + esnext/index.js | 7 ------- package.json | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 esnext/index.js diff --git a/UNRELEASED.md b/UNRELEASED.md index ca46b9c267a..e3505241d8d 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -10,6 +10,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f - Made `autoComplete` prop in `TextField` a required string ([#4267](https://github.com/Shopify/polaris-react/pull/4267)). If you do not want the browser to autofill a user's information (for example an email input which is a customer's email, but not the email of the user who is entering the information), we recommend setting `autoComplete` to `"off"`. - `Autocomplete` now requires `Autocomplete.TextField` to be used ([#3910](https://github.com/Shopify/polaris-react/pull/3910)) - Removed ComboBox as a named export on `Autocomplete` ([#3910](https://github.com/Shopify/polaris-react/pull/3910)) +- Remove the `esnext` folder from the package. If you use Polaris in an app built with sewing-kit, it must use at least sewing-kit 0.152.0 to leverage esnext builds. ([#4425](https://github.com/Shopify/polaris-react/pull/4425)) ### Enhancements diff --git a/esnext/index.js b/esnext/index.js deleted file mode 100644 index 21be4a65eaf..00000000000 --- a/esnext/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Our esnext build lives in dist/esnext. -// However currently sewing-kit expects the esnext's entrypoint to be this file -// thanks to a hardcoded alias: -// https://github.com/Shopify/sewing-kit/blob/9911ec817ebd21384f549187a481f6b624cf7182/packages/sewing-kit/src/tools/webpack/config/resolve.ts#L45-L50. -// Once that alias is removed then sewing-kit will use the `esnext` -// key in our package.json as the entrypoint and this file can be removed. -export * from '../dist/esnext/index.ts.esnext'; diff --git a/package.json b/package.json index 8c5b2ca0215..1c32a7462f1 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ }, "files": [ "dist", - "esnext", "locales", "!*.tsbuildinfo" ],