Skip to content

Commit

Permalink
Resolve dependabot CVE issues (gravitational#22605)
Browse files Browse the repository at this point in the history
* update storybook dependencies to resolve some dependabot issues.

* remove config that's already set to the default

* Resolve prettier issues after dep update.

* Pin x-default-browser version to resolve dependabot vulnerability.
  • Loading branch information
hatched authored Mar 3, 2023
1 parent d281fd7 commit 016141c
Show file tree
Hide file tree
Showing 12 changed files with 844 additions and 986 deletions.
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"arrowParens": "avoid",
"printWidth": 80,
"bracketSpacing": true,
"bracketSameLine": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"resolutions": {
"react": "16.14.0",
"**/minimist": "^1.2.5",
"**/@types/react": "^16.8.19"
"**/@types/react": "^16.8.19",
"x-default-browser": "^0.5.2"
},
"workspaces": {
"packages": [
Expand Down
6 changes: 3 additions & 3 deletions web/packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"@opentelemetry/sdk-trace-web": "1.8.0",
"@opentelemetry/semantic-conventions": "1.8.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
"@storybook/builder-webpack5": "^6.4.0",
"@storybook/manager-webpack5": "^6.4.0",
"@storybook/react": "^6.4.0",
"@storybook/builder-webpack5": "^6.5.16",
"@storybook/manager-webpack5": "^6.5.16",
"@storybook/react": "^6.5.16",
"@testing-library/jest-dom": "^5.15.1",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
5 changes: 2 additions & 3 deletions web/packages/design/src/StepSlider/StepSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export function StepSlider<T>(props: Props<T>) {
const [step, setStep] = useState(0);
// animationDirectionPrefix defines the prefix of the class name that contains
// the animations to apply when transitioning.
const [animationDirectionPrefix, setAnimationDirectionPrefix] = useState<
'next' | 'prev' | ''
>('');
const [animationDirectionPrefix, setAnimationDirectionPrefix] =
useState<'next' | 'prev' | ''>('');

const startTransitionInDirection = useCallback(
(direction: 'next' | 'prev') => {
Expand Down
4 changes: 3 additions & 1 deletion web/packages/design/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ import Flex from './Flex';
import Menu, { MenuItem, MenuItemIcon } from './Menu';
import { Pill } from './Pill';
import Popover from './Popover';
import { TextArea, type TextAreaProps } from './TextArea';
import { TextArea } from './TextArea';

import type { TextAreaProps } from './TextArea';

export { AnimatedProgressBar } from './AnimatedProgressBar';
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ import React, { useContext, useState, FC } from 'react';

import { FileTransferDialogDirection } from './FileTransferStateless';

const FileTransferContext = React.createContext<{
openedDialog: FileTransferDialogDirection;
openDownloadDialog(): void;
openUploadDialog(): void;
closeDialog(): void;
}>(null);
const FileTransferContext =
React.createContext<{
openedDialog: FileTransferDialogDirection;
openDownloadDialog(): void;
openUploadDialog(): void;
closeDialog(): void;
}>(null);

export const FileTransferContextProvider: FC<{
openedDialog?: FileTransferDialogDirection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ function DatabaseList(props: Props) {
pageIndicators,
} = props;

const [dbConnectInfo, setDbConnectInfo] = useState<{
name: string;
protocol: DbProtocol;
}>(null);
const [dbConnectInfo, setDbConnectInfo] =
useState<{
name: string;
protocol: DbProtocol;
}>(null);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import { ClusterAdd } from './ClusterAdd';
import { ClusterLogin } from './ClusterLogin';

export function ClusterConnect(props: ClusterConnectProps) {
const [createdClusterUri, setCreatedClusterUri] = useState<
RootClusterUri | undefined
>();
const [createdClusterUri, setCreatedClusterUri] =
useState<RootClusterUri | undefined>();
const { clustersService } = useAppContext();
const clusterUri = props.clusterUri || createdClusterUri;

Expand Down
13 changes: 7 additions & 6 deletions web/packages/teleterm/src/ui/Documents/workspaceContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import { AccessRequestsService } from 'teleterm/ui/services/workspacesService/ac
import { useAppContext } from 'teleterm/ui/appContextProvider';
import { ClusterUri, RootClusterUri } from 'teleterm/ui/uri';

const WorkspaceContext = React.createContext<{
rootClusterUri: RootClusterUri;
localClusterUri: ClusterUri;
documentsService: DocumentsService;
accessRequestsService: AccessRequestsService;
}>(null);
const WorkspaceContext =
React.createContext<{
rootClusterUri: RootClusterUri;
localClusterUri: ClusterUri;
documentsService: DocumentsService;
accessRequestsService: AccessRequestsService;
}>(null);

export const WorkspaceContextProvider: React.FC<{
value: {
Expand Down
5 changes: 2 additions & 3 deletions web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ import ConfirmClusterChangeDialog from './ConfirmClusterChangeDialog';
export function Clusters() {
const iconRef = useRef();
const [isPopoverOpened, setIsPopoverOpened] = useState(false);
const [confirmChangeTo, setConfirmChangeTo] = useState<ClusterUri | null>(
null
);
const [confirmChangeTo, setConfirmChangeTo] =
useState<ClusterUri | null>(null);
const clusters = useClusters();

const togglePopover = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ import React, {

export type RunActiveItemHandler = () => void;

export const KeyboardArrowsNavigationContext = createContext<{
activeIndex: number;
setActiveIndex(index: number): void;
addItem(index: number, onRunActiveItem: RunActiveItemHandler): void;
removeItem(index: number): void;
}>(null);
export const KeyboardArrowsNavigationContext =
createContext<{
activeIndex: number;
setActiveIndex(index: number): void;
addItem(index: number, onRunActiveItem: RunActiveItemHandler): void;
removeItem(index: number): void;
}>(null);

enum KeyboardArrowNavigationKeys {
ArrowDown = 'ArrowDown',
Expand Down
Loading

0 comments on commit 016141c

Please sign in to comment.