Skip to content

Commit

Permalink
chore(deps): Upgrade dependencies
Browse files Browse the repository at this point in the history
commit 05af3a2ff470c6f944a380859e6b12a67e3cf243
Author: Tasso Evangelista <tasso.evangelista@rocket.chat>
Date:   Wed May 12 01:13:56 2021 -0300

    Update Prettier

commit ac403fde45f7fabf0e4592d788835cfa7c5cf0a3
Author: Tasso Evangelista <tasso.evangelista@rocket.chat>
Date:   Sun May 9 11:55:03 2021 -0300

    Update runtime dependencies

commit f7afe640e8d80bb31649d98e305a6cf04a16db09
Author: Tasso Evangelista <tasso.evangelista@rocket.chat>
Date:   Wed May 12 01:07:10 2021 -0300

    Update build dependencies
  • Loading branch information
tassoevan committed May 12, 2021
1 parent b704680 commit b90df4f
Show file tree
Hide file tree
Showing 52 changed files with 642 additions and 673 deletions.
Binary file modified build/icon.icns
Binary file not shown.
94 changes: 47 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,82 +37,82 @@
".:lint-fix:eslint": "eslint --fix ."
},
"dependencies": {
"@bugsnag/js": "^7.3.5",
"@emotion/core": "^10.0.35",
"@emotion/styled": "^10.0.27",
"@rocket.chat/css-in-js": "^0.17.2",
"@rocket.chat/fuselage": "^0.17.2",
"@rocket.chat/fuselage-hooks": "^0.17.2",
"@rocket.chat/icons": "^0.17.2",
"@bugsnag/js": "^7.9.2",
"@emotion/css": "^11.1.3",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@rocket.chat/css-in-js": "^0.24.0",
"@rocket.chat/fuselage": "^0.24.0",
"@rocket.chat/fuselage-hooks": "^0.24.0",
"@rocket.chat/icons": "^0.24.0",
"abort-controller": "^3.0.0",
"electron-store": "^6.0.0",
"electron-store": "^6.0.1",
"electron-updater": "^4.3.5",
"i18next": "^19.7.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-i18next": "^11.7.3",
"i18next": "^20.2.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-i18next": "^11.8.15",
"react-keyed-flatten-children": "^1.3.0",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"reselect": "^4.0.0",
"rimraf": "^3.0.2",
"semver": "^7.3.2",
"tslib": "^2.0.1"
"semver": "^7.3.5",
"tslib": "^2.2.0"
},
"devDependencies": {
"@babel/core": "^7.11.4",
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.13.14",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-function-bind": "^7.10.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"@fiahfy/icns-convert": "^0.0.8",
"@fiahfy/ico-convert": "^0.0.7",
"@jest-runner/electron": "^3.0.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-function-bind": "^7.12.13",
"@babel/preset-env": "^7.14.1",
"@babel/preset-react": "^7.13.13",
"@fiahfy/icns-convert": "^0.0.12",
"@fiahfy/ico-convert": "^0.0.12",
"@jest-runner/electron": "^3.0.1",
"@rocket.chat/eslint-config": "^0.4.0",
"@rocket.chat/eslint-config-alt": "^0.6.3-dev.230",
"@rocket.chat/prettier-config": "^0.6.3-dev.230",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-commonjs": "^15.1.0",
"@rocket.chat/eslint-config-alt": "^0.24.0",
"@rocket.chat/prettier-config": "^0.24.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-typescript": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"@rollup/plugin-typescript": "^8.2.1",
"@types/electron-devtools-installer": "^2.2.0",
"@types/jest": "^26.0.14",
"@types/jest": "^26.0.23",
"@types/meteor": "^1.4.49",
"@types/node": "^12",
"@types/node-fetch": "^2.5.7",
"@types/puppeteer": "^5.4.0",
"@types/react": "^16.9.48",
"@types/react-dom": "^16.9.8",
"@types/react": "^17.0.5",
"@types/react-dom": "^17.0.3",
"@types/react-redux": "^7.1.9",
"@types/resize-observer-browser": "^0.1.3",
"@types/rimraf": "^3.0.0",
"@typescript-eslint/parser": "^4.22.0",
"builtin-modules": "^3.1.0",
"chokidar": "^3.4.3",
"conventional-changelog-cli": "^2.1.0",
"@typescript-eslint/parser": "^4.22.1",
"builtin-modules": "^3.2.0",
"chokidar": "^3.5.1",
"conventional-changelog-cli": "^2.1.1",
"convert-svg-to-png": "^0.5.0",
"electron": "^10.2.0",
"electron-builder": "^22.11.3",
"electron-devtools-installer": "^3.1.1",
"electron-notarize": "^1.0.0",
"eslint": "^7.25.0",
"eslint": "^7.26.0",
"jest": "^26.6.3",
"jimp": "^0.16.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"puppeteer": "^5.5.0",
"rollup": "^2.28.1",
"rollup-plugin-copy": "^3.3.0",
"ts-jest": "^26.4.0",
"ts-node": "^9.0.0",
"typescript": "^4.0.3",
"puppeteer": "^9.1.1",
"rollup": "^2.47.0",
"rollup-plugin-copy": "^3.4.0",
"ts-jest": "^26.5.6",
"ts-node": "^9.1.1",
"typescript": "^4.2.4",
"xvfb-maybe": "^0.2.1"
},
"optionalDependencies": {
"fsevents": "2.2.1"
"fsevents": "2.3.2"
},
"engines": {
"node": ">=12.8.x"
Expand Down
11 changes: 7 additions & 4 deletions src/buildAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const convertSvgToPng = async (
}),
deviceScaleFactor: 1,
});
const buffer = await page.screenshot({ type: 'png', omitBackground: true });
const buffer = (await page.screenshot({
type: 'png',
omitBackground: true,
})) as Buffer;
buffers.push(buffer);
}

Expand Down Expand Up @@ -179,9 +182,9 @@ const createWindowsTrayIcons = async (): Promise<void> => {
const createNsisSideBars = async (): Promise<void> => {
const sideBar = renderToStaticMarkup(createElement(NsisSideBar));
const [sideBarPng] = await convertSvgToPng(sideBar, [164, 314]);
const sidebarBitmap = await (await Jimp.read(sideBarPng)).getBufferAsync(
Jimp.MIME_BMP
);
const sidebarBitmap = await (
await Jimp.read(sideBarPng)
).getBufferAsync(Jimp.MIME_BMP);
await writeFile('build/installerSidebar.bmp', sidebarBitmap);
await writeFile('build/uninstallerSidebar.bmp', sidebarBitmap);
};
Expand Down
48 changes: 21 additions & 27 deletions src/deepLinks/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,42 +195,36 @@ const processDeepLink = async (deepLink: string): Promise<void> => {
};

export const setupDeepLinks = (): void => {
app.addListener(
'open-url',
async (event, url): Promise<void> => {
event.preventDefault();
app.addListener('open-url', async (event, url): Promise<void> => {
event.preventDefault();

const browserWindow = await getRootWindow();
const browserWindow = await getRootWindow();

if (!browserWindow.isVisible()) {
browserWindow.showInactive();
}
browserWindow.focus();

await processDeepLink(url);
if (!browserWindow.isVisible()) {
browserWindow.showInactive();
}
);
browserWindow.focus();

app.addListener(
'second-instance',
async (event, argv): Promise<void> => {
event.preventDefault();
await processDeepLink(url);
});

const browserWindow = await getRootWindow();
app.addListener('second-instance', async (event, argv): Promise<void> => {
event.preventDefault();

if (!browserWindow.isVisible()) {
browserWindow.showInactive();
}
browserWindow.focus();
const browserWindow = await getRootWindow();

const args = argv.slice(app.isPackaged ? 1 : 2);
if (!browserWindow.isVisible()) {
browserWindow.showInactive();
}
browserWindow.focus();

for (const arg of args) {
// eslint-disable-next-line no-await-in-loop
await processDeepLink(arg);
}
const args = argv.slice(app.isPackaged ? 1 : 2);

for (const arg of args) {
// eslint-disable-next-line no-await-in-loop
await processDeepLink(arg);
}
);
});

processDeepLinksInArgs = async (): Promise<void> => {
const args = process.argv.slice(app.isPackaged ? 1 : 2);
Expand Down
3 changes: 2 additions & 1 deletion src/injected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const start = (): void => {

window.Notification = class RocketChatDesktopNotification
extends EventTarget
implements Notification {
implements Notification
{
static readonly permission: NotificationPermission = 'granted';

static readonly maxActions: number =
Expand Down
Binary file modified src/public/images/tray/darwin/notificationTemplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/darwin/notificationTemplate@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-2@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-3@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-4@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-6@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-7@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-8@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-9@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-dot@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-plus-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/linux/notification-plus-9@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/public/images/tray/win32/notification-1.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-2.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-3.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-4.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-5.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-6.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-7.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-8.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-9.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-dot.ico
Binary file not shown.
Binary file modified src/public/images/tray/win32/notification-plus-9.ico
Binary file not shown.
54 changes: 27 additions & 27 deletions src/store/fsa.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
export type FluxStandardAction<
Type extends string = string,
Payload = void
> = void extends Payload
? {
type: Type;
}
: {
type: Type;
payload: Payload;
};
export type FluxStandardAction<Type extends string = string, Payload = void> =
void extends Payload
? {
type: Type;
}
: {
type: Type;
payload: Payload;
};

export const isFSA = <Action extends FluxStandardAction<string, unknown>>(
action: unknown
Expand Down Expand Up @@ -54,19 +52,21 @@ export const hasPayload = <Action extends FluxStandardAction<string, unknown>>(
payload: Action extends { payload: infer P } ? P : never;
} => 'payload' in action;

export const isResponseTo = <
Action extends FluxStandardAction<string, unknown>,
Types extends [...string[]]
>(
id: unknown,
...types: Types
) => (
action: Action
): action is Action &
{
[Type in Types[number]]: {
type: Type;
meta: { response: boolean; id: unknown };
};
}[Types[number]] =>
isResponse(action) && types.includes(action.type) && action.meta.id === id;
export const isResponseTo =
<
Action extends FluxStandardAction<string, unknown>,
Types extends [...string[]]
>(
id: unknown,
...types: Types
) =>
(
action: Action
): action is Action &
{
[Type in Types[number]]: {
type: Type;
meta: { response: boolean; id: unknown };
};
}[Types[number]] =>
isResponse(action) && types.includes(action.type) && action.meta.id === id;
11 changes: 5 additions & 6 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ let reduxStore: Store<RootState>;

let lastAction: RootAction;

const catchLastAction: Middleware = () => (next: Dispatch<RootAction>) => (
action
) => {
lastAction = action;
return next(action);
};
const catchLastAction: Middleware =
() => (next: Dispatch<RootAction>) => (action) => {
lastAction = action;
return next(action);
};

export const createMainReduxStore = (): void => {
const middlewares = applyMiddleware(catchLastAction, forwardToRenderers);
Expand Down
11 changes: 6 additions & 5 deletions src/ui/components/AddServerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ export const AddServerView: FC = () => {
const [input, setInput] = useState('');

const idleState = useMemo(() => ['idle', null] as const, []);
const [[validationState, errorMessage], setValidation] = useState<
| readonly [state: 'idle', message: null]
| readonly [state: 'validating', message: null]
| readonly [state: 'invalid', message: string | null]
>(idleState);
const [[validationState, errorMessage], setValidation] =
useState<
| readonly [state: 'idle', message: null]
| readonly [state: 'validating', message: null]
| readonly [state: 'invalid', message: string | null]
>(idleState);

const editInput = useCallback(
(input: string): void => {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/ServersView/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css } from '@emotion/core';
import { css } from '@emotion/react';
import styled from '@emotion/styled';

type WrapperProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/Shell/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Global, css } from '@emotion/core';
import { Global, css } from '@emotion/react';
import styled from '@emotion/styled';
import React, { FC } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/SideBar/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css, SerializedStyles } from '@emotion/core';
import { css, SerializedStyles } from '@emotion/react';
import styled from '@emotion/styled';

type WrapperProps = {
Expand Down
16 changes: 9 additions & 7 deletions src/ui/components/SideBar/useKeyboardShortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ export const useKeyboardShortcuts = (): boolean => {
useEffect(() => {
const shortcutKey = process.platform === 'darwin' ? 'Meta' : 'Control';

const handleKeyChange = (down: boolean) => ({ key }: KeyboardEvent) => {
if (shortcutKey !== key) {
return;
}

setShortcutsVisible(down);
};
const handleKeyChange =
(down: boolean) =>
({ key }: KeyboardEvent) => {
if (shortcutKey !== key) {
return;
}

setShortcutsVisible(down);
};

const handleKeyDown = handleKeyChange(true);
const handleKeyUp = handleKeyChange(false);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/main/serverView/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const attachGuestWebContentsEvents = async (): Promise<void> => {
httpReferrer: referrer,
...(postBody && {
extraHeaders: `Content-Type: ${postBody.contentType}; boundary=${postBody.boundary}`,
postData: (postBody.data as unknown) as
postData: postBody.data as unknown as
| UploadRawData[]
| UploadBlob[]
| UploadFile[],
Expand Down
3 changes: 2 additions & 1 deletion src/ui/main/serverView/popupMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const createSpellCheckingMenuTemplate = (
}

const { availableSpellCheckerLanguages } = serverViewWebContents.session;
const spellCheckerLanguages = serverViewWebContents.session.getSpellCheckerLanguages();
const spellCheckerLanguages =
serverViewWebContents.session.getSpellCheckerLanguages();

return [
...(spellCheckerLanguages.length > 0 && dictionarySuggestions
Expand Down
Loading

0 comments on commit b90df4f

Please sign in to comment.