Skip to content

Commit

Permalink
feat: change yarn to pnpm (#107)
Browse files Browse the repository at this point in the history
* change pnpm

* add pnpm

* pnpm install

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update pnpm-lock.yaml

* upgrade nuxt 14

* Update pnpm-lock.yaml

* Update ci.yml

* Update ci.yml
  • Loading branch information
productdevbook authored Nov 17, 2022
1 parent f199ca5 commit eb5aa8c
Show file tree
Hide file tree
Showing 7 changed files with 7,947 additions and 12,646 deletions.
118 changes: 72 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,34 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node-version: [18]
pnpm-version: [7]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
version: ${{ matrix.pnpm-version }}

- name: 📦 Install dependencies
run: yarn install
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
path: |
node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: pnpm i


build:
Expand All @@ -43,29 +54,32 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node-version: [18]
pnpm-version: [7]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
version: ${{ matrix.pnpm-version }}

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
path: |
node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: 🛠 Nuxt Build
run: yarn build

- name: Cache dist
uses: actions/cache@v3
with:
path: dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
run: pnpm build

generate:
name: 🚧 Nuxt generate
Expand All @@ -75,29 +89,32 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node-version: [18]
pnpm-version: [7]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Checkout
uses: actions/checkout@v3

- name: Cache node_modules
uses: actions/cache@v3
- uses: pnpm/[email protected]
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
version: ${{ matrix.pnpm-version }}

- name: 🛠 Nuxt Generate
run: yarn generate
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Cache dist
- name: Cache node_modules
uses: actions/cache@v3
with:
path: dist
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
path: |
node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: 🛠 Nuxt Generate
run: pnpm generate


lint:
Expand All @@ -108,20 +125,29 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node-version: [18]
pnpm-version: [7]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
version: ${{ matrix.pnpm-version }}

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
path: |
node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: 💪 Lint
run: yarn lint
run: pnpm lint
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

807 changes: 0 additions & 807 deletions .yarn/releases/yarn-3.3.0.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml

This file was deleted.

Loading

1 comment on commit eb5aa8c

@vercel
Copy link

@vercel vercel bot commented on eb5aa8c Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.