-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
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. |
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 would like to think like you, but to apply that, Node would have to have no breaking changes or deprecations. |
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
7a7072e
to
34a174b
Compare
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. |
The discussion on what version links to be used can be had separately, but this, itself, LGTM |
@AugustinMauroy @dario-piotrowicz Please re-review and merge when ready |
Lighthouse Results
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
There was a problem hiding this 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 🙇)
@dario-piotrowicz no worries! |
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
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.