Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.14.0
v24.0.0
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 22.14.0
pnpm 10.7.0
nodejs 24.12.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updates the asdf and mise config (@cprussin you might need to update the .nix config, as well)

pnpm 10.28.0
rust 1.78.0
python 3.12.4
4 changes: 2 additions & 2 deletions Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22.14.0-slim@sha256:bac8ff0b5302b06924a5e288fb4ceecef9c8bb0bb92515985d2efdc3a2447052 as builder-base
FROM node:24.12.0-slim@sha256:732887b2c52d7251840a19d203afc68a61532b1ff8b5bf3b76efd49ded39e908 as builder-base
WORKDIR /usr/src/pyth
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand All @@ -8,7 +8,7 @@ COPY ./ .
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile


FROM node:22.14.0-alpine3.21@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 as runner-base
FROM node:24.12.0-alpine3.23@sha256:c921b97d4b74f51744057454b306b418cf693865e73b8100559189605f6955b8 as runner-base
WORKDIR /srv
ENV NODE_ENV production
RUN addgroup --system --gid 1001 pyth && adduser --system --uid 1001 pyth -g pyth && chown pyth:pyth .
Expand Down
1 change: 1 addition & 0 deletions apps/api-reference/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
37 changes: 19 additions & 18 deletions apps/api-reference/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ export default {
},
},

turbopack: {
resolveExtensions: [
".ts",
".tsx",
".js",
".jsx",
".mts",
".mjs",
".cts",
".cjs",
],
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},

redirects: async () => [
{
source: "/price-feeds/evm",
destination: "/price-feeds/evm/getPriceNoOlderThan",
permanent: false,
},
],
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
use: ["@svgr/webpack"],
});

// make Next.js aware of how to import uncompiled TypeScript files
// from our component-library and other shared packages
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js", ".jsx"],
".jsx": [".tsx", ".jsx"],
".mjs": [".mts", ".mjs"],
".cjs": [".cts", ".cjs"],
};

return config;
},

headers: () => [
{
source: "/:path*",
Expand Down
12 changes: 9 additions & 3 deletions apps/api-reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": ">=22.14.0"
"node": "^24.0.0"
},
"scripts": {
"build:vercel": "next build",
Expand Down Expand Up @@ -63,5 +63,11 @@
"prettier": "catalog:",
"tailwindcss": "catalog:",
"vercel": "catalog:"
}
}
},
"browserslist": [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general good practice to have to be explicit about which browsers we support. this snippet was added to all next.js app package.json files

"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"not dead"
]
}
7 changes: 7 additions & 0 deletions apps/api-reference/src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import clsx from "clsx";
import Link from "next/link";
import type {
ComponentProps,
ElementType,
Expand Down Expand Up @@ -92,3 +93,9 @@ const Gradient = ({ size = DEFAULT_GRADIENT_SIZE, x, y }: GradientProps) => (
<div className="size-full scale-0 bg-gradient-radial from-pythpurple-400 to-70% opacity-10 transition duration-500 group-hover:scale-100 group-hover:opacity-30 group-active:scale-150 group-active:opacity-40 dark:from-pythpurple-600" />
</div>
);

type ButtonLinkProps = Omit<ButtonProps<typeof Link>, "as">;

export const ButtonLink = (props: ButtonLinkProps) => (
<Button as={Link} {...props} />
);
7 changes: 3 additions & 4 deletions apps/api-reference/src/components/ComingSoon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Link from "next/link";
import type { ReactNode } from "react";

import { Button } from "../Button";
import { ButtonLink } from "../Button";

type Props = {
children: ReactNode;
Expand All @@ -13,8 +12,8 @@ export const ComingSoon = ({ children }: Props) => (
Coming Soon
</h1>
<p className="mb-20 max-w-xl text-lg">{children}</p>
<Button as={Link} className="place-self-center px-24 py-3" href="/">
<ButtonLink className="place-self-center px-24 py-3" href="/">
Go Home
</Button>
</ButtonLink>
</main>
);
8 changes: 3 additions & 5 deletions apps/api-reference/src/components/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Link from "next/link";
import type { ElementType, SVGProps } from "react";

import Benchmarks from "./benchmarks.svg";
import Entropy from "./entropy.svg";
import PriceFeeds from "./price-feeds.svg";
import { Button } from "../Button";
import { ButtonLink } from "../Button";
import { MaxWidth } from "../MaxWidth";

export const Home = () => (
Expand Down Expand Up @@ -66,8 +65,7 @@ const ProductLink = ({
target,
icon: Icon,
}: ProductLinkProps) => (
<Button
as={Link}
<ButtonLink
href={href}
target={target}
gradient
Expand All @@ -82,5 +80,5 @@ const ProductLink = ({
{children}
</p>
</div>
</Button>
</ButtonLink>
);
8 changes: 3 additions & 5 deletions apps/api-reference/src/components/NotFound/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Link from "next/link";

import { Button } from "../Button";
import { ButtonLink } from "../Button";

export const NotFound = () => (
<main className="grid size-full place-content-center text-center">
Expand All @@ -10,8 +8,8 @@ export const NotFound = () => (
<p className="mb-20 text-lg font-medium">
{"The page you're looking for isn't here"}
</p>
<Button as={Link} className="place-self-center px-24 py-3" href="/">
<ButtonLink className="place-self-center px-24 py-3" href="/">
Go Home
</Button>
</ButtonLink>
</main>
);
2 changes: 1 addition & 1 deletion apps/developer-hub/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
33 changes: 17 additions & 16 deletions apps/developer-hub/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ const config = {
},
},

webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
use: ["@svgr/webpack"],
});

// make Next.js aware of how to import uncompiled TypeScript files
// from our component-library and other shared packages
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js", ".jsx"],
".jsx": [".tsx", ".jsx"],
".mjs": [".mts", ".mjs"],
".cjs": [".cts", ".cjs"],
};

return config;
turbopack: {
resolveExtensions: [
".ts",
".tsx",
".js",
".jsx",
".mts",
".mjs",
".cts",
".cjs",
],
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},

headers: async () => [
Expand Down
10 changes: 8 additions & 2 deletions apps/developer-hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": ">=22.14.0"
"node": "^24.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upgraded all engines to be at least node 24

},
"scripts": {
"build": "next build",
Expand Down Expand Up @@ -79,5 +79,11 @@
"stylelint-config-standard-scss": "catalog:",
"tailwindcss": "^4.1.6",
"vercel": "catalog:"
}
},
"browserslist": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"not dead"
]
}
19 changes: 10 additions & 9 deletions apps/developer-hub/src/app/api/playground/stream/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import {
} from "../../../../config/pyth-pro";
import { checkRateLimit } from "../../../../lib/rate-limiter";

function rawSocketDataToStr(data: WebSocket.Data) {
if (typeof data === "string") {
return data;
function parseRawSocketDataToStr(rawData: WebSocket.Data) {
if (typeof rawData === "string") {
return rawData;
}
if (Buffer.isBuffer(data)) {
return data.toString("utf-16le");
if (Buffer.isBuffer(rawData)) {
return rawData.toString("utf8");
}
return JSON.stringify(data);
return JSON.stringify(rawData);
}

// Request body schema
Expand Down Expand Up @@ -216,16 +216,17 @@ export async function POST(request: NextRequest) {
websocket.addEventListener("message", (event: MessageEvent) => {
try {
// event.data can be string, Buffer, ArrayBuffer, or Buffer[]
const messageData = rawSocketDataToStr(event.data);

const rawData = event.data;
const messageData = parseRawSocketDataToStr(rawData);
const parsedData: unknown = JSON.parse(messageData);
sendEvent("message", {
timestamp: new Date().toISOString(),
data: parsedData,
});
} catch {
// If not JSON, send as raw string
const dataStr = rawSocketDataToStr(event.data);
const rawData = event.data;
const dataStr = parseRawSocketDataToStr(rawData);
sendEvent("message", {
timestamp: new Date().toISOString(),
data: dataStr,
Expand Down
2 changes: 1 addition & 1 deletion apps/entropy-explorer/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
28 changes: 10 additions & 18 deletions apps/entropy-explorer/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ const config = {
},

turbopack: {
resolveExtensions: [
".ts",
".tsx",
".js",
".jsx",
".mts",
".mjs",
".cts",
".cjs",
],
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
Expand All @@ -29,24 +39,6 @@ const config = {
},
},

webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
use: ["@svgr/webpack"],
});

// make Next.js aware of how to import uncompiled TypeScript files
// from our component-library and other shared packages
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js", ".jsx"],
".jsx": [".tsx", ".jsx"],
".mjs": [".mts", ".mjs"],
".cjs": [".cts", ".cjs"],
};

return config;
},

headers: async () => [
{
source: "/:path*",
Expand Down
10 changes: 8 additions & 2 deletions apps/entropy-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": ">=22.14.0"
"node": "^24.0.0"
},
"scripts": {
"build:vercel": "next build",
Expand Down Expand Up @@ -51,5 +51,11 @@
"stylelint": "catalog:",
"stylelint-config-standard-scss": "catalog:",
"vercel": "catalog:"
}
},
"browserslist": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"not dead"
]
}
2 changes: 1 addition & 1 deletion apps/entropy-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"author": "",
"license": "Apache-2.0",
"engines": {
"node": ">=22.14.0"
"node": "^24.0.0"
}
}
2 changes: 1 addition & 1 deletion apps/hermes/client/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"zod": "^3.23.8"
},
"engines": {
"node": ">=22.14.0"
"node": "^24.0.0"
},
"type": "module",
"exports": {
Expand Down
Loading
Loading