Socket
Socket
Sign inDemoInstall

ipx

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipx - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.5.7](https://github.com/nuxt-contrib/ipx/compare/v0.5.6...v0.5.7) (2021-02-08)
### Bug Fixes
* override meta.type and meta.mimeType if format modifier used ([820f1e2](https://github.com/nuxt-contrib/ipx/commit/820f1e253dcbd0fe1122a742bb75dcfc364b868b))
### [0.5.6](https://github.com/nuxt-contrib/ipx/compare/v0.5.5...v0.5.6) (2021-02-04)

@@ -7,0 +14,0 @@

9

dist/cli.js

@@ -251,2 +251,3 @@ #!/usr/bin/env node

}
const format = inputOpts.modifiers.f || inputOpts.modifiers.format;
const getSrc = cachedPromise(() => {

@@ -263,2 +264,8 @@ const source2 = inputOpts.source || ufo.hasProtocol(id) ? "http" : "filesystem";

const meta = imageMeta__default['default'](data);
meta._type = meta.type;
meta._mimeType = meta.mimeType;
if (format) {
meta.type = format;
meta.mimeType = "image/" + format;
}
return meta;

@@ -273,3 +280,3 @@ });

const meta = await getMeta();
if (meta.type === "svg" && (!inputOpts.modifiers.f || !inputOpts.modifiers.format)) {
if (meta._type === "svg" && !format) {
return data;

@@ -276,0 +283,0 @@ }

@@ -16,2 +16,4 @@ import { IncomingMessage, ServerResponse } from 'http';

mimeType: string;
_mimeType: string;
_type: string;
}

@@ -18,0 +20,0 @@ interface IPXInputOptions {

@@ -248,2 +248,3 @@ 'use strict';

}
const format = inputOpts.modifiers.f || inputOpts.modifiers.format;
const getSrc = cachedPromise(() => {

@@ -260,2 +261,8 @@ const source2 = inputOpts.source || ufo.hasProtocol(id) ? "http" : "filesystem";

const meta = imageMeta__default['default'](data);
meta._type = meta.type;
meta._mimeType = meta.mimeType;
if (format) {
meta.type = format;
meta.mimeType = "image/" + format;
}
return meta;

@@ -270,3 +277,3 @@ });

const meta = await getMeta();
if (meta.type === "svg" && (!inputOpts.modifiers.f || !inputOpts.modifiers.format)) {
if (meta._type === "svg" && !format) {
return data;

@@ -273,0 +280,0 @@ }

2

package.json
{
"name": "ipx",
"version": "0.5.6",
"version": "0.5.7",
"repository": "nuxt-contrib/ipx",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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