Skip to content

Commit

Permalink
chore: migrated to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldziher committed Dec 21, 2024
1 parent 08159e9 commit e6fe69b
Show file tree
Hide file tree
Showing 92 changed files with 24,565 additions and 25,279 deletions.
15 changes: 8 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
**Checklist**
- [x] `yarn typecheck`
- [x] `yarn lint:fix`
- [x] `yarn test`
- [x] `yarn brl`
- [x] `yarn changeset`

- [x] `pnpm run typecheck`
- [x] `pnpm run lint:fix`
- [x] `pnpm run test`
- [x] `pnpm run brl`
- [x] `pnpm run changeset`
- [x] [ui changelog](apps/www/content/docs/components/changelog.mdx)

<!--
Thanks for the PR. Please complete the checklist below to ensure your PR can be
merged as soon as possible.
- yarn brl: Required if adding, moving or removing a file in a package.
- yarn changeset: Required if updating `packages`. Please be brief and descriptive. For breaking
- pnpm run brl: Required if adding, moving or removing a file in a package.
- pnpm run changeset: Required if updating `packages`. Please be brief and descriptive. For breaking
changes, use a major changeset. For new features, use a minor changeset. For
bug fixes, use a patch changeset.
- changelog: Required if updating `apps/www/src/registry`. See `apps/www/content/docs/components/changelog.mdx`.
Expand Down
124 changes: 0 additions & 124 deletions .github/actions/yarn-nm-install/action.yml

This file was deleted.

21 changes: 6 additions & 15 deletions .github/workflows/ci-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.4.1
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8.6.1
version: 9
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: $(pnpm store path)
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: 📥 Install dependencies
run: pnpm install --no-frozen-lockfile
- name: 📥 Install
run: pnpm install -r

- name: 🏗 Build
run: pnpm build
- name: 🏗 Run build
run: pnpm run build
30 changes: 18 additions & 12 deletions .github/workflows/lint-typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- 'packages/**'
- '.github/actions/**'
- '.github/workflows/lint-typecheck.yml'
- '.yarnrc.yml'
- 'yarn.lock'
- 'pnpm.lock'
- '.prettier*'
- '.eslint*'
- 'jest.config.js'
Expand All @@ -28,8 +27,7 @@ on:
- 'packages/**'
- '.github/actions/**'
- '.github/workflows/**'
- '.yarnrc.yml'
- 'yarn.lock'
- 'pnpm.lock'
- '.prettier*'
- '.eslint*'
- 'jest.config.js'
Expand All @@ -52,30 +50,38 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: 📥 Install
run: pnpm install -r

- name: ♻️ Restore packages cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: packages-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
key: packages-cache-${{ runner.os }}-${{ hashFiles('pnpm.lock') }}

- name: 🏗 Build
run: yarn build
- name: 🏗 Run build
run: pnpm run build

- name: 🔬 Lint
run: yarn lint
- name: 🔬 Linter
run: pnpm run lint

- name: 🕵️ Typecheck
run: yarn typecheck:all
run: pnpm run typecheck:all

notify-failure:
name: Discord Notification
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,39 @@ jobs:
update-registry:
name: Update Registry
runs-on: ubuntu-latest

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: 📥 Install
run: pnpm install -r

- name: ♻️ Restore packages cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: packages-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
key: packages-cache-${{ runner.os }}-${{ hashFiles('pnpm.lock') }}

- name: 🏗 Build Registry
run: yarn build:registry && yarn build:tw
run: pnpm run build:registry && pnpm run build:tw

- name: ◻️ Create Pull Request
uses: peter-evans/create-pull-request@v4
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: 📦 Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: 📥 Install
run: pnpm install -

# @link https://github.com/changesets/action
- name: 🦋 Create Release Pull Request or Publish
Expand All @@ -33,7 +34,11 @@ jobs:
with:
cwd: ${{ github.workspace }}
title: '[Release] Version packages'
publish: yarn release
publish: pnpm release
# Optional, might be used in conjunction with GITHUB_TOKEN to
# allow running the workflows on a Version package action.
# Be aware of security implications.
# setupGitUser: true
env:
# See https://github.com/changesets/action/issues/147
HOME: ${{ github.workspace }}
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/sync-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,20 @@ jobs:
- uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/[email protected]
- uses: pnpm/action-setup@4
name: Install pnpm
with:
version: 8.6.1
version: 9
run_install: false

- name: ♻️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: 🔄 Setup pnpm cache
uses: actions/cache@v4
with:
path: $(pnpm store path)
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: 📥 Install dependencies
run: pnpm install --no-frozen-lockfile
run: pnpm install -r

- name: 🏗 Build
run: pnpm build
Expand Down
Loading

0 comments on commit e6fe69b

Please sign in to comment.