Update electron to 13.1.2
This commit is contained in:
parent
6e88c6aee1
commit
df0aadc8a4
5 changed files with 19 additions and 9 deletions
|
@ -239,7 +239,7 @@
|
|||
"core-js": "2.6.9",
|
||||
"cross-env": "5.2.0",
|
||||
"css-loader": "3.2.0",
|
||||
"electron": "13.1.0",
|
||||
"electron": "13.1.2",
|
||||
"electron-builder": "22.10.5",
|
||||
"electron-mocha": "8.1.1",
|
||||
"electron-notarize": "0.1.1",
|
||||
|
|
|
@ -8,6 +8,8 @@ import * as path from 'path';
|
|||
import AbortController from 'abort-controller';
|
||||
import { MIMEType, IMAGE_JPEG } from '../../types/MIME';
|
||||
|
||||
import { typedArrayToArrayBuffer } from '../../Crypto';
|
||||
|
||||
import {
|
||||
fetchLinkPreviewImage,
|
||||
fetchLinkPreviewMetadata,
|
||||
|
@ -1155,7 +1157,7 @@ describe('link preview fetching', () => {
|
|||
new AbortController().signal
|
||||
),
|
||||
{
|
||||
data: fixture.buffer,
|
||||
data: typedArrayToArrayBuffer(fixture),
|
||||
contentType: contentType as MIMEType,
|
||||
}
|
||||
);
|
||||
|
@ -1240,7 +1242,7 @@ describe('link preview fetching', () => {
|
|||
new AbortController().signal
|
||||
),
|
||||
{
|
||||
data: fixture.buffer,
|
||||
data: typedArrayToArrayBuffer(fixture),
|
||||
contentType: IMAGE_JPEG,
|
||||
}
|
||||
);
|
||||
|
|
|
@ -13,6 +13,8 @@ import {
|
|||
IMAGE_WEBP,
|
||||
} from '../../types/MIME';
|
||||
|
||||
import { typedArrayToArrayBuffer } from '../../Crypto';
|
||||
|
||||
import { sniffImageMimeType } from '../../util/sniffImageMimeType';
|
||||
|
||||
describe('sniffImageMimeType', () => {
|
||||
|
@ -89,7 +91,9 @@ describe('sniffImageMimeType', () => {
|
|||
});
|
||||
|
||||
it('handles ArrayBuffers', async () => {
|
||||
const arrayBuffer = (await fixture('kitten-1-64-64.jpg')).buffer;
|
||||
const arrayBuffer = typedArrayToArrayBuffer(
|
||||
await fixture('kitten-1-64-64.jpg')
|
||||
);
|
||||
assert.strictEqual(sniffImageMimeType(arrayBuffer), IMAGE_JPEG);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -39,7 +39,11 @@ export function getAnimatedPngDataIfExists(
|
|||
|
||||
let numPlays: void | number;
|
||||
|
||||
const dataView = new DataView(bytes.buffer);
|
||||
const dataView = new DataView(
|
||||
bytes.buffer,
|
||||
bytes.byteOffset,
|
||||
bytes.byteLength
|
||||
);
|
||||
|
||||
let i = PNG_SIGNATURE.length;
|
||||
while (i < bytes.byteLength && i <= MAX_BYTES_TO_READ) {
|
||||
|
|
|
@ -7142,10 +7142,10 @@ electron-window@^0.8.0:
|
|||
dependencies:
|
||||
is-electron-renderer "^2.0.0"
|
||||
|
||||
electron@13.1.0:
|
||||
version "13.1.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-13.1.0.tgz#6d960bcc0dfb8663dd511b59a697e2fad35b2b6a"
|
||||
integrity sha512-ykRAaPWrVQkm2Lju4O4rMQzahNcxWLeLMrhBw8WnmIiugkvUH0MhZ85jsOTrAoQ2Zl1FC542bloKFWGSkeVjkg==
|
||||
electron@13.1.2:
|
||||
version "13.1.2"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-13.1.2.tgz#8c9abf9015766c9cbc16f10c99282d00d6ae1b90"
|
||||
integrity sha512-aNT9t+LgdQaZ7FgN36pN7MjSEoj+EWc2T9yuOqBApbmR4HavGRadSz7u9N2Erw2ojdIXtei2RVIAvVm8mbDZ0g==
|
||||
dependencies:
|
||||
"@electron/get" "^1.0.1"
|
||||
"@types/node" "^14.6.2"
|
||||
|
|
Loading…
Reference in a new issue