-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: remove cjs support and raise language level to ESNext #963
Conversation
I find your reasoning to be sound. ES6 indeed is massively supported. The only thing that worries me is this statement from the browserlist repo:
I was able to confirm the 100 million users from the Opera Mini site. It happens to be the case that Opera Mini does not support ES6. If this change was made, all the developers developing for those 100 million users in Africa would have to transpile this library. This is all just food for thought. In my opinion, this change would be good. Opera Mini should catch up and add support for ES6. I also checked a bunch of popular React libraries and frameworks (such as react-query and NextJS) and their TypeScript targets also seem to be either es6 or esnext. What do you think @xobotyi? |
I dont have a decision tbh. Im not able to imagine how many users pipelines that change would break. |
Would you be open to only the |
This sounds like a reasonable compromise to me. Anyone else? |
Sounds like a really reasonable compromise to me as well. |
I've reduced It will be slow step forward to fix of #659 and switching to |
I see a few breaking changes have gone through, is there a plan for this to get in soon? |
Yes, as soon as we figure current backlog |
*current backlog before this pr |
@xobotyi On our issues list there's currently pretty much nothing in addition to this that we would need to act on. There's open PR's but I don't think any of them are ready to be merged in a while, except for the documentation PRs. Would now be the time to tackle this PR? |
yup - i've planned to handle it on tuesday |
Im thinking of making one more step further and leave only one version - esm, with esnext langlevel. A bit harsh move, but we'll have make it anyway as we will have to move to module package once infrastructure will be ready. All major bundlers handles module dependencies perfectly. I'll update this pr now, and leave it here for a couple of days. planned date of merge is 4th Jan. |
the only downsite - had to temporarily disable built bundle testing due to issue with jest: jestjs/jest#13715 |
@xobotyi Would it be possible to retain |
Which one? 🤔 |
I believe we still have something using webpack 3 and requires us to ship CJS or they can't use our library. They're a different team from us so them changing their build for our teams' needs probably isn't something that will get on their road map any time soon. Not the end of the world since I could opt to bundle this code when we ship CJS, but not completely ideal either. |
But you have to transpile As for me - I'd cut everything in one move, since it will ease further support and future moving to |
Sounds good 👍 I don’t want to be in the way of progress
…On Mon, Jan 2, 2023 at 1:04 PM Anton Zinovyev ***@***.***> wrote:
But you have to transpile node_modules anyway, since many tools coming
esm only🤔
As for me - I'd cut everything in one move, since it will ease further
support and future moving to type: module
—
Reply to this email directly, view it on GitHub
<#963 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAERM35A77FZRKW4JM4GN33WQM7HPANCNFSM6AAAAAARDOECNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
BREAKING CHANGE All evergreen browsers fully support the ES6 spec (Even Safari as of Safari 10) Generating ES5 compliant code introduces unnecessary language polyfills that can bloat bundles and possibly create warnings in rollup (no top level this for example). Since this library supports React 18 and React 18 no longer supports IE 11 this seems like a good time to raise the floor of the non-ESNext generated code. If users of this library need to support IE 11 still they can always include this library in their babel config to transpile it down to whatever ES version they need to support.
BREAKING CHANGE: remove esnext version, now esmodules serves es esnext version.
Make use of SWC - it drastically improves tests performance. Bundle build still performed with ts though.
BREAKING CHANGE: `CJS ES5` and `ESM ES5` versions are removed from distribution, leaving only `ESM ESNext` version. We understand that this change can break existing pipelines for some developers, but such move eases library maintenance and is one of several moves towards module package. This change is one of several braking changes that will be released under same major version regarding changes in distribution and importing. Sorry for any inconvenience.
# [21.0.0](v20.1.0...v21.0.0) (2023-01-04) ### Features * **no-release:** drop es5 versions support, leave only ESNext ([#963](#963)) ([5a622af](5a622af)) ### BREAKING CHANGES * **no-release:** `CJS ES5` and `ESM ES5` versions are removed from distribution, leaving only `ESM ESNext` version. We understand that this change can break existing pipelines for some developers, but such move eases library maintenance and is one of several moves towards module package. This change is one of several braking changes that will be released under same major version regarding changes in distribution and importing. Sorry for any inconvenience.
@wesgro in closest release CJS version will be returned🙃 |
Moving fast and breaking things!
…On Thu, Jan 5, 2023 at 5:42 AM Anton Zinovyev ***@***.***> wrote:
@wesgro <https://github.com/wesgro> in closest release CJS version will
be returned🙃
—
Reply to this email directly, view it on GitHub
<#963 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAERM34COTIZ2LHO2XZXCODWQ3FUBANCNFSM6AAAAAARDOECNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
BREAKING CHANGE
All evergreen browsers fully support the ES6 spec (Even Safari as of Safari 10)
Generating ES5 compliant code introduces unnecessary language polyfills that can bloat bundles and possibly create warnings in rollup (no top level this for example).
Since this library supports React 18 and React 18 no longer supports IE 11 this seems like a good time to raise the floor of the non-ESNext generated code.
If users of this library need to support IE 11 still they can always include this library in their babel config to transpile it down to whatever ES version they need to support.
Fixes #962