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

doc: change ExperimentalWarnings to ExperimentalWarning #51741

Merged
merged 1 commit into from
Feb 26, 2024
Merged

doc: change ExperimentalWarnings to ExperimentalWarning #51741

merged 1 commit into from
Feb 26, 2024

Conversation

akaustav
Copy link
Contributor

@akaustav akaustav commented Feb 13, 2024

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.

@nodejs-github-bot nodejs-github-bot added cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations. labels Feb 13, 2024
@mertcanaltin
Copy link
Member

you need to edit your first commit message

you can do it like this : doc: change ExperimentalWarnings to ExperimentalWarning

@akaustav
Copy link
Contributor Author

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.

@akaustav akaustav changed the title docs: change ExperimentalWarnings to ExperimentalWarning doc: change ExperimentalWarnings to ExperimentalWarning Feb 13, 2024
@akaustav
Copy link
Contributor Author

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

@mertcanaltin mertcanaltin added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 14, 2024
@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 26, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 26, 2024
@nodejs-github-bot nodejs-github-bot merged commit 123dc51 into nodejs:main Feb 26, 2024
18 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 123dc51

marco-ippolito pushed a commit that referenced this pull request Feb 26, 2024
PR-URL: #51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
marco-ippolito pushed a commit that referenced this pull request Feb 27, 2024
PR-URL: #51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
@marco-ippolito marco-ippolito mentioned this pull request Mar 1, 2024
@akaustav akaustav deleted the patch-1 branch March 12, 2024 07:22
richardlau pushed a commit that referenced this pull request Mar 25, 2024
PR-URL: #51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
richardlau pushed a commit that referenced this pull request Mar 25, 2024
PR-URL: #51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
@richardlau richardlau mentioned this pull request Mar 25, 2024
rdw-msft pushed a commit to rdw-msft/node that referenced this pull request Mar 26, 2024
PR-URL: nodejs#51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants