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

Upgrade node version #2129

Merged
merged 17 commits into from Apr 3, 2024
Merged

Upgrade node version #2129

merged 17 commits into from Apr 3, 2024

Conversation

tuyuribr
Copy link
Collaborator

@tuyuribr tuyuribr commented Apr 9, 2023

PR Details

It's time to upgade the node version

Description

The latest ubuntu version, installs node v18. So we can upgrade node and the other dependencies

[https://packages.ubuntu.com/kinetic/nodejs]

Warnings

Win7 don't support node 18 ... (only up to 13)

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

TO DO

  • Quick steps for upgrade
  • Other dependencies update
  • User base test

Tested

Windows. Node v18.16.0. WaWeb 2.2326.10. [2023-06-24]

@tuyuribr tuyuribr changed the title Upgade node version Upgrade node version Apr 9, 2023
@tuyuribr
Copy link
Collaborator Author

tuyuribr commented Apr 9, 2023

I think node v16 gives us a little more time to the next upgrade

@tuyuribr
Copy link
Collaborator Author

tuyuribr commented Apr 9, 2023

Which puppeteer version should we choose? What are the breaking changes that we should avoid?
I think we should upgrade to v18.2.1
https://github.com/puppeteer/puppeteer/tree/v18.2.1

@tuyuribr
Copy link
Collaborator Author

tuyuribr commented Apr 9, 2023

I think we should upgrade node-fetch to v2.6.9 (nice). We are in 2.6.5 so probably won't break a thing.

https://github.com/node-fetch/node-fetch/releases/tag/v2.6.9

@amosayomide05
Copy link

I wonder why the library supports old version

@tuyuribr
Copy link
Collaborator Author

tuyuribr commented Apr 9, 2023

I wonder why the library supports old version

Because the last version of ubuntu would install node v12 on apt install nodejs

@wictornogueira
Copy link
Contributor

I think node v16 gives us a little more time to the next upgrade

Sort of... v16 will be reaching EOL in 5 months

README.md Outdated Show resolved Hide resolved
@tuyuribr tuyuribr marked this pull request as ready for review May 17, 2023 21:21
@tuyuribr tuyuribr added the waiting for testers Waiting for other people test this PR in other envs label May 17, 2023
@zvictor
Copy link

zvictor commented Jun 5, 2023

I wonder why the library supports old version

Because the last version of ubuntu would install node v12 on apt install nodejs

Thanks for sharing this info and for working on this PR! ❤️
I must say, it's quite surprising to learn that the decision to maintain an obsolete version was driven by Ubuntu's default Node.js installation.

Relying on Ubuntu as the primary deployment method seems arbitrary, particularly since this is just one of the many ways one could deploy WWeb applications. Moreover, it appears we haven't documented this decision or provided any deployment guidance, which means only those who happen to be already deploying on Ubuntu would benefit from it.

To exemplify: When I deployed my first app, I turned to Puppeteer's guides for recommended deployment steps. My deployment process still follows one of their guides.

I wholeheartedly agree with the changes proposed in this PR. As a Node project, rather than an Ubuntu one, it's important that we adhere to Node's release schedule. Sticking to whatever is the Active LTS version at the time is standard practice and will help prevent the accumulation of technical debt.

@tuyuribr
Copy link
Collaborator Author

If you test this PR please include your node version ( node --version ), your system OS and the WaWeb version ( await client.getWWebVersion() )
Update your package.json to: git+https://github.com/pedroslopez/whatsapp-web.js#tuyuribr-patch-2
Don't forget to delete node_modules them npm i

@tofers
Copy link
Contributor

tofers commented Jul 3, 2023

13 Puppetmaster has stopped working properly.

Some files are not loading.

With Puppeteer 18.2.1 files are loaded successfully. I will be switching

@tuyuribr tuyuribr added the breaking change Fix or feature that would cause existing functionality to change label Jul 15, 2023
@tuyuribr tuyuribr mentioned this pull request Aug 10, 2023
6 tasks
Copy link
Collaborator

@alechkos alechkos left a comment

Choose a reason for hiding this comment

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

Windows 10

Node v18.17.1
Puppeteer v18.2.1
WWeb v2.2333.11
WWebJS v1.22.1

Tested some library functions, version caching and my opened PRs, works perfect

@tuyuribr
Copy link
Collaborator Author

Warnings: Win7 only supports node 13

@wictornogueira
Copy link
Contributor

Warnings: Win7 only supports node 13

Well, we could always add a note about that 🤷
I wouldn't be that concerned, though

@diegofemello
Copy link

up

Copy link

@zvictor zvictor left a comment

Choose a reason for hiding this comment

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

awesome

@PurpShell PurpShell merged commit 79f0563 into main Apr 3, 2024
2 checks passed
@PurpShell PurpShell deleted the tuyuribr-patch-2 branch April 3, 2024 01:06
scaranaraa added a commit to scaranaraa/whatsapp-web.js that referenced this pull request Apr 3, 2024
@devagarwal007
Copy link

how to use this newly pushed code?

@washington65145as

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Fix or feature that would cause existing functionality to change high priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants