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/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 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, }); } }); 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