forked from thirdweb-dev/js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify build tooling and remove redundant dependencies (thirdweb-de…
…v#4664) <!-- start pr-codex --> ## PR-Codex overview This PR updates dependencies, TypeScript configurations, and package versions across multiple packages. It also refactors code in the `dashboard` app for improved functionality and type safety. ### Detailed summary - Updated `next` version to `14.2.12` in `wallet-ui`, `playground-web`, and `portal`. - Updated `@types/react` to `^18.3.7` in `wallet-ui`, `playground-web`, and `portal`. - Updated `eslint` and related plugins in `dashboard` and `portal`. - Refactored code in `dashboard` app for improved functionality and type safety. - Updated `@walletconnect` packages to version `2.16.2` in `thirdweb`. - Modified TypeScript configurations in `typedoc-gen` and `service-utils`. - Updated `react-native-svg` to version `15.7.1` in `portal`. - Updated `posthog-js` to version `1.161.6` in `wallet-ui` and `portal`. - Updated `happy-dom` to version `^15.7.4` in `portal`. - Updated `typescript` to version `5.6.2` in `typedoc-gen` and `dashboard`. > The following files were skipped due to too many changes: `apps/dashboard/package.json`, `apps/dashboard/src/core-ui/sidebar/tunnel.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `packages/typedoc-gen/tsconfig.base.json`, `packages/service-utils/tsconfig.base.json`, `packages/service-utils/package.json`, `pnpm-lock.yaml` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
31 changed files
with
2,080 additions
and
3,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,14 +68,14 @@ | |
"ipaddr.js": "^2.2.0", | ||
"lottie-react": "^2.4.0", | ||
"lucide-react": "0.441.0", | ||
"next": "14.2.11", | ||
"next": "14.2.12", | ||
"next-plausible": "^3.12.0", | ||
"next-seo": "^6.5.0", | ||
"next-themes": "^0.3.0", | ||
"nextjs-toploader": "^1.6.12", | ||
"papaparse": "^5.4.1", | ||
"pluralize": "^8.0.0", | ||
"posthog-js": "1.161.5", | ||
"posthog-js": "1.161.6", | ||
"posthog-js-opensource": "npm:[email protected]", | ||
"prism-react-renderer": "^2.3.1", | ||
"prismjs": "^1.29.0", | ||
|
@@ -108,8 +108,8 @@ | |
"devDependencies": { | ||
"@chakra-ui/cli": "^2.4.1", | ||
"@chromatic-com/storybook": "2.0.2", | ||
"@next/bundle-analyzer": "14.2.11", | ||
"@next/eslint-plugin-next": "14.2.11", | ||
"@next/bundle-analyzer": "14.2.12", | ||
"@next/eslint-plugin-next": "14.2.12", | ||
"@playwright/test": "1.47.1", | ||
"@storybook/addon-essentials": "8.3.1", | ||
"@storybook/addon-interactions": "8.3.1", | ||
|
@@ -125,7 +125,7 @@ | |
"@types/papaparse": "^5.3.14", | ||
"@types/pluralize": "^0.0.33", | ||
"@types/qrcode": "^1.5.5", | ||
"@types/react": "^18.3.6", | ||
"@types/react": "^18.3.7", | ||
"@types/react-dom": "^18", | ||
"@types/react-table": "^7.7.20", | ||
"@types/spdx-correct": "^3.1.3", | ||
|
@@ -136,9 +136,7 @@ | |
"checkly": "^4.8.1", | ||
"eslint": "8.57.0", | ||
"eslint-config-biome": "1.8.3", | ||
"eslint-plugin-import": "^2.30.0", | ||
"eslint-plugin-promise": "^6.2.0", | ||
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725", | ||
"eslint-plugin-react-compiler": "0.0.0-experimental-ca16900-20240916", | ||
"eslint-plugin-storybook": "^0.8.0", | ||
"next-sitemap": "^4.2.3", | ||
"postcss": "8.4.47", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
"use client"; | ||
|
||
import { useIsomorphicLayoutEffect } from "@/lib/useIsomorphicLayoutEffect"; | ||
import { useRef, useState } from "react"; | ||
import { useMemo } from "react"; | ||
import { createPortal } from "react-dom"; | ||
import type { ComponentWithChildren } from "types/component-with-children"; | ||
import { ClientOnly } from "../../components/ClientOnly/ClientOnly"; | ||
|
||
export const SIDEBAR_WIDTH = 240; | ||
|
||
export const SIDEBAR_TUNNEL_ID = "sidebar-tunnel"; | ||
|
||
export const SideBarTunnel: ComponentWithChildren = ({ children }) => { | ||
return ( | ||
<ClientOnlyPortal selector={SIDEBAR_TUNNEL_ID}>{children}</ClientOnlyPortal> | ||
<ClientOnly ssr={null}> | ||
<Portal selector={SIDEBAR_TUNNEL_ID}>{children}</Portal> | ||
</ClientOnly> | ||
); | ||
}; | ||
|
||
type ClientOnlyPortalProps = { selector: string }; | ||
type PortalProps = { selector: string }; | ||
|
||
const ClientOnlyPortal: ComponentWithChildren<ClientOnlyPortalProps> = ({ | ||
children, | ||
selector, | ||
}) => { | ||
const ref = useRef<Element | null>(null); | ||
const [mounted, setMounted] = useState(false); | ||
|
||
useIsomorphicLayoutEffect(() => { | ||
ref.current = document.getElementById(selector); | ||
setMounted(true); | ||
}, [selector]); | ||
|
||
return mounted && ref.current ? createPortal(children, ref.current) : null; | ||
const Portal: ComponentWithChildren<PortalProps> = ({ children, selector }) => { | ||
return useMemo(() => { | ||
const elem = document.getElementById(selector); | ||
if (elem) { | ||
return createPortal(children, elem); | ||
} | ||
return null; | ||
}, [children, selector]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "svg-jsx"], | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:tailwindcss/recommended", | ||
"plugin:mdx/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["error"], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"svg-jsx/camel-case-dash": "error" | ||
} | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "svg-jsx"], | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:tailwindcss/recommended", | ||
"plugin:mdx/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"svg-jsx/camel-case-dash": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.