-
Notifications
You must be signed in to change notification settings - Fork 174
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
upgrade ES target to es2022 #273
base: main
Are you sure you want to change the base?
Conversation
FWIW, I avoid private fields in all my code because of this. Not sure if it's really relevant to this element or whether consumers would install Proxies on it. |
I'm not sure I share those opinions; if you're extending a class it's fairly common to have to override parts of the class to deal with things like private state or copying (see the whole |
I prefer all-public fields because they enable advanced use cases that the original author has not considered. For example, there are numerous cases in Node.js API where one needs to access underscore props. With private fields, you restrict the consumer too much imho. |
Many of the private fields in this codebase (and our other custom element codebases) are public, but they need to be observed, for example |
Okay. I'm not suggesting changing these private fields now, but for new code, I would definitely consider using them and if there's no strong reason, I wouldn't, so that I don't break On topic: Another browser often forgotten is Pale Moon. It looks to support private class fields since their 2023-05-16 release, so I think it'll likely be fine with this change. |
This upgrades the output to use ES2022. This includes native private fields syntax. We see almost zero devices on github.com that do not support private fields. And we've been considered private fields part of our baseline support for a while now.
This means users on macos Mojave and below, using Safari, may have a further degraded experience than they already have. They can improve their experience by switching to another browser such as Chrome or Firefox, but Apple does not release Safari 15 for macos Mojave or below, as Apple has not supported macOS Mojave since Oct 2021 - when it was EOLd.
This also means users on ios/ipados 14 may see a further degraded experience. ios/ipados 14 was EOL in October 2021, and Apple no longer provides security updates for these devices. Some of these devices can upgrade to ios/ipados 15. Some devices, like the iPad Mini 3 (discontinued October 2014), 4th generation iPad (discontinued October 2014), or the iPhone 6 (discontinued September 2016) will be unable to upgrade to iOS 15, and so visiting a page with
<relative-time>
will cause JS toSyntaxError
.