From 726cfbe2889d155314436f12bbe02f94daf467a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:34:01 -0300 Subject: [PATCH] chore(deps): adjust codeql workflow for dependabot and bump moment from 2.29.4 to 2.30.1 (#33964) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Douglas Gubert Co-authored-by: Kevin Aleman --- .github/workflows/codeql-analysis.yml | 2 + .../business-hour/BusinessHourManager.ts | 2 +- .../server/functions/generateEml.ts | 3 +- .../getMomentChartLabelsAndData.spec.ts | 1 + .../charts/getMomentChartLabelsAndData.ts | 2 +- .../charts/getMomentCurrentLabel.spec.ts | 1 + .../charts/getMomentCurrentLabel.ts | 2 +- apps/meteor/package.json | 3 +- .../services/omnichannel-analytics/utils.ts | 2 +- .../business-hour/BusinessHourManager.spec.ts | 2 +- .../omnichannel-analytics/AgentData.tests.ts | 2 +- .../OverviewData.tests.ts | 2 +- apps/uikit-playground/package.json | 2 +- ee/packages/pdf-worker/package.json | 2 +- yarn.lock | 39 +++++++++---------- 15 files changed, 33 insertions(+), 34 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 202a02dd7785..dd75ef25eddb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,6 +2,8 @@ name: 'Code scanning - action' on: push: + branches-ignore: + - dependabot/** pull_request: schedule: - cron: '0 13 * * *' diff --git a/apps/meteor/app/livechat/server/business-hour/BusinessHourManager.ts b/apps/meteor/app/livechat/server/business-hour/BusinessHourManager.ts index 0f125910b9a4..adc7ebf05ce0 100644 --- a/apps/meteor/app/livechat/server/business-hour/BusinessHourManager.ts +++ b/apps/meteor/app/livechat/server/business-hour/BusinessHourManager.ts @@ -2,7 +2,7 @@ import type { ILivechatBusinessHour, IBusinessHourTimezone } from '@rocket.chat/ import { LivechatBusinessHourTypes } from '@rocket.chat/core-typings'; import type { AgendaCronJobs } from '@rocket.chat/cron'; import { LivechatBusinessHours, LivechatDepartment, Users } from '@rocket.chat/models'; -import moment from 'moment'; +import moment from 'moment-timezone'; import type { IBusinessHourBehavior, IBusinessHourType } from './AbstractBusinessHour'; import { closeBusinessHour } from './closeBusinessHour'; diff --git a/apps/meteor/app/smarsh-connector/server/functions/generateEml.ts b/apps/meteor/app/smarsh-connector/server/functions/generateEml.ts index cf0b7deab5db..1040e756529b 100644 --- a/apps/meteor/app/smarsh-connector/server/functions/generateEml.ts +++ b/apps/meteor/app/smarsh-connector/server/functions/generateEml.ts @@ -1,7 +1,6 @@ import { Messages, SmarshHistory, Users, Rooms } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; -import moment from 'moment'; -import 'moment-timezone'; +import moment from 'moment-timezone'; import { sendEmail } from './sendEmail'; import { i18n } from '../../../../server/lib/i18n'; diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.spec.ts b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.spec.ts index ec5eb1268233..57abfb23a077 100644 --- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.spec.ts +++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.spec.ts @@ -1,5 +1,6 @@ import moment from 'moment-timezone'; +import 'moment/locale/fa'; import { getMomentChartLabelsAndData } from './getMomentChartLabelsAndData'; moment.tz.setDefault('UTC'); diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.ts b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.ts index a0d4dda2d952..6457e05b499d 100644 --- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.ts +++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentChartLabelsAndData.ts @@ -1,4 +1,4 @@ -import moment from 'moment'; +import moment from 'moment-timezone'; export const getMomentChartLabelsAndData = (timestamp = Date.now()) => { const timingLabels = []; diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.spec.ts b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.spec.ts index d0d98c1c39d9..46d24dfe3846 100644 --- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.spec.ts +++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.spec.ts @@ -1,4 +1,5 @@ import moment from 'moment-timezone'; +import 'moment/locale/fa'; import { getMomentCurrentLabel } from './getMomentCurrentLabel'; diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.ts b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.ts index 17085a91b0d7..209169f55397 100644 --- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.ts +++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/getMomentCurrentLabel.ts @@ -1,4 +1,4 @@ -import moment from 'moment'; +import moment from 'moment-timezone'; export const getMomentCurrentLabel = (timestamp = Date.now()) => { const m = moment(timestamp); diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 1e397b4387eb..c98120eb8d81 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -128,7 +128,6 @@ "@types/meteor-collection-hooks": "^0.8.9", "@types/mkdirp": "^1.0.2", "@types/mocha": "github:whitecolor/mocha-types", - "@types/moment-timezone": "^0.5.30", "@types/node": "~20.16.15", "@types/node-gcm": "^1.0.5", "@types/node-rsa": "^1.1.4", @@ -385,7 +384,7 @@ "mime-type": "^4.0.0", "mkdirp": "^1.0.4", "moleculer": "^0.14.35", - "moment": "^2.29.4", + "moment": "^2.30.1", "moment-timezone": "^0.5.46", "mongo-message-queue": "^1.1.0", "mongodb": "patch:mongodb@npm%3A4.17.2#~/.yarn/patches/mongodb-npm-4.17.2-40d1286d70.patch", diff --git a/apps/meteor/server/services/omnichannel-analytics/utils.ts b/apps/meteor/server/services/omnichannel-analytics/utils.ts index 92af92e3f629..bd3966bd22b5 100644 --- a/apps/meteor/server/services/omnichannel-analytics/utils.ts +++ b/apps/meteor/server/services/omnichannel-analytics/utils.ts @@ -1,4 +1,4 @@ -import moment from 'moment'; +import moment from 'moment-timezone'; const HOURS_IN_DAY = 24; diff --git a/apps/meteor/tests/unit/app/livechat/server/business-hour/BusinessHourManager.spec.ts b/apps/meteor/tests/unit/app/livechat/server/business-hour/BusinessHourManager.spec.ts index 105f6c89682a..f83b5535deb6 100644 --- a/apps/meteor/tests/unit/app/livechat/server/business-hour/BusinessHourManager.spec.ts +++ b/apps/meteor/tests/unit/app/livechat/server/business-hour/BusinessHourManager.spec.ts @@ -29,7 +29,7 @@ const { BusinessHourManager } = proxyquire.noCallThru().load('../../../../../../ '../../../../lib/callbacks': {}, '../../../../ee/app/livechat-enterprise/server/business-hour/Helper': {}, './AbstractBusinessHour': {}, - 'moment': momentStub, + 'moment-timezone': momentStub, '@rocket.chat/models': { LivechatBusinessHours: LivechatBusinessHoursStub, }, diff --git a/apps/meteor/tests/unit/server/services/omnichannel-analytics/AgentData.tests.ts b/apps/meteor/tests/unit/server/services/omnichannel-analytics/AgentData.tests.ts index 0894c1f8d894..4c9320163774 100644 --- a/apps/meteor/tests/unit/server/services/omnichannel-analytics/AgentData.tests.ts +++ b/apps/meteor/tests/unit/server/services/omnichannel-analytics/AgentData.tests.ts @@ -1,7 +1,7 @@ /* eslint-disable new-cap */ import type { ILivechatRoomsModel } from '@rocket.chat/model-typings'; import { expect } from 'chai'; -import moment from 'moment'; +import moment from 'moment-timezone'; import sinon from 'sinon'; import { AgentOverviewData } from '../../../../../server/services/omnichannel-analytics/AgentData'; diff --git a/apps/meteor/tests/unit/server/services/omnichannel-analytics/OverviewData.tests.ts b/apps/meteor/tests/unit/server/services/omnichannel-analytics/OverviewData.tests.ts index 08fd30530690..e55d4dc685fe 100644 --- a/apps/meteor/tests/unit/server/services/omnichannel-analytics/OverviewData.tests.ts +++ b/apps/meteor/tests/unit/server/services/omnichannel-analytics/OverviewData.tests.ts @@ -1,6 +1,6 @@ /* eslint-disable new-cap */ import { expect } from 'chai'; -import moment from 'moment'; +import moment from 'moment-timezone'; import sinon from 'sinon'; import { conversations } from './mockData'; diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 1ca09539bfd4..eda9543d7921 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -30,7 +30,7 @@ "@rocket.chat/ui-contexts": "workspace:~", "codemirror": "^6.0.1", "eslint4b-prebuilt": "^6.7.2", - "moment": "^2.29.4", + "moment": "^2.30.1", "rc-scrollbars": "^1.1.6", "react": "^17.0.2", "react-beautiful-dnd": "^13.1.1", diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 76ce9a63473e..a35b7c2da96f 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -23,7 +23,7 @@ "@rocket.chat/fuselage-tokens": "^0.33.2", "emoji-assets": "^7.0.1", "emoji-toolkit": "^7.0.1", - "moment": "^2.29.4", + "moment": "^2.30.1", "moment-timezone": "^0.5.46", "react": "~18.3.1" }, diff --git a/yarn.lock b/yarn.lock index 3c86361aa2d9..d3dffea455a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9276,7 +9276,6 @@ __metadata: "@types/meteor-collection-hooks": "npm:^0.8.9" "@types/mkdirp": "npm:^1.0.2" "@types/mocha": "github:whitecolor/mocha-types" - "@types/moment-timezone": "npm:^0.5.30" "@types/node": "npm:~20.16.15" "@types/node-gcm": "npm:^1.0.5" "@types/node-rsa": "npm:^1.1.4" @@ -9423,7 +9422,7 @@ __metadata: mkdirp: "npm:^1.0.4" mocha: "npm:^9.2.2" moleculer: "npm:^0.14.35" - moment: "npm:^2.29.4" + moment: "npm:^2.30.1" moment-timezone: "npm:^0.5.46" mongo-message-queue: "npm:^1.1.0" mongodb: "patch:mongodb@npm%3A4.17.2#~/.yarn/patches/mongodb-npm-4.17.2-40d1286d70.patch" @@ -9733,7 +9732,7 @@ __metadata: emoji-toolkit: "npm:^7.0.1" eslint: "npm:~8.45.0" jest: "npm:~29.7.0" - moment: "npm:^2.29.4" + moment: "npm:^2.30.1" moment-timezone: "npm:^0.5.46" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" @@ -10408,7 +10407,7 @@ __metadata: eslint-plugin-react-hooks: "npm:^5.0.0" eslint-plugin-react-refresh: "npm:^0.4.14" eslint4b-prebuilt: "npm:^6.7.2" - moment: "npm:^2.29.4" + moment: "npm:^2.30.1" rc-scrollbars: "npm:^1.1.6" react: "npm:^17.0.2" react-beautiful-dnd: "npm:^13.1.1" @@ -12909,15 +12908,6 @@ __metadata: languageName: node linkType: hard -"@types/moment-timezone@npm:^0.5.30": - version: 0.5.30 - resolution: "@types/moment-timezone@npm:0.5.30" - dependencies: - moment-timezone: "npm:*" - checksum: 10/488b5880b346101f15e3f90267eb8d848ce20a41ea8b51305b1fee25f4fac57b93d553dc0de6f2eb8412be764bd74c9c347ed678c9a6d20d800a06c106b674f9 - languageName: node - linkType: hard - "@types/ms@npm:*": version: 0.7.31 resolution: "@types/ms@npm:0.7.31" @@ -29029,21 +29019,21 @@ __metadata: languageName: node linkType: hard -"moment-timezone@npm:*, moment-timezone@npm:^0.5.x": - version: 0.5.43 - resolution: "moment-timezone@npm:0.5.43" +"moment-timezone@npm:^0.5.46, moment-timezone@npm:~0.5.46": + version: 0.5.46 + resolution: "moment-timezone@npm:0.5.46" dependencies: moment: "npm:^2.29.4" - checksum: 10/f8b66f8562960d6c2ec90ea7e2ca8c10bd5f5cf5ced2eaaac83deb1011b145d0154e8d77018cf5e913d489898a343122a3d815768809653ab039306dce1db1eb + checksum: 10/7613ba388fa6004af62675fb9945cb0d37758b559d07470a5e188419ffe1ac03eb2ed16fe80aa34d1e7dd39fc5bd67dc02cd59e8dcdab95504cface2c78e4b3d languageName: node linkType: hard -"moment-timezone@npm:^0.5.46, moment-timezone@npm:~0.5.46": - version: 0.5.46 - resolution: "moment-timezone@npm:0.5.46" +"moment-timezone@npm:^0.5.x": + version: 0.5.43 + resolution: "moment-timezone@npm:0.5.43" dependencies: moment: "npm:^2.29.4" - checksum: 10/7613ba388fa6004af62675fb9945cb0d37758b559d07470a5e188419ffe1ac03eb2ed16fe80aa34d1e7dd39fc5bd67dc02cd59e8dcdab95504cface2c78e4b3d + checksum: 10/f8b66f8562960d6c2ec90ea7e2ca8c10bd5f5cf5ced2eaaac83deb1011b145d0154e8d77018cf5e913d489898a343122a3d815768809653ab039306dce1db1eb languageName: node linkType: hard @@ -29054,6 +29044,13 @@ __metadata: languageName: node linkType: hard +"moment@npm:^2.30.1": + version: 2.30.1 + resolution: "moment@npm:2.30.1" + checksum: 10/ae42d876d4ec831ef66110bdc302c0657c664991e45cf2afffc4b0f6cd6d251dde11375c982a5c0564ccc0fa593fc564576ddceb8c8845e87c15f58aa6baca69 + languageName: node + linkType: hard + "mongo-message-queue@npm:^1.1.0": version: 1.1.0 resolution: "mongo-message-queue@npm:1.1.0"