From b960e779b70508ed4b11cce84cd2e3fc2d529213 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 29 Sep 2023 20:15:57 +0100 Subject: [PATCH 1/3] fix: don't include node type refs in declaration (#83) * fix: don't include node type refs in declaration * chore: skip imageengine tests --- demo/src/examples.json | 2 +- scripts/build_npm.ts | 3 +++ src/e2e.test.ts | 51 +++++++++++++++++++++++++----------------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/demo/src/examples.json b/demo/src/examples.json index 6807b54..08bf28e 100644 --- a/demo/src/examples.json +++ b/demo/src/examples.json @@ -50,7 +50,7 @@ "keycdn": ["KeyCDN", "https://ip.keycdn.com/example.jpg"], "imageengine": [ "ImageEngine", - "https://blazing-fast-pics.cdn.imgeng.in/images/pic_1.jpg?imgeng=/w_400" + "https://blazing-fast-pics.cdn.imgeng.in/images/pic_3.jpg?imgeng=/w_400" ], "contentstack": [ "Contentstack", diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 4829180..4a1c702 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -11,6 +11,9 @@ await build({ }, }, rootTestDir: "./src", + compilerOptions: { + lib: ["ESNext", "WebWorker"], + }, package: { // package.json properties name: "unpic", diff --git a/src/e2e.test.ts b/src/e2e.test.ts index 14e63cb..5baf482 100644 --- a/src/e2e.test.ts +++ b/src/e2e.test.ts @@ -10,33 +10,44 @@ import type { ImageCdn } from "./types.ts"; Deno.test("E2E tests", async (t) => { for (const [cdn, example] of Object.entries(examples)) { const [name, url] = example; - await t.step(`${name} resizes an image`, async () => { - const image = transformUrl({ - url, - width: 100, - cdn: cdn as ImageCdn, - }); + // ImageEngine is really flaky, so ignore it - assertExists(image, `Failed to resize ${name} with ${cdn}`); - const { width } = await getPixels(image); + const ignore = cdn === "imageengine"; + await t.step({ + name: `${name} resizes an image`, + fn: async () => { + const image = transformUrl({ + url, + width: 100, + cdn: cdn as ImageCdn, + }); - assertEquals(width, 100); + assertExists(image, `Failed to resize ${name} with ${cdn}`); + const { width } = await getPixels(image); + + assertEquals(width, 100); + }, + ignore, }); - await t.step(`${name} returns requested aspect ratio`, async () => { - const image = transformUrl({ - url, - width: 100, - height: 50, - cdn: cdn as ImageCdn, - }); + await t.step({ + name: `${name} returns requested aspect ratio`, + fn: async () => { + const image = transformUrl({ + url, + width: 100, + height: 50, + cdn: cdn as ImageCdn, + }); - assertExists(image, `Failed to resize ${name} with ${cdn}`); + assertExists(image, `Failed to resize ${name} with ${cdn}`); - const { width, height } = await getPixels(image); + const { width, height } = await getPixels(image); - assertEquals(width, 100); - assertEquals(height, 50); + assertEquals(width, 100); + assertEquals(height, 50); + }, + ignore, }); } }); From 8822a997475aa637f141e7fdbf99cd7bfb1fa9ee Mon Sep 17 00:00:00 2001 From: Floyd Jones <43974214+floydjones1@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:17:37 -0400 Subject: [PATCH 2/3] chore: adding imageengine to list of supproted CDN (#81) Co-authored-by: Matt Kane --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 064473c..b521e45 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ is not auto-detected. - Contentstack - Cloudinary - Directus +- ImageEngine - Imgix, including Unsplash, DatoCMS, Sanity and Prismic - Kontent.ai - Shopify From f4ea4cf9ae1c7122d5b36598ac8a0148143271d9 Mon Sep 17 00:00:00 2001 From: "mixie-bot[bot]" <127146692+mixie-bot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 19:20:47 +0000 Subject: [PATCH 3/3] chore(main): release 3.10.1 (#84) Co-authored-by: mixie-bot[bot] <127146692+mixie-bot[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ version.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d661b31..f3f3b38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.10.1](https://github.com/ascorbic/unpic/compare/v3.10.0...v3.10.1) (2023-09-29) + + +### Bug Fixes + +* don't include node type refs in declaration ([#83](https://github.com/ascorbic/unpic/issues/83)) ([b960e77](https://github.com/ascorbic/unpic/commit/b960e779b70508ed4b11cce84cd2e3fc2d529213)) + ## [3.10.0](https://github.com/ascorbic/unpic/compare/v3.9.0...v3.10.0) (2023-08-01) diff --git a/version.txt b/version.txt index 30291cb..f870be2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.10.0 +3.10.1