@m4k/common 0.2.6 → 0.2.8
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 +12 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@m4k/common` are documented here.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.8]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Updated the TypeScript development dependency.
|
package/lib/index.d.ts
CHANGED
|
@@ -131,4 +131,5 @@ export declare class ProcessedFile {
|
|
|
131
131
|
constructor(name: string, type: string, stream?: AsyncIterable<Uint8Array> | undefined);
|
|
132
132
|
}
|
|
133
133
|
export { mimeTypes } from "./mime.js";
|
|
134
|
+
export declare function isImageNoOp(opt: ImageOptions, inputExt: string): boolean;
|
|
134
135
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -9,4 +9,17 @@ export class ProcessedFile {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
export { mimeTypes } from "./mime.js";
|
|
12
|
+
export function isImageNoOp(opt, inputExt) {
|
|
13
|
+
const outFmt = opt.format ?? opt.ext ?? "avif";
|
|
14
|
+
if (outFmt !== inputExt)
|
|
15
|
+
return false;
|
|
16
|
+
return (!opt.resize &&
|
|
17
|
+
!opt.crop &&
|
|
18
|
+
opt.rotate == null &&
|
|
19
|
+
opt.quality == null &&
|
|
20
|
+
!opt.colorspace &&
|
|
21
|
+
!opt.keepExif &&
|
|
22
|
+
!opt.keepIcc &&
|
|
23
|
+
!opt.keepMetadata);
|
|
24
|
+
}
|
|
12
25
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4k/common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Common types and utilities for m4k",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "sv2dev",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"typecheck": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"typescript": "^
|
|
27
|
+
"typescript": "^7.0.2"
|
|
28
28
|
}
|
|
29
29
|
}
|