node
node copied to clipboard
doc: change `ExperimentalWarnings` to `ExperimentalWarning`
Change Summary
This PR changes ExperimentalWarnings
to ExperimentalWarning
in the documentation for the latest version of NodeJS as of this writing - v21.6.1
.
Why?
I am using the experimental JSON Modules feature within my NodeJS project. Although the JSON Modules feature works, whenever I execute my ES Module based JavaScript file, I would receive the following warning:
(node:30484) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
After reading through the documentation under the section titled --disable-warning=code-or-type
, I tried to suppress the ExperimentalWarning
by changing the following start
script within my package.json
file:
{
...
"scripts": {
"start": "node --disable-warning=ExperimentalWarnings src/index.js"
},
...
}
But I still received the aforementioned ExperimentalWarning
within my console.
After re-reading the documentation (and referring other documentations - like this comment on issue #30810), instead of the plural version (ExperimentalWarnings
), I tried the singular version (ExperimentalWarning
):
{
...
"scripts": {
- "start": "node --disable-warning=ExperimentalWarnings src/index.js"
+ "start": "node --disable-warning=ExperimentalWarning src/index.js"
},
...
}
And it worked! The warning was suppressed. Hence, this PR to address the confusion in the documentation.
you need to edit your first commit message
you can do it like this : doc: change ExperimentalWarnings to ExperimentalWarning
you need to edit your first commit message
you can do it like this :
doc: change ExperimentalWarnings to ExperimentalWarning
Sure, @mertcanaltin. Working on modifying the commit message and rebasing my PR now. Will post here when done.
you need to edit your first commit message you can do it like this :
doc: change ExperimentalWarnings to ExperimentalWarning
Sure, @mertcanaltin. Working on modifying the commit message and rebasing my PR now. Will post here when done.
@mertcanaltin - Just rebased and force pushed the commit with the modified commit message. Please let me know if the commit looks good.
PS. Notes for myself
Commands used:
git rebase -i HEAD~1 ## reword commit git push --force-with-lease
Landed in 123dc51c6ca4ed7e8c0aebb553a22a1474b27e2e