Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Feb 18, 2023
1 parent bae6d93 commit 04288bf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
},
"homepage": "https://github.com/image-js/fast-png#readme",
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^16.11.6",
"eslint": "^8.1.0",
"eslint-config-cheminfo-typescript": "^10.1.1",
"jest": "^27.3.1",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.0",
"eslint": "^8.34.0",
"eslint-config-cheminfo-typescript": "^11.2.2",
"jest": "^29.4.3",
"pngjs": "^6.0.0",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.7",
"typescript": "^4.4.4"
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
"ts-jest": "^29.0.5",
"typescript": "^4.9.5"
},
"dependencies": {
"@types/pako": "^1.0.2",
"iobuffer": "^5.0.4",
"pako": "^2.0.4"
"@types/pako": "^2.0.0",
"iobuffer": "^5.3.2",
"pako": "^2.1.0"
}
}
2 changes: 1 addition & 1 deletion src/PngDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default class PngDecoder extends IOBuffer {
}
const compressedProfile = this.readBytes(length - name.length - 2);
this._png.iccEmbeddedProfile = {
name: name,
name,
profile: inflate(compressedProfile),
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/PngEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class PngEncoder extends IOBuffer {
public constructor(data: ImageData, options: PngEncoderOptions = {}) {
super();
this._colorType = ColorType.UNKNOWN;
this._zlibOptions = Object.assign({}, defaultZlibOptions, options.zlib);
this._zlibOptions = { ...defaultZlibOptions, ...options.zlib};
this._png = this._checkData(data);
this.setBigEndian();
}
Expand Down Expand Up @@ -110,9 +110,9 @@ export default class PngEncoder extends IOBuffer {
const png: DecodedPng = {
width: checkInteger(data.width, 'width'),
height: checkInteger(data.height, 'height'),
channels: channels,
channels,
data: data.data,
depth: depth,
depth,
text: {},
};
this._colorType = colorType;
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/decode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('decode', () => {
});
expect(img.palette).toBeInstanceOf(Array);
expect(img.palette).toHaveLength(256);
// @ts-ignore
// @ts-expect-error Palette should not be undefined
expect(img.palette[0]).toStrictEqual([124, 124, 124]);
});

Expand All @@ -55,9 +55,9 @@ describe('decode', () => {
});
expect(img.palette).toBeInstanceOf(Array);
expect(img.palette).toHaveLength(256);
// @ts-ignore
// @ts-expect-error Palette should not be undefined
expect(img.palette[0]).toStrictEqual([71, 112, 76, 0]);
// @ts-ignore
// @ts-expect-error Palette should not be undefined
expect(img.palette[255]).toStrictEqual([98, 185, 201, 255]);
});

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/encode.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @ts-ignore
// @ts-expect-error TS not defined but this is a test
import { PNG } from 'pngjs';

import { encode, decode } from '../index';
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('encode', () => {
expect(() =>
encode({
width: 1,
// @ts-ignore
// @ts-expect-error we want to test the error
height: undefined,
depth: 8,
data: new Uint8Array(),
Expand Down

0 comments on commit 04288bf

Please sign in to comment.