Skip to content

Commit

Permalink
devDeps: @metamask/eslint* packages 9->10 (#106)
Browse files Browse the repository at this point in the history
* devDeps: bump electron; dedupe browserslist

* yarn dedupe

* devDeps: bump @metamask/eslint* packages 9->10

* lint:fix
  • Loading branch information
legobeat authored Aug 29, 2023
1 parent 4d8a6fb commit fcaf7d2
Show file tree
Hide file tree
Showing 11 changed files with 884 additions and 652 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
{
files: ['*.ts'],
extends: ['@metamask/eslint-config-typescript'],
rules: {
'@typescript-eslint/consistent-type-definitions': 'off',
},
},

{
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@
"@jest-runner/electron": "^3.0.1",
"@lavamoat/allow-scripts": "^2.3.1",
"@metamask/auto-changelog": "^3.0.0",
"@metamask/eslint-config": "^9.0.0",
"@metamask/eslint-config-jest": "^9.0.0",
"@metamask/eslint-config-nodejs": "^9.0.0",
"@metamask/eslint-config-typescript": "^9.0.1",
"@metamask/eslint-config": "^10.0.0",
"@metamask/eslint-config-jest": "^10.0.0",
"@metamask/eslint-config-nodejs": "^10.0.0",
"@metamask/eslint-config-typescript": "^10.0.0",
"@types/chrome": "^0.0.204",
"@types/jest": "^26.0.13",
"@types/node": "^18.0.0",
"@types/readable-stream": "^2.3.9",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"browserify": "^17.0.0",
"electron": "^18.3.7",
"eslint": "^7.30.0",
"electron": "^18.3.15",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.8.2",
"eslint-plugin-jsdoc": "^39.3.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^26.6.3",
"jest-it-up": "^2.0.2",
"prettier": "^2.7.1",
Expand Down
2 changes: 1 addition & 1 deletion src/BasePostMessageStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('BasePostMessageStream', () => {
};

stream.once('error', (error) => {
expect(error.message).toStrictEqual('push error');
expect(error.message).toBe('push error');
resolve();
});

Expand Down
4 changes: 2 additions & 2 deletions src/WebWorker/WebWorker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('WebWorker Streams', () => {
// Send message to worker, triggering a response
parentStream.write(111);

expect(await responsePromise).toStrictEqual(555);
expect(await responsePromise).toBe(555);

// Check that events with falsy data are ignored as expected
parentStream.once('data', (data) => {
Expand All @@ -48,7 +48,7 @@ describe('WebWorker Streams', () => {
// Terminate worker, destroy parent, and check that parent was destroyed
worker.terminate();
parentStream.destroy();
expect(parentStream.destroyed).toStrictEqual(true);
expect(parentStream.destroyed).toBe(true);
});

describe('WebWorkerPostMessageStream', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('post-message-stream', () => {
);

for (const exportName of expectedExports) {
expect(exportName in PostMessageStream).toStrictEqual(true);
expect(exportName in PostMessageStream).toBe(true);
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('post-message-stream', () => {
);

for (const exportName of expectedExports) {
expect(exportName in PostMessageStream).toStrictEqual(true);
expect(exportName in PostMessageStream).toBe(true);
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/node-process/node-process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Node Child Process Streams', () => {
// Send message to child, triggering a response
parentStream.write(111);

expect(await responsePromise).toStrictEqual(555);
expect(await responsePromise).toBe(555);

// Check that events with falsy data are ignored as expected
parentStream.once('data', (data) => {
Expand All @@ -63,7 +63,7 @@ describe('Node Child Process Streams', () => {
// was destroyed
childProcess.kill();
parentStream.destroy();
expect(parentStream.destroyed).toStrictEqual(true);
expect(parentStream.destroyed).toBe(true);
});

describe('ProcessParentMessageStream', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/node-thread/node-thread.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Node Thread Streams', () => {
// Send message to child, triggering a response
parentStream.write(111);

expect(await responsePromise).toStrictEqual(555);
expect(await responsePromise).toBe(555);

// Check that events with falsy data are ignored as expected
parentStream.once('data', (data) => {
Expand All @@ -61,7 +61,7 @@ describe('Node Thread Streams', () => {
// was destroyed
thread.terminate();
parentStream.destroy();
expect(parentStream.destroyed).toStrictEqual(true);
expect(parentStream.destroyed).toBe(true);
});

describe('ThreadParentMessageStream', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/BrowserRuntimePostMessageStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('BrowserRuntimePostMessageStream', () => {
// Write to stream A, triggering a response from stream B
streamA.write(111);

expect(await responsePromise).toStrictEqual(555);
expect(await responsePromise).toBe(555);

const throwingListener = (data: any) => {
throw new Error(`Unexpected data on stream: ${data}`);
Expand All @@ -129,7 +129,7 @@ describe('BrowserRuntimePostMessageStream', () => {
// Destroy streams and confirm that they were destroyed
streamA.destroy();
streamB.destroy();
expect(streamA.destroyed).toStrictEqual(true);
expect(streamB.destroyed).toStrictEqual(true);
expect(streamA.destroyed).toBe(true);
expect(streamB.destroyed).toBe(true);
});
});
8 changes: 4 additions & 4 deletions src/window/WindowPostMessageStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('WindowPostMessageStream', () => {
// Write to stream A, triggering a response from stream B
streamA.write(111);

expect(await responsePromise).toStrictEqual(555);
expect(await responsePromise).toBe(555);

// Check that events without e.g. the correct event.source are ignored as
// expected
Expand All @@ -65,8 +65,8 @@ describe('WindowPostMessageStream', () => {
// Destroy streams and confirm that they were destroyed
streamA.destroy();
streamB.destroy();
expect(streamA.destroyed).toStrictEqual(true);
expect(streamB.destroyed).toStrictEqual(true);
expect(streamA.destroyed).toBe(true);
expect(streamB.destroyed).toBe(true);
});

it('can take targetOrigin as an option', () => {
Expand All @@ -75,7 +75,7 @@ describe('WindowPostMessageStream', () => {
target: 'target',
targetOrigin: '*',
});
expect((stream as any)._targetOrigin).toStrictEqual('*');
expect((stream as any)._targetOrigin).toBe('*');
stream.destroy();
});
});
Loading

0 comments on commit fcaf7d2

Please sign in to comment.