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

update to yarn 4.2.2 #1404

Merged

Conversation

karlismelderis-mckinsey
Copy link
Contributor

@karlismelderis-mckinsey karlismelderis-mckinsey commented May 28, 2024

Status

READY

Description

Update project to yarn v4

Yarn versions are controlled by corepack now
https://yarnpkg.com/getting-started/install

There are a plenty breaking changes but quick scan through code didn't raised any red flags hence only lock fine has changed

@melloware
Copy link
Collaborator

Looks like tests are failing?

@melloware melloware added the dependencies Pull requests that update a dependency file label May 28, 2024
@melloware melloware added this to the 6.30.0 milestone May 28, 2024
@anymaniax
Copy link
Collaborator

anymaniax commented May 28, 2024

I would prefer migrate to bun at this point

@karlismelderis-mckinsey karlismelderis-mckinsey force-pushed the chore/upgrade-yarn-v4 branch 3 times, most recently from 072e6c8 to d284176 Compare May 28, 2024 17:37
@karlismelderis-mckinsey
Copy link
Contributor Author

karlismelderis-mckinsey commented May 28, 2024

I would prefer migrate to bun at this point

I'll leave it up to you but do keep in mind that Installing another tool and learning how tests and package management work in Bun will discourage people (at least me) for contributing

I've already invested enough time to re-learn yarn after using pnpm for a while and I don't want to go through it one more time

if Bun survives Youtube/Blog/Facebook hype and is still around after couple more years
if Bun roadmap and release cycle becomes more stable and looks like NodeJS (read more corporate friendly)

P.S. I was surprised to find that Orval has multiple layers of yarn workspaces
Should be possible to specify them all in root but I'll leave it for another PR

@karlismelderis-mckinsey
Copy link
Contributor Author

karlismelderis-mckinsey commented May 28, 2024

I have another side question
any reason to introduce NX -> nx-fastify-react
it does pull in quite a bit of dependencies and requires attention to follow NX changes and run migrations and you're already 7 major versions behind

NX is a great tool but not sure you really need it for one single sample code

@melloware
Copy link
Collaborator

@soartec-lab did you bring in fastify? Or was it always there?

@soartec-lab
Copy link
Member

@melloware

No, I haven't added it.
Actually, when I re-run orval in nx-fastify-react, it doesn't work, so I exclude it in turborepo.

https://github.com/anymaniax/orval/blob/master/samples/package.json#L13

The nx-fastify-react is not maintained and is broken, so i agree to delete it.

@soartec-lab
Copy link
Member

Also, I agree with using bun. I've used it in other projects and it's great. This is because it can be used while maintaining compatibility and provides a better development experience.

However, since cooperation with dependabot is not yet supported, it is necessary to support that as well, so it is better to use yarn v4 first, and then take the time to replace it with bun.

@soartec-lab
Copy link
Member

@karlismelderis-mckinsey @melloware

I'll make PR for nx-fastify-react delete.

@soartec-lab
Copy link
Member

I''m working on it here, but it's still a work in progress. I will open it when completed

#1408

@karlismelderis-mckinsey
Copy link
Contributor Author

Have you considering to replace dependabot with renovate?

I find it's configuration more flexible and it discovers all package.json files in the repo without any extra configuration
also least last time I tried dependabot wasn't able to keep pnpm lock files up to date and extra scripting was required

@melloware
Copy link
Collaborator

Looks like merge conflict?

@karlismelderis-mckinsey
Copy link
Contributor Author

can we collect approvals and I'll rebase one more time
due to amount of changes merged it will be tough race to keep this PR without conflicts 😉

@melloware
Copy link
Collaborator

@karlismelderis-mckinsey if you update i will merge this PR once its ready to go.

@melloware melloware merged commit 21c0690 into orval-labs:master May 30, 2024
2 checks passed
@karlismelderis-mckinsey karlismelderis-mckinsey deleted the chore/upgrade-yarn-v4 branch May 30, 2024 14:04
@melloware
Copy link
Collaborator

melloware commented Jun 7, 2024

I have tried everything corepack enable etc all the YARN instructions yet i still get this on yarn dev

@orval/core:dev: DTS Build start
orval:dev: C:\dev\melloware\orval\packages\core\node_modules\chalk\source\index.js:2
orval:dev: const ansiStyles = require('ansi-styles');
orval:dev:                    ^
orval:dev:
orval:dev: Error [ERR_REQUIRE_ESM]: require() of ES Module C:\dev\melloware\orval\node_modules\ansi-styles\index.js from C:\dev\melloware\orval\packages\core\node_modules\chalk\source\index.js not supported.
orval:dev: Instead change the require of C:\dev\melloware\orval\node_modules\ansi-styles\index.js in C:\dev\melloware\orval\packages\core\node_modules\chalk\source\index.js to a dynamic import() which is available in all CommonJS modules.
orval:dev:     at Object.<anonymous> (C:\dev\melloware\orval\packages\core\node_modules\chalk\source\index.js:2:20) {
orval:dev:   code: 'ERR_REQUIRE_ESM'
orval:dev: }
orval:dev:
orval:dev: Node.js v20.14.0
@orval/core:dev: DTS ⚡️ Build success in 1773ms

Any thoughts?

verified my yarn version

C:\dev\melloware\orval>yarn --version
4.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants