node-client icon indicating copy to clipboard operation
node-client copied to clipboard

deps: remove babel

Open justinmk opened this issue 2 years ago • 1 comments

Problem

Babel adds complication to the build/dependencies. We aren't using it for anything important, looks like it is used to add decorators support.

Solution

  • Remove babel.
  • Remove support for decorators. (Bump major version of Nvim node-client)

Notes

$ npm ci
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained
. Please use @babel/plugin-transform-class-properties instead.

justinmk avatar Sep 06 '23 15:09 justinmk

@billyvg @rhysd can you help me understand the use of babel in this project? It looks like babel is only used here: https://github.com/neovim/node-client/blob/56fefb9195cfe4e3e7a5c9a5d073eb18c4074992/packages/example-plugin-decorators/package.json#L8

babel is targeting node 8: https://github.com/neovim/node-client/blob/56fefb9195cfe4e3e7a5c9a5d073eb18c4074992/.babelrc.js#L3 so I had expected it to translate packages/neovim/ to node8-compatible syntax, but seems like that isn't happening.

So if we want the "neovim" package to be compatible with an old target such as es2015, we currently can't rely on babel to polyfill es2022 libraries/features--rather we must avoid using es2022 libraries in our typescript code.

Is this a correct understanding?

justinmk avatar Feb 03 '24 02:02 justinmk