Skip to content

Commit 7f8e550

Browse files
chore: migrate the monorepo to pnpm (#16990)
* chore: migrate to pnpm * feat(app-vite&app-webpack): improve package manager references in banners * chore: remove npm reference in dev app uploader page * docs: upgrade contribution guide * chore: correctly include extras in workspaces * chore: include create-quasar in workspaces * chore: centralize .editorconfig * chore: remove yarn.lock * chore: only allow pnpm * chore: centralize linting packages and config * chore: create shared eslint config package * chore: remove redundant pnpm.peerDependencyRules.ignoreMissing it needs to be specified in the root since we are using pnpm workspaces but, it doesn't seem to be changing any behavior, so it's redundant * chore: include cli in workspaces * ci: ensure pnpm is installed and cache is set correctly * chore: generate pnpm lock file after rebase * chore: tidy up eslintignore * chore: setup root lint script * chore: include app-webpack in workspaces * chore: update vscode config * chore: update .github/CONTRIBUTING.md * chore: regenerate lock file * ci: fix create test project script after migrating to pnpm workspaces, some behavior got changed 1. prompts package named imports are not working. This is probably due to switching to a different version during migration, rather than a pnpm specific issue. 2. When using pnpm to create the test project, it becomes part of the monorepo, which makes it fail to install properly. * ci: fix weird test creation test issue with yarn * Revert "ci: fix weird test creation test issue with yarn" This reverts commit 5fcaa12. * ci: fix weird test creation test issue with yarn yarnpkg/yarn#9015 * ci: apply skip yarn corepack check to other scripts as well but still keep it in create-test-project script to avoid the problem when executing the script in different environments * ci: cache Cypress binary to fix tests on pr workflow * ci: install Cypress binary when cache does not exit and correctly cache it * chore(ui): fix tests not being able to run
1 parent 146e910 commit 7f8e550

File tree

111 files changed

+13168
-10078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+13168
-10078
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# http://editorconfig.org
12
root = true
23

34
[*]

.eslintignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
/app-vite/templates
2-
/app-webpack/templates
3-
/icongenie/samples
4-
/ui/types
5-
/utils/render-ssr-error/src-ui/dist
6-
/utils/render-ssr-error/src-ui/.quasar
1+
node_modules

.eslintrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require('@rushstack/eslint-patch/modern-module-resolution')
2+
3+
module.exports = {
4+
root: true,
5+
6+
parserOptions: {
7+
ecmaVersion: 'latest'
8+
},
9+
10+
extends: [
11+
'eslint:recommended',
12+
'quasar/base',
13+
'quasar/node'
14+
]
15+
}

.github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Quasar Contributing Guide
22

3-
The guide can be found [here](../CONTRIBUTING.md).
3+
Hi! We are really excited that you are interested in contributing to Quasar 👏.
4+
Please visit our website to view the [Contribution Guide](https://quasar.dev/how-to-contribute/contribution-guide).

.github/workflows/build-types.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,22 @@ jobs:
5454
steps:
5555
- uses: actions/checkout@v4
5656

57+
- name: Setup pnpm
58+
uses: pnpm/action-setup@v3
59+
5760
- uses: actions/setup-node@v4
5861
with:
5962
node-version: 20
60-
# No caching because we are not checking lock files in
63+
cache: 'pnpm'
6164

6265
- name: Install dependencies
63-
run: yarn
66+
run: pnpm i
6467

6568
- name: Ensure types are formatted correctly
66-
run: yarn format:types --write=false --check
69+
run: pnpm format:types --write=false --check
6770

6871
- name: Build the types
69-
run: yarn build js types
72+
run: pnpm build js types
7073

7174
- if: ${{ github.event_name == 'pull_request' }}
7275
run: |

.github/workflows/project-creation-tests.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@ jobs:
4040
- name: Checkout code
4141
uses: actions/checkout@v4
4242

43+
- name: Setup pnpm
44+
uses: pnpm/action-setup@v3
45+
4346
- name: Setup Node
4447
uses: actions/setup-node@v4
4548
with:
4649
node-version: 20
47-
# create-quasar is not included in workspaces, and its yarn.lock is .gitignored, so we can't have caching
48-
# cache: 'yarn'
50+
cache: 'pnpm'
4951

5052
- name: Install dependencies
51-
run: yarn
53+
run: pnpm i
5254

5355
- name: Lint the code
54-
run: yarn lint
56+
run: pnpm lint
5557

5658
test:
5759
needs: lint
@@ -61,6 +63,10 @@ jobs:
6163

6264
runs-on: ubuntu-latest
6365

66+
env:
67+
# See https://github.com/yarnpkg/yarn/issues/9015
68+
SKIP_YARN_COREPACK_CHECK: 1
69+
6470
defaults:
6571
run:
6672
working-directory: create-quasar
@@ -79,22 +85,19 @@ jobs:
7985
- name: Checkout code
8086
uses: actions/checkout@v4
8187

88+
- name: Setup pnpm
89+
uses: pnpm/action-setup@v3
90+
8291
- name: Setup Node
8392
uses: actions/setup-node@v4
8493
with:
8594
node-version: ${{ matrix.node-version }}
86-
# create-quasar is not included in workspaces, and its yarn.lock is .gitignored, so we can't have caching
87-
# cache: 'yarn'
95+
cache: 'pnpm'
8896

8997
- name: Install dependencies
90-
run: yarn
98+
run: pnpm i
9199

92100
# pnpm
93-
- name: Install pnpm
94-
if: ${{ matrix.package-manager == 'pnpm' }}
95-
uses: pnpm/action-setup@v3
96-
with:
97-
version: 8
98101
- name: Get pnpm store directory
99102
if: ${{ matrix.package-manager == 'pnpm' }}
100103
id: pnpm-cache
@@ -143,7 +146,7 @@ jobs:
143146
npm-cache-
144147
145148
- name: Create the test project
146-
run: yarn create-test-project ${{ matrix.script-type }} ${{ matrix.app-engine }} ${{ matrix.package-manager }}
149+
run: pnpm create-test-project ${{ matrix.script-type }} ${{ matrix.app-engine }} ${{ matrix.package-manager }}
147150

148151
- name: Lint the project
149152
working-directory: create-quasar/test-project

.github/workflows/release-notes.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ jobs:
1717
with:
1818
ref: dev
1919

20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v3
22+
2023
- uses: actions/setup-node@v4
2124
with:
2225
node-version: 20
23-
cache: 'yarn'
26+
cache: 'pnpm'
2427

25-
- run: yarn install
26-
working-directory: docs
28+
- name: Install dependencies
29+
run: pnpm i
2730

2831
- name: Generate Release Notes
2932
uses: actions/github-script@v7

.github/workflows/tests-on-pr.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ jobs:
2525
- name: Checkout code
2626
uses: actions/checkout@v4
2727

28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v3
30+
2831
- name: Setup Node
2932
uses: actions/setup-node@v4
3033
with:
3134
node-version: 20
32-
cache: 'yarn'
35+
cache: 'pnpm'
3336

3437
- name: Install dependencies
35-
run: yarn
38+
run: pnpm i
3639

3740
- name: Build the UI package
3841
working-directory: ui
39-
run: yarn build
42+
run: pnpm build
4043

4144
- name: Upload UI build artifact
4245
uses: actions/upload-artifact@v4
@@ -46,7 +49,7 @@ jobs:
4649

4750
- name: Build vite-plugin package
4851
working-directory: vite-plugin
49-
run: yarn build
52+
run: pnpm build
5053

5154
- name: Upload vite-plugin build artifact
5255
uses: actions/upload-artifact@v4
@@ -78,14 +81,36 @@ jobs:
7881
- name: Checkout code
7982
uses: actions/checkout@v4
8083

84+
- name: Setup pnpm
85+
uses: pnpm/action-setup@v3
86+
8187
- name: Setup Node
8288
uses: actions/setup-node@v4
8389
with:
8490
node-version: 20
85-
cache: 'yarn'
91+
cache: 'pnpm'
8692

8793
- name: Install dependencies
88-
run: yarn
94+
run: pnpm i
95+
96+
# We have to cache Cypress binary as well (https://on.cypress.io/not-installed-ci-error)
97+
- name: Get Cypress version
98+
id: cypress-version
99+
working-directory: ui
100+
run: |
101+
echo "CYPRESS_VERSION=$(pnpm why cypress --depth 0 --json | jq -r '.[0].devDependencies.cypress.version')" > $GITHUB_OUTPUT
102+
- name: Cache Cypress binary
103+
id: cypress-cache
104+
uses: actions/cache@v4
105+
with:
106+
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
107+
path: ~/.cache/Cypress
108+
key: cypress-cache-${{ steps.cypress-version.outputs.CYPRESS_VERSION }}
109+
restore-keys: |
110+
cypress-cache-
111+
- name: Install Cypress
112+
if: steps.cypress-cache.outputs.cache-hit != 'true'
113+
run: pnpm cypress install
89114

90115
- name: Download UI build artifact
91116
uses: actions/download-artifact@v4
@@ -105,7 +130,7 @@ jobs:
105130
CYPRESS_JUNIT_RESULTS_FILENAME: test-results/${{ matrix.browser }}/[hash].xml
106131
with:
107132
install: false
108-
command: yarn test:component:run --browser ${{ matrix.browser }}
133+
command: pnpm test:component:run --browser ${{ matrix.browser }}
109134
working-directory: ui
110135

111136
# Upload required artifacts to be used in tests-on-pr-report.yml

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
.Thumbs.db
33
*.sublime*
44
.idea/
5-
**/yarn.lock
65
debug.log
7-
package-lock.json
86

97
ui/.vscode/
108

119
node_modules/
10+
yarn.lock
11+
package-lock.json

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pnpm-related options
2+
shamefully-hoist=true
3+
strict-peer-dependencies=false

0 commit comments

Comments
 (0)