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

Amir/FEQ-219/Upgrade node version to 18 #8877

Conversation

amir-deriv
Copy link
Contributor

Changes:

Upgrade node js version from 16 to 18

Screenshots:

Please provide some screenshots of the change.

@vercel
Copy link

vercel bot commented Jun 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2023 4:17am

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #8877 (0655e76) into master (cb52143) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #8877   +/-   ##
=======================================
  Coverage   19.98%   19.98%           
=======================================
  Files        1817     1817           
  Lines       41156    41156           
  Branches     8178     8178           
=======================================
  Hits         8227     8227           
  Misses      32085    32085           
  Partials      844      844           

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/8877](https://github.com/binary-com/deriv-app/pull/8877)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-amir-deriv-amir-feq-219upgrade-nodejs-fccf7d.binary.sx?qa_server=red.binaryws.com&app_id=32181
    - **Original**: https://deriv-app-git-fork-amir-deriv-amir-feq-219upgrade-nodejs-fccf7d.binary.sx
- **App ID**: `32181`

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 21
🟧 Accessibility 75
🟢 Best practices 92
🟧 SEO 85
🟢 PWA 90

Lighthouse ran with https://deriv-app-git-fork-amir-deriv-amir-feq-219upgrade-nodejs-fccf7d.binary.sx/

@ali-hosseini-deriv
Copy link
Member

hey @amir-deriv, you also need to update the node version in circleci config.

@ali-hosseini-deriv
Copy link
Member

@amir-deriv please update the readme file too. we have a badge there.

@boring-cyborg boring-cyborg bot added the Docs label Jun 6, 2023
hamid-deriv
hamid-deriv previously approved these changes Jun 7, 2023
Comment on lines +9 to +12
Object.defineProperty(window, 'location', {
writable: true,
value: new URL(url),
});
Copy link
Contributor

Choose a reason for hiding this comment

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

just out of curiosity, didn't the previous code work with node 18? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, any reason for this change?

shayan-deriv
shayan-deriv previously approved these changes Jun 7, 2023
package.json Outdated Show resolved Hide resolved
@@ -11,7 +11,7 @@
"url": "https://github.com/binary-com/deriv-app/issues"
},
"engines": {
"node": "^16.16.0"
"node": "^18.16.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

same to old. using a more general 18.x is better imo

Comment on lines +9 to +12
Object.defineProperty(window, 'location', {
writable: true,
value: new URL(url),
});
Copy link
Contributor

Choose a reason for hiding this comment

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

+1, any reason for this change?

Co-authored-by: yashim-deriv <yashim@regentmarkets.com>
@amir-deriv amir-deriv dismissed stale reviews from shayan-deriv and hamid-deriv via ee0378c June 7, 2023 07:58
@amir-deriv
Copy link
Contributor Author

image

@yashim-deriv @shayan-deriv

This is related to node 18.x , it's not letting us redefine a property on window the way we were doing it before so I just changed the way to do it. It's working on node 19.x but the fix is not there in 18.x

please refer to this. nodejs/node#47563

image image

shayan-deriv
shayan-deriv previously approved these changes Jun 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.8% 4.8% Duplication

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Generating Lighthouse report...

@ali-hosseini-deriv ali-hosseini-deriv merged commit ed0eca0 into deriv-com:master Jun 8, 2023
ali-hosseini-deriv added a commit that referenced this pull request Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants