From ad6f3e5b6e9198f2b5ae100b9f6a5ed7e762543f Mon Sep 17 00:00:00 2001 From: Shaswot Subedi Date: Fri, 31 Oct 2025 10:38:37 +0000 Subject: [PATCH] Update to pnpm v10 and add workspace injection Upgraded pnpm version requirement and installation instructions from v9 to v10 in workflow, README, and package.json. Added 'injectWorkspacePackages: true' to pnpm config files for improved workspace package management. --- .github/workflows/unit-test.yml | 2 +- README.md | 4 +++- examplePlugins/hybrid/v1/package.json | 4 ++++ package.json | 2 +- pnpm-lock.yaml | 1 + pnpm-workspace.yaml | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 18def6a..b4555bb 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -20,7 +20,7 @@ jobs: node-version: '20.x' - name: Install PNPM - run: npm install -g pnpm@9 + run: npm install -g pnpm@10 timeout-minutes: 5 - name: Install Dependencies diff --git a/README.md b/README.md index a5abd69..fb1c05b 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,11 @@ A plugin is a directory in this repo of the form `plugins/`_plugin-name_`/v1` co Ensure `pnpm` is installed by running `pnpm -version`. If its not installed it can be installed by running the following command: ```bash - npm install --location=global pnpm@9 + npm install --location=global pnpm@10 ``` + If older version of `pnpm` is installed it can be upgraded by following `pnpm` update [documentation](https://pnpm.io/cli/self-update) + | **Description** | **Command** | **Notes** | | ------------------------------- | --------------------------- | -------------------------------------- | | Install all packages | `pnpm i` | e.g. after merging main | diff --git a/examplePlugins/hybrid/v1/package.json b/examplePlugins/hybrid/v1/package.json index 295f891..fde5595 100644 --- a/examplePlugins/hybrid/v1/package.json +++ b/examplePlugins/hybrid/v1/package.json @@ -4,6 +4,10 @@ "type": "module", "author": "someone", "license": "ISC", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "unitTest": "pnpm -w run test --ci --path=plugins/ExamplePlugin/v1" + }, "dependencies": { "lodash": "^4.17.21" } diff --git a/package.json b/package.json index 3aabb0d..6d0b4ea 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "engines": { "node": ">=20", - "pnpm": ">=8" + "pnpm": ">=10" }, "homepage": "https://github.com/squaredup/squaredup-plugin-public#readme", "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90812fb..31a74ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,6 +3,7 @@ lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false + injectWorkspacePackages: true importers: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6137ce4..50005d5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,3 +3,5 @@ packages: - 'scripts/**' - 'examplePlugins/**' - 'packages/**' + +injectWorkspacePackages: true