Comparing version 2.2.1 to 2.2.2
export default JSON.parse(`{ | ||
"res.cloudinary.com": "cloudinary", | ||
"images.ctfassets.net": "contentful", | ||
@@ -4,0 +3,0 @@ "cdn.builder.io": "builder.io", |
@@ -6,4 +6,5 @@ export default JSON.parse(`{ | ||
"storyblok.com": "storyblok", | ||
"kc-usercontent.com": "kontent.ai" | ||
"kc-usercontent.com": "kontent.ai", | ||
"cloudinary.com": "cloudinary" | ||
} | ||
`); |
@@ -33,3 +33,3 @@ import { roundIfNumeric } from "../utils.js"; | ||
const group = matches[0].groups || {}; | ||
const { transformations: transformString, format: originalFormat, ...baseParams } = group; | ||
const { transformations: transformString = "", format: originalFormat, ...baseParams } = group; | ||
const { w, h, f, ...transformations } = parseTransforms(transformString); | ||
@@ -61,2 +61,4 @@ const format = (f && f !== "auto") ? f : originalFormat; | ||
} | ||
// Default crop to fill without upscaling | ||
props.transformations.c ||= "lfill"; | ||
return new URL(formatUrl(props)); | ||
@@ -63,0 +65,0 @@ }; |
@@ -6,3 +6,3 @@ { | ||
"name": "unpic", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Universal image CDN translator", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = JSON.parse(`{ | ||
"res.cloudinary.com": "cloudinary", | ||
"images.ctfassets.net": "contentful", | ||
@@ -6,0 +5,0 @@ "cdn.builder.io": "builder.io", |
@@ -8,4 +8,5 @@ "use strict"; | ||
"storyblok.com": "storyblok", | ||
"kc-usercontent.com": "kontent.ai" | ||
"kc-usercontent.com": "kontent.ai", | ||
"cloudinary.com": "cloudinary" | ||
} | ||
`); |
@@ -36,3 +36,3 @@ "use strict"; | ||
const group = matches[0].groups || {}; | ||
const { transformations: transformString, format: originalFormat, ...baseParams } = group; | ||
const { transformations: transformString = "", format: originalFormat, ...baseParams } = group; | ||
const { w, h, f, ...transformations } = parseTransforms(transformString); | ||
@@ -65,2 +65,4 @@ const format = (f && f !== "auto") ? f : originalFormat; | ||
} | ||
// Default crop to fill without upscaling | ||
props.transformations.c ||= "lfill"; | ||
return new URL(formatUrl(props)); | ||
@@ -67,0 +69,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63547
1547