-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
yarn => pnpm #2323
yarn => pnpm #2323
Conversation
|
|
I have signed up for EasyCLA, what else do I need to do to trigger the next process? @acao |
@rxliuli ah, the email used for CLA has to be the same email that’s used in each commit. Also I have to approve the action workflows for the first PR from a user because we have had malicious PRs |
It looks like we need to use a base image that already has pnpm ideally, or we can use an action to manually install pnpm for each workflow |
Just run |
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.
Please update the github actions to install pnpm, preferrably in the base docker image, so that CI passes. As you can see, all 18 checks are failing
Do you want to change the command to install dependencies on netlify? I have observed that the dependencies are still installed using npm and then fail https://app.netlify.com/sites/graphiql-test/deploys/625f4fd9e4fab7000994463a |
@rxliuli awesome! Also, weird, not sure why i had to re-approve the actions |
Build & Test I know what's wrong, it's fixed. But why does lint fail, it seems strange, do I need to fix these lint and ts errors? Or some configuration was accidentally changed. . . https://github.com/graphql/graphiql/runs/6087316492?check_suite_focus=true |
@rxliuli something is off with lint staged, so for now you need to run pnpm format. |
I can’t remember why i migrated the actions to re-install modules from the shared cache individually rather than having a shared action for npm install and build. It started with a seperate install => cypress workflow that seemed to complete 1 minute faster somehow. Either way this is great because it will save us 30-50s per action based on your experiments |
Hmm, the typescript version must be resolving differently, either way you can use the ts-expect-error comment if you want since they are mostly just handling exceptions |
I restored the version of the dependencies from the previous yarn.lock, including typescript, sorry, I didn't notice the change of the dependency version before |
webpack4 is not compatible with pnpm, it's a bit tricky, have you guys done webpack4 => webpack5? Or we can use rollup? or use faster esbuild? |
This was the blocker we had run into before with pnpm, thus why i raised the issue of webpack support early on! Our plan was to migrate to vite instead, and drop babel and webpack altogether. But we may have to upgrade to webpack 5 as a transitional step. It will have to wait as I’m sick with covid and my co maintainers are focused on other things at the moment. when we originally upgraded to webpack from browserify (yes when I inherited the project it still used browserify), webpack 4 was beta and webpack 5 did not exist. So many generations of tooling 😭 |
With vite the goal was to get rid of the duplicate typescript project references tree and use vite to bundle each library for it‘s relevant exports, but I’m having trouble finding something that can re-create tsc —build —watch on a monorepo scale. |
Is there any suggestion, currently only one **Test PR / Cypress E2E Suite (pull_request) ** can not pass, I don't use webpack very much so don't know much about the configuration here |
In production, we wrote a plugin to handle this, pointing the module to src/index.ts so that we don't have to rebuild dist/index.js every time the lib is modified ref: https://github.com/rxliuli/liuli-tools/blob/master/libs/rollup-plugin-ts-alias/README.md |
Like I mentioned in #2185, you will need to find a compatibility mode or workaround for webpack 4, jest, cypress, etc, which has been what kept us from switching to pnpm im previous attempts. Currently the deploy preview and build users import from cdn isn’t building. Otherwise a webpack 5 upgrade will take some sizeable effort and will definitely need to come in a separate PR, since it heavily impacts the actual bundle we ship to the CDNs, which is used more than even the esm module! |
@rxliuli that plugin looks very promising thanks! Apologies there seems to be a delay with my LTE connection, each of your comments is only visible once I make a comment? So I’m just seeing your reply now |
I think we can do this best in two or more PRs:
|
closing for #3054 |
ref: #2185