Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Update dependency jimp to v1 #5253

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/node": "^20.14.15",
"fast-check": "workspace:*",
"jest": "^29.7.0",
"jimp": "^0.22.12",
"jimp": "^1.6.0",
"typescript": "~5.6.3"
},
"browserslist": {
Expand Down
6 changes: 3 additions & 3 deletions website/prebuild/optimize-images.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jimp from 'jimp';
import { Jimp } from 'jimp';
import { existsSync } from 'fs';
import { fileURLToPath } from 'url';
import { join } from 'path';
Expand All @@ -7,8 +7,8 @@ import allContributors from '../src/components/HomepageContributors/all-contribu
const __dirname = fileURLToPath(new URL('.', import.meta.url));

async function collectImage(imageUrl, imageFinalPath, squaredSize) {
const image = await jimp.read(imageUrl);
await image.resize(squaredSize, squaredSize).quality(80).writeAsync(imageFinalPath);
const image = await Jimp.read(imageUrl);
await image.resize({ h: squaredSize, h: squaredSize }).write(imageFinalPath, { quality: 80 });
}

const quotes = [
Expand Down
Loading
Loading