Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/rude-ads-notice.md

This file was deleted.

169 changes: 65 additions & 104 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unpic/lib",
"version": "4.2.1",
"version": "4.2.2",
"exports": {
".": "./mod.ts",
"./async": "./src/async.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unpic",
"version": "4.2.1",
"version": "4.2.2",
"private": true,
"description": "Universal image CDN translator",
"repository": {
Expand Down
24 changes: 12 additions & 12 deletions src/providers/storyblok.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const OLD_BASE_URL =

Deno.test("Storyblok Image CDN - extract", async (t) => {
await t.step("should extract operations from new URL format", () => {
const url = `${NEW_BASE_URL}/m/400x300/filters:format(webp):focal(150x100:250x200)`;
const url =
`${NEW_BASE_URL}/m/400x300/filters:format(webp):focal(150x100:250x200)`;
const result = extract(url);
assertEquals(result, {
src: NEW_BASE_URL,
Expand Down Expand Up @@ -49,8 +50,6 @@ Deno.test("Storyblok Image CDN - extract", async (t) => {
},
});
});


});

Deno.test("Storyblok Image CDN - generate", async (t) => {
Expand Down Expand Up @@ -97,11 +96,14 @@ Deno.test("Storyblok Image CDN - generate", async (t) => {
const result = generate(NEW_BASE_URL, {
width: 400,
height: 300,
filters:{
focal: "150x150:250x250"
}
filters: {
focal: "150x150:250x250",
},
});
assertEquals(result, `${NEW_BASE_URL}/m/400x300/filters:focal(150x150:250x250)`);
assertEquals(
result,
`${NEW_BASE_URL}/m/400x300/filters:focal(150x150:250x250)`,
);
});
});

Expand All @@ -111,9 +113,9 @@ Deno.test("Storyblok Image CDN - transform", async (t) => {
width: 500,
height: 400,
format: "webp",
filters:{
focal: "150x150:250x250"
}
filters: {
focal: "150x150:250x250",
},
});
assertEquals(
result,
Expand Down Expand Up @@ -142,5 +144,3 @@ Deno.test("Storyblok Image CDN - transform", async (t) => {
);
});
});


1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.2.2