Skip to content

Commit

Permalink
chore: switch to pnpm instead of yarn (#1653)
Browse files Browse the repository at this point in the history
* chore: switch to pnpm instead of yarn

Fixes #1652

Signed-off-by: Jeff MAURY <[email protected]>

* fix: increase memory size for eslint

Signed-off-by: Jeff MAURY <[email protected]>

* fix: add missing dependency

Signed-off-by: Jeff MAURY <[email protected]>

* fix: update pnpm lock file

Signed-off-by: Jeff MAURY <[email protected]>

* fix: add svelte to workspace dev dependencies to fix lint issue

Signed-off-by: Jeff MAURY <[email protected]>

* fix: use pnpm 9.9.0

Signed-off-by: Jeff MAURY <[email protected]>

* fix: update node configuration

Signed-off-by: Jeff MAURY <[email protected]>

* fix: add missing pnpm-workspace.yaml

Signed-off-by: Jeff MAURY <[email protected]>

* fix: update pnpm-lock.yaml

Signed-off-by: Jeff MAURY <[email protected]>

* fix: update pnpm-lock.yaml

Signed-off-by: Jeff MAURY <[email protected]>

* fix: revert postman-code-generators to 1.10.1

Signed-off-by: Jeff MAURY <[email protected]>

* fix: remove unneeded root dependency

Signed-off-by: Jeff MAURY <[email protected]>

---------

Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury authored Sep 10, 2024
1 parent a648ca0 commit 99ae73f
Show file tree
Hide file tree
Showing 11 changed files with 9,996 additions and 7,828 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/build-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 20

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}
run_install: false

- uses: actions/cache@v4
id: yarn-cache
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'pnpm'

- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npx yarn --frozen-lockfile --network-timeout 180000
- name: Execute pnpm
run: pnpm install

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

- name: Login to ghcr.io
run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/e2e-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ jobs:
ref: main
path: podman-desktop

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

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

- name: Update podman
run: |
Expand Down Expand Up @@ -106,18 +112,18 @@ jobs:

- name: Ensure getting current HEAD version of the test framework
working-directory: ./podman-desktop-extension-ai-lab/tests/playwright
run: yarn add -D @podman-desktop/tests-playwright@next
run: pnpm add -D @podman-desktop/tests-playwright@next

- name: Execute yarn in AI Lab Extension
- name: Execute pnpm in AI Lab Extension
working-directory: ./podman-desktop-extension-ai-lab
run: yarn --frozen-lockfile
run: pnpm install

- name: Run All E2E tests
working-directory: ./podman-desktop-extension-ai-lab
env:
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
AI_LAB_CI_RUN: true
run: yarn test:e2e
run: pnpm test:e2e

- uses: actions/upload-artifact@v4
if: always()
Expand Down
47 changes: 13 additions & 34 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,55 +30,34 @@ jobs:
os: [windows-2022, ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Get yarn cache directory path (Windows)
if: ${{ matrix.os=='windows-2022' }}
id: yarn-cache-dir-path-windows
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}

- name: Get yarn cache directory path (mac/Linux)
if: ${{ matrix.os=='ubuntu-22.04'}}
id: yarn-cache-dir-path-unix
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
if: ${{ matrix.os=='windows-2022' }}
id: yarn-cache-windows
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
path: ${{ steps.yarn-cache-dir-path-windows.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
run_install: false

- uses: actions/cache@v4
if: ${{ matrix.os=='ubuntu-22.04'}}
id: yarn-cache-unix
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path-unix.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'pnpm'

- name: Execute yarn
run: yarn --frozen-lockfile --network-timeout 180000
- name: Execute pnpm
run: pnpm install

- name: Run linter
run: yarn lint:check
run: pnpm lint:check

- name: Run formatter
run: yarn format:check
run: pnpm format:check

- name: Run unit tests
run: yarn test:unit
run: pnpm test:unit

- name: Run typecheck
run: yarn typecheck
run: pnpm typecheck

- name: Run svelte check
run: yarn svelte:check
run: pnpm svelte:check

# Check we don't have changes in git
- name: Check no changes in git
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,28 +120,21 @@ jobs:
with:
ref: ${{ needs.tag.outputs.githubTag }}

- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 20

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}
run_install: false

- uses: actions/cache@v4
id: yarn-cache
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'pnpm'

- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npx yarn --frozen-lockfile --network-timeout 180000
run: pnpm install

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

- name: Login to ghcr.io
run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node-linker=hoisted

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"npm": ">=10.2.3"
},
"scripts": {
"build": "concurrently \"yarn --cwd packages/frontend build\" \"yarn --cwd packages/backend build\"",
"watch": "concurrently \"yarn --cwd packages/frontend watch\" \"yarn --cwd packages/backend watch\"",
"build": "concurrently \"cd packages/frontend && npm run build\" \"cd packages/backend && npm run build\"",
"watch": "concurrently \"cd packages/frontend && npm run watch\" \"cd packages/backend && npm run watch\"",
"format:check": "prettier --check \"**/src/**/*.{ts,svelte}\"",
"format:fix": "prettier --write \"**/src/**/*.{ts,svelte}\"",
"lint:check": "eslint . --cache",
Expand All @@ -25,12 +25,13 @@
"test:e2e": "cd tests/playwright && npm run test:e2e",
"typecheck:shared": "tsc --noEmit --project packages/shared",
"typecheck:frontend": "tsc --noEmit --project packages/frontend",
"typecheck:backend": "yarn --cwd packages/backend typecheck",
"typecheck:backend": "cd packages/backend && npm run typecheck",
"typecheck": "npm run typecheck:shared && npm run typecheck:frontend && npm run typecheck:backend"
},
"resolutions": {
"string-width": "^4.2.0",
"wrap-ansi": "^7.0.0"
"wrap-ansi": "^7.0.0",
"postman-code-generators": "1.10.1"
},
"devDependencies": {
"@eslint/compat": "^1.1.1",
Expand Down Expand Up @@ -68,5 +69,6 @@
},
"dependencies": {
"js-yaml": "^4.1.0"
}
},
"packageManager": "[email protected]+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
}
8 changes: 4 additions & 4 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
}
},
"scripts": {
"generate": "yarn openapi-typescript ../../api/openapi.yaml -o src-generated/openapi.ts",
"build": "yarn generate && vite build",
"generate": "npx openapi-typescript ../../api/openapi.yaml -o src-generated/openapi.ts",
"build": "npm run generate && vite build",
"test": "vitest run --coverage",
"test:watch": "vitest watch --coverage",
"format:check": "prettier --check \"src/**/*.ts\"",
"format:fix": "prettier --write \"src/**/*.ts\"",
"watch": "yarn generate && vite --mode development build -w",
"typecheck": "yarn generate && tsc --noEmit"
"watch": "npm run generate && npx vite --mode development build -w",
"typecheck": "npm run generate && tsc --noEmit"
},
"dependencies": {
"@huggingface/gguf": "^0.1.10",
Expand Down
Loading

0 comments on commit 99ae73f

Please sign in to comment.