Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.

Commit c98c546

Browse files
fix(image-compressor): download compressed file via blob fetch (#16)
* fix(image-compressor): download compressed file via blob fetch chore(release): bump/readme versions & update GitHub Action Closes #15 - ImageCompressor now fetches the result as a blob and triggers download (resolves #15; network‑tab link no longer required). - Added “Version:” lines to root, frontend and backend READMEs. - Ensure backend docs JSON version matches package version. - Publish workflow updates docs & READMEs and commits them on bump. - Include docs/README, root README and frontend README in version bump commits. * feat: comit message improvements * Update .github/workflows/publish.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update frontend/src/components/ImageCompressor.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * @coderabbitai review comments resolved --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent fef6de3 commit c98c546

6 files changed

Lines changed: 546 additions & 90 deletions

File tree

.github/workflows/publish.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,55 @@ jobs:
7676
VERSION=$(node -p "require('./package.json').version")
7777
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
7878
79+
- name: Update docs version
80+
run: |
81+
VERSION=${{ steps.get_version.outputs.version }}
82+
export VERSION
83+
node - <<'EOF'
84+
const fs = require('fs');
85+
const version = process.env.VERSION;
86+
87+
// update backend api JSON docs
88+
const jsonPath = 'backend/docs/api-documentation.json';
89+
if (fs.existsSync(jsonPath)) {
90+
const doc = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
91+
doc.info = doc.info || {};
92+
doc.info.version = version;
93+
fs.writeFileSync(jsonPath, JSON.stringify(doc, null, 2));
94+
}
95+
96+
// update any README files with Version: lines
97+
const updateReadme = (p) => {
98+
if (fs.existsSync(p)) {
99+
let c = fs.readFileSync(p, 'utf8');
100+
c = c.replace(/\*\*Version:\*\* .*/, `**Version:** ${version}`);
101+
fs.writeFileSync(p, c);
102+
}
103+
};
104+
updateReadme('backend/docs/README.md');
105+
updateReadme('README.md');
106+
updateReadme('frontend/README.md');
107+
EOF
108+
79109
- name: Commit version changes
80110
id: commit_versions
81111
run: |
82112
FILES=""
83113
if [ -f package.json ]; then FILES="$FILES package.json"; fi
84114
if [ -f frontend/package.json ]; then FILES="$FILES frontend/package.json"; fi
85115
if [ -f backend/package.json ]; then FILES="$FILES backend/package.json"; fi
116+
if [ -f backend/docs/api-documentation.json ]; then FILES="$FILES backend/docs/api-documentation.json"; fi
117+
if [ -f backend/docs/README.md ]; then FILES="$FILES backend/docs/README.md"; fi
118+
if [ -f README.md ]; then FILES="$FILES README.md"; fi
119+
if [ -f frontend/README.md ]; then FILES="$FILES frontend/README.md"; fi
86120
if [ -n "$FILES" ]; then git add $FILES; fi
87121
88122
if git diff --cached --quiet; then
89123
echo "did_commit=false" >> $GITHUB_OUTPUT
90124
exit 0
91125
fi
92126
93-
git commit -m "chore: bump versions for ${{ github.event.inputs.release_type }} release"
127+
git commit -m "chore: bump versions for ${{ github.event.inputs.release_type }} v${{ steps.get_version.outputs.version }} release"
94128
# Check if tag already exists
95129
TAG_NAME="v${{ steps.get_version.outputs.version }}"
96130
did_commit=false

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 🛠️ dkutils — The Ultimate Multi-Utility Platform
22

3+
**Version:** 2.0.1
4+
35
![dkutils Logo](frontend/public/logo.png)
46

57
[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

0 commit comments

Comments
 (0)