From 35ad74f8a32c00855377bb73c735d4deaccab092 Mon Sep 17 00:00:00 2001 From: Greg L Date: Thu, 23 Nov 2023 13:33:52 -0500 Subject: [PATCH] - Updated workflow and pre-commit to work with PNPM, modified package.json to preinstall PNPM only. --- .github/workflows/main.yml | 8 ++++---- .husky/pre-commit | 4 ++-- package.json | 1 + packages/components/package.json | 1 + packages/server/package.json | 1 + packages/ui/package.json | 1 + 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 759f195f7..200202b26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,10 +28,10 @@ jobs: with: node-version: ${{ matrix.node-version }} - - run: npm i -g yarn + - run: npm i -g pnpm - - run: yarn install --ignore-engines + - run: pnpm install - - run: yarn lint + - run: pnpm lint - - run: yarn build + - run: pnpm build diff --git a/.husky/pre-commit b/.husky/pre-commit index 7aba04762..8e47731fc 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -yarn quick # prettify -yarn lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first) \ No newline at end of file +pnpm quick # prettify +pnpm lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first) diff --git a/package.json b/package.json index b8a90d52e..c414d48c6 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "components" ], "scripts": { + "preinstall": "npx only-allow pnpm", "dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev", "build": "pnpm --filter \"./packages/**\" build", "start": "kill-port 3000 && run-script-os", diff --git a/packages/components/package.json b/packages/components/package.json index dc19b591e..8aff672bb 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -5,6 +5,7 @@ "main": "dist/src/index", "types": "dist/src/index.d.ts", "scripts": { + "preinstall": "npx only-allow pnpm", "build": "tsc && gulp", "dev": "tsc --watch" }, diff --git a/packages/server/package.json b/packages/server/package.json index 741bf0f61..1e9286952 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -20,6 +20,7 @@ "commands": "./dist/commands" }, "scripts": { + "preinstall": "npx only-allow pnpm", "build": "tsc", "start": "run-script-os", "start:windows": "cd bin && run start", diff --git a/packages/ui/package.json b/packages/ui/package.json index 681f8857d..432ceb383 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -59,6 +59,7 @@ "yup": "^0.32.9" }, "scripts": { + "preinstall": "npx only-allow pnpm", "dev": "vite", "build": "vite build" },