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
🔨 feat: Migrate to pnpm
#9516
🔨 feat: Migrate to pnpm
#9516
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
TODO:
Questions:
|
|
It was due to multiple react version issue, maybe it's no longer an issue. |
That's awesome! |
I think it's no longer an issue with react version: the following works
I think this is the best option: (It's fine without the updates too)
|
(issues with 2 react(s) in the past)
FYI: just added |
thanks @nvh95 I will fix those cypress tests. |
@bluebill1049 The cypress tests just passed after I rebased on |
I see, that's awesome! Thanks a lot @nvh95 |
@bluebill1049 If by any chance when you got some time, can you help to look at this failed action? https://github.com/react-hook-form/react-hook-form/actions/runs/3615848030/jobs/6093262592 |
@nvh95 sure will do. |
looks like it's determined by the.lock file: https://github.com/preactjs/compressed-size-action/blob/master/src/index.js#L59-L67 |
on it's pulling the master, let's merge it in. It should just work. it's try to pull the master to compare the size difference, hence it's not going to work out (yarn vs pnpm) |
@bluebill1049 I'm checking all the boxes in the PR description. I will let you know when it's done and we are good to merge |
Awesome! thanks so much for this @nvh95 🙏 🥳 |
@@ -2,7 +2,7 @@ | |||
"name": "react-hook-form", | |||
"version": "0.0.0", | |||
"scripts": { | |||
"dev": "vite", | |||
"dev": "vite --force", |
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.
@bluebill1049 --force
is to invalidate the pre-bundle dependencies. This is a workaround. When you make changes to RHF, please restart the dev server of app
.
We will try to improve this behavior to have real HMR. (See my comment in app/vite.config.ts
for more)
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.
Yea, no worries on that.
# Do we want to run with multiple versions of node? | ||
node-version: [16] |
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.
@bluebill1049 It is recommended to specify which node version we use. FYI
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.
sounds good 👍
strategy: | ||
matrix: | ||
# Do we want to run with multiple versions of node? | ||
node-version: [16] |
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.
@bluebill1049 It is recommended to specify which node version we use. Also, we can test RHF on multiple node versions as well. For now, I just fixed it to node 16, we can change to following in the future if it's needed
strategy: | |
matrix: | |
# Do we want to run with multiple versions of node? | |
node-version: [16] | |
strategy: | |
matrix: | |
# Do we want to run with multiple versions of node? | |
node-version: [16, 18] |
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.
yep, 👍
- name: Test | ||
run: | | ||
yarn test --ci | ||
yarn test:type | ||
pnpm run test --ci |
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.
pnpm test --ci
fails,
pnpm run test --ci
passed
Not have much time to check more details.
cc: @bluebill1049
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.
haha that's strange, yea pnpm run test --ci
is fine.
@bluebill1049
For script Otherwise, my PR is ready to be merged 🥳. Please help to do some testing from your side. Thank you very much for this awesome library. |
I will take over and resolve the rest 🌷 thanks @nvh95 a lot 👍 |
- coverage - test:native - test:server
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.
🚀 This is really awesome and thanks very much for the huge effort!
@@ -13,7 +13,7 @@ | |||
"joi": "^17.5.0", | |||
"react": "^17.0.1", | |||
"react-dom": "^17.0.1", | |||
"react-hook-form": "^7.25.0", | |||
"react-hook-form": "file:..", |
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.
@nvh95 Hi, I have question why you don't use workspace:*
keyword here?
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.
aha still no pnpm-workspace.yaml
file on project root,
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.
Hi @sadeghbarati. I considered that option #9516 (comment)
However, now, I am looking for the simplest solution, since this PR focuses on migrating to pnpm
. In the next PR, I will adopt pnpm Workspace and use workspace:*
.
Thanks for your suggestion 🤗.
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.
Just saw your Tweet, Thanks for your efforts
Description
pnpm
is faster and consumes less disk storage. Why don't use it? 😁Related PR(s)
Features
yarn
bypnpm
coverage (TODO: Check if it fails withyarn
)test:servertest:nativepostversion(I guess it's not needed)api-extrator
build-test
automation
compressed-size
Chores
build:watch
scriptvite@3
forapp