Deprecating .js.es6 file extensions in themes and plugins

Back in 2020, Discourse switched from the .js.es6 extension to .js. Over the years, the vast majority of themes and plugins have switched to the new extension, which provides much better compatibility with modern JavaScript tooling.

We are now formally deprecating the use of .js.es6, and will remove support after the next ESR release.

If you see a deprecation message for .js.es6 files, you simply need to rename them to .js. That’s it. No need to change the content of the files.

Why do you keep doing things like this rather than maintain compatibility?

This is just creating more work for no reason. It costs nothing to allow the old and new extensions. They are just filenames.

Some of us are trying to do other things, not spend our lives updating Discourse plugins.

I’ve already stopped writing new plugins because i’m sick of this stuff.

.es6 standard is over 10 years old. I think it’s reasonable to expect a deprecation after that length of time?

Is it fair to say your question was already asked and answered here?

Are there specific plugins you’d like help updating? if they’re open source I’m willing to take a look and open a PR

I don’t think this is too much work:

This has been the standard for 6 years as the post says. If you hadn’t done it in six years and are now making your third post complaining about this then there’s another problem here.

No, I am going to delete my plugins instead.

It’s not that making this particular change and re-testing everything afterwards is difficult. It’s that it’s yet another breaking change made for absolutely no reason, demonstrating that the Discourse team couldn’t care less about backward compatibility and breaking people’s forms and code.

The file extensions I used in this project were the ones the Discourse team told me to use at the time the plugin was written. There’s no sane reason to stop supporting the old extensions, but you’re doing it anyway because the team values making things slightly tidier on their side of things than keeping things working.

The team have messed up priorities and I’ve had enough of it.

I responded over in the other topic:

but on this point specifically:

We have seen significant confusion relating to the .es6 file extensions. This deprecation is motivated by that education/support problem, and not technical constraints.

People end up using .es6 because they copy existing themes/plugins. Then, all sorts of things are broken. In particular: syntax highlighting in editors, intellisense/type-checking, linting, codemods (e.g. the one to fix the .hbs deprecation), etc.

Developer experience is an important part of our platform. Enforcing consistency allows us to improve the education story, improve documentation and improve tooling.

I understand that this change is frustrating and I would like to find a path to maintaining these plugins if they’re important to the sites using them, specifically so we don’t end up with broken functionality. If there’s any possibility of keeping you involved in that process, that would be preferable.