Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Dec 8, 2024
1 parent 8936a95 commit 6bf06ab
Show file tree
Hide file tree
Showing 6 changed files with 3,384 additions and 2,833 deletions.
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid",
"quoteProps": "consistent"
}
"quoteProps": "consistent",
"plugins": ["prettier-plugin-organize-imports"]
}
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@
"copy-to-clipboard": "^3.3.3",
"history": "^5.3.0",
"local-storage": "^2.0.0",
"monaco-editor": "^0.51.0",
"monaco-editor": "^0.52.0",
"monaco-themes": "^0.4.4",
"pako": "^2.1.0",
"react": "^18.2.0",
"react": "^19.0.0",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-dom": "^19.0.0",
"react-scripts": "^5.0.1",
"styled-components": "^6.1.1",
"typescript": "^4.4.2",
"styled-components": "^6.1.13",
"typescript": "^5.7.2",
"whatwg-mimetype": "^3.0.0"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/node": "^18.11.9",
"@types/pako": "^2.0.3",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/whatwg-mimetype": "^3.0.2",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4"
"prettier": "^3.4.2",
"prettier-plugin-organize-imports": "^4.1.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Editor({
}: EditorProps) {
const [language, setLanguage] = useState<string>('plain');
const [readOnly, setReadOnly] = useState<boolean>(isMobile && !!pasteId);
const resetFunction = useRef<ResetFunction>();
const resetFunction = useRef<ResetFunction>(null);

const [theme, setTheme] = usePreference<keyof Themes>(
'theme',
Expand Down
4 changes: 2 additions & 2 deletions src/components/EditorControls.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy from 'copy-to-clipboard';
import history from 'history/browser';
import { MutableRefObject, useCallback, useEffect, useState } from 'react';
import { RefObject, useCallback, useEffect, useState } from 'react';
import styled from 'styled-components';

import themes, { Themes } from '../style/themes';
Expand All @@ -12,7 +12,7 @@ import MenuButton from './MenuButton';

export interface EditorControlsProps {
actualContent: string;
resetFunction: MutableRefObject<ResetFunction | undefined>;
resetFunction: RefObject<ResetFunction | null>;
language: string;
setLanguage: (value: string) => void;
readOnly: boolean;
Expand Down
18 changes: 6 additions & 12 deletions src/components/EditorTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,17 @@ import Editor, {
OnMount,
} from '@monaco-editor/react';
import history from 'history/browser';
import React, {
MutableRefObject,
useCallback,
useEffect,
useRef,
useState,
} from 'react';
import { RefObject, useCallback, useEffect, useRef, useState } from 'react';
import styled from 'styled-components';
import themes, { Theme } from '../style/themes';

import type { editor } from 'monaco-editor';
import { ResetFunction } from './Editor';
import { logLanguage } from '../util/languages/log';
import { diffLanguage } from '../util/languages/diff';
import { logLanguage } from '../util/languages/log';
import { ResetFunction } from './Editor';

import * as monaco from 'monaco-editor';
import { loader } from '@monaco-editor/react';
import * as monaco from 'monaco-editor';

loader.config({ monaco });

Expand All @@ -33,7 +27,7 @@ export interface EditorTextAreaProps {
language: string;
fontSize: number;
readOnly: boolean;
resetFunction: MutableRefObject<ResetFunction | undefined>;
resetFunction: RefObject<ResetFunction | null>;
}

export default function EditorTextArea({
Expand Down Expand Up @@ -254,7 +248,7 @@ function useSelectedLine(): [SelectedLine, ToggleSelectedFunction] {
}

function useLineNumberMagic(
editorAreaRef: React.RefObject<HTMLDivElement>,
editorAreaRef: RefObject<HTMLDivElement | null>,
selected: SelectedLine,
toggleSelected: ToggleSelectedFunction,
forcedContent: string,
Expand Down
Loading

0 comments on commit 6bf06ab

Please sign in to comment.