@divriots/jampack 0.31.0 → 0.31.1

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/dist/cache.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { GlobalState } from './state.js';
3
2
  declare const listOfCategories: readonly ["img", "img-ext"];
4
3
  export type Category = (typeof listOfCategories)[number];
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { GlobalState } from '../state.js';
3
2
  export declare const defaultTargets: () => import("lightningcss").Targets;
4
3
  export declare function compressCSS({ targets }: GlobalState, originalCode: Buffer, type?: 'inline' | undefined): Promise<Buffer>;
@@ -1,3 +1,2 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { GlobalState } from '../state.js';
3
2
  export declare function compressHTML(state: GlobalState, originalCode: Buffer): Promise<Buffer>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import sharp from 'sharp';
3
2
  import { MimeType } from 'file-type';
4
3
  import { GlobalState } from '../state.js';
@@ -83,11 +83,11 @@ export async function compressImage(state, data, options) {
83
83
  // To format
84
84
  switch (toFormat) {
85
85
  case 'jpeg':
86
- sharpFile = sharpFile.jpeg({ ...imageOptions.jpeg.options } || {});
86
+ sharpFile = sharpFile.jpeg({ ...imageOptions.jpeg.options });
87
87
  outputFormat = 'jpg';
88
88
  break;
89
89
  case 'png':
90
- sharpFile = sharpFile.png({ ...imageOptions.png.options } || {});
90
+ sharpFile = sharpFile.png({ ...imageOptions.png.options });
91
91
  outputFormat = 'png';
92
92
  break;
93
93
  case 'webp':
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  /**
4
3
  * @type import('./error.cjs').ProloadError
5
4
  */
@@ -3,5 +3,5 @@
3
3
  * @param {string} filePath
4
4
  */
5
5
  export default function requireOrImport(filePath: string, { middleware }?: {
6
- middleware?: any[] | undefined;
6
+ middleware?: never[] | undefined;
7
7
  }): Promise<any>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { FileExtension, MimeType } from 'file-type';
3
2
  import { ImageFormat } from '../compressors/images.js';
4
3
  type ImageMeta = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divriots/jampack",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "cache-version": {
5
5
  "img": "v1",
6
6
  "img-ext": "v1"
@@ -35,6 +35,7 @@
35
35
  "critters": "^0.0.22",
36
36
  "deepmerge": "^4.3.1",
37
37
  "esbuild": "^0.20.2",
38
+ "escalade": "^3.2.0",
38
39
  "file-type": "^19.0.0",
39
40
  "globby": "^14.0.1",
40
41
  "hasha": "^6.0.0",