Skip to content

Commit

Permalink
build: move from yarn to pnpm (#1816)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl authored Jun 26, 2023
1 parent 695af3e commit 3edbd6d
Show file tree
Hide file tree
Showing 27 changed files with 12,127 additions and 57,131 deletions.
49 changes: 32 additions & 17 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,58 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install
- run: yarn workspace react-day-picker run typecheck
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -F react-day-picker typecheck

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install
- run: yarn workspace react-day-picker run lint --max-warnings=0
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -F react-day-picker lint --max-warnings=0

test:
needs: [lint, typecheck]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install
- run: yarn workspace react-day-picker run test
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -F react-day-picker test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install
- run: yarn workspace react-day-picker run build
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -F react-day-picker build
- uses: actions/upload-artifact@v3
with:
name: rdp-dist
Expand All @@ -81,9 +93,12 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.16
registry-url: https://registry.npmjs.org/
always-auth: false
- uses: actions/download-artifact@v3
Expand Down
44 changes: 28 additions & 16 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install
- run: yarn workspace react-day-picker run build
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -F react-day-picker build
- uses: actions/upload-artifact@v3
with:
name: rdp-dist
Expand All @@ -44,34 +47,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
node-version: 18.16
cache: pnpm
- uses: actions/download-artifact@v3
with:
name: rdp-dist
path: packages/react-day-picker/dist
- run: yarn install
- run: yarn workspace website run typecheck
- run: yarn workspace website run lint --max-warnings=0
- run: yarn workspace website run test
- run: pnpm install --frozen-lockfile
- run: pnpm -F website typecheck
- run: pnpm -F website lint --max-warnings=0
- run: pnpm -F website test

build-website:
needs: [build-package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
node-version: 18.16
cache: pnpm
- uses: actions/download-artifact@v3
with:
name: rdp-dist
path: packages/react-day-picker/dist
- run: yarn install
- run: yarn workspace website run build
- run: pnpm install --frozen-lockfile
- run: pnpm -F website build
- uses: actions/upload-artifact@v3
with:
name: website-build
Expand All @@ -83,9 +92,12 @@ jobs:
if: ${{ github.event_name == 'release' || github.event.inputs.deploy }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.16
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v3
with:
Expand All @@ -95,7 +107,7 @@ jobs:
with:
name: rdp-dist
path: packages/react-day-picker/dist
- run: yarn install
- run: pnpm install --frozen-lockfile
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ node_modules
coverage
build
dist
yarn-debug.log*
yarn-error.log*
/.yarn/cache
/.yarn/install-state.gz
/.yarn/build-state.yml
14 changes: 0 additions & 14 deletions .vscode/launch.json

This file was deleted.

77 changes: 0 additions & 77 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

Loading

0 comments on commit 3edbd6d

Please sign in to comment.