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

chore: use toUpperCase in detectOS #7241

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Conversation

CodingRule
Copy link
Contributor

Instead of using the switch statement, we use a faster way with an object. Hope it's not useless tho.

Signed-off-by: CodingRule <[email protected]>
@CodingRule CodingRule requested a review from a team as a code owner November 19, 2024 12:32
Copy link

vercel bot commented Nov 19, 2024

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Nov 19, 2024 2:07pm

@CodingRule
Copy link
Contributor Author

Also I can change it at utils/getNodeDownloadUrl.ts too

apps/site/util/detectOS.ts Outdated Show resolved Hide resolved
apps/site/util/detectOS.ts Outdated Show resolved Hide resolved
Signed-off-by: CodingRule <[email protected]>
Signed-off-by: CodingRule <[email protected]>
@CodingRule
Copy link
Contributor Author

@RedYetiDev Done Thanks for pointing out to me that I can directly do it with uppercase and I have updated it in your sayings. Thanks! Hope this contribution will help.

@RedYetiDev RedYetiDev changed the title Update detectOS.ts chore: to toUpperCase in detectOS Nov 19, 2024
@RedYetiDev RedYetiDev changed the title chore: to toUpperCase in detectOS chore: use toUpperCase in detectOS Nov 19, 2024
Copy link
Member

@RedYetiDev RedYetiDev left a comment

Choose a reason for hiding this comment

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

See my one comment, then LGTM

Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: CodingRule <[email protected]>
@CodingRule
Copy link
Contributor Author

Haha thanks! I saw that one coming tbh (=

@CodingRule
Copy link
Contributor Author

See my one comment, then LGTM

thanks good sir!

@CodingRule
Copy link
Contributor Author

also quick question @RedYetiDev would I be able to apply the same logic here too?

utils/getNodeDownloadUrl.ts too

@RedYetiDev
Copy link
Member

In a seperate PR, preferably

@CodingRule
Copy link
Contributor Author

yes ofc

Copy link
Contributor

github-actions bot commented Nov 19, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 94 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

@RedYetiDev RedYetiDev enabled auto-merge November 19, 2024 14:13
Copy link
Contributor

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.73% (627/691) 72.44% (184/254) 94.48% (120/127)

Unit Test Report

Tests Skipped Failures Errors Time
137 0 💤 0 ❌ 0 🔥 5.5s ⏱️

@RedYetiDev RedYetiDev added this pull request to the merge queue Nov 19, 2024
@RedYetiDev
Copy link
Member

Thanks for your contribution, @CodingRule! It's be merged shortly.

Merged via the queue into nodejs:main with commit 52e04b0 Nov 19, 2024
14 of 15 checks passed
@CodingRule
Copy link
Contributor Author

Ty!

bmuenzenmeyer pushed a commit that referenced this pull request Nov 21, 2024
* Update detectOS.ts

Signed-off-by: CodingRule <[email protected]>

* Update detectOS.ts

Signed-off-by: CodingRule <[email protected]>

* Update detectOS.ts

Signed-off-by: CodingRule <[email protected]>

* Update apps/site/util/detectOS.ts

Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: CodingRule <[email protected]>

---------

Signed-off-by: CodingRule <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
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.

3 participants