Skip to content

Commit 3d19a23

Browse files
authored
Merge pull request #124 from imagekit-developer/v4
V4
2 parents 94ca930 + 7597b41 commit 3d19a23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5108
-40095
lines changed

.editorconfig

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
# ─────────────────────────────────────────────────────
9+
# 1. Build the library and create the .tgz once
10+
# ─────────────────────────────────────────────────────
11+
pack:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: ⬇️ Check out code
16+
uses: actions/checkout@v4
17+
18+
- name: 🟢 Set up Node 20
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20.x
22+
cache: npm
23+
24+
- name: 📦 Install deps, build, pack
25+
run: |
26+
npm ci
27+
npm run build
28+
npm pack # ⇠ generates imagekit-vue-*.tgz in $GITHUB_WORKSPACE
29+
env:
30+
CI: true
31+
32+
- name: 📤 Upload package artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: imagekit-package
36+
path: imagekit-vue-*.tgz # uploads exactly one .tgz
37+
38+
# ─────────────────────────────────────────────────────
39+
# 2. Matrix: run demo-app tests in parallel
40+
# ─────────────────────────────────────────────────────
41+
test:
42+
needs: pack # wait for the tarball
43+
runs-on: ubuntu-latest
44+
45+
strategy:
46+
matrix:
47+
app: [vue-ts, nuxt] # sub-folders in test-apps
48+
49+
steps:
50+
- name: ⬇️ Check out code
51+
uses: actions/checkout@v4
52+
53+
- name: 🟢 Set up Node 20
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: 20.x
57+
cache: npm
58+
59+
- name: 📥 Download package artifact
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: imagekit-package # puts .tgz into $GITHUB_WORKSPACE by default
63+
64+
- name: 🚀 Run E2E tests
65+
run: |
66+
# ── figure out the real .tgz filename (there’s only one) ───────────────
67+
PKG_TGZ="$(ls "$GITHUB_WORKSPACE"/imagekit-vue-*.tgz)"
68+
echo "Installing $PKG_TGZ"
69+
70+
# ── now set up the demo app ───────────────────────────────────────────
71+
cd test-apps/${{ matrix.app }}
72+
npm install
73+
npm install "$PKG_TGZ" --no-save
74+
npx playwright install --with-deps
75+
npm run test:e2e
76+
env:
77+
CI: true

.github/workflows/nodejs.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/npmpublish.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- name: ⬇️ Check out code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .npmrc file to publish to npm
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- name: Build and Publish
24+
run: |
25+
npm ci
26+
npm run build
27+
# print the NPM user name for validation
28+
npm whoami
29+
VERSION=$(node -p "require('./package.json').version" )
30+
# Only publish stable versions to the latest tag
31+
if [[ "$VERSION" =~ ^[^-]+$ ]]; then
32+
NPM_TAG="latest"
33+
else
34+
NPM_TAG="beta"
35+
fi
36+
echo "Publishing $VERSION with $NPM_TAG tag."
37+
npm publish --tag $NPM_TAG --provenance --access public
38+
env:
39+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
40+
CI: true

.gitignore

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1-
.DS_Store
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
210
node_modules
3-
.vscode/settings.json
4-
.vscode/launch.json
5-
.env
6-
/dist
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo
31+
32+
33+
*.tgz
34+
35+
.env

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock.json

DEVELOPMENT.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)