Skip to content

Commit c905fbe

Browse files
authored
Merge pull request #2488 from pyth-network/cprussin/ui-24-update-dependencies
chore: update all app node dependencies
2 parents df1ca64 + 8c2e938 commit c905fbe

File tree

146 files changed

+8900
-10325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+8900
-10325
lines changed

.envrc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
#!/usr/bin/env bash
2-
# the shebang is ignored, but nice for editors
3-
4-
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
5-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
6-
fi
71
use flake

apps/api-reference/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { nextjs as default } from "@cprussin/jest-config";
1+
export { nextjs as default } from "@cprussin/jest-config/next";

apps/api-reference/package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,51 @@
1818
"test:types": "tsc"
1919
},
2020
"dependencies": {
21-
"@amplitude/analytics-browser": "^2.9.0",
22-
"@amplitude/plugin-autocapture-browser": "^0.9.0",
23-
"@floating-ui/react": "^0.26.17",
24-
"@headlessui/react": "^2.2.0",
25-
"@heroicons/react": "^2.1.4",
26-
"@next/third-parties": "^14.2.4",
21+
"@amplitude/analytics-browser": "catalog:",
22+
"@amplitude/plugin-autocapture-browser": "catalog:",
23+
"@floating-ui/react": "catalog:",
24+
"@headlessui/react": "catalog:",
25+
"@heroicons/react": "catalog:",
26+
"@next/third-parties": "catalog:",
2727
"@pythnetwork/client": "catalog:",
28-
"@pythnetwork/pyth-sdk-solidity": "workspace:^",
29-
"@solana/web3.js": "^1.95.1",
30-
"@tanstack/react-query": "^5.45.1",
31-
"bs58": "^5.0.0",
32-
"clsx": "^2.1.1",
33-
"connectkit": "^1.8.2",
34-
"cryptocurrency-icons": "^0.18.1",
35-
"framer-motion": "^11.3.8",
28+
"@pythnetwork/pyth-sdk-solidity": "workspace:*",
29+
"@solana/web3.js": "catalog:",
30+
"@tanstack/react-query": "catalog:",
31+
"bs58": "catalog:",
32+
"clsx": "catalog:",
33+
"connectkit": "catalog:",
34+
"cryptocurrency-icons": "catalog:",
35+
"framer-motion": "catalog:",
3636
"next": "catalog:",
37-
"next-themes": "^0.3.0",
38-
"pino": "^9.2.0",
37+
"next-themes": "catalog:",
38+
"pino": "catalog:",
3939
"react": "catalog:",
4040
"react-dom": "catalog:",
41-
"react-markdown": "^9.0.1",
42-
"shiki": "^1.7.0",
43-
"viem": "^2.22.23",
44-
"wagmi": "^2.10.4",
45-
"zod": "^3.23.8"
41+
"react-markdown": "catalog:",
42+
"shiki": "catalog:",
43+
"viem": "catalog:",
44+
"wagmi": "catalog:",
45+
"zod": "catalog:"
4646
},
4747
"devDependencies": {
48-
"@axe-core/react": "^4.9.1",
48+
"@axe-core/react": "catalog:",
4949
"@cprussin/eslint-config": "catalog:",
5050
"@cprussin/jest-config": "catalog:",
5151
"@cprussin/prettier-config": "catalog:",
5252
"@cprussin/tsconfig": "catalog:",
53-
"@svgr/webpack": "^8.1.0",
54-
"@tailwindcss/forms": "^0.5.7",
55-
"@types/jest": "^29.5.12",
56-
"@types/node": "^20.14.6",
53+
"@svgr/webpack": "catalog:",
54+
"@tailwindcss/forms": "catalog:",
55+
"@types/jest": "catalog:",
56+
"@types/node": "catalog:",
5757
"@types/react": "catalog:",
5858
"@types/react-dom": "catalog:",
59-
"autoprefixer": "^10.4.19",
60-
"eslint": "^9.5.0",
61-
"jest": "^29.7.0",
62-
"postcss": "^8.4.38",
59+
"autoprefixer": "catalog:",
60+
"eslint": "catalog:",
61+
"jest": "catalog:",
62+
"postcss": "catalog:",
6363
"prettier": "catalog:",
64-
"tailwindcss": "^3.4.4",
65-
"typescript": "^5.5.2",
66-
"vercel": "^34.2.7"
64+
"tailwindcss": "catalog:",
65+
"typescript": "catalog:",
66+
"vercel": "catalog:"
6767
}
6868
}

apps/api-reference/src/apis/evm/common.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import { z } from "zod";
22

3-
import {
4-
type ReadApi,
5-
type WriteApi,
6-
type NetworkInfo,
7-
EvmApiType,
8-
Language,
9-
} from "../../components/EvmApi";
3+
import type { ReadApi, WriteApi, NetworkInfo } from "../../components/EvmApi";
4+
import { EvmApiType, Language } from "../../components/EvmApi";
105
import { singletonArray, safeFetch } from "../../zod-utils";
116

127
export const readApi = <ParameterName extends string>(

apps/api-reference/src/app/price-feeds/[chain]/[method]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"use client";
22

33
import { notFound } from "next/navigation";
4-
import { type ComponentProps, use } from "react";
4+
import type { ComponentProps } from "react";
5+
import { use } from "react";
56

67
import * as apis from "../../../../apis";
78
import { EvmApi } from "../../../../components/EvmApi";

apps/api-reference/src/browser-logger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import pino, { type Logger } from "pino";
1+
import type { Logger } from "pino";
2+
import pino from "pino";
23

34
import { IS_PRODUCTION_BUILD } from "./isomorphic-config";
45

apps/api-reference/src/components/Accordion/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Disclosure, DisclosurePanel } from "@headlessui/react";
22
import { LazyMotion, AnimatePresence, m, domAnimation } from "framer-motion";
3-
import { type ComponentProps, type Ref, forwardRef } from "react";
3+
import type { ComponentProps, Ref } from "react";
4+
import { forwardRef } from "react";
45

56
export { DisclosureButton as AccordionButton } from "@headlessui/react";
67

apps/api-reference/src/components/Button/index.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
"use client";
22

33
import clsx from "clsx";
4-
import {
5-
type ComponentProps,
6-
type ElementType,
7-
type MouseEvent,
8-
type CSSProperties,
9-
useState,
10-
useCallback,
4+
import type {
5+
ComponentProps,
6+
ElementType,
7+
MouseEvent,
8+
CSSProperties,
119
} from "react";
10+
import { useState, useCallback } from "react";
1211

1312
const DEFAULT_GRADIENT_SIZE = "30rem";
1413

apps/api-reference/src/components/Code/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Transition } from "@headlessui/react";
22
import { ClipboardDocumentIcon, CheckIcon } from "@heroicons/react/24/outline";
33
import clsx from "clsx";
4-
import { useMemo, useCallback, type HTMLAttributes } from "react";
5-
import { useEffect, useState } from "react";
4+
import type { HTMLAttributes } from "react";
5+
import { useMemo, useCallback, useEffect, useState } from "react";
66
import type { OffsetOrPosition } from "shiki";
77

88
import style from "./style.module.css";

apps/api-reference/src/components/Code/shiki.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
import {
2-
type HighlighterCore,
3-
type DecorationItem,
4-
getHighlighterCore as shikiGetHighlighterCore,
5-
} from "shiki/core";
1+
import type { HighlighterCore, DecorationItem } from "shiki/core";
2+
import { createHighlighterCore } from "shiki/core";
3+
import { createOnigurumaEngine } from "shiki/engine/oniguruma";
64
import javascript from "shiki/langs/javascript.mjs";
75
import json from "shiki/langs/json.mjs";
86
import solidity from "shiki/langs/solidity.mjs";
97
import darkPlus from "shiki/themes/dark-plus.mjs";
108
import lightPlus from "shiki/themes/light-plus.mjs";
11-
import loadWasm from "shiki/wasm";
129

1310
import type { SupportedLanguage } from "./supported-language";
1411

1512
export type Highlighter = {
1613
highlight: (
1714
lang: SupportedLanguage | undefined,
1815
code: string,
19-
options?: HighlightOptions | undefined,
16+
options?: HighlightOptions,
2017
) => string;
2118
};
2219

@@ -25,17 +22,17 @@ export type HighlightOptions = {
2522
};
2623

2724
export const getHighlighter = async (): Promise<Highlighter> => {
28-
const highlighterCore = await shikiGetHighlighterCore({
25+
const highlighterCore = await createHighlighterCore({
2926
langs: [javascript, solidity, json],
3027
themes: [darkPlus, lightPlus],
31-
loadWasm,
28+
engine: createOnigurumaEngine(() => import("shiki/wasm")),
3229
});
3330

3431
return {
3532
highlight: (
3633
lang: SupportedLanguage | undefined,
3734
code: string,
38-
options?: HighlightOptions | undefined,
35+
options?: HighlightOptions,
3936
) => highlight(highlighterCore, lang, code, options),
4037
};
4138
};
@@ -44,7 +41,7 @@ const highlight = (
4441
highlighter: HighlighterCore,
4542
lang: SupportedLanguage | undefined,
4643
code: string,
47-
options?: HighlightOptions | undefined,
44+
options?: HighlightOptions,
4845
) =>
4946
highlighter.codeToHtml(code, {
5047
lang: lang ?? "text",

apps/api-reference/src/components/Code/use-highlighted-code.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
"use client";
22

3+
import type { ReactNode, RefObject } from "react";
34
import {
4-
type ReactNode,
5-
type RefObject,
65
createContext,
76
useContext,
87
useState,
@@ -48,7 +47,7 @@ const useHighlighter = () => {
4847
export const useHighlightedCode = (
4948
language: SupportedLanguage | undefined,
5049
code: string,
51-
dimRange?: readonly [OffsetOrPosition, OffsetOrPosition] | undefined,
50+
dimRange?: readonly [OffsetOrPosition, OffsetOrPosition],
5251
) => {
5352
const highlighter = useHighlighter();
5453
const decorations = useMemo(

apps/api-reference/src/components/EvmApi/index.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ import { ArrowPathIcon } from "@heroicons/react/24/outline";
1313
import PythAbi from "@pythnetwork/pyth-sdk-solidity/abis/IPyth.json";
1414
import PythErrorsAbi from "@pythnetwork/pyth-sdk-solidity/abis/PythErrors.json";
1515
import { ChainIcon } from "connectkit";
16-
import {
17-
type Dispatch,
18-
type SetStateAction,
19-
type ComponentProps,
20-
type ElementType,
21-
type SVGAttributes,
22-
useState,
23-
useCallback,
24-
useMemo,
16+
import type {
17+
Dispatch,
18+
SetStateAction,
19+
ComponentProps,
20+
ElementType,
21+
SVGAttributes,
2522
} from "react";
23+
import { useState, useCallback, useMemo } from "react";
2624
import { useSwitchChain, useChainId, useConfig } from "wagmi";
2725
import { readContract } from "wagmi/actions";
2826

2927
import type { Parameter } from "./parameter";
3028
import { ParameterInput } from "./parameter-input";
31-
import { type EvmApiType, RunButton } from "./run-button";
29+
import type { EvmApiType } from "./run-button";
30+
import { RunButton } from "./run-button";
3231
import { getLogger } from "../../browser-logger";
3332
import { getContractAddress } from "../../evm-networks";
3433
import { useIsMounted } from "../../use-is-mounted";
35-
import { type SupportedLanguage, Code } from "../Code";
34+
import type { SupportedLanguage } from "../Code";
35+
import { Code } from "../Code";
3636
import { ErrorTooltip } from "../ErrorTooltip";
3737
import { InlineLink } from "../InlineLink";
3838
import { Markdown } from "../Markdown";

apps/api-reference/src/components/EvmApi/parameter-input.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,18 @@ import { ArrowPathIcon } from "@heroicons/react/24/outline";
88
import base58 from "bs58";
99
import clsx from "clsx";
1010
import Image from "next/image";
11-
import {
12-
type ChangeEvent,
13-
type Dispatch,
14-
type SetStateAction,
15-
useState,
16-
useCallback,
17-
useMemo,
18-
useEffect,
19-
} from "react";
11+
import type { ChangeEvent, Dispatch, SetStateAction } from "react";
12+
import { useState, useCallback, useMemo, useEffect } from "react";
2013

14+
import type { Parameter } from "./parameter";
2115
import {
22-
type Parameter,
2316
PLACEHOLDERS,
2417
isValid,
2518
getValidationError,
2619
ParameterType,
2720
} from "./parameter";
21+
import type { PriceFeed } from "../../use-price-feed-list";
2822
import {
29-
type PriceFeed,
3023
PriceFeedListContextType,
3124
usePriceFeedList,
3225
} from "../../use-price-feed-list";

apps/api-reference/src/components/EvmApi/parameter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export enum ParameterType {
1313
IntArray,
1414
}
1515

16-
export const TRANSFORMS: {
17-
[paramType in ParameterType]?: (value: string) => unknown;
18-
} = {
16+
export const TRANSFORMS: Partial<
17+
Record<ParameterType, (value: string) => unknown>
18+
> = {
1919
[ParameterType.PriceFeedIdArray]: (value) => [value],
2020
[ParameterType.HexArray]: (value) => [value],
2121
[ParameterType.IntArray]: (value) => [value],

apps/api-reference/src/components/EvmApi/run-button.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { ContractFunctionExecutionError } from "viem";
99
import { useAccount, useConfig } from "wagmi";
1010
import { readContract, simulateContract, writeContract } from "wagmi/actions";
1111

12-
import { type Parameter, TRANSFORMS } from "./parameter";
12+
import type { Parameter } from "./parameter";
13+
import { TRANSFORMS } from "./parameter";
1314
import { getContractAddress } from "../../evm-networks";
1415
import { useIsMounted } from "../../use-is-mounted";
1516
import { Button } from "../Button";

apps/api-reference/src/components/Header/nav-link.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import clsx from "clsx";
44
import Link from "next/link";
55
import { useSelectedLayoutSegment } from "next/navigation";
6-
import { type ComponentProps, useMemo } from "react";
6+
import type { ComponentProps } from "react";
7+
import { useMemo } from "react";
78

89
const baseClasses = "font-semibold text-sm py-2 px-3";
910

apps/api-reference/src/components/Input/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import type { InputProps } from "@headlessui/react";
12
import {
23
Field,
34
Label,
45
Description,
56
Input as HeadlessUiInput,
6-
type InputProps,
77
} from "@headlessui/react";
88
import clsx from "clsx";
9-
import { type Ref, type ReactNode, forwardRef } from "react";
9+
import type { Ref, ReactNode } from "react";
10+
import { forwardRef } from "react";
1011

1112
import { ErrorTooltip } from "../ErrorTooltip";
1213

apps/api-reference/src/components/Markdown/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ComponentProps } from "react";
1+
import type { ComponentProps } from "react";
22
import MarkdownComponent from "react-markdown";
33

44
import { MARKDOWN_COMPONENTS } from "../../markdown-components";

apps/api-reference/src/components/Modal/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
CloseButton,
99
} from "@headlessui/react";
1010
import { XMarkIcon } from "@heroicons/react/24/outline";
11-
import { type ReactNode, Fragment } from "react";
11+
import type { ReactNode } from "react";
12+
import { Fragment } from "react";
1213

1314
import { Button } from "../Button";
1415

apps/api-reference/src/components/Select/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ import {
1111
ChevronRightIcon,
1212
} from "@heroicons/react/24/outline";
1313
import clsx from "clsx";
14-
import {
15-
type ReactNode,
16-
type ChangeEvent,
17-
useState,
18-
useCallback,
19-
useMemo,
20-
} from "react";
14+
import type { ReactNode, ChangeEvent } from "react";
15+
import { useState, useCallback, useMemo } from "react";
2116

2217
import { Accordion, AccordionButton, AccordionPanel } from "../Accordion";
2318

0 commit comments

Comments
 (0)