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
Changes from 11 commits
d447a36
e6ab840
147254c
b4eaab5
3833901
9f620f4
1030127
866f04d
4d741c5
6034507
a68cdfc
f83aa9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,24 +5,40 @@ on: [pull_request] | |||||||||||||||||
jobs: | ||||||||||||||||||
build: | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
strategy: | ||||||||||||||||||
matrix: | ||||||||||||||||||
# Do we want to run with multiple versions of node? | ||||||||||||||||||
node-version: [16] | ||||||||||||||||||
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, 👍 |
||||||||||||||||||
|
||||||||||||||||||
steps: | ||||||||||||||||||
- name: Checkout repo | ||||||||||||||||||
uses: actions/checkout@v2 | ||||||||||||||||||
uses: actions/checkout@v3 | ||||||||||||||||||
|
||||||||||||||||||
- name: Install deps and build (with cache) | ||||||||||||||||||
uses: bahmutov/npm-install@v1 | ||||||||||||||||||
- name: Setup pnpm | ||||||||||||||||||
uses: pnpm/action-setup@v2 | ||||||||||||||||||
with: | ||||||||||||||||||
version: 7 | ||||||||||||||||||
|
||||||||||||||||||
- name: Use Node.js ${{ matrix.node-version }} | ||||||||||||||||||
uses: actions/setup-node@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
node-version: ${{ matrix.node-version }} | ||||||||||||||||||
cache: 'pnpm' | ||||||||||||||||||
|
||||||||||||||||||
- name: Install dependencies | ||||||||||||||||||
run: pnpm install | ||||||||||||||||||
|
||||||||||||||||||
- name: Lint | ||||||||||||||||||
run: | | ||||||||||||||||||
yarn lint | ||||||||||||||||||
yarn type | ||||||||||||||||||
pnpm lint | ||||||||||||||||||
pnpm type | ||||||||||||||||||
|
||||||||||||||||||
# What is --ci? | ||||||||||||||||||
- 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 commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. haha that's strange, yea |
||||||||||||||||||
pnpm test:type | ||||||||||||||||||
|
||||||||||||||||||
- name: Bundle watch | ||||||||||||||||||
run: | | ||||||||||||||||||
yarn bundlewatch | ||||||||||||||||||
pnpm bundlewatch |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
package-lock=false | ||
auto-install-peers=true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @bluebill1049 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, no worries on that. |
||
"build": "tsc && vite build", | ||
"serve": "vite preview" | ||
}, | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @nvh95 Hi, I have question why you don't use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aha still no There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Thanks for your suggestion 🤗. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just saw your Tweet, Thanks for your efforts |
||
"react-router-dom": "^6.2.1", | ||
"react-select": "^5.2.2", | ||
"yup": "^0.32.8" | ||
|
@@ -24,8 +24,8 @@ | |
"@types/react-router-dom": "^5.3.3", | ||
"@types/react-select": "^5.0.1", | ||
"@types/yup": "^0.29.13", | ||
"@vitejs/plugin-react": "^1.3.1", | ||
"@vitejs/plugin-react": "^2.2.0", | ||
"typescript": "^4.5.5", | ||
"vite": "^2.9" | ||
"vite": "^3.2.4" | ||
} | ||
} |
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 👍