Skip to content
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

drop support for very old systems #1925

Closed
BePo65 opened this issue Jun 5, 2022 · 5 comments
Closed

drop support for very old systems #1925

BePo65 opened this issue Jun 5, 2022 · 5 comments

Comments

@BePo65
Copy link
Contributor

BePo65 commented Jun 5, 2022

Originally posted by @iamkun in #1914 (comment)

it's better to avoid using the spread operator, cause it will increase the final compiled js bundle size dramatically.

I think that perhaps it makes sense to think about what systems should be supported by a such a widespread used package like 'dayjs'.

Node.js
According to the .travis.yml, 'dayjs' is tested on node versions '14', '12', '10' and '8'.
For node - according to the node releases list - only versions '18', '16' and '14' get updates and the site states that Production applications should only use Active LTS or Maintenance LTS releases.

<Proposal for Node>
maybe it would be a good idea to change the node versions in .travis.yml to '18', '16' and '14' and dropping tests on older systems.

Browsers
The documentation for 'dayjs' states that

the following browsers are used for the ci system: Chrome on Windows XP, IE 8, 9, and 10 on Windows 7, IE 11 on Windows 10, latest Firefox on Linux, and latest Safari on OSX 10.8 and 10.11.

The question is, if testing on Windows older than Windows 10 and testing with IE (any version) is still necessary.

The older windows systems are just insecure, as Microsoft does not support security updates for these OS; no one should use theses systems any more and enterprises that still rely on old systems with paid support from microsoft, probably won't change the applications on that old systems.

And the last IE version looses support from microsoft next week (and has a market share of less than 1% - depending on which source you are looking at). And IE is the browser that prevents the use of current javascript features.

<Proposal for browsers>
As I did not find a target parameter in babel.config.js according to the babel documentation the default is used:

When no targets are specified: Babel will assume you are targeting the oldest browsers possible. For example, @babel/preset-env will transform all ES2015-ES2020 code to be ES5 compatible.

So adding "targets": "> 0.56%, last 2 versions, Firefox ESR, not dead" to the babel config file will change this and drop the IE11.

@BePo65 BePo65 changed the title drop support for insecure systems drop support for very old systems Jun 5, 2022
@iamkun
Copy link
Owner

iamkun commented Jun 6, 2022

Day.js v1.x will ship bundle in es5 syntax and will not change to others like es5 to avoid capability issue.

We can deal with it in v2.x version in next branch.

@iamkun
Copy link
Owner

iamkun commented Jun 6, 2022

for the unit test, maybe 12 14 16 18 is a better choice for us?

@BePo65
Copy link
Contributor Author

BePo65 commented Jun 6, 2022

We can deal with it in v2.x version in next branch.

You are right, there are so many users of dayjs out there in very different scenarios; so the consequences of switching over to es6 are unclear.
At the moment I am trying to give comments to all open issues above issue #1879 (somewhere I had to draw the line and the issue for v2.0looked quite attractive to me) and when this is done I will try to contribute my share to v2.0.

@BePo65
Copy link
Contributor Author

BePo65 commented Jun 6, 2022

for the unit test, maybe 12 14 16 18 is a better choice for us?

starting with node v12 is a good compromise as this version left the maintenance phase not too long ago.

@BePo65 BePo65 closed this as completed Jun 6, 2022
@iamkun
Copy link
Owner

iamkun commented Jun 11, 2022

updated to 12 14 16 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants