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

unpic

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unpic - npm Package Compare versions

Comparing version 3.20.0 to 3.21.0

esm/deps/jsr.io/@std/assert/1.0.9/almost_equals.d.ts.map

5

esm/src/transformers/astro.js

@@ -42,3 +42,3 @@ import { getNumericParam, setParamIfDefined, toCanonicalUrlString, toUrl, } from "../utils.js";

};
export const transform = ({ url: originalUrl, width, height, format }) => {
export const transform = ({ url: originalUrl, width, height, format, cdnOptions }) => {
const parsedUrl = toUrl(originalUrl);

@@ -51,3 +51,4 @@ const href = toCanonicalUrlString(new URL(parsedUrl.pathname, parsedUrl.origin));

setParamIfDefined(url, "f", format);
return `/_image?${url.searchParams.toString()}`;
const endpoint = cdnOptions?.astro?.endpoint ?? "/_image";
return `${endpoint}?${url.searchParams.toString()}`;
};

2

package.json
{
"name": "unpic",
"version": "3.20.0",
"version": "3.21.0",
"description": "Universal image CDN translator",

@@ -5,0 +5,0 @@ "homepage": "https://unpic.pics/lib",

@@ -47,3 +47,3 @@ "use strict";

exports.parse = parse;
const transform = ({ url: originalUrl, width, height, format }) => {
const transform = ({ url: originalUrl, width, height, format, cdnOptions }) => {
const parsedUrl = (0, utils_js_1.toUrl)(originalUrl);

@@ -56,4 +56,5 @@ const href = (0, utils_js_1.toCanonicalUrlString)(new URL(parsedUrl.pathname, parsedUrl.origin));

(0, utils_js_1.setParamIfDefined)(url, "f", format);
return `/_image?${url.searchParams.toString()}`;
const endpoint = cdnOptions?.astro?.endpoint ?? "/_image";
return `${endpoint}?${url.searchParams.toString()}`;
};
exports.transform = transform;

Sorry, the diff of this file is not supported yet

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