Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,18 @@ 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
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
30 changes: 16 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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"
Expand All @@ -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
CI: true
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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 }}
63 changes: 63 additions & 0 deletions .github/workflows/sync-release-as.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.0.1"
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"vue-tsc": "^2.2.8"
},
"dependencies": {
"@imagekit/javascript": "^5.1.0"
"@imagekit/javascript": "^5.5.0"
}
}
63 changes: 63 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
2 changes: 1 addition & 1 deletion test-apps/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
export default defineNuxtConfig({
compatibilityDate: '2025-05-15',
devtools: { enabled: true },
modules: ['@nuxt/image', '@nuxt/content']
modules: ['@nuxt/image']
})
1 change: 0 additions & 1 deletion test-apps/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading