-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
chore(package.json): Update dependencies and node version #727
Conversation
So, hear me out. Inside README.md you claim that the project needs node v20.9.0+. But package.json specifies that it needs to be EXACTLY node 20.0.0 I updated the field in the package.json to use the correct version of node. Or range of versions, for that matter.
Yarn 4 is so much faster and more efficient than yarn 1, and its dependency resolution algorythm is more secure. But I understand if you would like to keep the older versions.
Hold on, I am fixing the build errors... |
Builds and CI succeed now, and the only thing failing is the |
Thanks a lot for this PR! We'll need some extra time to review it but hope to provide feedback tomorrow the latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment. Apart from the comment (LGTM).
|
@1p22geo Please make sure you always fetch latest upstream as this is going to be major changes in our codebase. Thank you : ) |
thanks for that one Co-authored-by: Alok Gupta <[email protected]>
I see the errors, fixing now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Warning: This PR might introduce breaking changes in production, as there are complete changes in our yarn.lock
file and yarn is now in an upgraded version.
Thank you @1p22geo : )
Hi @1p22geo do you mind if we change the target branch to try the deployment first in cloudflare? Once that works well merge the temorary branch to main. |
Of course, I've only tried it with latest node. Once any errors occur, I'd be happy to help fix. |
Updated to upstream and resolved conflicts. |
BTW may I know how is the whole "temporary deployment" thing going? Are there any errors that need to be fixed, or is it just difficult to set up? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
df5fafb
into
json-schema-org:web-node-20-9-0
We have been busy!! Merged! |
I tested everything in cloudflare and I needed to add yarn back as dependency because we are using it to generate the sitemap files at deployment time. You can see the content fo the branch here: https://github.com/json-schema-org/website/tree/web-node-20-9-0 This is the build command we are running in cloudflare : next build && next-sitemap --config next-sitemap.config.js Now everything is working in web-node-20-9-0 and we are ready to merge to main. |
Why is it yarn 1.22 again? I added Yarn 4... |
packageManager is yarn 4.2 (latest) Line 76 in 674ac5d
but you added yarn 1.22? Line 45 in 674ac5d
|
Last version of yarn is 1.22 |
I literally gave you this link in the PR description https://yarnpkg.com/migration/overview |
:-) I am not an expert. I am just trying to keep the website running while managing the community |
Also, it's the stale repo. |
Ah wait, somehow |
It seems than the last yarn version available as dependency is the 1.22.22 version: |
Wait, you said you run But
Also you can run Did it really not work without |
Hi again @1p22geo. We are not using cloudflare workers, we are using cloudflare pages. If we remove yarn from the dependencies this is the error we get in the cloudflare deployment:
As soon as I add yarn to the dependencies it works like a charm. I'd like to clarify that we are not expert frontend developers, we are a group o people passionate about JSON Schema, the Specification and its tooling. These type of changes that maybe are trivial for you, may be more complex for us. Our expertise field is the spec, JSON Schemas design and processing and developer tooling .... so please bear with us. |
I agree that it doesn't make sense for |
@benjagm I remembered that I have access the Cloudflare Pages, so I tried it myself. I changed the command to
It seems that it doesn't respect the After my testing, I changed all the settings back to how they were before. I'll let you decide whether or not to make the change permanent. |
So, I found out that Cloudflare Pages has v1 and v2 build systems. The v2 build system respects
@benjagm, I reverted all the Cloudflare configuration changes I made so you have a chance to do more thorough testing (I did little more than make sure it built without errors) before making the changes permanent. |
@1p22geo I want to thank you for taking the time to do this upgrade. Keeping dependencies up-to-date is a very important security practice. That said, I want to call your attention to an interaction that occurred in this thread.
Some of us found these comments to be disrespectful. I know cultural differences as well as language barriers can lead to misunderstandings especially in async written communications like this, but I wanted you to know this was how it was received and I hope you'll adjust as I'm sure you don't mean to offend anyone. @benjagm might not be a web development expert, but this website and many other things in this community wouldn't exist without his efforts. He deserves our respect. Thanks again for your contributions and I'm glad to have you as part of this community. |
Thanks everyone! @jdesrosiers Good finding with the v1 vs v2 build system of cloudflare. I changed it and it starts using the modern Yarn. That works. I'd like to recall that we are doing all of this use site-map to generate the sitemap xml files and improve our SEO. These are the scripts we have configured in package.json:
I have checked the result of using
This is the new PR to master branch: #757 |
I'm surprised that |
What kind of change does this PR introduce?
dependencies
in package.jsonIssue Number:
There weren't any, as it is not technically a bug. Yet.
Screenshots/videos:
Sorry, none here.
If relevant, did you update the documentation?
Not relevant.
Summary
why upgrade yarn
I know that
package.json
updates are stricly forbidden for this repository (there is even a CI workflow to fail PRs which changed it) but this is kinda important.I know it will cause major pain, especially for CI runs, but I can help with migrating workflows to yarn 4.
Does this PR introduce a breaking change?
Yes.