Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imagemin-jpegoptim

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemin-jpegoptim - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

20

index.js

@@ -1,7 +0,7 @@

'use strict';
const execa = require('execa');
const isJpg = require('is-jpg');
const jpegoptim = require('jpegoptim-bin');
import {Buffer} from 'node:buffer';
import {execa} from 'execa';
import isJpg from 'is-jpg';
import jpegoptim from 'jpegoptim-bin';
module.exports = options => async buffer => {
const imageminJpegoptim = options => async buffer => {
options = {

@@ -14,3 +14,3 @@ stripAll: true,

stripXmp: true,
...options
...options,
};

@@ -28,3 +28,3 @@

'--stdin',
'--stdout'
'--stdout',
];

@@ -64,3 +64,3 @@

if (options.size) {
if (options.size > 0) {
args.push(`--size=${options.size}`);

@@ -72,3 +72,3 @@ }

input: buffer,
maxBuffer: Infinity
maxBuffer: Number.POSITIVE_INFINITY,
});

@@ -78,1 +78,3 @@

};
export default imageminJpegoptim;
{
"name": "imagemin-jpegoptim",
"version": "7.0.0",
"version": "8.0.0",
"description": "Imagemin plugin for jpegoptim",
"license": "MIT",
"repository": "imagemin/imagemin-jpegoptim",
"type": "module",
"exports": "./index.js",
"author": {

@@ -24,3 +26,3 @@ "name": "Kevin Mårtensson",

"engines": {
"node": ">=10"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},

@@ -43,11 +45,11 @@ "scripts": {

"dependencies": {
"execa": "^4.0.0",
"is-jpg": "^2.0.0",
"jpegoptim-bin": "^6.0.0"
"execa": "^6.0.0",
"is-jpg": "^3.0.0",
"jpegoptim-bin": "^7.1.0"
},
"devDependencies": {
"ava": "^3.8.0",
"ava": "^3.15.0",
"is-progressive": "^3.0.0",
"xo": "^0.30.0"
"xo": "^0.47.0"
}
}

@@ -1,6 +0,5 @@

# imagemin-jpegoptim [![Build Status](https://travis-ci.org/imagemin/imagemin-jpegoptim.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-jpegoptim)
# imagemin-jpegoptim
> [Imagemin](https://github.com/imagemin/imagemin) plugin for [jpegoptim](https://github.com/tjko/jpegoptim)
## Install

@@ -14,12 +13,12 @@

## Usage
```js
const imagemin = require('imagemin');
const imageminJpegoptim = require('imagemin-jpegoptim');
import imagemin from 'imagemin';
import imageminJpegoptim from 'imagemin-jpegoptim';
(async () => {
await imagemin(['images/*.jpg'], 'build/images', {
use: [
await imagemin(['images/*.jpg'], {
destination: 'build/images',
plugins: [
imageminJpegoptim()

@@ -33,6 +32,5 @@ ]

## API
### imageminJpegoptim([options])(buffer)
### imageminJpegoptim(options?)(buffer)

@@ -43,7 +41,7 @@ Returns a `Promise<Buffer>`.

Type: `Object`
Type: `object`
##### progressive
Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -61,3 +59,3 @@

Type: `number` `string`
Type: `number | string`

@@ -68,3 +66,3 @@ Try to optimize file to given size. Target size is specified either in kilo bytes (`1`-`n`) or as percentage (`1%`-`99%`).

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -78,3 +76,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -86,3 +84,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -94,3 +92,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -102,3 +100,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -110,3 +108,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -116,3 +114,2 @@

#### buffer

@@ -123,6 +120,1 @@

Buffer to optimize.
## License
MIT © [Imagemin](https://github.com/imagemin)
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