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

Update dev setup to support modern JS syntax #5517

Merged
merged 4 commits into from
Feb 23, 2021
Merged

Conversation

Pessimistress
Copy link
Collaborator

Change List

  • eslint config
  • Fix a bug in jupyter-widget/playground where babel-plugin-inline-webgl-constants removes import
  • Fix test bench failure
  • Add proof-of-concept (optional chaining) in test code

@coveralls
Copy link

coveralls commented Feb 23, 2021

Coverage Status

Coverage decreased (-0.3%) to 81.497% when pulling 81fddd5 on x/modern-syntax into f7af504 on master.

.eslintrc.js Show resolved Hide resolved
@@ -1,3 +1,3 @@
require('reify');
require('@babel/register');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noooo not babel register..., please let me debug untranspiled code.... ;)

Just bump to node 14 to ecma script 2020 support.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js does not support our style of module imports (a mix of es modules and commonjs).

reify was meant to add that support, however it crashes on ECMA 2020 syntax. The module has also not been updated for 2 years.

I have added an explicit option to @babel/register to only use transforms that are needed by Node 14.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, that is not too bad. FWIW, there is esm too (reify alternative) it may be more up to date.

test/node.js Outdated Show resolved Hide resolved
@Pessimistress Pessimistress merged commit 0c13f10 into master Feb 23, 2021
@Pessimistress Pessimistress deleted the x/modern-syntax branch February 23, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants