Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 5, 2024
1 parent 7e6fcb0 commit 127615e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const exposePlugin = async plugin => (...arguments_) => loadPlugin(plugin, ...ar

const getDefaultPlugins = async () => Promise.all(defaultPlugins.flatMap(plugin => loadPlugin(plugin)));

const validExtensions = new Set(['.jpg', '.jpeg', '.png', '.gif', '.svg']);

export default function gulpImagemin(plugins, options) {
if (typeof plugins === 'object' && !Array.isArray(plugins)) {
options = plugins;
Expand All @@ -36,8 +38,6 @@ export default function gulpImagemin(plugins, options) {
...options,
};

const validExtensions = new Set(['.jpg', '.jpeg', '.png', '.gif', '.svg']);

let totalBytes = 0;
let totalSavedBytes = 0;
let totalFiles = 0;
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function gulpImagemin(plugins, options) {
console.log(`${PLUGIN_NAME}:`, chalk.green('✔ ') + file.relative + chalk.gray(` (${message})`));
}

file.contents = data;
file.contents = Buffer.from(data);

return file;
}, {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"type": "module",
"exports": "./index.js",
"sideEffects": false,
"engines": {
"node": ">=18"
},
Expand Down Expand Up @@ -39,16 +40,16 @@
],
"dependencies": {
"chalk": "^5.3.0",
"gulp-plugin-extras": "^0.2.2",
"imagemin": "^8.0.1",
"gulp-plugin-extras": "^1.0.0",
"imagemin": "^9.0.0",
"plur": "^5.1.0",
"pretty-bytes": "^6.1.1"
},
"devDependencies": {
"ava": "^5.3.1",
"ava": "^6.1.2",
"imagemin-pngquant": "^9.0.2",
"vinyl": "^3.0.0",
"xo": "^0.56.0"
"xo": "^0.58.0"
},
"optionalDependencies": {
"imagemin-gifsicle": "^7.0.0",
Expand Down

0 comments on commit 127615e

Please sign in to comment.