build(script): use `dev` instead of `serve`
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 formatto ensure the code follows the style guide. - [X] I have run
npm run testto check if all tests are passing. - [X] I have run
npx turbo buildto check if the website builds without errors. - NA I've covered new added functionality with unit tests if necessary.
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 |
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.
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.
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?
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?
- because if you go to the next doc it calls it a development environment
- Because there is the HMR principle
- The pure serve is the fact that there is no code executed on the server, which is not the case.
I believe you are having some language barriers here. "Serve" has nothing to do with the word "server" specifically in this context...
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
Fwiw I am probably +1 to dev -- that is what I default to when looking for the right command to run locally for development.
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.
Can we simply support both? One alias to the other?
I found that a good consensus! @ovflowd what do you think ?
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.
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.
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.
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
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
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 | 🔗 |