From 7deff053ebec1562738b800ae5cea75a327cf692 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Wed, 16 Sep 2026 15:11:28 +0530 Subject: [PATCH 1/9] ci: set up Release Please Adds release-please-config.json, .release-please-manifest.json (seeded at 4.0.1), the Release Please workflow, and the Release-As sync workflow used by the other ImageKit SDK repos. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/release-please.yml | 20 +++++++++ .github/workflows/sync-release-as.yml | 63 +++++++++++++++++++++++++++ .release-please-manifest.json | 3 ++ release-please-config.json | 63 +++++++++++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 .github/workflows/release-please.yml create mode 100644 .github/workflows/sync-release-as.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..ef0ac0b --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,20 @@ +name: Release Please +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + if: github.repository == 'imagekit-developer/imagekit-vuejs' + runs-on: ubuntu-latest + + steps: + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 + id: release + with: + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} diff --git a/.github/workflows/sync-release-as.yml b/.github/workflows/sync-release-as.yml new file mode 100644 index 0000000..31620ed --- /dev/null +++ b/.github/workflows/sync-release-as.yml @@ -0,0 +1,63 @@ +name: Sync Release-As from release PR title + +on: + pull_request: + types: [edited] + +permissions: + contents: write + +jobs: + sync: + if: >- + github.event.pull_request.base.ref == 'master' && + startsWith(github.event.pull_request.head.ref, 'release-please--') && + github.event.changes.title != null + runs-on: ubuntu-latest + steps: + - name: Extract versions from old and new title + id: parse + env: + NEW_TITLE: ${{ github.event.pull_request.title }} + OLD_TITLE: ${{ github.event.changes.title.from }} + run: | + # Anchored on pull-request-title-pattern "release: ${version}" from release-please-config.json. + extract() { + echo "$1" | grep -oE '^release:[[:space:]]+v?[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?' \ + | sed -E 's/^release:[[:space:]]+v?//' + } + NEW_VERSION=$(extract "$NEW_TITLE") + OLD_VERSION=$(extract "$OLD_TITLE") + echo "old=$OLD_VERSION" + echo "new=$NEW_VERSION" + if [ -z "$NEW_VERSION" ]; then + echo "::notice::No semver in new title; nothing to do." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + if [ "$NEW_VERSION" = "$OLD_VERSION" ]; then + echo "::notice::Version unchanged ($NEW_VERSION); not pushing." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" + + - name: Check out main + if: steps.parse.outputs.skip != 'true' + uses: actions/checkout@v6 + with: + ref: master + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + fetch-depth: 1 + + - name: Push empty Release-As commit + if: steps.parse.outputs.skip != 'true' + env: + VERSION: ${{ steps.parse.outputs.version }} + run: | + git config user.name "release-as-bot" + git config user.email "release-as-bot@users.noreply.github.com" + git commit --allow-empty -m "chore: pin next release + + Release-As: ${VERSION}" + git push origin master diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..cf533f2 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "4.0.1" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..df0d3cd --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "node", + "package-name": "@imagekit/vue" + } + }, + "include-v-in-tag": false, + "include-component-in-tag": false, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ] +} From 834156c35bb46f0cd8033942487b0237498fec91 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Wed, 16 Sep 2026 15:11:28 +0530 Subject: [PATCH 2/9] fix(deps): require @imagekit/javascript ^5.5.0 for density transformation support Raises the minimum @imagekit/javascript to 5.5.0, which adds the `density` transformation (serialized as `dn`). Consumers with an older lockfile pin would otherwise keep 5.4.x and silently drop the parameter. Co-Authored-By: Claude Fable 5.1 --- package-lock.json | 13 +++++++------ package.json | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 252a677..1c7ee00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@imagekit/vue", - "version": "4.0.0", + "version": "4.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@imagekit/vue", - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "dependencies": { - "@imagekit/javascript": "^5.1.0" + "@imagekit/javascript": "^5.5.0" }, "devDependencies": { "@tsconfig/node22": "^22.0.1", @@ -908,9 +908,10 @@ } }, "node_modules/@imagekit/javascript": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@imagekit/javascript/-/javascript-5.1.0.tgz", - "integrity": "sha512-P12NaxlO6Qu4GROFagX9qgP5kKde236mCu5jJB1cWJ6mPaVdjyk0Mw3ciGIWdKXST/jP1cFqS2ZoBVRSq1SWow==" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@imagekit/javascript/-/javascript-5.5.0.tgz", + "integrity": "sha512-eu2lLzSwTj4awP6CeB8NUHnKz+GZk4og3ztZsb7MDjoy1NcfCVqB1gBxH8Q9xzCkBrP50SvGuSrK/ZGNzrXXDA==", + "license": "Apache-2.0" }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", diff --git a/package.json b/package.json index 39b9079..a4f928c 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "vue-tsc": "^2.2.8" }, "dependencies": { - "@imagekit/javascript": "^5.1.0" + "@imagekit/javascript": "^5.5.0" } } From 91f61d268cb51713cca44ce248f0914bedeffb01 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 11:47:23 +0530 Subject: [PATCH 3/9] test(nuxt): drop unused @nuxt/content module from the test app @nuxt/content v3 requires a SQLite driver (better-sqlite3) at `nuxt prepare`, which fails the postinstall step in CI. The test app never uses the module, so remove it instead of adding the driver. Co-Authored-By: Claude Fable 5.1 --- test-apps/nuxt/nuxt.config.ts | 2 +- test-apps/nuxt/package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test-apps/nuxt/nuxt.config.ts b/test-apps/nuxt/nuxt.config.ts index ba063b9..7ad419b 100644 --- a/test-apps/nuxt/nuxt.config.ts +++ b/test-apps/nuxt/nuxt.config.ts @@ -2,5 +2,5 @@ export default defineNuxtConfig({ compatibilityDate: '2025-05-15', devtools: { enabled: true }, - modules: ['@nuxt/image', '@nuxt/content'] + modules: ['@nuxt/image'] }) \ No newline at end of file diff --git a/test-apps/nuxt/package.json b/test-apps/nuxt/package.json index 2c66adb..a7d8a57 100644 --- a/test-apps/nuxt/package.json +++ b/test-apps/nuxt/package.json @@ -13,7 +13,6 @@ "test:e2e-update": "playwright test --update-snapshots" }, "dependencies": { - "@nuxt/content": "^3.5.1", "@nuxt/image": "^1.10.0", "nuxt": "^3.17.3", "vue": "^3.5.13", From 120dc56de0e221842f85b4eea409021781051bff Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 12:36:19 +0530 Subject: [PATCH 4/9] ci: build test apps explicitly before running Playwright Playwright's webServer wrapper only prints the last line of a failed build, hiding the actual error. Run the build as its own step first. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4de576f..be117b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,9 @@ jobs: npm install npm install "$PKG_TGZ" --no-save npx playwright install --with-deps + # Build explicitly so a failing build prints its error here instead of + # being swallowed by Playwright's webServer wrapper. + npm run build npm run test:e2e env: CI: true From ae2a811a4a783138a503e2d612584e147015c423 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 12:40:06 +0530 Subject: [PATCH 5/9] test(nuxt): add @tsconfig/node22 devDependency Vite's tsconfig loader walks up to the repo root tsconfig.node.json, which extends @tsconfig/node22. In CI the root node_modules is never installed for the test job, so the build failed with TSCONFIG_ERROR. Declare the package in the nuxt test app, as the vue-ts test app already does. Co-Authored-By: Claude Fable 5.1 --- test-apps/nuxt/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-apps/nuxt/package.json b/test-apps/nuxt/package.json index a7d8a57..55359f7 100644 --- a/test-apps/nuxt/package.json +++ b/test-apps/nuxt/package.json @@ -19,6 +19,7 @@ "vue-router": "^4.5.1" }, "devDependencies": { - "@playwright/test": "^1.52.0" + "@playwright/test": "^1.52.0", + "@tsconfig/node22": "^22.0.1" } } From b3b9a03990197b3da91d4ac1566b1871b5df4495 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 12:42:53 +0530 Subject: [PATCH 6/9] Revert "test(nuxt): add @tsconfig/node22 devDependency" This reverts commit ae2a811a4a783138a503e2d612584e147015c423. --- test-apps/nuxt/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test-apps/nuxt/package.json b/test-apps/nuxt/package.json index 55359f7..a7d8a57 100644 --- a/test-apps/nuxt/package.json +++ b/test-apps/nuxt/package.json @@ -19,7 +19,6 @@ "vue-router": "^4.5.1" }, "devDependencies": { - "@playwright/test": "^1.52.0", - "@tsconfig/node22": "^22.0.1" + "@playwright/test": "^1.52.0" } } From ce57893c293984752e90da4832273535b192bfec Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 12:42:53 +0530 Subject: [PATCH 7/9] ci: install root dependencies before building test apps Vite's tsconfig loader (tsconfck) walks up from the test app to the repo root tsconfig.node.json, which extends @tsconfig/node22 resolved from the root node_modules. The test job never installed the root, so the nuxt build failed with TSCONFIG_ERROR in CI while passing locally. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be117b7..5c31376 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,10 @@ jobs: PKG_TGZ="$(ls "$GITHUB_WORKSPACE"/imagekit-vue-*.tgz)" echo "Installing $PKG_TGZ" + # ── root install: Vite's tsconfig loader walks up to the repo root + # tsconfig.node.json, which extends @tsconfig/node22 ────────────── + npm ci --ignore-scripts + # ── now set up the demo app ─────────────────────────────────────────── cd test-apps/${{ matrix.app }} npm install From b1c150471c80de6095be67d1d69df45347841595 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 12:54:56 +0530 Subject: [PATCH 8/9] ci: add Changelog heading for Release Please Release Please inserts new entries before the first version heading that is preceded by a newline. With the file starting directly at '## x.y.z', the first match was the second heading and new releases would land out of order. A top-level heading fixes the insertion point. Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ff388..8e6a812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# Changelog + ## 4.0.1 Include `@imagekit/javascript` in external in Rollup config to prevent bundling it with the package, allowing users to be able to fetch the latest version of the SDK without needing to update the package. This also reduces the bundle size of the package and allows users to manage the SDK version separately. From 3a52a8b570a9221eb683bab728a4fd64cd62c6eb Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 13:29:42 +0530 Subject: [PATCH 9/9] ci: publish to npm with OIDC trusted publishing Same shape as imagekit-javascript's publish workflow: - id-token: write, no NODE_AUTH_TOKEN, no `npm whoami` - Node 24 with npm pinned to the 11 line (>= 11.5.1 needed; npm@latest is 12 and refuses older Node) - `npm publish --provenance` - workflow_dispatch so a failed publish can be re-run from the default branch without re-tagging The trusted publisher on npmjs.com must reference this file's name, `publish.yml`. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/publish.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 410374c..0ba12cb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,10 @@ -name: Publish Package to npmjs +name: Publish on: release: types: [published] + # Manual re-run from the default branch, e.g. when a release publish failed. + workflow_dispatch: jobs: publish: @@ -11,22 +13,23 @@ jobs: contents: read id-token: write steps: - - name: ⬇️ Check out code - uses: actions/checkout@v4 - - - name: Setup .npmrc file to publish to npm + - uses: actions/checkout@v4 + - name: Use Node.js 24.x uses: actions/setup-node@v4 with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - - name: Build and Publish + node-version: 24.x + registry-url: https://registry.npmjs.org/ + - name: Upgrade npm for OIDC trusted publishing + # Trusted publishing needs npm >= 11.5.1. Pin the 11 line: npm@latest + # is now 12.x, which refuses to install on older Node runners. + run: | + npm install -g npm@11 + npm --version + - name: NPM Publish run: | npm ci npm run build - # print the NPM user name for validation - npm whoami - VERSION=$(node -p "require('./package.json').version" ) + VERSION=$(node -p "require('./package.json').version") # Only publish stable versions to the latest tag if [[ "$VERSION" =~ ^[^-]+$ ]]; then NPM_TAG="latest" @@ -36,5 +39,4 @@ jobs: echo "Publishing $VERSION with $NPM_TAG tag." npm publish --tag $NPM_TAG --provenance --access public env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - CI: true \ No newline at end of file + CI: true