Skip to content

Commit

Permalink
Completely replace Yarn with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Sep 4, 2024
1 parent b9aeae0 commit fc3944a
Show file tree
Hide file tree
Showing 21 changed files with 11,860 additions and 8,871 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
name: command:build
on: push
name: extension build

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
- name: Run `extenion build` command
run: yarn test:build
run: pnpm test:build

37 changes: 25 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
name: 🛠

on: push
on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- name: Run compiler
run: yarn compile
- name: Run tests
run: yarn test:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: pnpm compile
- name: Run tests
run: pnpm test:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
28 changes: 21 additions & 7 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
name: cli
on: push
name: extension

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
- name: Run `extenion` cli without arguments
run: yarn test:cli
run: pnpm test:cli
27 changes: 20 additions & 7 deletions .github/workflows/create.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
name: command:create
on: push
name: extension create

on:
push:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
- name: Run `extension create` command
run: yarn test:create
run: pnpm test:create
29 changes: 22 additions & 7 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: command:dev
on: push
name: extension dev

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
- name: Run `extension dev` command
run: yarn test:dev
run: pnpm test:dev
2 changes: 1 addition & 1 deletion .github/workflows/discord-notify-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Github Releases To Discord
uses: SethCohen/[email protected]
with:
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: command:preview
on: push
name: extension preview

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
# - name: Run `extension preview` command (TODO)
# run: yarn test:preview
# run: pnpm test:preview
25 changes: 18 additions & 7 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
name: release:preview
on: [push, pull_request]

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install modules
run: yarn install
cache: 'pnpm'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Run compiler
run: yarn compile
run: pnpm compile
- name: Deploy release preview
run: pnpx pkg-pr-new publish './programs/*'
27 changes: 21 additions & 6 deletions .github/workflows/start.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: command:start
on: push

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run compiler
run: yarn compile
run: pnpm compile
# - name: Run start tests (TODO)
# run: yarn test:start
# run: pnpm test:start
8 changes: 8 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
recursive-install=false
# If this is enabled, locally available packages are linked to node_modules instead of being downloaded from the registry.
# link-workspace-packages=true
# If this is enabled, local packages from the workspace are preferred over packages from the registry,
# even if there is a newer version of the package in the registry.
# prefer-workspace-packages=true
# If this is enabled, pnpm creates a single pnpm-lock.yaml file in the root of the workspace.
# shared-workspace-lockfile=true
Loading

0 comments on commit fc3944a

Please sign in to comment.