Skip to content

Commit

Permalink
Chore: Dependencies upgrade (#25290)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed May 23, 2022
1 parent 763e312 commit 5292957
Show file tree
Hide file tree
Showing 21 changed files with 2,192 additions and 1,944 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"changeProcessCWD": true
}
],
"typescript.tsdk": "./node_modules/typescript/lib"
"typescript.tsdk": "./node_modules/typescript/lib",
"cSpell.words": ["photoswipe"]
}
2 changes: 1 addition & 1 deletion _templates/package/new/package.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ to: packages/<%= name %>/package.json
"eslint": "^8.12.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typescript": "~4.3.5"
"typescript": "~4.3.4"
},
"scripts": {
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spacebars
standard-minifier-js@2.8.0
tracker@1.2.0

#rocketchat:google-natural-language
rocketchat:livechat
rocketchat:streamer
rocketchat:version
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/slackbridge/server/SlackAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import url from 'url';
import http from 'http';
import https from 'https';

import { RTMClient } from '@slack/client';
import { RTMClient } from '@slack/rtm-api';
import { Meteor } from 'meteor/meteor';

import { slackLogger } from './logger';
Expand Down
24 changes: 9 additions & 15 deletions apps/meteor/app/ui/client/views/app/photoswipeContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Blaze } from 'meteor/blaze';
import { Template } from 'meteor/templating';
import { escapeHTML } from '@rocket.chat/string-helpers';
import type PhotoSwipe from 'photoswipe';
import type PhotoSwipeUiDefault from 'photoswipe/dist/photoswipe-ui-default';
import PhotoSwipeUIDefault from 'photoswipe/dist/photoswipe-ui-default';

const parseLength = (x: unknown): number | undefined => {
const length = typeof x === 'string' ? parseInt(x, 10) : undefined;
Expand All @@ -25,7 +25,7 @@ const getImageSize = (src: string): Promise<[w: number, h: number]> =>
img.src = src;
});

type Slide = PhotoSwipeUiDefault.Item & { description?: string };
type Slide = PhotoSwipe.Item & { description?: string; title?: string };

const fromElementToSlide = async (element: Element): Promise<Slide | null> => {
if (!(element instanceof HTMLElement)) {
Expand Down Expand Up @@ -70,15 +70,11 @@ const fromElementToSlide = async (element: Element): Promise<Slide | null> => {
return null;
};

let currentGallery: PhotoSwipe<PhotoSwipeUiDefault.Options> | null = null;
let currentGallery: PhotoSwipe<PhotoSwipe.Options> | null = null;

const initGallery = async (items: Slide[], options: PhotoSwipeUiDefault.Options): Promise<void> => {
const [
{ default: PhotoSwipe },
{ default: PhotoSwipeUiDefault }, // eslint-disable-line @typescript-eslint/camelcase
] = await Promise.all([
const initGallery = async (items: Slide[], options: PhotoSwipe.Options): Promise<void> => {
const [{ default: PhotoSwipe }] = await Promise.all([
import('photoswipe'),
import('photoswipe/dist/photoswipe-ui-default'),
// @ts-ignore
import('photoswipe/dist/photoswipe.css'),
// @ts-ignore
Expand All @@ -94,7 +90,7 @@ const initGallery = async (items: Slide[], options: PhotoSwipeUiDefault.Options)
throw new Error('Photoswipe container element not found');
}

currentGallery = new PhotoSwipe(container, PhotoSwipeUiDefault, items, options);
currentGallery = new PhotoSwipe(container, PhotoSwipeUIDefault, items, options);

currentGallery.listen('destroy', () => {
currentGallery = null;
Expand All @@ -104,13 +100,11 @@ const initGallery = async (items: Slide[], options: PhotoSwipeUiDefault.Options)
}
};

const defaultGalleryOptions: PhotoSwipeUiDefault.Options = {
const defaultGalleryOptions = {
bgOpacity: 0.7,
showHideOpacity: true,
counterEl: false,
shareEl: false,
clickToCloseNonZoomable: false,
index: 0,
wheelToZoom: true,
padding: { top: 20, bottom: 40, left: 100, right: 100 },
addCaptionHTMLFn(item: Slide, captionEl: HTMLElement): boolean {
captionEl.children[0].innerHTML = `
${escapeHTML(item.title ?? '')}<br/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react/no-multi-comp */
import { IRoom } from '@rocket.chat/core-typings';
import { EventHandlerOf } from '@rocket.chat/emitter';
import { createContext, useContext } from 'react';
Expand Down
16 changes: 8 additions & 8 deletions apps/meteor/ee/server/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"@rocket.chat/rest-typings": "workspace:^",
"@rocket.chat/string-helpers": "~0.31.9",
"@rocket.chat/ui-kit": "~0.31.9",
"ajv": "^8.7.1",
"ajv": "^8.11.0",
"bcrypt": "^5.0.1",
"body-parser": "^1.20.0",
"colorette": "^1.4.0",
"colorette": "^2.0.16",
"cookie": "^0.5.0",
"cookie-parser": "^1.4.6",
"ejson": "^2.2.2",
Expand All @@ -44,29 +44,29 @@
"mem": "^8.1.1",
"moleculer": "^0.14.20",
"mongodb": "^3.6.10",
"nats": "^2.4.0",
"nats": "^2.6.1",
"pino": "^7.10.0",
"sodium-native": "^3.3.0",
"sodium-plus": "^0.9.0",
"underscore.string": "^3.3.6",
"uuid": "^7.0.3",
"uuid": "^8.3.2",
"ws": "^8.5.0"
},
"devDependencies": {
"@rocket.chat/icons": "^0.31.0",
"@types/agenda": "^2.0.9",
"@types/cookie": "^0.4.1",
"@types/cookie": "^0.5.1",
"@types/cookie-parser": "^1.4.2",
"@types/ejson": "^2.1.3",
"@types/ejson": "^2.2.0",
"@types/express": "^4.17.13",
"@types/fibers": "^3.1.1",
"@types/mongodb": "^3.6.20",
"@types/node": "^14.18.12",
"@types/node": "^14.18.15",
"@types/ws": "^8.5.3",
"pino-pretty": "^7.6.1",
"pm2": "^5.2.0",
"ts-node": "^10.7.0",
"typescript": "~4.3.5"
"typescript": "~4.3.4"
},
"volta": {
"extends": "../../package.json"
Expand Down
Loading

0 comments on commit 5292957

Please sign in to comment.