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 packages to work with latest node LTS version #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minvernizzinextbit
Copy link

Ciao Riccardo =)
I wanted to discuss the possibility to update onepunch to the latest LTS version of node (at the time of writing: Gallium, 16.17.0). This would mean breaking onepunch for node versions prior to version 14, but I think it's an inevitable choice if onepunch needs to be up to date security-wise.
I tried to test as much as possible various scenarios and I think I was able to adapt the code to make it work with the updated packages. Let me know though if you find anything that is still not working or if you think that something could be done differently.

Here is a list of the things I did:

  • Updated all packages to their latest versions to date;
  • After Node 14, imports work as ESModules instead of CommonJS requires, so updated the syntax;
  • live-server was not updated anymore, so switched to alive-server, which is just an updated fork off of that;
  • Added a .prettierrc.json file just to create a standard for coding styles so that xowould not throw errors during linting tests
  • Updated wherever I could where xolinting was suggesting changes

…y; add .prettierrc file to uniform code styles for xo tests
@minvernizzinextbit
Copy link
Author

Actually we could further test which is the lowest version of node that all this works in and specify it in the package.json like:

"engines": {
   "node": ">=16.0.0"
 }

(or we could just use input the latest LTS version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant