@artsy/img 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.1.2 (Fri Dec 09 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - fix(gemini): fixes crop url mode [#9](https://github.com/artsy/img/pull/9) ([@dzucconi](https://github.com/dzucconi))
6
+
7
+ #### Authors: 1
8
+
9
+ - Damon ([@dzucconi](https://github.com/dzucconi))
10
+
11
+ ---
12
+
1
13
  # v0.1.1 (Fri Dec 09 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -11,6 +11,7 @@ const gemini = (config) => {
11
11
  switch (mode) {
12
12
  case "crop": {
13
13
  resizeTo = "fill";
14
+ break;
14
15
  }
15
16
  case "resize": {
16
17
  if (width && !height) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/img",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Logic for constructing image proxy URLs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,7 +61,7 @@ describe("strategies", () => {
61
61
  const img = gemini.exec("crop", EXAMPLE_SRC, { width: 200, height: 200 });
62
62
 
63
63
  expect(img).toEqual(
64
- "https://d7hftxdivxxvm.cloudfront.net?height=200&quality=80&resize_to=fit&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FMFFPXvpJSoGzggU8zujwBw%2Fnormalized.jpg&width=200"
64
+ "https://d7hftxdivxxvm.cloudfront.net?height=200&quality=80&resize_to=fill&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FMFFPXvpJSoGzggU8zujwBw%2Fnormalized.jpg&width=200"
65
65
  );
66
66
  });
67
67
  });
@@ -14,6 +14,7 @@ export const gemini = (config: Gemini): Exec => {
14
14
  switch (mode) {
15
15
  case "crop": {
16
16
  resizeTo = "fill";
17
+ break;
17
18
  }
18
19
 
19
20
  case "resize": {