From 01a4ffeb8b2e67067ff4735d10f2ed36ba8b2858 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Wed, 21 Jan 2026 15:41:00 +0100 Subject: [PATCH 1/4] :arrow_up: Updated plugins release to 1.4.0 (#8148) --- frontend/package.json | 2 +- frontend/yarn.lock | 20 ++++++------ plugins/CHANGELOG.md | 31 +++++++++++++++++++ plugins/docs/publish-package.md | 37 +++++++++++++++-------- plugins/libs/plugin-types/package.json | 2 +- plugins/libs/plugins-runtime/package.json | 4 +-- plugins/libs/plugins-styles/package.json | 2 +- plugins/pnpm-lock.yaml | 14 +++------ plugins/tools/scripts/publish.ts | 11 ------- 9 files changed, 74 insertions(+), 49 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index a1a89771b1..df11969036 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,7 +54,7 @@ "devDependencies": { "@penpot/draft-js": "portal:./packages/draft-js", "@penpot/mousetrap": "portal:./packages/mousetrap", - "@penpot/plugins-runtime": "1.3.2", + "@penpot/plugins-runtime": "1.4.0", "@penpot/svgo": "penpot/svgo#v3.2", "@penpot/text-editor": "portal:./text-editor", "@playwright/test": "1.57.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 7b6b7718c1..46f749ead1 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1191,21 +1191,21 @@ __metadata: languageName: node linkType: soft -"@penpot/plugin-types@npm:^1.3.2": - version: 1.3.2 - resolution: "@penpot/plugin-types@npm:1.3.2" - checksum: 10c0/3f624472c260721ad89bf8d944e75acf6a9c9577271a757acb77574102213914051d1a32d5ab16e6ba16ae077fff78cf7a0f6d11d18351dfc214426677a67468 +"@penpot/plugin-types@npm:^1.4.0": + version: 1.4.0 + resolution: "@penpot/plugin-types@npm:1.4.0" + checksum: 10c0/bd97a17e7083efa307260dcaec841596012ae65964a947738a6ef5d6114b161616f3cf83fa21ed7ede322334c25f1c3cd4027a5409ce336f40455681a4ea192d languageName: node linkType: hard -"@penpot/plugins-runtime@npm:1.3.2": - version: 1.3.2 - resolution: "@penpot/plugins-runtime@npm:1.3.2" +"@penpot/plugins-runtime@npm:1.4.0": + version: 1.4.0 + resolution: "@penpot/plugins-runtime@npm:1.4.0" dependencies: - "@penpot/plugin-types": "npm:^1.3.2" + "@penpot/plugin-types": "npm:^1.4.0" ses: "npm:^1.1.0" zod: "npm:^3.22.4" - checksum: 10c0/b6d2cb3a57bcbe58232db52b8224d1817495e96b34997bfa72421629b5f34a8c9cc71357c315dcab9d52ea036ed632a5efe0ac50f52e730901c02d498dfa1313 + checksum: 10c0/497c36c8e0edb7bc8e5ca60ab89fbc0f63e96adab6733bd7244df53921395e31743f37f9a28e57139009d1c65bee181f972f23bc821d2c1e0f05ce610b473ac1 languageName: node linkType: hard @@ -4176,7 +4176,7 @@ __metadata: dependencies: "@penpot/draft-js": "portal:./packages/draft-js" "@penpot/mousetrap": "portal:./packages/mousetrap" - "@penpot/plugins-runtime": "npm:1.3.2" + "@penpot/plugins-runtime": "npm:1.4.0" "@penpot/svgo": "penpot/svgo#v3.2" "@penpot/text-editor": "portal:./text-editor" "@playwright/test": "npm:1.57.0" diff --git a/plugins/CHANGELOG.md b/plugins/CHANGELOG.md index 67b0b183fa..b36a5386dc 100644 --- a/plugins/CHANGELOG.md +++ b/plugins/CHANGELOG.md @@ -1,3 +1,34 @@ +## 1.4.0 (2026-01-21) + +### 🚀 Features + +- switch component ([7d68450](https://github.com/penpot/penpot-plugins/commit/7d68450)) +- Add variants to plugins API ([04f3c26](https://github.com/penpot/penpot-plugins/commit/04f3c26)) +- format ci job ([17b5834](https://github.com/penpot/penpot-plugins/commit/17b5834)) +- fix problem with ci ([4b3c50f](https://github.com/penpot/penpot-plugins/commit/4b3c50f)) +- change in workflow ([3a69f51](https://github.com/penpot/penpot-plugins/commit/3a69f51)) +- **plugin-types:** add methods to modify the index for shapes ([4ad50af](https://github.com/penpot/penpot-plugins/commit/4ad50af)) +- **plugin-types:** change content type and added new attributes ([dbb68a5](https://github.com/penpot/penpot-plugins/commit/dbb68a5)) +- **plugins-runtime:** add data method to image data ([f077481](https://github.com/penpot/penpot-plugins/commit/f077481)) +- **plugins-runtime:** fix problem with linter ([30f4984](https://github.com/penpot/penpot-plugins/commit/30f4984)) +- **plugins-runtime:** allow openPage() to toggle opening on a new window or not ([da8288b](https://github.com/penpot/penpot-plugins/commit/da8288b)) + +### 🩹 Fixes + +- package-lock.json ([d1d940a](https://github.com/penpot/penpot-plugins/commit/d1d940a)) +- fonts gdpr & switch provider ([d63231e](https://github.com/penpot/penpot-plugins/commit/d63231e)) +- missing changes ([b8fc936](https://github.com/penpot/penpot-plugins/commit/b8fc936)) +- format ci ([e0fab2e](https://github.com/penpot/penpot-plugins/commit/e0fab2e)) +- fetch main only in pr ([e48c5d4](https://github.com/penpot/penpot-plugins/commit/e48c5d4)) + +### ❤️ Thank You + +- alonso.torres +- Juanfran @juanfran +- Michał Korczak +- Miguel de Benito Delgado +- Pablo Alba + ## 1.3.2 (2025-07-04) ### 🩹 Fixes diff --git a/plugins/docs/publish-package.md b/plugins/docs/publish-package.md index aaee111e6a..a694792f68 100644 --- a/plugins/docs/publish-package.md +++ b/plugins/docs/publish-package.md @@ -7,6 +7,29 @@ This guide details the process of publishing `plugin-types`, for plugin development. Below is a walkthrough for publishing these packages and managing releases. +**Warning** +Before generating the release, please, check the update the changelog with +the changes that will be released. + +## Problem with pnpm + +There is an issue with dependencies and release with pnpm. For it to work +you need to add the following into your `.npmrc` + +``` +link-workspace-packages=true +``` + +## NPM Authentication + +You need to generate a temporary access token in the NPM website. + +Once you have the token add the following to the `.npmrc` + +``` +//registry.npmjs.org/:_authToken= +``` + ## Publishing Libraries Publishing packages enables the distribution of types and styles @@ -35,28 +58,16 @@ pnpm run release -- --dry-run false This command will: -- Update the `CHANGELOG.md` - Update the library's `package.json` version - Generate a commit -- Create a new git tag - Publish to NPM with the `latest` tag Ensure everything is correct before proceeding with the git push. Once verified, execute the following commands: ```shell +git commit -m ":arrow_up: Updated plugins release to X.X.X" git push -git push origin vX.X.X -``` - -Replace `vX.X.X` with the new version number. - -> 📘 To update the documentation site, you must also update the `stable` branch: - -```shell -git checkout stable -git merge main -git push origin stable ``` For detailed information, refer to the [Nx Release diff --git a/plugins/libs/plugin-types/package.json b/plugins/libs/plugin-types/package.json index c9dfa6bdc7..2c905672ea 100644 --- a/plugins/libs/plugin-types/package.json +++ b/plugins/libs/plugin-types/package.json @@ -1,6 +1,6 @@ { "name": "@penpot/plugin-types", - "version": "1.3.2", + "version": "1.4.0", "typings": "./index.d.ts", "type": "module" } diff --git a/plugins/libs/plugins-runtime/package.json b/plugins/libs/plugins-runtime/package.json index 2cc3ae3055..676e98b057 100644 --- a/plugins/libs/plugins-runtime/package.json +++ b/plugins/libs/plugins-runtime/package.json @@ -1,8 +1,8 @@ { "name": "@penpot/plugins-runtime", - "version": "1.3.2", + "version": "1.4.0", "dependencies": { - "@penpot/plugin-types": "^1.3.2", + "@penpot/plugin-types": "^1.4.0", "ses": "^1.1.0", "zod": "^3.22.4" }, diff --git a/plugins/libs/plugins-styles/package.json b/plugins/libs/plugins-styles/package.json index 511c3f7f86..372745ea33 100644 --- a/plugins/libs/plugins-styles/package.json +++ b/plugins/libs/plugins-styles/package.json @@ -1,5 +1,5 @@ { "name": "@penpot/plugin-styles", - "version": "1.3.2", + "version": "1.4.0", "dependencies": {} } diff --git a/plugins/pnpm-lock.yaml b/plugins/pnpm-lock.yaml index d1dd76b579..4230d80c51 100644 --- a/plugins/pnpm-lock.yaml +++ b/plugins/pnpm-lock.yaml @@ -230,8 +230,8 @@ importers: libs/plugins-runtime: dependencies: '@penpot/plugin-types': - specifier: ^1.3.2 - version: 1.3.2 + specifier: ^1.4.0 + version: link:../plugin-types ses: specifier: ^1.1.0 version: 1.14.0 @@ -4200,12 +4200,6 @@ packages: } engines: { node: '>= 10.0.0' } - '@penpot/plugin-types@1.3.2': - resolution: - { - integrity: sha512-f0kmmZaFNs9sGtSmqmSJQYCs5Qt+KYgTD8RneUjL+Dv+zfNQnd5e4L+iHSYFJ4HWvcDvTiK7F/gya7PwMTu7WA==, - } - '@phenomnomnominal/tsquery@5.0.1': resolution: { @@ -13194,6 +13188,7 @@ packages: integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==, } engines: { node: '>=10' } + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me tar@7.5.2: resolution: @@ -13201,6 +13196,7 @@ packages: integrity: sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==, } engines: { node: '>=18' } + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me terser-webpack-plugin@5.3.16: resolution: @@ -18203,8 +18199,6 @@ snapshots: '@parcel/watcher-win32-x64': 2.5.1 optional: true - '@penpot/plugin-types@1.3.2': {} - '@phenomnomnominal/tsquery@5.0.1(typescript@5.6.3)': dependencies: esquery: 1.6.0 diff --git a/plugins/tools/scripts/publish.ts b/plugins/tools/scripts/publish.ts index 7ea5970617..41ec00b7a2 100644 --- a/plugins/tools/scripts/publish.ts +++ b/plugins/tools/scripts/publish.ts @@ -69,17 +69,6 @@ const determineArgs = async () => { }, ); - await releaseChangelog({ - dryRun: args.dryRun, - versionData: result.projectsVersionData, - version: result.workspaceVersion, - gitCommitMessage: `chore(release): publish ${result.workspaceVersion} [skip ci]`, - gitCommit: true, - gitTag: true, - verbose: args.verbose, - firstRelease: args.firstRelease, - }); - if (!args.skipPublish) { await releasePublish({ dryRun: args.dryRun, From 656f81f89fdf9ea236bfc88665f90415c79d80b6 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Wed, 21 Jan 2026 17:36:58 +0100 Subject: [PATCH 2/4] :arrow_up: Update plugins to 1.4.2 (#8157) --- frontend/package.json | 2 +- frontend/yarn.lock | 20 +++++++++---------- plugins/CHANGELOG.md | 4 ++++ plugins/libs/plugin-types/package.json | 2 +- plugins/libs/plugins-runtime/package.json | 4 ++-- .../plugins-runtime/src/lib/create-sandbox.ts | 4 ++-- plugins/libs/plugins-styles/package.json | 2 +- plugins/pnpm-lock.yaml | 2 +- 8 files changed, 22 insertions(+), 18 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index df11969036..f4c36c6ef6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,7 +54,7 @@ "devDependencies": { "@penpot/draft-js": "portal:./packages/draft-js", "@penpot/mousetrap": "portal:./packages/mousetrap", - "@penpot/plugins-runtime": "1.4.0", + "@penpot/plugins-runtime": "1.4.2", "@penpot/svgo": "penpot/svgo#v3.2", "@penpot/text-editor": "portal:./text-editor", "@playwright/test": "1.57.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 46f749ead1..ebc1ed2427 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1191,21 +1191,21 @@ __metadata: languageName: node linkType: soft -"@penpot/plugin-types@npm:^1.4.0": - version: 1.4.0 - resolution: "@penpot/plugin-types@npm:1.4.0" - checksum: 10c0/bd97a17e7083efa307260dcaec841596012ae65964a947738a6ef5d6114b161616f3cf83fa21ed7ede322334c25f1c3cd4027a5409ce336f40455681a4ea192d +"@penpot/plugin-types@npm:^1.4.2": + version: 1.4.2 + resolution: "@penpot/plugin-types@npm:1.4.2" + checksum: 10c0/b0972fe75c97e697eb1044c89db660393886b3c30676f8436ff4ab56c5bf0397b2c675697ae1b9c5fe40bc95a803aecf6d7ac356dbf6d3535bf8baec5d05eab1 languageName: node linkType: hard -"@penpot/plugins-runtime@npm:1.4.0": - version: 1.4.0 - resolution: "@penpot/plugins-runtime@npm:1.4.0" +"@penpot/plugins-runtime@npm:1.4.2": + version: 1.4.2 + resolution: "@penpot/plugins-runtime@npm:1.4.2" dependencies: - "@penpot/plugin-types": "npm:^1.4.0" + "@penpot/plugin-types": "npm:^1.4.2" ses: "npm:^1.1.0" zod: "npm:^3.22.4" - checksum: 10c0/497c36c8e0edb7bc8e5ca60ab89fbc0f63e96adab6733bd7244df53921395e31743f37f9a28e57139009d1c65bee181f972f23bc821d2c1e0f05ce610b473ac1 + checksum: 10c0/af084d906cce9a6dea956fe5420111d7ea37c7620737a1e3d4f12958cb302a8f697c1229c237107c28fbb3b9f37eee308e6d16262b04ad56ae6f76c7a12f12e5 languageName: node linkType: hard @@ -4176,7 +4176,7 @@ __metadata: dependencies: "@penpot/draft-js": "portal:./packages/draft-js" "@penpot/mousetrap": "portal:./packages/mousetrap" - "@penpot/plugins-runtime": "npm:1.4.0" + "@penpot/plugins-runtime": "npm:1.4.2" "@penpot/svgo": "penpot/svgo#v3.2" "@penpot/text-editor": "portal:./text-editor" "@playwright/test": "npm:1.57.0" diff --git a/plugins/CHANGELOG.md b/plugins/CHANGELOG.md index b36a5386dc..e15c253923 100644 --- a/plugins/CHANGELOG.md +++ b/plugins/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.4.2 (2026-01-21) + +- **plugin-types:** fix atob/btoa functions + ## 1.4.0 (2026-01-21) ### 🚀 Features diff --git a/plugins/libs/plugin-types/package.json b/plugins/libs/plugin-types/package.json index 2c905672ea..0e8e1ca47d 100644 --- a/plugins/libs/plugin-types/package.json +++ b/plugins/libs/plugin-types/package.json @@ -1,6 +1,6 @@ { "name": "@penpot/plugin-types", - "version": "1.4.0", + "version": "1.4.2", "typings": "./index.d.ts", "type": "module" } diff --git a/plugins/libs/plugins-runtime/package.json b/plugins/libs/plugins-runtime/package.json index 676e98b057..5d3756b9fc 100644 --- a/plugins/libs/plugins-runtime/package.json +++ b/plugins/libs/plugins-runtime/package.json @@ -1,8 +1,8 @@ { "name": "@penpot/plugins-runtime", - "version": "1.4.0", + "version": "1.4.2", "dependencies": { - "@penpot/plugin-types": "^1.4.0", + "@penpot/plugin-types": "^1.4.2", "ses": "^1.1.0", "zod": "^3.22.4" }, diff --git a/plugins/libs/plugins-runtime/src/lib/create-sandbox.ts b/plugins/libs/plugins-runtime/src/lib/create-sandbox.ts index 9d03f9da95..70c024835e 100644 --- a/plugins/libs/plugins-runtime/src/lib/create-sandbox.ts +++ b/plugins/libs/plugins-runtime/src/lib/create-sandbox.ts @@ -118,8 +118,8 @@ export function createSandbox( // Window properties console: ses.harden(window.console), devicePixelRatio: ses.harden(window.devicePixelRatio), - atob: ses.harden(window.atob), - btoa: ses.harden(window.btoa), + atob: ses.harden(window.atob.bind(null)), + btoa: ses.harden(window.btoa.bind(null)), structuredClone: ses.harden(window.structuredClone), }; diff --git a/plugins/libs/plugins-styles/package.json b/plugins/libs/plugins-styles/package.json index 372745ea33..10144ed9d3 100644 --- a/plugins/libs/plugins-styles/package.json +++ b/plugins/libs/plugins-styles/package.json @@ -1,5 +1,5 @@ { "name": "@penpot/plugin-styles", - "version": "1.4.0", + "version": "1.4.2", "dependencies": {} } diff --git a/plugins/pnpm-lock.yaml b/plugins/pnpm-lock.yaml index 4230d80c51..b1cdc2d9bc 100644 --- a/plugins/pnpm-lock.yaml +++ b/plugins/pnpm-lock.yaml @@ -230,7 +230,7 @@ importers: libs/plugins-runtime: dependencies: '@penpot/plugin-types': - specifier: ^1.4.0 + specifier: ^1.4.2 version: link:../plugin-types ses: specifier: ^1.1.0 From e6b5364a8403c34138343edb4763c5fffd79bc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 21 Jan 2026 18:31:54 +0100 Subject: [PATCH 3/4] :wrench: Deploy penpot api documentation --- .github/workflows/plugins-deploy-api-doc.yml | 73 ++++++++++++++++++++ plugins/wrangle-penpot-plugins-api-doc.toml | 4 ++ 2 files changed, 77 insertions(+) create mode 100644 .github/workflows/plugins-deploy-api-doc.yml create mode 100644 plugins/wrangle-penpot-plugins-api-doc.toml diff --git a/.github/workflows/plugins-deploy-api-doc.yml b/.github/workflows/plugins-deploy-api-doc.yml new file mode 100644 index 0000000000..1c67d4f47b --- /dev/null +++ b/.github/workflows/plugins-deploy-api-doc.yml @@ -0,0 +1,73 @@ +name: Plugins/api-doc deployer + +on: + push: + branches: + - develop + - staging + - main + paths: + - "plugins/**" + - ".github/workflows/deploy-plugin-docs.yml" + - "wrangle-penpot-plugins-api-doc.toml" + workflow_dispatch: + inputs: + gh_ref: + description: 'Name of the branch or ref' + type: string + required: true + default: 'develop' + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: plugins + steps: + - name: Extract some useful variables + id: vars + run: | + echo "gh_ref=${{ inputs.gh_ref || github.ref_name }}" >> $GITHUB_OUTPUT + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ steps.vars.outputs.gh_ref }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: "pnpm" + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build docs + run: pnpm run build:doc + + - name: Select Worker name + run: | + REF="${{ steps.vars.outputs.gh_ref }}" + case "$REF" in + main) echo "WORKER_NAME=penpot-plugins-api-doc-pro" >> $GITHUB_ENV ;; + staging) echo "WORKER_NAME=penpot-plugins-api-doc-pre" >> $GITHUB_ENV ;; + develop) echo "WORKER_NAME=penpot-plugins-api-doc-hourly" >> $GITHUB_ENV ;; + *) echo "Unsupported branch ${REF}" && exit 1 ;; + esac + + - name: Deploy to Cloudflare Workers + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: deploy --config wrangle-penpot-plugins-api-doc.toml --name ${{ env.WORKER_NAME }} diff --git a/plugins/wrangle-penpot-plugins-api-doc.toml b/plugins/wrangle-penpot-plugins-api-doc.toml new file mode 100644 index 0000000000..e9535be2d8 --- /dev/null +++ b/plugins/wrangle-penpot-plugins-api-doc.toml @@ -0,0 +1,4 @@ +name = "penpot-plugins-api-doc" +compatibility_date = "2025-01-01" + +assets = { directory = "dist/doc" } From 2574ad33153039b28d30bd004f6373bc72cb0006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Thu, 22 Jan 2026 11:38:22 +0100 Subject: [PATCH 4/4] :wrench: Fixes to the API documentation deployer --- .github/workflows/plugins-deploy-api-doc.yml | 58 +++++++++++++++----- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/.github/workflows/plugins-deploy-api-doc.yml b/.github/workflows/plugins-deploy-api-doc.yml index 1c67d4f47b..62a87745bb 100644 --- a/.github/workflows/plugins-deploy-api-doc.yml +++ b/.github/workflows/plugins-deploy-api-doc.yml @@ -7,16 +7,22 @@ on: - staging - main paths: - - "plugins/**" - - ".github/workflows/deploy-plugin-docs.yml" - - "wrangle-penpot-plugins-api-doc.toml" + - "plugins/libs/plugin-types/index.d.ts" + - "plugins/libs/plugin-types/REAME.md" + - "plugins/tools/typedoc.css" + - "plugins/CHANGELOG.md" + - "plugins/wrangle-penpot-plugins-api-doc.toml" workflow_dispatch: inputs: gh_ref: - description: 'Name of the branch or ref' - type: string + description: 'Name of the branch' + type: choice required: true default: 'develop' + options: + - develop + - staging + - main permissions: contents: read @@ -24,9 +30,6 @@ permissions: jobs: deploy: runs-on: ubuntu-latest - defaults: - run: - working-directory: plugins steps: - name: Extract some useful variables id: vars @@ -39,20 +42,44 @@ jobs: fetch-depth: 0 ref: ${{ steps.vars.outputs.gh_ref }} + # START: Setup Node and PNPM enabling cache - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - cache: "pnpm" + node-version-file: .nvmrc - - name: Setup pnpm - uses: pnpm/action-setup@v4 + - name: Enable PNPM + working-directory: ./plugins + shell: bash + run: | + corepack enable; + corepack install; + + - name: Get pnpm store path + id: pnpm-store + working-directory: ./plugins + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 with: - run_install: false + path: ${{ steps.pnpm-store.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('plugins/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + # END: Setup Node and PNPM enabling cache - - name: Install dependencies - run: pnpm install --frozen-lockfile + - name: Install deps + working-directory: ./plugins + shell: bash + run: | + pnpm install --no-frozen-lockfile; + pnpm add -D -w wrangler@latest; - name: Build docs + working-directory: plugins + shell: bash run: pnpm run build:doc - name: Select Worker name @@ -68,6 +95,7 @@ jobs: - name: Deploy to Cloudflare Workers uses: cloudflare/wrangler-action@v3 with: + workingDirectory: plugins apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: deploy --config wrangle-penpot-plugins-api-doc.toml --name ${{ env.WORKER_NAME }}