Skip to content

Commit

Permalink
chore: migrate to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Jul 24, 2024
1 parent 1e183ef commit e4d9cf4
Show file tree
Hide file tree
Showing 35 changed files with 18,394 additions and 162,771 deletions.
10 changes: 5 additions & 5 deletions .github/actions/nightly-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:
repository: ${{ inputs.checkout-repo }}
ref: ${{ inputs.checkout-ref }}
fetch-depth: 0
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/pnpm-install
- run: >-
node -e "
const json = require('./lerna.json');
Expand All @@ -45,9 +45,9 @@ runs:
- id: get-version
run: echo "full-version=$(node -e "console.log(require('./lerna.json').version)")-${{ inputs.release-id }}" >> $GITHUB_OUTPUT
shell: bash
- run: yarn lerna version ${{ steps.get-version.outputs.full-version }} --no-push --no-commit-hooks --force-publish --yes
- run: pnpm lerna version ${{ steps.get-version.outputs.full-version }} --no-push --no-commit-hooks --force-publish --yes
shell: bash
- run: yarn conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2
- run: pnpm conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2
shell: bash
- run: >-
node -e "fs.writeFileSync(
Expand All @@ -56,9 +56,9 @@ runs:
)"
shell: bash
working-directory: ./packages/vuetify
- run: yarn lerna run build --scope @vuetify/nightly
- run: pnpm lerna run build --scope @vuetify/nightly
shell: bash
- run: yarn lerna run build --scope @vuetify/api-generator
- run: pnpm lerna run build --scope @vuetify/api-generator
shell: bash
- name: NPM Release
run: |
Expand Down
17 changes: 17 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pnpm install
description: Restore node_modules and cache, then run pnpm install

runs:
using: composite
steps:
- uses: actions/cache@v4
with:
path: |
node_modules
**/node_modules
/home/runner/.cache/pnpm
/home/runner/.cache/Cypress
key: pnpm-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4
- run: pnpm i --frozen-lockfile
shell: bash
17 changes: 0 additions & 17 deletions .github/actions/yarn-install/action.yml

This file was deleted.

34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/yarn-install
- run: yarn build vuetify
- uses: ./.github/actions/pnpm-install
- run: pnpm build vuetify
- uses: ./.github/actions/upload-artifact
with:
name: vuetify-dist
Expand All @@ -54,8 +54,8 @@ jobs:
- uses: ./.github/actions/download-artifact
with:
name: vuetify-dist
- uses: ./.github/actions/yarn-install
- run: yarn lerna run lint $SCOPES
- uses: ./.github/actions/pnpm-install
- run: pnpm lerna run lint $SCOPES
env:
SCOPES: ${{ matrix.scopes }}

Expand All @@ -66,8 +66,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/yarn-install
- run: yarn run test:coverage -i
- uses: ./.github/actions/pnpm-install
- run: pnpm run test:coverage -i
working-directory: ./packages/vuetify
- uses: codecov/codecov-action@v4

Expand All @@ -78,13 +78,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/yarn-install
- run: yarn cy:run --record --parallel --ci-build-id $GITHUB_RUN_ID
- uses: ./.github/actions/pnpm-install
- run: pnpm cy:run --record --parallel --ci-build-id $GITHUB_RUN_ID
if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' }}
working-directory: ./packages/vuetify
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- run: yarn cy:run
- run: pnpm cy:run
if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner != 'vuetifyjs' }}
working-directory: ./packages/vuetify
- uses: actions/upload-artifact@v3
Expand All @@ -105,8 +105,8 @@ jobs:
- uses: ./.github/actions/download-artifact
with:
name: vuetify-dist
- uses: ./.github/actions/yarn-install
- run: yarn build api
- uses: ./.github/actions/pnpm-install
- run: pnpm build api
- run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: NPM Release
run: bash scripts/deploy.sh
Expand All @@ -115,7 +115,7 @@ jobs:
RELEASE_TAG: ${{ env.RELEASE_TAG }}
- name: GitHub release
id: create_release
run: yarn conventional-github-releaser -p vuetify
run: pnpm conventional-github-releaser -p vuetify
env:
DEBUG: '*'
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -130,10 +130,10 @@ jobs:
- uses: ./.github/actions/download-artifact
with:
name: vuetify-dist
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/pnpm-install
- uses: ./.github/actions/download-locales
- run: yarn build api
- run: yarn build docs
- run: pnpm build api
- run: pnpm build docs
env:
NODE_OPTIONS: --max-old-space-size=4096
VITE_COSMIC_2_BUCKET_SLUG: ${{ secrets.COSMIC_2_BUCKET_SLUG }}
Expand Down Expand Up @@ -161,8 +161,8 @@ jobs:
- uses: ./.github/actions/download-artifact
with:
name: docs-dist
- uses: ./.github/actions/yarn-install
- run: yarn global add vercel
- uses: ./.github/actions/pnpm-install
- run: pnpm add vercel --global
- run: node scripts/deploy-and-alias.js ${{ github.ref }}
env:
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}
17 changes: 7 additions & 10 deletions .github/workflows/crowdin-uploads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ env:
jobs:
upload-to-crowdin:
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Upload
uses: crowdin/github-action@v1.19.0
with:
config: crowdin.yml
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
- name: Checkout
uses: actions/checkout@v4
- name: Upload
uses: crowdin/github-action@v1.19.0
with:
config: crowdin.yml
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
4 changes: 2 additions & 2 deletions .github/workflows/nightly-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
echo "Last commit was more than 24 hours ago, skipping tests"
exit 1
fi
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/pnpm-install
- run: echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- run: yarn cy:run
- run: pnpm cy:run
working-directory: ./packages/vuetify
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=false
ignore-workspace-root-check=true
20 changes: 20 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
hooks: {
readPackage (pkg, context) {
if (pkg.name === 'vite-ssr') {
delete pkg.dependencies['react-router-dom']
delete pkg.dependencies['react-ssr-prepass']
pkg.peerDependencies.vite = '*'
pkg.peerDependencies['@vueuse/head'] = '*'
pkg.peerDependencies['@vitejs/plugin-vue'] = '*'
}
if (['vite-plugin-warmup', 'unplugin-fonts', 'vite-plugin-md'].includes(pkg.name)) {
pkg.peerDependencies.vite = '*'
}
if (['@rollup/pluginutils', 'rollup-plugin-terser', '@rollup/plugin-replace'].includes(pkg.name)) {
pkg.peerDependencies.rollup = '*'
}
return pkg
}
}
}
Loading

0 comments on commit e4d9cf4

Please sign in to comment.