@jimp/plugin-rotate
Advanced tools
Comparing version 1.1.2 to 1.1.3--canary.34e8f3b.0
@@ -180,3 +180,5 @@ "use strict"; | ||
const parsed = RotateOptionsSchema.parse(options); | ||
let { deg, mode = true } = typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const actualOptions = typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const { mode = true } = actualOptions; | ||
let { deg } = actualOptions; | ||
// No need to do extra rotation | ||
@@ -183,0 +185,0 @@ deg %= 360; |
@@ -177,3 +177,5 @@ import { ResizeStrategy, methods as resizeMethods } from "@jimp/plugin-resize"; | ||
const parsed = RotateOptionsSchema.parse(options); | ||
let { deg, mode = true } = typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const actualOptions = typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const { mode = true } = actualOptions; | ||
let { deg } = actualOptions; | ||
// No need to do extra rotation | ||
@@ -180,0 +182,0 @@ deg %= 360; |
{ | ||
"name": "@jimp/plugin-rotate", | ||
"version": "1.1.2", | ||
"version": "1.1.3--canary.34e8f3b.0", | ||
"repository": "jimp-dev/jimp", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
@@ -16,22 +19,22 @@ "lint": "eslint .", | ||
"dependencies": { | ||
"@jimp/core": "1.1.2", | ||
"@jimp/plugin-crop": "1.1.2", | ||
"@jimp/plugin-resize": "1.1.2", | ||
"@jimp/types": "1.1.2", | ||
"@jimp/utils": "1.1.2", | ||
"zod": "^3.22.4" | ||
"@jimp/core": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/plugin-crop": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/plugin-resize": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/types": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/utils": "1.1.3--canary.34e8f3b.0", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@jimp/config-eslint": "1.1.2", | ||
"@jimp/config-typescript": "1.1.2", | ||
"@jimp/config-vitest": "1.1.2", | ||
"@jimp/config-eslint": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/config-typescript": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/config-vitest": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/core": "workspace:*", | ||
"@jimp/test-utils": "1.1.2", | ||
"@types/node": "^20.12.5", | ||
"@vitest/browser": "^1.4.0", | ||
"eslint": "^8.57.0", | ||
"@jimp/test-utils": "1.1.3--canary.34e8f3b.0", | ||
"@types/node": "^18.19.48", | ||
"@vitest/browser": "^2.0.5", | ||
"eslint": "^9.9.1", | ||
"tshy": "^3.0.2", | ||
"typescript": "^5.5.4", | ||
"vite-plugin-node-polyfills": "^0.21.0", | ||
"vitest": "^1.4.0" | ||
"vite-plugin-node-polyfills": "^0.22.0", | ||
"vitest": "^2.0.5" | ||
}, | ||
@@ -68,3 +71,3 @@ "tshy": { | ||
"module": "./dist/esm/index.js", | ||
"gitHead": "ba9de4df25a2f0e41f11a68c7aa50181a52115cb" | ||
"gitHead": "34e8f3bbb3f0392953c609a6d4f6e4ec4acb092e" | ||
} |
@@ -19,4 +19,4 @@ import { describe, expect, test } from "vitest"; | ||
"▪▪▪▪▴▴▴▴", | ||
"▦▪▪▪▴▴▴▦" | ||
) | ||
"▦▪▪▪▴▴▴▦", | ||
), | ||
); | ||
@@ -44,4 +44,4 @@ | ||
"▴▴▴▦▴▴▴", | ||
"▴▴▴▦▴▴▴" | ||
) | ||
"▴▴▴▦▴▴▴", | ||
), | ||
); | ||
@@ -60,3 +60,3 @@ | ||
const imgSrc = jimp.fromBitmap( | ||
makeTestImage("▴▴▴▴▪▪▪▪", "▴▴▴▴▪▪▪▪", "▦▦▦▦▴▴▴▴", "▦▦▦▦▴▴▴▴") | ||
makeTestImage("▴▴▴▴▪▪▪▪", "▴▴▴▴▪▪▪▪", "▦▦▦▦▴▴▴▴", "▦▦▦▦▴▴▴▴"), | ||
); | ||
@@ -75,3 +75,3 @@ | ||
const imgSrc = jimp.fromBitmap( | ||
makeTestImage("□□□□□□□□", "▹▹▹▹▹▹▹▹", "▿▿▿▿▿▿▿▿", "□□□□□□□□") | ||
makeTestImage("□□□□□□□□", "▹▹▹▹▹▹▹▹", "▿▿▿▿▿▿▿▿", "□□□□□□□□"), | ||
); | ||
@@ -84,3 +84,3 @@ | ||
expect( | ||
imgSrc.clone().rotate({ deg: angle, mode: false }) | ||
imgSrc.clone().rotate({ deg: angle, mode: false }), | ||
).toMatchSnapshot(); | ||
@@ -87,0 +87,0 @@ }); |
@@ -231,4 +231,5 @@ import { ResizeStrategy, methods as resizeMethods } from "@jimp/plugin-resize"; | ||
const parsed = RotateOptionsSchema.parse(options); | ||
let { deg, mode = true } = | ||
typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const actualOptions = typeof parsed === "number" ? { deg: parsed } : parsed; | ||
const { mode = true } = actualOptions; | ||
let { deg } = actualOptions; | ||
@@ -235,0 +236,0 @@ // No need to do extra rotation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
114409
27
796
2
+ Added@jimp/core@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/file-ops@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/plugin-crop@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/plugin-resize@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/types@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/utils@1.1.3--canary.34e8f3b.0(transitive)
- Removed@jimp/core@1.1.2(transitive)
- Removed@jimp/file-ops@1.1.2(transitive)
- Removed@jimp/plugin-crop@1.1.2(transitive)
- Removed@jimp/plugin-resize@1.1.2(transitive)
- Removed@jimp/types@1.1.2(transitive)
- Removed@jimp/utils@1.1.2(transitive)
Updatedzod@^3.23.8