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

fix(snippets): update nvm instructions #7467

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Feb 3, 2025

Description

I fix the nvm instructions, and also ensure that port 3000 isn't hardcoded.

Validation

Actually tested it locally this time.

Related Issues

Fixes #7434.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Copilot Copilot bot review requested due to automatic review settings February 3, 2025 05:59
@ljharb ljharb requested a review from a team as a code owner February 3, 2025 05:59
Copy link

vercel bot commented Feb 3, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Feb 3, 2025 7:36pm

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Note

Your Pull Request seems to be updating Translations of the Node.js Website.

Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project.
We recommend giving a read on our Translation Guidelines.

Thank you!

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 10 changed files in this pull request and generated no comments.

Files not reviewed (7)
  • apps/site/snippets/en/download/nvm.bash: Language not supported
  • apps/site/snippets/fr/download/nvm.bash: Language not supported
  • apps/site/snippets/id/download/nvm.bash: Language not supported
  • apps/site/snippets/ja/download/nvm.bash: Language not supported
  • apps/site/snippets/ko/download/nvm.bash: Language not supported
  • apps/site/snippets/uk/download/nvm.bash: Language not supported
  • apps/site/snippets/zh-tw/download/nvm.bash: Language not supported
Copy link
Member

@araujogui araujogui left a comment

Choose a reason for hiding this comment

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

LGTM

@araujogui araujogui changed the title Update nvm instructions fix(snippets): update nvm instructions Feb 3, 2025
@ljharb ljharb force-pushed the update_nvm_instructions branch from 5b44aa8 to a55d025 Compare February 3, 2025 19:35
@ljharb
Copy link
Member Author

ljharb commented Feb 3, 2025

fwiw it's very confusing that translations exist in version control but shouldn't be updated in version control.

@ovflowd
Copy link
Member

ovflowd commented Feb 4, 2025

fwiw it's very confusing that translations exist in version control but shouldn't be updated in version control.

Well, they are on VC because we need to have them build as part of the source. It might sound confusing, but we use Crowdin for translations :)

Crowdin is pretty standard. I don't think it is confusing, of course, it can definitely (and did couple of times) that people will accidentally edit translations on VC and open a PR. That's why we have a Bot, and also a translation guidelines also referenced on README. And on nodejs.org if you click to edit a translated page, it redirects you to Crowdin :)

@@ -8,11 +8,13 @@ import {
import { availableLocaleCodes } from '@/next.locales.mjs';
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why changing these files? This doesn't seem to be related? Are you just unhappy with the style?

Copy link
Member

Choose a reason for hiding this comment

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

Could you maybe revert these changes as these are unrelated?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can, but this isn't just about style; using an async function is faster and cleaner than making a promise and returning it.

@@ -11,7 +11,7 @@ import { availableLocaleCodes } from '../../next.locales.mjs';
* This method is used to generate the Node.js Website Download Snippets
Copy link
Member

Choose a reason for hiding this comment

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

Same here, revert unrelated stylistic changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

this file is indeed mostly stylistic, would you prefer a separate PR for it? arrows are intended for inline callbacks, not for the main purpose of a module.

@@ -8,11 +8,13 @@ import {
import { availableLocaleCodes } from '@/next.locales.mjs';
Copy link
Member Author

Choose a reason for hiding this comment

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

I can, but this isn't just about style; using an async function is faster and cleaner than making a promise and returning it.

Comment on lines -27 to 31
return import('@/next-data/providers/downloadSnippets').then(
({ default: provideDownloadSnippets }) => provideDownloadSnippets(lang)!
const { default: provideDownloadSnippets } = await import(
'@/next-data/providers/downloadSnippets'
);
Copy link
Member Author

Choose a reason for hiding this comment

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

same comment here - this isn't just style, it's cleaner in the case where it fails to debug the problem.

@@ -11,7 +11,7 @@ import { availableLocaleCodes } from '../../next.locales.mjs';
* This method is used to generate the Node.js Website Download Snippets
Copy link
Member Author

Choose a reason for hiding this comment

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

this file is indeed mostly stylistic, would you prefer a separate PR for it? arrows are intended for inline callbacks, not for the main purpose of a module.

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