Skip to content

fix(learn): env var tutorial link to latest docs #7996

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

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

mureinik
Copy link
Contributor

@mureinik mureinik commented Jul 19, 2025

Description

Adjust the link in the "How to read environment variables from Node.js" tutorial to refer to the environment variables documentation added in 24.5.0.

Validation

Click on the link in the "How to read environment variables from Node.js" article and see it directs to the Environment Variables section in the API docs.

Related Issues

Fixes #7995

Check List

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

@mureinik mureinik requested a review from a team as a code owner July 19, 2025 19:25
Copy link

vercel bot commented Jul 19, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Aug 1, 2025 7:39pm

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

Adjust the link in the "How to read environment variables from Node.js" tutorial to refer to the latest version of the API docs and not an arbitrarily link to Node.js 22's docs.

No it's not arbitrary. It's voluntary done in #7307

Why ? Because maintaining the learn section is complicated. So do not have broken docs/exmaple we decide to ping it to a version. this sub section use 22

Why not update it to 24 but you have to verify everything.

Also for more context take a look at https://nodejs.org/en/blog/events/collab-summit-2024-dublin#documentation-improvements-nodejs-learn-section

@avivkeller
Copy link
Member

I disagree. We should always use the latest version of the documentation. The articles should be updated over time, yes, but we shouldn't assume the user is on a version that isn't the latest.

@AugustinMauroy
Copy link
Member

My idea at the time, but I never tried to implement it, was to have a semver range in the frontmatter of the display in some way in the metabar. And then to have an MDX component that links the docs.

I disagree. We should always use the latest version of the documentation. The articles should be updated over time, yes, but we shouldn't assume the user is on a version that isn't the latest.

I would like to think like you, but to apply that, Node would have to have no breaking changes or deprecations.

@mureinik
Copy link
Contributor Author

nodejs/node#59052 was merged, but the changes it made to the API docs will only become visible with the next release (presumably 24.5.0?).

I don't want to update this PR to reference it to avoid accidental premature merging that will result in a broken link. Once the next version of the API docs is live, I'll circle back and update this MR to point to the new Environment Variabels section.

Adjust the link in the "How to read environment variables from Node.js"
tutorial to refer to the environment variables documentation added in
24.5.0.

Fixes nodejs#7995
@mureinik mureinik force-pushed the env-support-version branch from 7a7072e to 34a174b Compare August 1, 2025 19:38
@mureinik
Copy link
Contributor Author

mureinik commented Aug 1, 2025

Now that Node.js 24.5.0 has been released, the PR is updated to refer to the newly added "Environment Variables" section in the API docs, as per the discussion above.

@avivkeller
Copy link
Member

The discussion on what version links to be used can be had separately, but this, itself, LGTM

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Aug 8, 2025
@avivkeller
Copy link
Member

@AugustinMauroy @dario-piotrowicz Please re-review and merge when ready

@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Aug 8, 2025
Copy link
Contributor

github-actions bot commented Aug 8, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🔴 71 🟢 100 🟢 100 🟢 100 🔗
/en/about 🟢 100 🟢 97 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 99 🟢 93 🟢 100 🟠 89 🔗
/en/download 🟢 92 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 100 🔗

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.04%. Comparing base (8194265) to head (34a174b).
⚠️ Report is 12 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7996      +/-   ##
==========================================
+ Coverage   72.98%   73.04%   +0.06%     
==========================================
  Files          95       95              
  Lines        8324     8324              
  Branches      215      214       -1     
==========================================
+ Hits         6075     6080       +5     
+ Misses       2248     2243       -5     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Looks good to me 🙂

Thanks @mureinik 😄 (and sorry for the late review 🙇)

@mureinik
Copy link
Contributor Author

mureinik commented Aug 9, 2025

@dario-piotrowicz no worries!

@avivkeller avivkeller added this pull request to the merge queue Aug 9, 2025
Merged via the queue into nodejs:main with commit 2e4a6d2 Aug 9, 2025
15 checks passed
@mureinik mureinik deleted the env-support-version branch August 9, 2025 14:14
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.

"How to read environment variables from Node.js" points to the Node.js 22 documentation
4 participants