From 6878598a5d3eb431c1473cc224d6e155fbf97325 Mon Sep 17 00:00:00 2001 From: tuyuribr <45042245+tuyuribr@users.noreply.github.com> Date: Sat, 5 Feb 2022 16:42:25 -0300 Subject: [PATCH 01/14] fix: await promise when setting user agent (#1113) Some of my devices were bugging out because the setUserAgent didn't had an await, after this everything was working fine (try loading the wwebjs in a broken microSd ahhaha). We need some testing but on my limited testing everything is working Co-authored-by: Rajeh Taher --- src/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.js b/src/Client.js index 2888dd2..643844a 100644 --- a/src/Client.js +++ b/src/Client.js @@ -76,7 +76,7 @@ class Client extends EventEmitter { page = (await browser.pages())[0]; } - page.setUserAgent(this.options.userAgent); + await page.setUserAgent(this.options.userAgent); this.pupBrowser = browser; this.pupPage = page; From bb2ef88e0a72c928c3e91ab3b4381d807bb89d24 Mon Sep 17 00:00:00 2001 From: Shir Serlui <70711723+shirser121@users.noreply.github.com> Date: Sat, 5 Feb 2022 21:52:04 +0200 Subject: [PATCH 02/14] fix: message.delete() can revoke for everyone (#1107) Change msg.canRevoke to msg._canRevoke according to WhatsApp code change --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 9bbdae2..0c582cd 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -382,7 +382,7 @@ class Message extends Base { await this.client.pupPage.evaluate((msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - if (everyone && msg.id.fromMe && msg.canRevoke()) { + if (everyone && msg.id.fromMe && msg._canRevoke()) { return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], true); } From 20aee44c3bc841664023eaefc8f2223b024df08f Mon Sep 17 00:00:00 2001 From: Zulfikar Date: Sun, 6 Feb 2022 03:41:27 +0700 Subject: [PATCH 03/14] fix getLabels error (#1049) Co-authored-by: Rajeh Taher --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 6989a86..8e7b5db 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -31,7 +31,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.BlockContact = window.mR.findModule('blockContact')[0]; window.Store.GroupMetadata = window.mR.findModule((module) => module.default && module.default.handlePendingInvite)[0].default; window.Store.UploadUtils = window.mR.findModule((module) => (module.default && module.default.encryptAndUpload) ? module.default : null)[0].default; - window.Store.Label = window.mR.findModule('LabelCollection')[0].default; + window.Store.Label = window.mR.findModule('LabelCollection')[0].LabelCollection; window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].GK; window.Store.QueryOrder = window.mR.findModule('queryOrder')[0]; window.Store.QueryProduct = window.mR.findModule('queryProduct')[0]; From 32e47d818a8846389181c41996456e7e80f83965 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 5 Feb 2022 18:19:02 -0400 Subject: [PATCH 04/14] fix: only emit `disconnected` event on navigation when state is `PAIRING` (#1169) --- src/Client.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Client.js b/src/Client.js index 643844a..dd9b819 100644 --- a/src/Client.js +++ b/src/Client.js @@ -430,11 +430,13 @@ class Client extends EventEmitter { */ this.emit(Events.READY); - // Disconnect when navigating away - // Because WhatsApp Web now reloads when logging out from the device, this also covers that case + // Disconnect when navigating away when in PAIRING state (detect logout) this.pupPage.on('framenavigated', async () => { - this.emit(Events.DISCONNECTED, 'NAVIGATION'); - await this.destroy(); + const appState = await this.getState(); + if(appState === WAState.PAIRING) { + this.emit(Events.DISCONNECTED, 'NAVIGATION'); + await this.destroy(); + } }); } From 2f1c894a34e574073c54a65e659a63aa73559617 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 5 Feb 2022 20:04:00 -0400 Subject: [PATCH 05/14] add tests for `takeoverOnConflict` (#1170) * add tests * fix module test, remove unused CryptoLib --- src/util/Injected.js | 1 - tests/client.js | 108 +++++++++++++++++++++++++++++-------------- 2 files changed, 74 insertions(+), 35 deletions(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 8e7b5db..06b7049 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -8,7 +8,6 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store = Object.assign({}, window.mR.findModule(m => m.default && m.default.Chat)[0].default); window.Store.AppState = window.mR.findModule('STREAM')[0].Socket; window.Store.Conn = window.mR.findModule('Conn')[0].Conn; - window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; window.Store.Wap = window.mR.findModule('queryLinkPreview')[0].default; window.Store.SendSeen = window.mR.findModule('sendSeen')[0]; window.Store.SendClear = window.mR.findModule('sendClear')[0]; diff --git a/tests/client.js b/tests/client.js index 0ad8e72..78c0852 100644 --- a/tests/client.js +++ b/tests/client.js @@ -7,7 +7,7 @@ const Contact = require('../src/structures/Contact'); const Message = require('../src/structures/Message'); const MessageMedia = require('../src/structures/MessageMedia'); const Location = require('../src/structures/Location'); -const { MessageTypes } = require('../src/util/Constants'); +const { MessageTypes, WAState } = require('../src/util/Constants'); const remoteId = helper.remoteId; @@ -145,6 +145,46 @@ describe('Client', function() { await client.destroy(); }); + + it('can take over if client was logged in somewhere else with takeoverOnConflict=true', async function() { + this.timeout(40000); + + const readyCallback1 = sinon.spy(); + const readyCallback2 = sinon.spy(); + const disconnectedCallback1 = sinon.spy(); + const disconnectedCallback2 = sinon.spy(); + + const client1 = helper.createClient({ + withSession: true, + options: { takeoverOnConflict: true, takeoverTimeoutMs: 5000 } + }); + const client2 = helper.createClient({withSession: true}); + + client1.on('ready', readyCallback1); + client2.on('ready', readyCallback2); + client1.on('disconnected', disconnectedCallback1); + client2.on('disconnected', disconnectedCallback2); + + await client1.initialize(); + expect(readyCallback1.called).to.equal(true); + expect(readyCallback2.called).to.equal(false); + expect(disconnectedCallback1.called).to.equal(false); + expect(disconnectedCallback2.called).to.equal(false); + + await client2.initialize(); + expect(readyCallback2.called).to.equal(true); + expect(disconnectedCallback1.called).to.equal(false); + expect(disconnectedCallback2.called).to.equal(false); + + // wait for takeoverTimeoutMs to kick in + await helper.sleep(5200); + expect(disconnectedCallback1.called).to.equal(false); + expect(disconnectedCallback2.called).to.equal(true); + expect(disconnectedCallback2.calledWith(WAState.CONFLICT)).to.equal(true); + + await client1.destroy(); + + }); }); describe('Authenticated', function() { @@ -171,46 +211,46 @@ describe('Client', function() { it('exposes all required WhatsApp Web internal models', async function() { const expectedModules = [ - 'Chat', - 'Msg', - 'Contact', - 'Conn', 'AppState', - 'CryptoLib', - 'Wap', - 'SendSeen', - 'SendClear', - 'SendDelete', - 'genId', - 'SendMessage', - 'MsgKey', - 'Invite', - 'OpaqueData', - 'MediaPrep', - 'MediaObject', - 'MediaUpload', - 'Cmd', - 'MediaTypes', - 'VCard', - 'UserConstructor', - 'Validators', - 'WidFactory', 'BlockContact', - 'GroupMetadata', - 'Sticker', - 'UploadUtils', - 'Label', + 'Call', + 'Chat', + 'Cmd', + 'Conn', + 'Contact', + 'DownloadManager', 'Features', + 'GroupMetadata', + 'Invite', + 'Label', + 'MediaObject', + 'MediaPrep', + 'MediaTypes', + 'MediaUpload', + 'Msg', + 'MsgKey', + 'OpaqueData', 'QueryOrder', 'QueryProduct', - 'DownloadManager' - ]; + 'SendClear', + 'SendDelete', + 'SendMessage', + 'SendSeen', + 'Sticker', + 'UploadUtils', + 'UserConstructor', + 'VCard', + 'Validators', + 'Wap', + 'WidFactory', + 'genId' + ]; - const loadedModules = await client.pupPage.evaluate(() => { - return Object.keys(window.Store); - }); + const loadedModules = await client.pupPage.evaluate((expectedModules) => { + return expectedModules.filter(m => Boolean(window.Store[m])); + }, expectedModules); - expect(loadedModules).to.include.members(expectedModules); + expect(loadedModules).to.have.members(expectedModules); }); }); From f149516d0dc2f55b5196c6030136ab4e3f90e6c7 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 5 Feb 2022 22:05:42 -0400 Subject: [PATCH 06/14] chore(tests): add Chat model tests (#784) * add search and status tests * reset to previous status in test * move version to its own test * add tests for Chat model * keep hooks at the top * run tests recursively in default script --- package.json | 3 +- src/Client.js | 4 +- src/structures/Chat.js | 2 +- tests/client.js | 54 +++++++++++ tests/structures/chat.js | 187 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 246 insertions(+), 4 deletions(-) create mode 100644 tests/structures/chat.js diff --git a/package.json b/package.json index 117a118..db791e6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "./index.js", "typings": "./index.d.ts", "scripts": { - "test": "mocha tests", + "test": "mocha tests --recursive", + "test-single": "mocha", "shell": "node --experimental-repl-await ./shell.js", "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose" }, diff --git a/src/Client.js b/src/Client.js index dd9b819..a6bd6da 100644 --- a/src/Client.js +++ b/src/Client.js @@ -729,7 +729,7 @@ class Client extends EventEmitter { return await this.pupPage.evaluate(async chatId => { let chat = await window.Store.Chat.get(chatId); await window.Store.Cmd.archiveChat(chat, true); - return chat.archive; + return true; }, chatId); } @@ -741,7 +741,7 @@ class Client extends EventEmitter { return await this.pupPage.evaluate(async chatId => { let chat = await window.Store.Chat.get(chatId); await window.Store.Cmd.archiveChat(chat, false); - return chat.archive; + return false; }, chatId); } diff --git a/src/structures/Chat.js b/src/structures/Chat.js index 32bb486..b8aacb1 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -65,7 +65,7 @@ class Chat extends Base { /** * Indicates if the chat is muted or not - * @type {number} + * @type {boolean} */ this.isMuted = data.isMuted; diff --git a/tests/client.js b/tests/client.js index 78c0852..49c69ec 100644 --- a/tests/client.js +++ b/tests/client.js @@ -200,6 +200,12 @@ describe('Client', function() { await client.destroy(); }); + it('can get current WhatsApp Web version', async function () { + const version = await client.getWWebVersion(); + expect(typeof version).to.equal('string'); + console.log(`WA Version: ${version}`); + }); + describe('Expose Store', function() { it('exposes the store', async function() { const exposed = await client.pupPage.evaluate(() => { @@ -526,5 +532,53 @@ END:VCARD`; expect(formatted).to.eql('+1 (809) 220-1111'); }); }); + + describe('Search messages', function () { + it('can search for messages', async function () { + this.timeout(5000); + + const m1 = await client.sendMessage(remoteId, 'I\'m searching for Super Mario Brothers'); + const m2 = await client.sendMessage(remoteId, 'This also contains Mario'); + const m3 = await client.sendMessage(remoteId, 'Nothing of interest here, just Luigi'); + + // wait for search index to catch up + await helper.sleep(1000); + + const msgs = await client.searchMessages('Mario', {chatId: remoteId}); + expect(msgs.length).to.be.greaterThanOrEqual(2); + const msgIds = msgs.map(m => m.id._serialized); + expect(msgIds).to.include.members([ + m1.id._serialized, m2.id._serialized + ]); + expect(msgIds).to.not.include.members([m3.id._serialized]); + }); + }); + + describe('Status/About', function () { + let me, previousStatus; + + before(async function () { + me = await client.getContactById(client.info.wid._serialized); + previousStatus = await me.getAbout(); + }); + + after(async function () { + await client.setStatus(previousStatus); + }); + + it('can set the status text', async function () { + await client.setStatus('My shiny new status'); + + const status = await me.getAbout(); + expect(status).to.eql('My shiny new status'); + }); + + it('can set the status text to something else', async function () { + await client.setStatus('Busy'); + + const status = await me.getAbout(); + expect(status).to.eql('Busy'); + }); + }); }); }); \ No newline at end of file diff --git a/tests/structures/chat.js b/tests/structures/chat.js new file mode 100644 index 0000000..92d18a0 --- /dev/null +++ b/tests/structures/chat.js @@ -0,0 +1,187 @@ +const { expect } = require('chai'); + +const helper = require('../helper'); +const Message = require('../../src/structures/Message'); +const { MessageTypes } = require('../../src/util/Constants'); +const { Contact } = require('../../src/structures'); + +const remoteId = helper.remoteId; + +describe('Chat', function () { + let client; + let chat; + + before(async function() { + this.timeout(35000); + client = helper.createClient({ withSession: true }); + await client.initialize(); + chat = await client.getChatById(remoteId); + }); + + after(async function () { + await client.destroy(); + }); + + it('can send a message to a chat', async function () { + const msg = await chat.sendMessage('hello world'); + expect(msg).to.be.instanceOf(Message); + expect(msg.type).to.equal(MessageTypes.TEXT); + expect(msg.fromMe).to.equal(true); + expect(msg.body).to.equal('hello world'); + expect(msg.to).to.equal(remoteId); + }); + + it('can fetch messages sent in a chat', async function () { + this.timeout(5000); + await helper.sleep(1000); + const msg = await chat.sendMessage('another message'); + + const messages = await chat.fetchMessages(); + expect(messages.length).to.be.greaterThanOrEqual(2); + + const fetchedMsg = messages[messages.length-1]; + expect(fetchedMsg).to.be.instanceOf(Message); + expect(fetchedMsg.type).to.equal(MessageTypes.TEXT); + expect(fetchedMsg.id._serialized).to.equal(msg.id._serialized); + expect(fetchedMsg.body).to.equal(msg.body); + }); + + it('can use a limit when fetching messages sent in a chat', async function () { + await helper.sleep(1000); + const msg = await chat.sendMessage('yet another message'); + + const messages = await chat.fetchMessages({limit: 1}); + expect(messages).to.have.lengthOf(1); + + const fetchedMsg = messages[0]; + expect(fetchedMsg).to.be.instanceOf(Message); + expect(fetchedMsg.type).to.equal(MessageTypes.TEXT); + expect(fetchedMsg.id._serialized).to.equal(msg.id._serialized); + expect(fetchedMsg.body).to.equal(msg.body); + }); + + it('can get the related contact', async function () { + const contact = await chat.getContact(); + expect(contact).to.be.instanceOf(Contact); + expect(contact.id._serialized).to.equal(chat.id._serialized); + }); + + describe('Seen', function () { + it('can mark a chat as unread', async function () { + await chat.markUnread(); + await helper.sleep(500); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.unreadCount).to.equal(-1); + }); + + it('can mark a chat as seen', async function () { + const res = await chat.sendSeen(); + expect(res).to.equal(true); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.unreadCount).to.equal(0); + }); + }); + + describe('Archiving', function (){ + it('can archive a chat', async function () { + const res = await chat.archive(); + expect(res).to.equal(true); + + await helper.sleep(1000); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.archived).to.equal(true); + }); + + it('can unarchive a chat', async function () { + const res = await chat.unarchive(); + expect(res).to.equal(false); + + await helper.sleep(1000); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.archived).to.equal(false); + }); + }); + + describe('Pinning', function () { + it('can pin a chat', async function () { + const res = await chat.pin(); + expect(res).to.equal(true); + + await helper.sleep(1000); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.pinned).to.equal(true); + }); + + it('can unpin a chat', async function () { + const res = await chat.unpin(); + expect(res).to.equal(false); + await helper.sleep(1000); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.pinned).to.equal(false); + }); + }); + + describe('Muting', function () { + it('can mute a chat forever', async function() { + await chat.mute(); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.isMuted).to.equal(true); + expect(chat.muteExpiration).to.equal(-1); + }); + + it('can mute a chat until a specific date', async function() { + const unmuteDate = new Date(new Date().getTime() + (1000*60*60)); + await chat.mute(unmuteDate); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.isMuted).to.equal(true); + expect(chat.muteExpiration).to.equal( + Math.round(unmuteDate.getTime() / 1000) + ); + }); + + it('can unmute a chat', async function () { + await chat.unmute(); + await helper.sleep(500); + + // refresh chat + chat = await client.getChatById(remoteId); + expect(chat.isMuted).to.equal(false); + expect(chat.muteExpiration).to.equal(0); + }); + }); + + describe.skip('Destructive operations', function () { + it('can clear all messages from chat', async function () { + this.timeout(5000); + + const res = await chat.clearMessages(); + expect(res).to.equal(true); + + await helper.sleep(3000); + + const msgs = await chat.fetchMessages(); + expect(msgs).to.have.lengthOf(0); + }); + + it('can delete a chat', async function () { + const res = await chat.delete(); + expect(res).to.equal(true); + }); + }); +}); \ No newline at end of file From 078933f0612cb3710118b4b7aaafadb4099fdc9c Mon Sep 17 00:00:00 2001 From: Igor Nunes Date: Sat, 5 Feb 2022 23:11:53 -0300 Subject: [PATCH 07/14] fix(typings): add MessageTypes BUTTONS_RESPONSE (#1032) fixes #1104 --- index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.d.ts b/index.d.ts index c3c4d6c..05e0285 100644 --- a/index.d.ts +++ b/index.d.ts @@ -443,6 +443,7 @@ declare namespace WAWebJS { PAYMENT = 'payment', UNKNOWN = 'unknown', GROUP_INVITE = 'groups_v4_invite', + BUTTONS_RESPONSE = 'buttons_response' } /** Client status */ From 221d29736a709a32bf89a4577661c47ce2daa724 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 5 Feb 2022 23:04:47 -0400 Subject: [PATCH 08/14] remove unnecessary `pull_request` trigger for lint --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 82036b5..f0228fc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,6 @@ name: Lint on: push: - pull_request: jobs: eslint: From c859ac39ce8477b54f388016a6dfd8c483e05eea Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 5 Feb 2022 23:05:01 -0400 Subject: [PATCH 09/14] fix: dont crash when calling .destroy() while waiting for qr scan (#1172) fixes #739 fixes #951 --- src/Client.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Client.js b/src/Client.js index a6bd6da..6b761fb 100644 --- a/src/Client.js +++ b/src/Client.js @@ -109,7 +109,7 @@ class Client extends EventEmitter { const KEEP_PHONE_CONNECTED_IMG_SELECTOR = '[data-icon="intro-md-beta-logo-dark"], [data-icon="intro-md-beta-logo-light"], [data-asset-intro-image-light="true"], [data-asset-intro-image-dark="true"]'; if (this.options.session) { - // Check if session restore was successfull + // Check if session restore was successful try { await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: this.options.authTimeoutMs }); } catch (err) { @@ -168,10 +168,22 @@ class Client extends EventEmitter { this._qrRefreshInterval = setInterval(getQrCode, this.options.qrRefreshIntervalMs); // Wait for code scan - await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 }); - clearInterval(this._qrRefreshInterval); - this._qrRefreshInterval = undefined; + try { + await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 }); + clearInterval(this._qrRefreshInterval); + this._qrRefreshInterval = undefined; + } catch(error) { + if ( + error.name === 'ProtocolError' && + error.message && + error.message.match(/Target closed/) + ) { + // something has called .destroy() while waiting + return; + } + throw error; + } } await page.evaluate(ExposeStore, moduleRaid.toString()); From fa9f5aba387943529354522f7d195adf56a54977 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 23:17:11 -0400 Subject: [PATCH 10/14] Update supported WhatsApp Web version to v2.2202.12 (#1152) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cd612f5..7f76c99 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2202.8](https://img.shields.io/badge/WhatsApp_Web-2.2202.8-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2202.12](https://img.shields.io/badge/WhatsApp_Web-2.2202.12-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 928db87..bfdd224 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2202.8 \ No newline at end of file +2.2202.12 \ No newline at end of file From 09cbee0e65699b80502e5ae39ccbb8315326696a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 23:32:30 -0400 Subject: [PATCH 11/14] chore(deps-dev): bump eslint-plugin-mocha from 9.0.0 to 10.0.3 (#1087) Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 9.0.0 to 10.0.3. - [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases) - [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/9.0.0...10.0.3) --- updated-dependencies: - dependency-name: eslint-plugin-mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db791e6..3468f89 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "chai": "^4.3.4", "dotenv": "^10.0.0", "eslint": "^8.4.1", - "eslint-plugin-mocha": "^9.0.0", + "eslint-plugin-mocha": "^10.0.3", "jsdoc": "^3.6.4", "jsdoc-baseline": "^0.1.5", "mocha": "^9.0.2", From 21d565154a61a455eb21ec4209164d459628bb35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 23:32:53 -0400 Subject: [PATCH 12/14] chore(deps-dev): bump dotenv from 10.0.0 to 16.0.0 (#1171) Bumps [dotenv](https://github.com/motdotla/dotenv) from 10.0.0 to 16.0.0. - [Release notes](https://github.com/motdotla/dotenv/releases) - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v10.0.0...v16.0.0) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3468f89..a10287f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/node-fetch": "^2.5.12", "chai": "^4.3.4", - "dotenv": "^10.0.0", + "dotenv": "^16.0.0", "eslint": "^8.4.1", "eslint-plugin-mocha": "^10.0.3", "jsdoc": "^3.6.4", From b1f7ff01bc8e365c57511860cbb09a6a0c1b684c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 23:35:04 -0400 Subject: [PATCH 13/14] chore(deps-dev): bump sinon from 12.0.1 to 13.0.1 (#1160) Bumps [sinon](https://github.com/sinonjs/sinon) from 12.0.1 to 13.0.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md) - [Commits](https://github.com/sinonjs/sinon/compare/v12.0.1...v13.0.1) --- updated-dependencies: - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a10287f..4d9331f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jsdoc": "^3.6.4", "jsdoc-baseline": "^0.1.5", "mocha": "^9.0.2", - "sinon": "^12.0.1" + "sinon": "^13.0.1" }, "engines": { "node": ">=12.0.0" From 2200390d4c2a243e2a059c6c661b530469384e24 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 5 Feb 2022 23:36:05 -0400 Subject: [PATCH 14/14] disable eslint warning on intentionally skipped test --- tests/structures/chat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/structures/chat.js b/tests/structures/chat.js index 92d18a0..144aa5d 100644 --- a/tests/structures/chat.js +++ b/tests/structures/chat.js @@ -166,6 +166,7 @@ describe('Chat', function () { }); }); + // eslint-disable-next-line mocha/no-skipped-tests describe.skip('Destructive operations', function () { it('can clear all messages from chat', async function () { this.timeout(5000);