nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

build(script): use `dev` instead of `serve`

Open AugustinMauroy opened this issue 1 year ago • 9 comments

Description

I propose to change serve to dev because it's not serving the site. It's just create a dev environment. Also on docs I had remove an obsolete mention.

Check List

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

AugustinMauroy avatar Apr 25 '24 15:04 AugustinMauroy

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Apr 26, 2024 0:37am

vercel[bot] avatar Apr 25 '24 15:04 vercel[bot]

I think this is the 3rd time you open a PR proposing the rename of this command. The answer before was NO and it is still a NO.

There is no reason to change and we have kept it this way as it was the name before and people are used to it; changing it now has no meaningful impact.

ovflowd avatar Apr 25 '24 15:04 ovflowd

I think this is the 3rd time you open a PR proposing the rename of this command. The answer before was NO and it is still a NO.

I've never opened a pr. But suggest.

There is no reason to change and we have kept it this way as it was the name before and people are used to it; changing it now has no meaningful impact.

Yes, there is a home for former contributors. But for new contributors it's strange because ‘the convention’ next makes dev the usual command.

And we have to bear in mind that serve is not the right term/is no longer appropriate.

AugustinMauroy avatar Apr 25 '24 15:04 AugustinMauroy

I've never opened a pr. But suggest.

My bad then.

Yes, there is a home for former contributors. But for new contributors it's strange because ‘the convention’ next makes dev the usual command.

You can still run next dev. NPM scripts have nothing to do with Next.js; Have you seen anyone complaining about the command being called "serve" besides yourself? It's on the top of the README, I doubt people are doing this incorrectly and if they are they will quickly make it right once they read the README.

And we have to bear in mind that serve is not the right term/is no longer appropriate.

No? We are starting a dev server and serving files. How is the name not appropriate?

ovflowd avatar Apr 25 '24 15:04 ovflowd

You can still run next dev. NPM scripts have nothing to do with Next.js; Have you seen anyone complaining about the command being called "serve" besides yourself? It's on the top of the README, I doubt people are doing this incorrectly and if they are they will quickly make it right once they read the README.

I have to admit that you're right about that.

No? We are starting a dev server and serving files. How is the name not appropriate?

  1. because if you go to the next doc it calls it a development environment
  2. Because there is the HMR principle
  3. The pure serve is the fact that there is no code executed on the server, which is not the case.

AugustinMauroy avatar Apr 25 '24 15:04 AugustinMauroy

I believe you are having some language barriers here. "Serve" has nothing to do with the word "server" specifically in this context...

ovflowd avatar Apr 25 '24 15:04 ovflowd

I believe you are having some language barriers here. "Serve" has nothing to do with the word "server" specifically in this context...

For me, the term ‘serve’ in the context of an entry in the package.json means turning on/opening a server (rutime/software) which provides static files.

So IMHO next dev isn't serving software

AugustinMauroy avatar Apr 25 '24 15:04 AugustinMauroy

Fwiw I am probably +1 to dev -- that is what I default to when looking for the right command to run locally for development.

MattIPv4 avatar Apr 25 '24 15:04 MattIPv4

I'm +1 on this change, because "obvious always wins"

In our case here, we are unapologetically stating we are using Next. To deviate from their common patterns is an oddity.

Can we simply support both? One alias to the other?

I'm like a 6 outta 10 , but hope we can approach the problem with civility and a aim toward concensus.

bmuenzenmeyer avatar Apr 26 '24 01:04 bmuenzenmeyer

Can we simply support both? One alias to the other?

I found that a good consensus! @ovflowd what do you think ?

AugustinMauroy avatar Apr 26 '24 06:04 AugustinMauroy

I'm +1 on this change, because "obvious always wins"

In our case here, we are unapologetically stating we are using Next. To deviate from their common patterns is an oddity.

Can we simply support both? One alias to the other?

I'm like a 6 outta 10 , but hope we can approach the problem with civility and a aim toward concensus.

Those are solid points, but although we use Next.js, we do want to keep the repository as neutral as possible and support existing contributors.

I believe having both commands (serve being the original and "dev" references "serve") a good compromise.

ovflowd avatar Apr 26 '24 08:04 ovflowd

For reference, I'm usually against doing changes based on the hypothetical that someone somewhere will ever have such issue, before anyone ever reported that they see such issue; It's overengineering.

ovflowd avatar Apr 26 '24 08:04 ovflowd

before anyone ever reported that they see such issue

Feel free to take my comments here as such a report -- I've repeatedly run dev locally and been confused, then had to remember that this uses the non-standard serve instead.

MattIPv4 avatar Apr 26 '24 12:04 MattIPv4

Feel free to take my comments here as such a report -- I've repeatedly run dev locally and been confused, then had to remember that this uses the non-standard serve instead.

so have I - and while this is a minor slow down, I wonder about all the folks that don't report it

bmuenzenmeyer avatar Apr 26 '24 14:04 bmuenzenmeyer

I just want to add that I am glad we can come to an agreement - the project is better off when all of our perspectives are heard

bmuenzenmeyer avatar Apr 26 '24 14:04 bmuenzenmeyer

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 98 🟢 100 🟢 96 🟢 91 🔗
/en/about 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 98 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 99 🟢 100 🟢 96 🟢 92 🔗

github-actions[bot] avatar May 01 '24 02:05 github-actions[bot]

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 91%
90.04% (588/653) 76.08% (175/230) 92.18% (118/128)

Unit Test Report

Tests Skipped Failures Errors Time
128 0 :zzz: 0 :x: 0 :fire: 5.662s :stopwatch:

github-actions[bot] avatar May 01 '24 02:05 github-actions[bot]