-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(workspace): Migrate from yarn to pnpm (#2837)
- Loading branch information
Showing
53 changed files
with
17,308 additions
and
17,104 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/actions/yarn-run/action.js → .github/actions/pnpm-run/action.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const run = require('execa')( | ||
'yarn', | ||
'pnpm', | ||
['run', process.env.INPUT_COMMAND], | ||
{ cwd: process.cwd(), } | ||
); | ||
|
4 changes: 2 additions & 2 deletions
4
.github/actions/yarn-run/action.yml → .github/actions/pnpm-run/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,132 +15,141 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Get Yarn cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
node-version: 18 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Use Yarn cache | ||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
id: pnpm-cache | ||
with: | ||
path: | | ||
~/.cache/Cypress | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
${{ steps.pnpm-store.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use node_modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
if: | | ||
steps.yarn-cache.outputs.cache-hit != 'true' || | ||
steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: TypeScript | ||
run: yarn run check | ||
run: pnpm run check | ||
|
||
- name: Linting | ||
run: yarn run lint | ||
run: pnpm run lint | ||
|
||
- name: Unit Tests | ||
run: yarn run test | ||
run: pnpm run test | ||
|
||
react-e2e: | ||
name: React end-to-end tests | ||
name: React E2E | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Get Yarn cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
node-version: 18 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Use Yarn cache | ||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
id: pnpm-cache | ||
with: | ||
path: | | ||
~/.cache/Cypress | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
${{ steps.pnpm-store.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use node_modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
if: | | ||
steps.yarn-cache.outputs.cache-hit != 'true' || | ||
steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: Build | ||
run: yarn workspace @urql/core build | ||
run: pnpm -F urql build | ||
|
||
- name: e2e tests 🧪 | ||
uses: cypress-io/github-action@v4 | ||
with: | ||
command: yarn cypress run --component | ||
install: false | ||
command: pnpm cypress run --component | ||
working-directory: packages/react-urql | ||
|
||
graphcache-e2e: | ||
name: Graphcache end-to-end tests | ||
name: Graphcache E2E | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Get Yarn cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
node-version: 18 | ||
|
||
- name: Use Yarn cache | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
id: pnpm-cache | ||
with: | ||
path: | | ||
~/.cache/Cypress | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
${{ steps.pnpm-store.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use node_modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
if: | | ||
steps.yarn-cache.outputs.cache-hit != 'true' || | ||
steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: Build | ||
run: yarn workspace @urql/core build && yarn workspace urql build && yarn workspace @urql/exchange-execute build | ||
run: pnpm -F "@urql/core" -F urql -F "@urql/exchange-execute" build | ||
|
||
- name: e2e tests 🧪 | ||
uses: cypress-io/github-action@v4 | ||
with: | ||
command: yarn cypress run --component | ||
install: false | ||
command: pnpm cypress run --component | ||
working-directory: exchanges/graphcache | ||
|
||
build: | ||
|
@@ -158,35 +167,40 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Get Yarn cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Use Yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
node-version: 18 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Use node_modules cache | ||
id: node-modules-cache | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: pnpm-cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
path: | | ||
~/.cache/Cypress | ||
${{ steps.pnpm-store.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
if: | | ||
steps.yarn-cache.outputs.cache-hit != 'true' || | ||
steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: Build | ||
run: yarn run build | ||
run: pnpm build | ||
|
||
- name: Pack | ||
uses: ./.github/actions/yarn-run | ||
uses: ./.github/actions/pnpm-run | ||
with: | ||
command: pack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,39 +17,37 @@ jobs: | |
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
node-version: 18 | ||
|
||
- name: Get Yarn cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Use Yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Use node_modules cache | ||
id: node-modules-cache | ||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: pnpm-cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
path: | | ||
~/.cache/Cypress | ||
${{ steps.pnpm-store.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
if: | | ||
steps.yarn-cache.outputs.cache-hit != 'true' || | ||
steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: PR or Publish | ||
id: changesets | ||
uses: changesets/action@b3300fad33b6ab794313da28d27424c0e2f78991 | ||
with: | ||
publish: yarn changeset publish | ||
publish: pnpm changeset publish | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.