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

chore: migrate the monorepo to pnpm #16990

Merged
merged 29 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3c345a9
chore: migrate to pnpm
yusufkandemir Mar 8, 2024
747ce40
feat(app-vite&app-webpack): improve package manager references in ban…
yusufkandemir Mar 8, 2024
c146ecb
chore: remove npm reference in dev app uploader page
yusufkandemir Mar 11, 2024
636f08b
docs: upgrade contribution guide
yusufkandemir Mar 11, 2024
d9ef9eb
chore: correctly include extras in workspaces
yusufkandemir Mar 11, 2024
9b3dde4
chore: include create-quasar in workspaces
yusufkandemir Mar 11, 2024
6594d74
chore: centralize .editorconfig
yusufkandemir Mar 11, 2024
6daf39b
chore: remove yarn.lock
yusufkandemir Mar 11, 2024
3512049
chore: only allow pnpm
yusufkandemir Mar 11, 2024
dab74cd
chore: centralize linting packages and config
yusufkandemir Mar 12, 2024
9cab907
chore: create shared eslint config package
yusufkandemir Mar 12, 2024
8fbff0c
chore: remove redundant pnpm.peerDependencyRules.ignoreMissing
yusufkandemir Mar 12, 2024
2b936c5
chore: include cli in workspaces
yusufkandemir Mar 12, 2024
d8e9b46
ci: ensure pnpm is installed and cache is set correctly
yusufkandemir Mar 12, 2024
394e83c
chore: generate pnpm lock file after rebase
yusufkandemir Mar 12, 2024
1161c1f
chore: tidy up eslintignore
yusufkandemir Mar 12, 2024
18a7337
chore: setup root lint script
yusufkandemir Mar 12, 2024
deef29c
chore: include app-webpack in workspaces
yusufkandemir Mar 12, 2024
8cc34be
chore: update vscode config
yusufkandemir Mar 12, 2024
87c1f09
chore: update .github/CONTRIBUTING.md
yusufkandemir Mar 12, 2024
c446bd6
chore: regenerate lock file
yusufkandemir Mar 12, 2024
c70d912
ci: fix create test project script
yusufkandemir Mar 12, 2024
5fcaa12
ci: fix weird test creation test issue with yarn
yusufkandemir Mar 12, 2024
f0b1fb2
Revert "ci: fix weird test creation test issue with yarn"
yusufkandemir Mar 12, 2024
64577ec
ci: fix weird test creation test issue with yarn
yusufkandemir Mar 12, 2024
001ed89
ci: apply skip yarn corepack check to other scripts as well
yusufkandemir Mar 12, 2024
4b8d89b
ci: cache Cypress binary to fix tests on pr workflow
yusufkandemir Mar 12, 2024
b11ff63
ci: install Cypress binary when cache does not exit
yusufkandemir Mar 12, 2024
4a4c01c
chore(ui): fix tests not being able to run
yusufkandemir Mar 12, 2024
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
1 change: 1 addition & 0 deletions ui/dev/.editorconfig → .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# http://editorconfig.org
root = true

[*]
Expand Down
7 changes: 1 addition & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
/app-vite/templates
/app-webpack/templates
/icongenie/samples
/ui/types
/utils/render-ssr-error/src-ui/dist
/utils/render-ssr-error/src-ui/.quasar
node_modules
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,

parserOptions: {
ecmaVersion: 'latest'
},

extends: [
'eslint:recommended',
'quasar/base',
'quasar/node'
]
}
3 changes: 2 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Quasar Contributing Guide

The guide can be found [here](../CONTRIBUTING.md).
Hi! We are really excited that you are interested in contributing to Quasar 👏.
Please visit our website to view the [Contribution Guide](https://quasar.dev/how-to-contribute/contribution-guide).
11 changes: 7 additions & 4 deletions .github/workflows/build-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- uses: actions/setup-node@v4
with:
node-version: 20
# No caching because we are not checking lock files in
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm i

- name: Ensure types are formatted correctly
run: yarn format:types --write=false --check
run: pnpm format:types --write=false --check

- name: Build the types
run: yarn build js types
run: pnpm build js types

- if: ${{ github.event_name == 'pull_request' }}
run: |
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/project-creation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
# create-quasar is not included in workspaces, and its yarn.lock is .gitignored, so we can't have caching
# cache: 'yarn'
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm i

- name: Lint the code
run: yarn lint
run: pnpm lint

test:
needs: lint
Expand All @@ -61,6 +63,10 @@ jobs:

runs-on: ubuntu-latest

env:
# See https://github.com/yarnpkg/yarn/issues/9015
SKIP_YARN_COREPACK_CHECK: 1

defaults:
run:
working-directory: create-quasar
Expand All @@ -79,22 +85,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# create-quasar is not included in workspaces, and its yarn.lock is .gitignored, so we can't have caching
# cache: 'yarn'
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm i

# pnpm
- name: Install pnpm
if: ${{ matrix.package-manager == 'pnpm' }}
uses: pnpm/action-setup@v3
with:
version: 8
- name: Get pnpm store directory
if: ${{ matrix.package-manager == 'pnpm' }}
id: pnpm-cache
Expand Down Expand Up @@ -143,7 +146,7 @@ jobs:
npm-cache-

- name: Create the test project
run: yarn create-test-project ${{ matrix.script-type }} ${{ matrix.app-engine }} ${{ matrix.package-manager }}
run: pnpm create-test-project ${{ matrix.script-type }} ${{ matrix.app-engine }} ${{ matrix.package-manager }}

- name: Lint the project
working-directory: create-quasar/test-project
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jobs:
with:
ref: dev

- name: Setup pnpm
uses: pnpm/action-setup@v3

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'

- run: yarn install
working-directory: docs
- name: Install dependencies
run: pnpm i

- name: Generate Release Notes
uses: actions/github-script@v7
Expand Down
39 changes: 32 additions & 7 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm i

- name: Build the UI package
working-directory: ui
run: yarn build
run: pnpm build

- name: Upload UI build artifact
uses: actions/upload-artifact@v4
Expand All @@ -46,7 +49,7 @@ jobs:

- name: Build vite-plugin package
working-directory: vite-plugin
run: yarn build
run: pnpm build

- name: Upload vite-plugin build artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -78,14 +81,36 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm i

# We have to cache Cypress binary as well (https://on.cypress.io/not-installed-ci-error)
- name: Get Cypress version
id: cypress-version
working-directory: ui
run: |
echo "CYPRESS_VERSION=$(pnpm why cypress --depth 0 --json | jq -r '.[0].devDependencies.cypress.version')" > $GITHUB_OUTPUT
- name: Cache Cypress binary
id: cypress-cache
uses: actions/cache@v4
with:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
path: ~/.cache/Cypress
key: cypress-cache-${{ steps.cypress-version.outputs.CYPRESS_VERSION }}
restore-keys: |
cypress-cache-
- name: Install Cypress
if: steps.cypress-cache.outputs.cache-hit != 'true'
run: pnpm cypress install

- name: Download UI build artifact
uses: actions/download-artifact@v4
Expand All @@ -105,7 +130,7 @@ jobs:
CYPRESS_JUNIT_RESULTS_FILENAME: test-results/${{ matrix.browser }}/[hash].xml
with:
install: false
command: yarn test:component:run --browser ${{ matrix.browser }}
command: pnpm test:component:run --browser ${{ matrix.browser }}
working-directory: ui

# Upload required artifacts to be used in tests-on-pr-report.yml
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
.Thumbs.db
*.sublime*
.idea/
**/yarn.lock
debug.log
package-lock.json

ui/.vscode/

node_modules/
yarn.lock
package-lock.json
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pnpm-related options
shamefully-hoist=true
strict-peer-dependencies=false
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"vue.volar"
],
"vue.volar",
"editorconfig.editorconfig"
]
}
14 changes: 12 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"eslint.format.enable": false,
"editor.formatOnSave": false,
"eslint.workingDirectories": ["./docs", "./ui"],
"eslint.workingDirectories": [
"./app-vite",
"./app-webpack",
"./cli",
"./create-quasar",
"./docs",
"./ui",
"./utils/render-ssr-error",
"./utils/ssl-certificate",
"./vite-plugin"
],
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "vue"],
"eslint.validate": ["javascript", "vue"]
}
Loading
Loading