diff --git a/package.json b/package.json index a1c5da5b..ea800211 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,6 @@ "engines": { "node": ">=18.0.0 || >=20.0.0" }, - "bin": { - "mosaic": "yarn workspace @jpmorganchase/mosaic-cli" - }, "scripts": { "build:site": "turbo run build --filter=@jpmorganchase/mosaic-site", "build": "turbo run build", @@ -59,7 +56,9 @@ "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.0.0", "@types/lodash-es": "^4.17.6", - "@types/node": "^17.0.24", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@types/node": "^18.0.0", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "@vanilla-extract/esbuild-plugin": "^2.3.11", @@ -90,7 +89,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "resize-observer-polyfill": "1.5.1", - "typescript": "^4.8.3", + "typescript": "^5.0.0", "vitest": "^2.0.0" }, "dependencies": { @@ -100,7 +99,7 @@ }, "resolutions": { "@braintree/sanitize-url": "^6.0.0", - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "commander": "^9.4.0", "esbuild": "0.23.1", "json5": "^1.0.2" diff --git a/packages/components-labs/package.json b/packages/components-labs/package.json index d5326541..1d4448e9 100644 --- a/packages/components-labs/package.json +++ b/packages/components-labs/package.json @@ -37,7 +37,7 @@ "@types/styled-components": "^5.1.26", "@vanilla-extract/esbuild-plugin": "^2.3.11", "del-cli": "^4.0.1", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -53,7 +53,7 @@ "warning": "^3.0.0" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/components-labs/src/Diagram.tsx b/packages/components-labs/src/Diagram.tsx index 73c41bcc..7bc99bae 100644 --- a/packages/components-labs/src/Diagram.tsx +++ b/packages/components-labs/src/Diagram.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { Mermaid, MermaidProps } from 'mdx-mermaid/lib/Mermaid'; import warning from 'warning'; diff --git a/packages/components/package.json b/packages/components/package.json index 2242fee7..145552c0 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -38,7 +38,7 @@ "devDependencies": { "react": "^18.2.0", "del-cli": "^4.0.1", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-store": "^0.1.0-beta.89", @@ -62,7 +62,7 @@ "warning": "^3.0.0" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/components/src/BrowserOnly.tsx b/packages/components/src/BrowserOnly.tsx index a5c510a7..cc8198a7 100644 --- a/packages/components/src/BrowserOnly.tsx +++ b/packages/components/src/BrowserOnly.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { canUseDOM } from './canUseDOM'; export function BrowserOnly({ diff --git a/packages/components/src/Button.tsx b/packages/components/src/Button.tsx index f09526db..4b606c67 100644 --- a/packages/components/src/Button.tsx +++ b/packages/components/src/Button.tsx @@ -1,4 +1,4 @@ -import React, { type Ref, type ReactNode, forwardRef } from 'react'; +import { type Ref, type ReactNode, forwardRef } from 'react'; import classnames from 'clsx'; import { Button as SaltButton, ButtonProps as SaltButtonProps } from '@salt-ds/core'; import { button as buttonStyles } from '@jpmorganchase/mosaic-theme'; diff --git a/packages/components/src/FilterToolbar/FilterDropdown/index.tsx b/packages/components/src/FilterToolbar/FilterDropdown/index.tsx index f1ff6b3f..4c9950b9 100644 --- a/packages/components/src/FilterToolbar/FilterDropdown/index.tsx +++ b/packages/components/src/FilterToolbar/FilterDropdown/index.tsx @@ -1,4 +1,4 @@ -import React, { SyntheticEvent, useMemo } from 'react'; +import { SyntheticEvent, useMemo } from 'react'; import { Dropdown, DropdownProps, Option } from '@salt-ds/core'; import { Icon } from '../../Icon'; import { useToolbarDispatch, useToolbarState } from '../ToolbarProvider'; diff --git a/packages/components/src/FilterToolbar/Search/index.tsx b/packages/components/src/FilterToolbar/Search/index.tsx index b98f8f8d..efe590c2 100644 --- a/packages/components/src/FilterToolbar/Search/index.tsx +++ b/packages/components/src/FilterToolbar/Search/index.tsx @@ -1,4 +1,4 @@ -import React, { ChangeEvent, SyntheticEvent, useState } from 'react'; +import { ChangeEvent, SyntheticEvent, useState } from 'react'; import classnames from 'clsx'; import { ComboBox, Option, ComboBoxProps } from '@salt-ds/core'; import { Icon } from '../../Icon'; diff --git a/packages/components/src/FilterToolbar/SortDropdown/index.tsx b/packages/components/src/FilterToolbar/SortDropdown/index.tsx index 8b0cddaf..18a45167 100644 --- a/packages/components/src/FilterToolbar/SortDropdown/index.tsx +++ b/packages/components/src/FilterToolbar/SortDropdown/index.tsx @@ -1,4 +1,4 @@ -import React, { SyntheticEvent, useState } from 'react'; +import { SyntheticEvent, useState } from 'react'; import { Dropdown, Option, DropdownProps } from '@salt-ds/core'; import { Icon } from '../../Icon'; import { useToolbarDispatch, useToolbarState } from '../ToolbarProvider'; diff --git a/packages/components/src/Grid/index.tsx b/packages/components/src/Grid/index.tsx index 489b360f..2bc9eaaa 100644 --- a/packages/components/src/Grid/index.tsx +++ b/packages/components/src/Grid/index.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ReactNode, Ref } from 'react'; +import { forwardRef, ReactNode, Ref } from 'react'; import classnames from 'clsx'; import styles from './styles.css'; diff --git a/packages/components/src/GridBase/index.tsx b/packages/components/src/GridBase/index.tsx index 97b09325..608884e6 100644 --- a/packages/components/src/GridBase/index.tsx +++ b/packages/components/src/GridBase/index.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ReactElement, Ref } from 'react'; +import { forwardRef, ReactElement, Ref } from 'react'; import classnames from 'clsx'; import { responsiveSprinkles } from '@jpmorganchase/mosaic-theme'; import type { SpaceVars } from '@jpmorganchase/mosaic-theme'; diff --git a/packages/components/src/Link/index.tsx b/packages/components/src/Link/index.tsx index 75ab2344..fc089115 100644 --- a/packages/components/src/Link/index.tsx +++ b/packages/components/src/Link/index.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, Ref } from 'react'; +import { forwardRef, Ref } from 'react'; import classnames from 'clsx'; import { LinkBase, LinkBaseProps } from '../LinkBase'; diff --git a/packages/components/src/PageFilterView/index.tsx b/packages/components/src/PageFilterView/index.tsx index 7ecc0687..f416a160 100644 --- a/packages/components/src/PageFilterView/index.tsx +++ b/packages/components/src/PageFilterView/index.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { TileContentLabel } from '../TileContentLabel'; import { TileLink } from '../TileLink'; import type { GridItemSize } from '../Grid'; diff --git a/packages/components/src/ThemeProvider.tsx b/packages/components/src/ThemeProvider.tsx index de4ab20b..9aa07d18 100644 --- a/packages/components/src/ThemeProvider.tsx +++ b/packages/components/src/ThemeProvider.tsx @@ -1,7 +1,7 @@ import { useColorMode } from '@jpmorganchase/mosaic-store'; import { ssrClassName } from '@jpmorganchase/mosaic-theme'; import { SaltProvider, UNSTABLE_SaltProviderNext } from '@salt-ds/core'; -import React, { type ReactNode, useEffect, useState } from 'react'; +import { type ReactNode, useEffect, useState } from 'react'; import classnames from 'clsx'; diff --git a/packages/components/src/TileBase/TileBase.tsx b/packages/components/src/TileBase/TileBase.tsx index 9910e04f..8ab9af5c 100644 --- a/packages/components/src/TileBase/TileBase.tsx +++ b/packages/components/src/TileBase/TileBase.tsx @@ -28,8 +28,6 @@ export interface TileBaseProps { onSelect?: (event: React.KeyboardEvent | React.MouseEvent) => void; /** The children components of the Tile component */ children?: React.ReactNode; - /** Ref */ - ref?: Ref; /** aria role */ role?: string; /** Tile size */ @@ -152,7 +150,7 @@ export const TileBaseComponent: FC = function TileBase({ ); }; -export const TileBase: FC = forwardRef((props, ref: Ref) => ( +export const TileBase = forwardRef((props, ref) => ( diff --git a/packages/components/src/Tiles.tsx b/packages/components/src/Tiles.tsx index 539800db..a8b31c20 100644 --- a/packages/components/src/Tiles.tsx +++ b/packages/components/src/Tiles.tsx @@ -1,4 +1,4 @@ -import React, { FC, forwardRef, ReactElement, Ref } from 'react'; +import { FC, forwardRef, ReactElement, Ref } from 'react'; import { TileBaseProps } from './TileBase'; import { Grid, GridProps } from './Grid'; diff --git a/packages/content-editor-plugin/package.json b/packages/content-editor-plugin/package.json index a0fed841..eb6c68af 100644 --- a/packages/content-editor-plugin/package.json +++ b/packages/content-editor-plugin/package.json @@ -35,7 +35,7 @@ "dev": "node ../../scripts/bundle.mjs watch" }, "devDependencies": { - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -65,7 +65,7 @@ "zustand": "^4.1.1" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/content-editor-plugin/src/components/ActionMenu/ActionMenu.tsx b/packages/content-editor-plugin/src/components/ActionMenu/ActionMenu.tsx index 60a13b03..7c25de54 100644 --- a/packages/content-editor-plugin/src/components/ActionMenu/ActionMenu.tsx +++ b/packages/content-editor-plugin/src/components/ActionMenu/ActionMenu.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Menu, MenuTrigger, MenuPanel, MenuItem } from '@salt-ds/core'; import { Icon, Button } from '@jpmorganchase/mosaic-components'; import { IconNames } from '@jpmorganchase/mosaic-theme'; diff --git a/packages/content-editor-plugin/src/components/BaseToolbar/BaseToolbar.tsx b/packages/content-editor-plugin/src/components/BaseToolbar/BaseToolbar.tsx index 99a3c80f..9af92f9b 100644 --- a/packages/content-editor-plugin/src/components/BaseToolbar/BaseToolbar.tsx +++ b/packages/content-editor-plugin/src/components/BaseToolbar/BaseToolbar.tsx @@ -1,4 +1,4 @@ -import React, { type ReactNode } from 'react'; +import { type ReactNode } from 'react'; import classnames from 'clsx'; import styles from './BaseToolbar.css'; diff --git a/packages/content-editor-plugin/src/components/BaseTooltray/BaseTooltray.tsx b/packages/content-editor-plugin/src/components/BaseTooltray/BaseTooltray.tsx index 45d0c1f4..c06934e2 100644 --- a/packages/content-editor-plugin/src/components/BaseTooltray/BaseTooltray.tsx +++ b/packages/content-editor-plugin/src/components/BaseTooltray/BaseTooltray.tsx @@ -1,4 +1,4 @@ -import React, { type ReactNode } from 'react'; +import { type ReactNode } from 'react'; import classnames from 'clsx'; import styles from './BaseTooltray.css'; diff --git a/packages/content-editor-plugin/src/components/ContentEditor.tsx b/packages/content-editor-plugin/src/components/ContentEditor.tsx index 46451aa1..73002c39 100644 --- a/packages/content-editor-plugin/src/components/ContentEditor.tsx +++ b/packages/content-editor-plugin/src/components/ContentEditor.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'; import { ContentEditable } from '@lexical/react/LexicalContentEditable'; import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary'; diff --git a/packages/content-editor-plugin/src/components/Dialog.tsx b/packages/content-editor-plugin/src/components/Dialog.tsx index b3d5d6d3..78e042c2 100644 --- a/packages/content-editor-plugin/src/components/Dialog.tsx +++ b/packages/content-editor-plugin/src/components/Dialog.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dialog as SaltDialog, type DialogProps as SaltDialogProps } from '@salt-ds/core'; import { themeClassName } from '@jpmorganchase/mosaic-theme'; import classnames from 'clsx'; diff --git a/packages/content-editor-plugin/src/components/Editor.tsx b/packages/content-editor-plugin/src/components/Editor.tsx index e91eaf16..dfdd7895 100644 --- a/packages/content-editor-plugin/src/components/Editor.tsx +++ b/packages/content-editor-plugin/src/components/Editor.tsx @@ -1,4 +1,4 @@ -import React, { ComponentType, FC, useRef, useState } from 'react'; +import { ComponentType, FC, useRef, useState } from 'react'; import classnames from 'clsx'; import matter from 'gray-matter'; import { LexicalComposer } from '@lexical/react/LexicalComposer'; diff --git a/packages/content-editor-plugin/src/components/EditorControls.tsx b/packages/content-editor-plugin/src/components/EditorControls.tsx index 1cc415ed..201cb2b0 100644 --- a/packages/content-editor-plugin/src/components/EditorControls.tsx +++ b/packages/content-editor-plugin/src/components/EditorControls.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import { BaseToolbar as Toolbar } from './BaseToolbar/BaseToolbar'; import { BaseTooltray as Tooltray } from './BaseTooltray/BaseTooltray'; diff --git a/packages/content-editor-plugin/src/components/LinkEditor/EditLinkButton.tsx b/packages/content-editor-plugin/src/components/LinkEditor/EditLinkButton.tsx index d9521280..2cfbf6ab 100644 --- a/packages/content-editor-plugin/src/components/LinkEditor/EditLinkButton.tsx +++ b/packages/content-editor-plugin/src/components/LinkEditor/EditLinkButton.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import { ToolbarButton, type ToolbarButtonProps } from '../Toolbar/ToolbarButton'; diff --git a/packages/content-editor-plugin/src/components/LinkEditor/LinkEditor.tsx b/packages/content-editor-plugin/src/components/LinkEditor/LinkEditor.tsx index 26e6e5f8..79d0cc1e 100644 --- a/packages/content-editor-plugin/src/components/LinkEditor/LinkEditor.tsx +++ b/packages/content-editor-plugin/src/components/LinkEditor/LinkEditor.tsx @@ -6,7 +6,7 @@ import { RangeSelection, SELECTION_CHANGE_COMMAND } from 'lexical'; -import React, { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react'; +import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react'; import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useFloatingUI, Input } from '@salt-ds/core'; diff --git a/packages/content-editor-plugin/src/components/LinkEditor/SaveAdornment.tsx b/packages/content-editor-plugin/src/components/LinkEditor/SaveAdornment.tsx index 66c65880..6d05fc69 100644 --- a/packages/content-editor-plugin/src/components/LinkEditor/SaveAdornment.tsx +++ b/packages/content-editor-plugin/src/components/LinkEditor/SaveAdornment.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import type { ButtonProps } from '@jpmorganchase/mosaic-components'; import { ToolbarButton } from '../Toolbar/ToolbarButton'; diff --git a/packages/content-editor-plugin/src/components/PersistEditDialog/PersistStatus.tsx b/packages/content-editor-plugin/src/components/PersistEditDialog/PersistStatus.tsx index bce0f5b5..240436bc 100644 --- a/packages/content-editor-plugin/src/components/PersistEditDialog/PersistStatus.tsx +++ b/packages/content-editor-plugin/src/components/PersistEditDialog/PersistStatus.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactNode } from 'react'; +import { FC, ReactNode } from 'react'; import classnames from 'clsx'; import { P2, P6 } from '@jpmorganchase/mosaic-components'; diff --git a/packages/content-editor-plugin/src/components/PersistEditDialog/index.tsx b/packages/content-editor-plugin/src/components/PersistEditDialog/index.tsx index a50fbe50..104b6a4a 100644 --- a/packages/content-editor-plugin/src/components/PersistEditDialog/index.tsx +++ b/packages/content-editor-plugin/src/components/PersistEditDialog/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useState } from 'react'; +import { FC, useState } from 'react'; import md5 from 'md5'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { $convertToMarkdownString } from '@lexical/markdown'; diff --git a/packages/content-editor-plugin/src/components/Popper/Popper.tsx b/packages/content-editor-plugin/src/components/Popper/Popper.tsx index 55611685..51064c6c 100644 --- a/packages/content-editor-plugin/src/components/Popper/Popper.tsx +++ b/packages/content-editor-plugin/src/components/Popper/Popper.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, HTMLAttributes, ReactNode } from 'react'; +import { forwardRef, HTMLAttributes, ReactNode } from 'react'; import { Portal, useWindow } from '@salt-ds/lab'; import { themeClassName } from '@jpmorganchase/mosaic-theme'; import classnames from 'clsx'; diff --git a/packages/content-editor-plugin/src/components/SaveButton.tsx b/packages/content-editor-plugin/src/components/SaveButton.tsx index f418e26c..969f7b6f 100644 --- a/packages/content-editor-plugin/src/components/SaveButton.tsx +++ b/packages/content-editor-plugin/src/components/SaveButton.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Button, Icon } from '@jpmorganchase/mosaic-components'; import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'; diff --git a/packages/content-editor-plugin/src/components/ScrollableSection/ScrollableSection.tsx b/packages/content-editor-plugin/src/components/ScrollableSection/ScrollableSection.tsx index e30817c1..8c006c8e 100644 --- a/packages/content-editor-plugin/src/components/ScrollableSection/ScrollableSection.tsx +++ b/packages/content-editor-plugin/src/components/ScrollableSection/ScrollableSection.tsx @@ -1,11 +1,11 @@ -import React, { Ref, forwardRef } from 'react'; +import { ReactNode, Ref, forwardRef } from 'react'; import classnames from 'clsx'; import styles from './ScrollableSection.css'; interface ScrollableSectionProps { className?: string; - children: React.ReactNode; + children: ReactNode; } export const ScrollableSection = forwardRef(function ScrollableSection( diff --git a/packages/content-editor-plugin/src/components/StatusBanner.tsx b/packages/content-editor-plugin/src/components/StatusBanner.tsx index 92517cb2..71e6462c 100644 --- a/packages/content-editor-plugin/src/components/StatusBanner.tsx +++ b/packages/content-editor-plugin/src/components/StatusBanner.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Banner, BannerContent } from '@salt-ds/core'; import { usePageState } from '../store'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/InsertBlockDropdown.tsx b/packages/content-editor-plugin/src/components/Toolbar/InsertBlockDropdown.tsx index b5db4f9b..de3115f3 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/InsertBlockDropdown.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/InsertBlockDropdown.tsx @@ -1,4 +1,4 @@ -import React, { SyntheticEvent } from 'react'; +import { SyntheticEvent } from 'react'; import { Dropdown, Option } from '@salt-ds/core'; import { $createCodeNode } from '@lexical/code'; import { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND } from '@lexical/list'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/InsertHorizontalRule.tsx b/packages/content-editor-plugin/src/components/Toolbar/InsertHorizontalRule.tsx index 52787037..e87643bb 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/InsertHorizontalRule.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/InsertHorizontalRule.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { INSERT_HORIZONTAL_RULE_COMMAND } from '@lexical/react/LexicalHorizontalRuleNode'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/InsertImage.tsx b/packages/content-editor-plugin/src/components/Toolbar/InsertImage.tsx index 742e168a..5825c35d 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/InsertImage.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/InsertImage.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { Button, Icon } from '@jpmorganchase/mosaic-components'; import { string, object } from 'yup'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/InsertLink.tsx b/packages/content-editor-plugin/src/components/Toolbar/InsertLink.tsx index 4680f084..268aa9d5 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/InsertLink.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/InsertLink.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { Button, Icon } from '@jpmorganchase/mosaic-components'; import { string, object } from 'yup'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/InsertTable.tsx b/packages/content-editor-plugin/src/components/Toolbar/InsertTable.tsx index 5541ff54..86244cf6 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/InsertTable.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/InsertTable.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement, FC, ReactNode, MouseEventHandler, useRef, useState } from 'react'; +import { ReactElement, FC, ReactNode, MouseEventHandler, useRef, useState } from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { INSERT_TABLE_COMMAND } from '@lexical/table'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/TextFormatTooltray.tsx b/packages/content-editor-plugin/src/components/Toolbar/TextFormatTooltray.tsx index 2d4135ca..7375ab42 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/TextFormatTooltray.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/TextFormatTooltray.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import classnames from 'clsx'; import { FORMAT_TEXT_COMMAND, diff --git a/packages/content-editor-plugin/src/components/Toolbar/Toolbar.tsx b/packages/content-editor-plugin/src/components/Toolbar/Toolbar.tsx index fbfe9e41..c5f6545b 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/Toolbar.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/Toolbar.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icon } from '@jpmorganchase/mosaic-components'; import { useEditHistory } from '../../hooks/useEditHistory'; import { usePageState } from '../../store'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/ToolbarButton.tsx b/packages/content-editor-plugin/src/components/Toolbar/ToolbarButton.tsx index 960ed394..efb5db1f 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/ToolbarButton.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/ToolbarButton.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, Ref } from 'react'; +import { forwardRef, Ref } from 'react'; import classnames from 'clsx'; import { Button, type ButtonProps, Label } from '@jpmorganchase/mosaic-components'; diff --git a/packages/content-editor-plugin/src/components/Toolbar/ToolbarSepartor.tsx b/packages/content-editor-plugin/src/components/Toolbar/ToolbarSepartor.tsx index ccacf3d3..2aebed6a 100644 --- a/packages/content-editor-plugin/src/components/Toolbar/ToolbarSepartor.tsx +++ b/packages/content-editor-plugin/src/components/Toolbar/ToolbarSepartor.tsx @@ -1,4 +1,4 @@ -import React, { type ReactNode } from 'react'; +import { type ReactNode } from 'react'; import classnames from 'clsx'; import styles from './ToolbarSeparator.css'; diff --git a/packages/content-editor-plugin/src/plugins/FloatingToolbarPlugin.tsx b/packages/content-editor-plugin/src/plugins/FloatingToolbarPlugin.tsx index 512f3f82..009654c8 100644 --- a/packages/content-editor-plugin/src/plugins/FloatingToolbarPlugin.tsx +++ b/packages/content-editor-plugin/src/plugins/FloatingToolbarPlugin.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { mergeRegister } from '@lexical/utils'; import { diff --git a/packages/content-editor-plugin/src/plugins/MarkdownLinkPlugin.tsx b/packages/content-editor-plugin/src/plugins/MarkdownLinkPlugin.tsx index 4a94715c..7e0a31e8 100644 --- a/packages/content-editor-plugin/src/plugins/MarkdownLinkPlugin.tsx +++ b/packages/content-editor-plugin/src/plugins/MarkdownLinkPlugin.tsx @@ -10,7 +10,7 @@ import { createCommand, LexicalCommand } from 'lexical'; -import React, { useCallback, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import { InsertLinkDialog } from '../components/Toolbar/InsertLink'; diff --git a/packages/content-editor-plugin/src/plugins/PreviewPlugin.tsx b/packages/content-editor-plugin/src/plugins/PreviewPlugin.tsx index 13a84abc..f4ea4ec8 100644 --- a/packages/content-editor-plugin/src/plugins/PreviewPlugin.tsx +++ b/packages/content-editor-plugin/src/plugins/PreviewPlugin.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { $convertToMarkdownString } from '@lexical/markdown'; import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'; import type { EditorState } from 'lexical'; diff --git a/packages/content-editor-plugin/src/plugins/TableActionMenuPlugin.tsx b/packages/content-editor-plugin/src/plugins/TableActionMenuPlugin.tsx index cd053f04..d17953d0 100644 --- a/packages/content-editor-plugin/src/plugins/TableActionMenuPlugin.tsx +++ b/packages/content-editor-plugin/src/plugins/TableActionMenuPlugin.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { $getSelection, $isRangeSelection, LexicalEditor } from 'lexical'; import { diff --git a/packages/core/src/filesystems/MutableVolume.ts b/packages/core/src/filesystems/MutableVolume.ts index 5d9f9f4c..ebcacd8f 100644 --- a/packages/core/src/filesystems/MutableVolume.ts +++ b/packages/core/src/filesystems/MutableVolume.ts @@ -13,7 +13,7 @@ export default class MutableVolume extends FileSystemRestricted implements IVolu } asRestricted() { - return new FileSystemRestricted(this.#vfs, super.namespace); + return new FileSystemRestricted(this.#vfs, this.namespace); } freeze() { diff --git a/packages/core/src/filesystems/RestrictedVolume.ts b/packages/core/src/filesystems/RestrictedVolume.ts index e36c0dd4..b7d932a1 100644 --- a/packages/core/src/filesystems/RestrictedVolume.ts +++ b/packages/core/src/filesystems/RestrictedVolume.ts @@ -8,19 +8,19 @@ import ImmutableFileSystem from './ImmutableVolume.js'; */ class RestrictedVolume extends ImmutableFileSystem implements IVolumePartiallyMutable { #vfs: IFileAccess; + declare promises: any; constructor(vfs, namespace) { super(vfs, namespace); this.#vfs = vfs; + this.promises = create(this.promises, { + unlink: target => this.#vfs.unlink(target), + symlink: (target, alias, type) => this.#vfs.symlink(target, alias, type), + writeFile: (file, data) => this.#vfs.writeFile(file, data), + mkdir: (dir, options) => this.#vfs.mkdir(dir, options) + }); } - promises = create(this.promises, { - unlink: target => this.#vfs.unlink(target), - symlink: (target, alias, type) => this.#vfs.symlink(target, alias, type), - writeFile: (file, data) => this.#vfs.writeFile(file, data), - mkdir: (dir, options) => this.#vfs.mkdir(dir, options) - }); - /** * Do not use this method on restricted volumes, as it may disrupt the read/cache flow of files. */ @@ -41,7 +41,7 @@ class RestrictedVolume extends ImmutableFileSystem implements IVolumePartiallyMu } asReadOnly() { - return new ImmutableFileSystem(this.#vfs, super.namespace); + return new ImmutableFileSystem(this.#vfs, this.namespace); } } diff --git a/packages/core/src/filesystems/UnionVolume.ts b/packages/core/src/filesystems/UnionVolume.ts index db634bb8..899cccd4 100644 --- a/packages/core/src/filesystems/UnionVolume.ts +++ b/packages/core/src/filesystems/UnionVolume.ts @@ -11,18 +11,17 @@ export default class UnionVolume extends MutableVolume implements IUnionVolume { constructor(vfs, namespace) { super(vfs, namespace); this.#vfs = vfs; - } - - promises = create(this.promises, { - readFile: (file, options) => { - if (options?.includeConflicts) { - return this.#vfs.readFile(file, options) as Promise; + this.promises = create(this.promises, { + readFile: (file, options) => { + if (options?.includeConflicts) { + return this.#vfs.readFile(file, options) as Promise; + } + return this.#vfs.readFile(file) as Promise; } - return this.#vfs.readFile(file) as Promise; - } - }); + }); + } scope(namespaces: string[]) { - return new UnionVolume(this.#vfs.scope(namespaces), super.namespace); + return new UnionVolume(this.#vfs.scope(namespaces), this.namespace); } } diff --git a/packages/layouts/package.json b/packages/layouts/package.json index f6173b96..7613a4ee 100644 --- a/packages/layouts/package.json +++ b/packages/layouts/package.json @@ -37,7 +37,7 @@ "devDependencies": { "del-cli": "^4.0.1", "esbuild-node-externals": "^1.0.2", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -54,7 +54,7 @@ "react-transition-group": "^4.4.5" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/layouts/src/layouts/TypeDoc/ExportsSidebar/index.tsx b/packages/layouts/src/layouts/TypeDoc/ExportsSidebar/index.tsx index ee3507a3..0e23180d 100644 --- a/packages/layouts/src/layouts/TypeDoc/ExportsSidebar/index.tsx +++ b/packages/layouts/src/layouts/TypeDoc/ExportsSidebar/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Caption1, Caption2, Link } from '@jpmorganchase/mosaic-components'; import styles from './styles.css'; diff --git a/packages/open-api-component/package.json b/packages/open-api-component/package.json index 47862bfe..5bc1ea88 100644 --- a/packages/open-api-component/package.json +++ b/packages/open-api-component/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "del-cli": "^4.0.1", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -54,7 +54,7 @@ "warning": "^3.0.0" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/site-components/package.json b/packages/site-components/package.json index 282be0e3..642ffc76 100644 --- a/packages/site-components/package.json +++ b/packages/site-components/package.json @@ -37,7 +37,7 @@ "@vanilla-extract/esbuild-plugin": "^2.3.11", "del-cli": "^4.0.1", "next-router-mock": "^0.9.13", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -72,7 +72,7 @@ "warning": "^3.0.0" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "next-auth": "^4.22.1", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/packages/site-components/src/404.tsx b/packages/site-components/src/404.tsx index 2c07c6d3..c2e9e36b 100644 --- a/packages/site-components/src/404.tsx +++ b/packages/site-components/src/404.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Hero } from '@jpmorganchase/mosaic-components'; export function Page404() { diff --git a/packages/site-components/src/500.tsx b/packages/site-components/src/500.tsx index 2755351f..1a93a283 100644 --- a/packages/site-components/src/500.tsx +++ b/packages/site-components/src/500.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Hero } from '@jpmorganchase/mosaic-components'; export function Page500() { diff --git a/packages/site-components/src/AppHeader/AppHeader.tsx b/packages/site-components/src/AppHeader/AppHeader.tsx index eadd3969..4a1d9128 100644 --- a/packages/site-components/src/AppHeader/AppHeader.tsx +++ b/packages/site-components/src/AppHeader/AppHeader.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { FC } from 'react'; import { Text } from '@salt-ds/core'; import { Logo, LogoImage } from '@salt-ds/lab'; import { useBreakpoint, Link } from '@jpmorganchase/mosaic-components'; @@ -31,7 +31,7 @@ const createDrawerMenu = menu => return [...result, parsedItem]; }, []); -export const AppHeader: React.FC = ({ homeLink, logo, menu = [], title }) => { +export const AppHeader: FC = ({ homeLink, logo, menu = [], title }) => { const breakpoint = useBreakpoint(); const { route } = useRoute(); const showDrawer = breakpoint === 'mobile' || breakpoint === 'tablet'; diff --git a/packages/site-components/src/AppHeader/withAppHeaderAdapter.tsx b/packages/site-components/src/AppHeader/withAppHeaderAdapter.tsx index 5a85bdaf..909a9a77 100644 --- a/packages/site-components/src/AppHeader/withAppHeaderAdapter.tsx +++ b/packages/site-components/src/AppHeader/withAppHeaderAdapter.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TabsLinkItem, TabsMenu, TabsMenuButtonItem } from '@jpmorganchase/mosaic-components'; import { TabMenuItemType } from '@jpmorganchase/mosaic-components'; import type { diff --git a/packages/site-components/src/BaseUrlProvider.tsx b/packages/site-components/src/BaseUrlProvider.tsx index 79a895fb..05c68cde 100644 --- a/packages/site-components/src/BaseUrlProvider.tsx +++ b/packages/site-components/src/BaseUrlProvider.tsx @@ -1,4 +1,4 @@ -import React, { createContext, Context, useContext } from 'react'; +import { createContext, Context, useContext } from 'react'; import { hasProtocol } from '@jpmorganchase/mosaic-components'; import { useRoute } from '@jpmorganchase/mosaic-store'; diff --git a/packages/site-components/src/Body.tsx b/packages/site-components/src/Body.tsx index 25322d35..64efc5f8 100644 --- a/packages/site-components/src/Body.tsx +++ b/packages/site-components/src/Body.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MDXRemote } from 'next-mdx-remote'; import { ErrorBoundary, useErrorBoundary } from 'react-error-boundary'; import { useContentEditor, Editor } from '@jpmorganchase/mosaic-content-editor-plugin'; diff --git a/packages/site-components/src/Breadcrumbs/Breadcrumb.tsx b/packages/site-components/src/Breadcrumbs/Breadcrumb.tsx index a1aa18a1..c5b68b6f 100644 --- a/packages/site-components/src/Breadcrumbs/Breadcrumb.tsx +++ b/packages/site-components/src/Breadcrumbs/Breadcrumb.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ReactNode } from 'react'; +import { forwardRef, ReactNode } from 'react'; import { Icon, Link } from '@jpmorganchase/mosaic-components'; import styles from './styles.css'; diff --git a/packages/site-components/src/Breadcrumbs/withBreadcrumbsAdapter.tsx b/packages/site-components/src/Breadcrumbs/withBreadcrumbsAdapter.tsx index c6b17ab5..eda75f52 100644 --- a/packages/site-components/src/Breadcrumbs/withBreadcrumbsAdapter.tsx +++ b/packages/site-components/src/Breadcrumbs/withBreadcrumbsAdapter.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useBreadcrumbs } from '@jpmorganchase/mosaic-store'; export const withBreadcrumbsAdapter = Component => () => { diff --git a/packages/site-components/src/DocPaginator/withNavigationAdapter.tsx b/packages/site-components/src/DocPaginator/withNavigationAdapter.tsx index f3601063..9254fe9a 100644 --- a/packages/site-components/src/DocPaginator/withNavigationAdapter.tsx +++ b/packages/site-components/src/DocPaginator/withNavigationAdapter.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useNavigation } from '@jpmorganchase/mosaic-store'; export const withNavigationAdapter = diff --git a/packages/site-components/src/Document.tsx b/packages/site-components/src/Document.tsx index 26152f16..60b206bd 100644 --- a/packages/site-components/src/Document.tsx +++ b/packages/site-components/src/Document.tsx @@ -1,6 +1,5 @@ /* eslint-disable eslint-comments/disable-enable-pair */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import React from 'react'; import NextDocument, { Html, Head, NextScript, Main } from 'next/document'; export type { DocumentProps } from 'next/document'; diff --git a/packages/site-components/src/Footer/withFooterAdapter.tsx b/packages/site-components/src/Footer/withFooterAdapter.tsx index de317161..08214589 100644 --- a/packages/site-components/src/Footer/withFooterAdapter.tsx +++ b/packages/site-components/src/Footer/withFooterAdapter.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useFooter } from '@jpmorganchase/mosaic-store'; export const withFooterAdapter = Component => () => { diff --git a/packages/site-components/src/HTMLView.tsx b/packages/site-components/src/HTMLView.tsx index 681eff61..f4e463e1 100644 --- a/packages/site-components/src/HTMLView.tsx +++ b/packages/site-components/src/HTMLView.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; const embeddedWebViewInitialized = false; diff --git a/packages/site-components/src/Image/index.tsx b/packages/site-components/src/Image/index.tsx index b1772c16..397c78a5 100644 --- a/packages/site-components/src/Image/index.tsx +++ b/packages/site-components/src/Image/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, forwardRef, Ref } from 'react'; +import { FC, forwardRef, Ref } from 'react'; import NextImage, { type ImageProps as NextImageProps } from 'next/image'; import classnames from 'clsx'; diff --git a/packages/site-components/src/PageNavigation.tsx b/packages/site-components/src/PageNavigation.tsx index 90473268..2290ea92 100644 --- a/packages/site-components/src/PageNavigation.tsx +++ b/packages/site-components/src/PageNavigation.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useSidebar } from '@jpmorganchase/mosaic-store'; import { VerticalNavigation } from './VerticalNavigation'; diff --git a/packages/site-components/src/SearchInput/Results.tsx b/packages/site-components/src/SearchInput/Results.tsx index 039f971f..f6814eee 100644 --- a/packages/site-components/src/SearchInput/Results.tsx +++ b/packages/site-components/src/SearchInput/Results.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState, KeyboardEvent } from 'react'; import { useRouter } from 'next/router'; import classnames from 'clsx'; import { Caption6, P4, P6 } from '@jpmorganchase/mosaic-components'; @@ -43,8 +43,8 @@ function ResultListItem({ result, query, onSelect }: ResultListItemProps) { onSelect(result); }; - const handleKeySelection = e => { - if (e.keyCode === (13 || 32)) { + const handleKeySelection = (e: KeyboardEvent) => { + if (e.key === 'Enter' || e.key === 'Space') { onSelect(result); } }; diff --git a/packages/site-components/src/SearchInput/index.tsx b/packages/site-components/src/SearchInput/index.tsx index 0379edd0..ac4245a7 100644 --- a/packages/site-components/src/SearchInput/index.tsx +++ b/packages/site-components/src/SearchInput/index.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { Input, Button } from '@salt-ds/core'; import { Icon } from '@jpmorganchase/mosaic-components'; import { useSearchData } from './useSearchData'; diff --git a/packages/site-components/src/Sidebar/index.tsx b/packages/site-components/src/Sidebar/index.tsx index 0c06f6d7..513eef42 100644 --- a/packages/site-components/src/Sidebar/index.tsx +++ b/packages/site-components/src/Sidebar/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactNode } from 'react'; +import { FC, ReactNode } from 'react'; import classnames from 'clsx'; import styles from './styles.css'; diff --git a/packages/site-components/src/TableOfContents/TableOfContentsItem.tsx b/packages/site-components/src/TableOfContents/TableOfContentsItem.tsx index 2549de5c..fe91e959 100644 --- a/packages/site-components/src/TableOfContents/TableOfContentsItem.tsx +++ b/packages/site-components/src/TableOfContents/TableOfContentsItem.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { NavigationItem } from '@salt-ds/core'; import { stripMarkdownLinks } from './utils'; diff --git a/packages/site-components/src/UserProfile/index.tsx b/packages/site-components/src/UserProfile/index.tsx index 502ae8d1..38573c93 100644 --- a/packages/site-components/src/UserProfile/index.tsx +++ b/packages/site-components/src/UserProfile/index.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react'; +import { ReactElement } from 'react'; import classnames from 'clsx'; import { Avatar } from '@salt-ds/core'; diff --git a/packages/site-components/src/mdx.tsx b/packages/site-components/src/mdx.tsx index 7d2aac74..7d2ab204 100644 --- a/packages/site-components/src/mdx.tsx +++ b/packages/site-components/src/mdx.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Pre, getMarkdownComponents, withMarkdownSpacing } from '@jpmorganchase/mosaic-components'; import type { PreProps } from '@jpmorganchase/mosaic-components'; import { getLabMarkdownComponents } from '@jpmorganchase/mosaic-labs-components'; diff --git a/packages/site-middleware/package.json b/packages/site-middleware/package.json index c7c7fb8f..3977014c 100644 --- a/packages/site-middleware/package.json +++ b/packages/site-middleware/package.json @@ -32,7 +32,7 @@ "aws-sdk-client-mock": "^2.0.1", "vitest-fetch-mock": "^0.3.0", "mock-fs": "^5.0.0", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@aws-sdk/client-s3": "^3.645.0", diff --git a/packages/site-middleware/src/withMDXContent.ts b/packages/site-middleware/src/withMDXContent.ts index 16841590..c4d02828 100644 --- a/packages/site-middleware/src/withMDXContent.ts +++ b/packages/site-middleware/src/withMDXContent.ts @@ -87,7 +87,7 @@ export const withMDXContent: MosaicMiddleware = async ( context: GetServerSidePropsContext ) => { const { resolvedUrl } = context; - const mosaicMode = context.res.getHeader('X-Mosaic-Mode' || 'active') as MosaicMode; + const mosaicMode = (context.res.getHeader('X-Mosaic-Mode') || 'active') as MosaicMode; const extname = path.extname(resolvedUrl); const pathname = stripParams(resolvedUrl); // Any urls which are not prefixed, will default to MDX diff --git a/packages/site/package.json b/packages/site/package.json index dc68bb0f..758392b9 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -43,7 +43,7 @@ "@jpmorganchase/mosaic-theme": "^0.1.0-beta.89", "@salt-ds/core": "^1.33.0", "@salt-ds/lab": "1.0.0-alpha.50", - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "next": "^14.0.0", "next-auth": "^4.24.5" }, diff --git a/packages/sitemap-component/package.json b/packages/sitemap-component/package.json index 40afb0c3..6f620631 100644 --- a/packages/sitemap-component/package.json +++ b/packages/sitemap-component/package.json @@ -37,7 +37,7 @@ "@vanilla-extract/esbuild-plugin": "^2.3.11", "del-cli": "^4.0.1", "msw": "^2.0.0", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.89", @@ -45,7 +45,7 @@ "d3": "^7.7.0" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "next-auth": "^4.22.1", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/packages/source-git-repo/src/Repo.ts b/packages/source-git-repo/src/Repo.ts index b88a2800..e85c44e1 100644 --- a/packages/source-git-repo/src/Repo.ts +++ b/packages/source-git-repo/src/Repo.ts @@ -202,7 +202,7 @@ export default class Repo { ) { const updatedFilesGen = updatedFilesGenerator(this, disableAutoPullChanges); - let intervalId: NodeJS.Timer | null = setInterval(async () => { + let intervalId: NodeJS.Timeout | null = setInterval(async () => { try { if (this.#cloned) { const { value: updatedFiles } = await updatedFilesGen.next(); diff --git a/packages/standard-generator/src/templates/package.json.hbs b/packages/standard-generator/src/templates/package.json.hbs index 5cdc517b..a6806dc0 100644 --- a/packages/standard-generator/src/templates/package.json.hbs +++ b/packages/standard-generator/src/templates/package.json.hbs @@ -20,7 +20,7 @@ }, "dependencies": { {{{ printDependencies dependencies }}} - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "next": "^13.4.1", "next-auth": "^4.24.5" }, diff --git a/packages/store/package.json b/packages/store/package.json index 2b738d2c..e4949d52 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -33,13 +33,13 @@ }, "devDependencies": { "del-cli": "^4.0.1", - "typescript": "^4.8.3" + "typescript": "^5.0.0" }, "dependencies": { "zustand": "^4.1.1" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/theme/package.json b/packages/theme/package.json index 2e289222..4b2b2dcc 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@vanilla-extract/esbuild-plugin": "^2.3.11", "esbuild": "0.23.1", - "typescript": "^4.8.3", + "typescript": "^5.0.0", "fast-glob": "^3.2.7" }, "dependencies": { @@ -51,7 +51,7 @@ "fast-deep-equal": "^3.1.3" }, "peerDependencies": { - "@types/react": "^18.0.26", + "@types/react": "^18.3.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/tsconfig.bundle.json b/tsconfig.bundle.json index 3d2d1d6e..aec647f4 100644 --- a/tsconfig.bundle.json +++ b/tsconfig.bundle.json @@ -2,7 +2,8 @@ "extends": "./tsconfig", "compilerOptions": { "lib": ["es2022", "DOM", "DOM.iterable"], - "jsx": "react", + "jsx": "react-jsx", + "module": "ESNext", "moduleResolution": "node", "noImplicitAny": false, "emitDeclarationOnly": true, diff --git a/tsconfig.json b/tsconfig.json index cff240f6..3d4f7fd2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { "allowSyntheticDefaultImports": true, - "module": "es2022", + "module": "NodeNext", "target": "es2022", "lib": ["es2022"], "esModuleInterop": true, - "moduleResolution": "Node16", + "moduleResolution": "NodeNext", "isolatedModules": true, "sourceMap": true, "declaration": true, diff --git a/yarn.lock b/yarn.lock index 0fa3b782..e668dafb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3213,10 +3213,12 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*": - version "17.0.36" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.36.tgz#c0d5f2fe76b47b63e0e0efc3d2049a9970d68794" - integrity sha1-wNXy/na0e2Pg4O/D0gSamXDWh5Q= +"@types/node@*", "@types/node@^22.1.0": + version "22.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" + integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== + dependencies: + undici-types "~6.19.8" "@types/node@^12.7.1": version "12.20.55" @@ -3224,26 +3226,16 @@ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/node@^16.0.0": - version "16.18.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.11.tgz#cbb15c12ca7c16c85a72b6bdc4d4b01151bb3cae" - integrity sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA== - -"@types/node@^17.0.24": - version "17.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" - integrity sha1-LA+v14cF56GLeQa1IBpSJxncUZA= + version "16.18.119" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.119.tgz#88443bb82119b7c0920e86949673876cbe1c3492" + integrity sha512-ia7V9a2FnhUFfetng4/sRPBMTwHZUkPFY736rb1cg9AgG7MZdR97q7/nLR9om+sq5f1la9C857E0l/nrI0RiFQ== -"@types/node@^18.7.19": - version "18.11.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.10.tgz#4c64759f3c2343b7e6c4b9caf761c7a3a05cee34" - integrity sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ== - -"@types/node@^22.1.0": - version "22.5.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.2.tgz#e42344429702e69e28c839a7e16a8262a8086793" - integrity sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg== +"@types/node@^18.0.0", "@types/node@^18.7.19": + version "18.19.64" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.64.tgz#122897fb79f2a9ec9c979bded01c11461b2b1478" + integrity sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ== dependencies: - undici-types "~6.19.2" + undici-types "~5.26.4" "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -3267,6 +3259,13 @@ dependencies: types-ramda "^0.29.4" +"@types/react-dom@^18.3.1": + version "18.3.1" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.1.tgz#1e4654c08a9cdcfb6594c780ac59b55aad42fe07" + integrity sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ== + dependencies: + "@types/react" "*" + "@types/react-window@^1.8.2": version "1.8.8" resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.8.tgz#c20645414d142364fbe735818e1c1e0a145696e3" @@ -3274,20 +3273,14 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.0.26": - version "18.0.26" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917" - integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug== +"@types/react@*", "@types/react@^18.3.12": + version "18.3.12" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.12.tgz#99419f182ccd69151813b7ee24b792fe08774f60" + integrity sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw== dependencies: "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" -"@types/scheduler@*": - version "0.16.2" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" - integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== - "@types/semver@^6.0.0": version "6.2.3" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.3.tgz#5798ecf1bec94eaa64db39ee52808ec0693315aa" @@ -12391,10 +12384,10 @@ types-ramda@^0.29.4: dependencies: ts-toolbelt "^9.6.0" -typescript@^4.8.3: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha1-xGSryhWWaVl75flriUNQCyOOYOY= +typescript@^5.0.0: + version "5.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== ufo@^1.5.4: version "1.5.4" @@ -12416,7 +12409,12 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~6.19.2: +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +undici-types@~6.19.8: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==