Page MenuHomePhabricator

Usage of babel?
Closed, InvalidPublic

Description

In nodejs' package.json, we fetch "@babel/core" and "@babel/preset-env", but I cannot find where we do take advantage of babel.

Babel seems to have been introduced for front-end unit testing (see this Gerrit ticket), but I tried to run the latter with Babel and it worked fine.

If there is indeed no such use of it, shouldn't we remove it?
Unless we want to take advantage of ES2015+ features on the Front-End and keep the support of old browsers like IE11.

Details

Event Timeline

I think you can create a patch to remove it from package.json, and we'll see if all the integration tests pass. If anything breaks after merge we can always revert easily.

Change 829232 had a related patch set uploaded (by Teleosteen; author: Teleosteen):

[mediawiki/extensions/WikiLambda@master] Remove babel from packages (unused)

https://gerrit.wikimedia.org/r/829232

@ori Sure! You'll find the patch above :)

The CI failed. I understand why!
That's because Babel is a peerDependency of vue3-jest. That requires to install Babel along with the latter.

I close the issue and the Gerrit ticket.

Change 829232 abandoned by Teleosteen:

[mediawiki/extensions/WikiLambda@master] Remove babel from packages (unused)

Reason:

Babel is a peerDependency of vue3-jest and is required in package.json

https://gerrit.wikimedia.org/r/829232