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

feat: add -w option as an alias to --watch #51696

Closed
wants to merge 4 commits into from
Closed

feat: add -w option as an alias to --watch #51696

wants to merge 4 commits into from

Conversation

onurravli
Copy link

With this pull request, node -w also will be activate watch mode alongside node --watch.

Add an alias to the --watch option.
Update cli.md to add -w alias to --watch.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 7, 2024
@VoltrexKeyva VoltrexKeyva added the cli Issues and PRs related to the Node.js command line interface. label Feb 8, 2024
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

The tests are failing. Can you fix them?

@onurravli
Copy link
Author

@anonrig still looking for failed checks but I couldn't find the problem yet. Tests are done in Windows but not in Unix like OSs. Which files should I look?

@tniessen tniessen added the semver-minor PRs that contain new features and should be released in the next minor version. label Feb 8, 2024
@tniessen
Copy link
Member

tniessen commented Feb 8, 2024

No strong opinion on this. FWIW, as far as I am aware, we haven't added single-letter options in years. Some years ago, someone added a short option for --conditions, but that had to be reverted, and eventually was re-added three years ago using capital -C to avoid using up lowercase letters (see #38755). Other than that, I don't think we've added any short options in at least five years. In my personal opinion, there are some useful short options (-p, -e), but other than that, the better readability of long options almost always outweighs saving a few keystrokes.

@onurravli
Copy link
Author

You may be right. But for example in tsc I'm used to using the -w flag, like tsc -w -p ., so I tried node -w a few times accidentally. That's why I opened this pull request.

@mertcanaltin
Copy link
Member

mertcanaltin commented Feb 12, 2024

From a developer point of view using -w can be positive, but as @tniessen said, I agree that long description is good for readability, I think we should evaluate this issue according to the need.

@rluvaton rluvaton changed the title feat: add -w option feat: add -w option as an alias to --watch Feb 13, 2024
@onurravli onurravli closed this May 2, 2024
@onurravli onurravli deleted the feat-onurravli/add-w-option branch May 2, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cli Issues and PRs related to the Node.js command line interface. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants