Socket
Socket
Sign inDemoInstall

imagemin

Package Overview
Dependencies
Maintainers
7
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemin - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

19

index.js

@@ -1,10 +0,12 @@

import {promisify} from 'util';
import path from 'path';
import {Buffer} from 'node:buffer';
import {promises as fsPromises} from 'node:fs';
import {promisify} from 'node:util';
import path from 'node:path';
import fs from 'graceful-fs';
import {promises as fsPromises} from 'fs';
import FileType from 'file-type';
import globby from 'globby';
import {globby} from 'globby';
import pPipe from 'p-pipe';
import replaceExt from 'replace-ext';
import junk from 'junk';
import convertToUnixPath from 'slash';

@@ -22,3 +24,3 @@ const readFile = promisify(fs.readFile);

const {ext} = await FileType.fromBuffer(data);
const {ext} = await FileType.fromBuffer(data) || {ext: path.extname(sourcePath)};
let destinationPath = destination ? path.join(destination, path.basename(sourcePath)) : undefined;

@@ -30,3 +32,3 @@ destinationPath = ext === 'webp' ? replaceExt(destinationPath, '.webp') : destinationPath;

sourcePath,
destinationPath
destinationPath,
};

@@ -49,3 +51,4 @@

const filePaths = glob ? await globby(input, {onlyFiles: true}) : input;
const unixFilePaths = input.map(path => convertToUnixPath(path));
const filePaths = glob ? await globby(unixFilePaths, {onlyFiles: true}) : input;

@@ -62,3 +65,3 @@ return Promise.all(

}
})
}),
);

@@ -65,0 +68,0 @@ }

{
"name": "imagemin",
"version": "8.0.0",
"version": "8.0.1",
"description": "Minify images seamlessly",

@@ -30,8 +30,9 @@ "license": "MIT",

"dependencies": {
"file-type": "^14.6.0",
"globby": "^11.0.3",
"graceful-fs": "^4.2.6",
"file-type": "^16.5.3",
"globby": "^12.0.0",
"graceful-fs": "^4.2.8",
"junk": "^3.1.0",
"p-pipe": "^4.0.0",
"replace-ext": "^2.0.0"
"replace-ext": "^2.0.0",
"slash": "^3.0.0"
},

@@ -46,4 +47,4 @@ "devDependencies": {

"tempy": "^1.0.1",
"xo": "^0.39.1"
"xo": "^0.43.0"
}
}

@@ -1,2 +0,2 @@

# imagemin ![GitHub Actions Status](https://github.com/imagemin/imagemin/workflows/CI/badge.svg?branch=master)
# imagemin

@@ -24,2 +24,3 @@ > Minify images seamlessly

<br>
<br>
<a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=imagemin&utm_source=github">

@@ -36,2 +37,12 @@ <div>

</a>
<br>
<a href="https://strapi.io/?ref=sindresorhus">
<div>
<img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="200" alt="Strapi">
</div>
<b>Strapi is the leading open-source headless CMS.</b>
<div>
<sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
</div>
</a>
</p>

@@ -126,10 +137,2 @@ </div>

## Hosted API
We also provide a hosted API for imagemin which may simplify your use case.
<a href="https://imagemin.saasify.sh">
<img src="https://badges.saasify.sh?text=View%20Hosted%20API" height="40"/>
</a>
## Related

@@ -136,0 +139,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc