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.2 to 0.5.3

8

CHANGELOG.md

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

### [0.5.3](https://github.com/nuxt-contrib/ipx/compare/v0.5.2...v0.5.3) (2021-02-04)
### Bug Fixes
* fix max-age cache header name ([833272b](https://github.com/nuxt-contrib/ipx/commit/833272b6a4c63c388e941c8f037118c204a8dac4))
* **types:** optional ipxOptions ([692ab1f](https://github.com/nuxt-contrib/ipx/commit/692ab1f6c64fa86d77581bebdcabf0ba707b9469))
### [0.5.2](https://github.com/nuxt-contrib/ipx/compare/v0.5.1...v0.5.2) (2021-02-03)

@@ -7,0 +15,0 @@

6

dist/cli.js

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

const imageMeta = require('image-meta');
const ufo = require('ufo');
const path = require('path');

@@ -18,3 +19,2 @@ const isValidPath = require('is-valid-path');

const fetch = require('node-fetch');
const ufo = require('ufo');
const getEtag = require('etag');

@@ -252,3 +252,3 @@ const xss2 = require('xss');

const getSrc = cachedPromise(() => {
const source2 = inputOpts.source || id.startsWith("http") ? "http" : "filesystem";
const source2 = inputOpts.source || ufo.hasProtocol(id) ? "http" : "filesystem";
if (!ctx.sources[source2]) {

@@ -317,3 +317,3 @@ throw createError("Unknown source: " + source2, 400);

if (src.maxAge !== void 0) {
res.setHeader("Cache-Control", "maxAge=" + +src.maxAge);
res.setHeader("Cache-Control", "max-age=" + +src.maxAge);
}

@@ -320,0 +320,0 @@ const data = await img.data();

@@ -30,5 +30,5 @@ import { IncomingMessage, ServerResponse } from 'http';

interface IPXOptions {
dir: false | string;
domains: false | string[];
sharp: {
dir?: false | string;
domains?: false | string[];
sharp?: {
[key: string]: any;

@@ -35,0 +35,0 @@ };

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

const imageMeta = require('image-meta');
const ufo = require('ufo');
const path = require('path');

@@ -16,3 +17,2 @@ const isValidPath = require('is-valid-path');

const fetch = require('node-fetch');
const ufo = require('ufo');
const getEtag = require('etag');

@@ -249,3 +249,3 @@ const xss2 = require('xss');

const getSrc = cachedPromise(() => {
const source2 = inputOpts.source || id.startsWith("http") ? "http" : "filesystem";
const source2 = inputOpts.source || ufo.hasProtocol(id) ? "http" : "filesystem";
if (!ctx.sources[source2]) {

@@ -314,3 +314,3 @@ throw createError("Unknown source: " + source2, 400);

if (src.maxAge !== void 0) {
res.setHeader("Cache-Control", "maxAge=" + +src.maxAge);
res.setHeader("Cache-Control", "max-age=" + +src.maxAge);
}

@@ -317,0 +317,0 @@ const data = await img.data();

{
"name": "ipx",
"version": "0.5.2",
"version": "0.5.3",
"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