From 198272703fa87d6cd03653e233e893e04f759d6a Mon Sep 17 00:00:00 2001 From: Afonso Jorge Ramos Date: Fri, 22 Sep 2023 18:54:58 +0100 Subject: [PATCH 1/2] chore(deps): upgrade `@primer/octicons-react` --- package.json | 2 +- pnpm-lock.yaml | 10 ++--- src/components/Sidebar.tsx | 4 +- .../AccountNotifications.test.tsx.snap | 30 +++++++------ .../NotificationRow.test.tsx.snap | 44 +++++++++++-------- .../__snapshots__/Repository.test.tsx.snap | 13 +++--- .../__snapshots__/Sidebar.test.tsx.snap | 30 +++++++------ .../LoginEnterprise.test.tsx.snap | 13 +++--- .../LoginWithToken.test.tsx.snap | 13 +++--- .../__snapshots__/Settings.test.tsx.snap | 13 +++--- src/utils/github-api.test.ts | 16 +++---- src/utils/github-api.ts | 22 +++++----- 12 files changed, 112 insertions(+), 98 deletions(-) diff --git a/package.json b/package.json index e6c51ca30..780f23250 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "afterSign": "scripts/notarize.js" }, "dependencies": { - "@primer/octicons-react": "^11.2.0", + "@primer/octicons-react": "^19.8.0", "axios": "=0.27.2", "date-fns": "^2.16.1", "electron-updater": "^4.3.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 09d72d9a0..b6d470411 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@primer/octicons-react': - specifier: ^11.2.0 - version: 11.2.0(react@16.14.0) + specifier: ^19.8.0 + version: 19.8.0(react@16.14.0) axios: specifier: '=0.27.2' version: 0.27.2 @@ -816,11 +816,11 @@ packages: fastq: 1.15.0 dev: true - /@primer/octicons-react@11.2.0(react@16.14.0): - resolution: {integrity: sha512-pi3DT5fUtATw2atMRQ7xCUUbdauA/hYTKfM2ijf3rtipeyQ7Ou3ij/JLhnc9Ke110ljHJh69j/PiINbbKAYegQ==} + /@primer/octicons-react@19.8.0(react@16.14.0): + resolution: {integrity: sha512-2Z+D7xTloFTLQVRUEbg0pQpe6aTL9RR+8RqBhjkrF+BFuVdM1ENOyjywaGEO7DIkPU5Zxlv0gxSlD85LQxL+sw==} engines: {node: '>=8'} peerDependencies: - react: '>=15' + react: '>=16.3' dependencies: react: 16.14.0 dev: false diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 5081e077b..0da632a4b 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,4 +1,4 @@ -import * as Octicons from '@primer/octicons-react'; +import { BellIcon } from '@primer/octicons-react'; import { ipcRenderer, shell } from 'electron'; import React, { useCallback, useContext, useMemo } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; @@ -55,7 +55,7 @@ export const Sidebar: React.FC = () => { onClick={onOpenGitHubNotifications} aria-label={`${notificationsCount} Unread Notifications`} > - + {notificationsCount > 0 && notificationsCount} diff --git a/src/components/__snapshots__/AccountNotifications.test.tsx.snap b/src/components/__snapshots__/AccountNotifications.test.tsx.snap index 18c3181df..1a8fcb8ec 100644 --- a/src/components/__snapshots__/AccountNotifications.test.tsx.snap +++ b/src/components/__snapshots__/AccountNotifications.test.tsx.snap @@ -8,25 +8,26 @@ Array [ github.com ,
Repository @@ -41,24 +42,25 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi github.com
`; diff --git a/src/components/__snapshots__/NotificationRow.test.tsx.snap b/src/components/__snapshots__/NotificationRow.test.tsx.snap index 15fd3fb4d..ac0a03b85 100644 --- a/src/components/__snapshots__/NotificationRow.test.tsx.snap +++ b/src/components/__snapshots__/NotificationRow.test.tsx.snap @@ -10,25 +10,29 @@ exports[`components/Notification.js should render itself & its children 1`] = ` ", - } - } + className="octicon octicon-issue-opened" fill="currentColor" + focusable="false" height={18} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={18} - /> + > + + +
", - } - } fill="currentColor" + focusable="false" height={13} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={13} - /> + > + +
@@ -93,24 +98,25 @@ exports[`components/Notification.js should render itself & its children 1`] = ` aria-hidden="false" aria-label="Mark as Read" className="hover:text-green-500" - dangerouslySetInnerHTML={ - Object { - "__html": "", - } - } fill="currentColor" + focusable="false" height={20} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={20} - /> + > + + diff --git a/src/components/__snapshots__/Repository.test.tsx.snap b/src/components/__snapshots__/Repository.test.tsx.snap index d6deac116..54c25a118 100644 --- a/src/components/__snapshots__/Repository.test.tsx.snap +++ b/src/components/__snapshots__/Repository.test.tsx.snap @@ -29,24 +29,25 @@ Array [ aria-hidden="false" aria-label="Mark Repository as Read" className="hover:text-green-500" - dangerouslySetInnerHTML={ - Object { - "__html": "", - } - } fill="currentColor" + focusable="false" height={20} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={20} - /> + > + + , diff --git a/src/components/__snapshots__/Sidebar.test.tsx.snap b/src/components/__snapshots__/Sidebar.test.tsx.snap index 5ff88d128..814aa2c5f 100644 --- a/src/components/__snapshots__/Sidebar.test.tsx.snap +++ b/src/components/__snapshots__/Sidebar.test.tsx.snap @@ -59,25 +59,26 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in) > ", - } - } + className="octicon octicon-bell" fill="currentColor" + focusable="false" height={12} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={12} - /> + > + + 4 @@ -178,25 +179,26 @@ exports[`components/Sidebar.tsx should render itself & its children (logged out) > ", - } - } + className="octicon octicon-bell" fill="currentColor" + focusable="false" height={12} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={12} - /> + > + + 4 diff --git a/src/routes/__snapshots__/LoginEnterprise.test.tsx.snap b/src/routes/__snapshots__/LoginEnterprise.test.tsx.snap index a00a315bb..9edc43f32 100644 --- a/src/routes/__snapshots__/LoginEnterprise.test.tsx.snap +++ b/src/routes/__snapshots__/LoginEnterprise.test.tsx.snap @@ -15,24 +15,25 @@ exports[`routes/LoginEnterprise.js renders correctly 1`] = ` ", - } - } fill="currentColor" + focusable="false" height={20} role="img" style={ Object { "display": "inline-block", + "overflow": "visible", "userSelect": "none", "verticalAlign": "text-bottom", } } viewBox="0 0 16 16" width={20} - /> + > + +