Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pnpm #3901

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.15.1
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
31 changes: 18 additions & 13 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,37 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.15.1
run_install: false

- name: Use Node.js 22
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.15.1
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
15 changes: 3 additions & 12 deletions .github/workflows/sync-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,19 @@ jobs:
- uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/action-setup@v2.4.1
uses: pnpm/action-setup@v4
with:
version: 8.6.1
version: 9.15.1
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
Loading