Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions apps/browser-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
"@evaluate/helpers": "workspace:^",
"@evaluate/shapes": "workspace:^",
"@evaluate/styles": "workspace:^",
"@t3-oss/env-core": "^0.11.1",
"lucide-react": "^0.476.0",
"posthog-js": "^1.234.1",
"@t3-oss/env-core": "^0.12.0",
"lucide-react": "^0.488.0",
"posthog-js": "^1.236.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"sonner": "^2.0.2",
"tailwind-merge": "^3.0.2",
"sonner": "^2.0.3",
"tailwind-merge": "^3.2.0",
"webext-bridge": "^6.0.1",
"webextension-polyfill": "^0.12.0",
"zod": "3.22.4"
"zod": "4.0.0-beta.20250414T061543"
},
"devDependencies": {
"@babel/generator": "^7.27.0",
"@babel/parser": "^7.27.0",
"@babel/traverse": "^7.27.0",
"@babel/types": "^7.27.0",
"@crxjs/vite-plugin": "2.0.0-beta.30",
"@tailwindcss/vite": "^4.0.17",
"@types/babel__generator": "^7.6.8",
"@tailwindcss/vite": "^4.1.4",
"@types/babel__generator": "^7.27.0",
"@types/babel__traverse": "^7.20.7",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@types/webextension-polyfill": "^0.12.3",
"@vitejs/plugin-react": "^4.3.4",
"tailwindcss": "^4.0.17",
"@vitejs/plugin-react": "^4.4.0",
"tailwindcss": "^4.1.4",
"vite": "3.2.11",
"vite-plugin-zip-pack": "^1.2.4",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
5 changes: 1 addition & 4 deletions apps/browser-extension/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { z } from 'zod';
export default createEnv({
clientPrefix: 'VITE_PUBLIC_',
client: {
VITE_PUBLIC_WEBSITE_URL: z
.string()
.url()
.transform((v) => new URL(v)),
VITE_PUBLIC_WEBSITE_URL: z.url().transform((v) => new URL(v)),
VITE_PUBLIC_POSTHOG_KEY: z.string().min(1).optional(),
},

Expand Down
6 changes: 3 additions & 3 deletions apps/discord-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"@evaluate/engine": "workspace:^",
"@evaluate/helpers": "workspace:^",
"@evaluate/shapes": "workspace:^",
"@t3-oss/env-core": "^0.11.1",
"@t3-oss/env-core": "^0.12.0",
"date-fns": "^4.1.0",
"es-toolkit": "^1.34.1",
"posthog-node": "^4.11.1",
"zod": "3.22.4"
"posthog-node": "^4.11.6",
"zod": "4.0.0-beta.20250414T061543"
},
"devDependencies": {
"tsup": "^8.4.0"
Expand Down
5 changes: 1 addition & 4 deletions apps/discord-bot/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { z } from 'zod';

export default createEnv({
server: {
WEBSITE_URL: z
.string()
.url()
.transform((v) => new URL(v)),
WEBSITE_URL: z.url().transform((v) => new URL(v)),
POSTHOG_KEY: z.string().optional(),
DISCORD_TOKEN: z.string().min(1).optional(),
DISCORD_PUBLIC_KEY: z.string().min(1).optional(),
Expand Down
42 changes: 21 additions & 21 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,56 @@
"dev:lint": "use-env -p NEXT -- next dev"
},
"dependencies": {
"@codemirror/commands": "^6.8.0",
"@codemirror/view": "^6.36.4",
"@codemirror/commands": "^6.8.1",
"@codemirror/view": "^6.36.5",
"@evaluate/components": "workspace:^",
"@evaluate/engine": "workspace:^",
"@evaluate/helpers": "workspace:^",
"@evaluate/hooks": "workspace:^",
"@evaluate/shapes": "workspace:^",
"@evaluate/styles": "workspace:^",
"@hookform/resolvers": "^4.1.3",
"@t3-oss/env-nextjs": "^0.11.1",
"@tanstack/react-query": "^5.70.0",
"@tanstack/react-query-devtools": "^5.70.0",
"@hookform/resolvers": "^5.0.1",
"@t3-oss/env-nextjs": "^0.12.0",
"@tanstack/react-query": "^5.74.3",
"@tanstack/react-query-devtools": "^5.74.3",
"@uiw/codemirror-extensions-langs": "^4.23.10",
"@uiw/codemirror-theme-vscode": "^4.23.10",
"@uiw/react-codemirror": "^4.23.10",
"@vercel/speed-insights": "^1.2.0",
"date-fns": "^4.1.0",
"discord-bot": "workspace:^",
"dompurify": "^3.2.4",
"embla-carousel-autoplay": "^8.5.2",
"dompurify": "^3.2.5",
"embla-carousel-autoplay": "^8.6.0",
"es-toolkit": "^1.34.1",
"file-saver": "^2.0.5",
"fuse.js": "^7.1.0",
"is-mobile": "^5.0.0",
"jszip": "^3.10.1",
"lucide-react": "^0.476.0",
"material-icon-theme": "^5.20.0",
"next": "^15.2.4",
"lucide-react": "^0.488.0",
"material-icon-theme": "^5.21.1",
"next": "^15.3.0",
"next-themes": "npm:@wits/next-themes@^0.2.16",
"posthog-js": "^1.234.1",
"posthog-js": "^1.236.1",
"react": "^19.1.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^19.1.0",
"react-hook-form": "^7.55.0",
"react-hotkeys-hook": "^4.6.1",
"sharp": "^0.33.5",
"tailwind-merge": "^3.0.2",
"type-fest": "^4.38.0",
"react-hotkeys-hook": "^5.0.1",
"sharp": "^0.34.1",
"tailwind-merge": "^3.2.0",
"type-fest": "^4.40.0",
"virtual-file-explorer-backend": "^0.0.4",
"vscode-icons-js": "^11.6.1",
"zod": "3.22.4"
"zod": "4.0.0-beta.20250414T061543"
},
"devDependencies": {
"@million/lint": "^1.0.14",
"@next/bundle-analyzer": "^15.2.4",
"@tailwindcss/postcss": "^4.0.17",
"@next/bundle-analyzer": "^15.3.0",
"@tailwindcss/postcss": "^4.1.4",
"@types/file-saver": "^2.0.7",
"@types/react": "^19.0.12",
"@types/react": "^19.1.2",
"autoprefixer": "^10.4.21",
"tailwindcss": "^4.0.17"
"tailwindcss": "^4.1.4"
}
}
7 changes: 2 additions & 5 deletions apps/website/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { createEnv } from '@t3-oss/env-nextjs';
import { vercel } from '@t3-oss/env-nextjs/presets';
import { vercel } from '@t3-oss/env-nextjs/presets-zod';
import discordEnv from 'discord-bot/env';
import { z } from 'zod';

export default createEnv({
extends: [discordEnv, vercel()],

server: {
WEBSITE_URL: z
.string()
.url()
.transform((v) => new URL(v)),
WEBSITE_URL: z.url().transform((v) => new URL(v)),
},
client: {
NEXT_PUBLIC_POSTHOG_KEY: z.string().min(1).optional(),
Expand Down
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evaluate",
"packageManager": "[email protected].5",
"packageManager": "[email protected].9",
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"lint": "biome check . --write",
Expand All @@ -17,17 +17,11 @@
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@evaluate/scripts": "workspace:^",
"@types/node": "^22.13.14",
"@types/node": "^22.14.1",
"husky": "^9.1.7",
"ts-patch": "^3.3.0",
"turbo": "^2.4.4",
"typescript": "^5.8.2",
"turbo": "^2.5.0",
"typescript": "^5.8.3",
"typescript-transform-paths": "^3.5.5"
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
},
"allowNonAppliedPatches": true
}
}
32 changes: 16 additions & 16 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
"build": "tsc"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-dialog": "^1.1.6",
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@radix-ui/react-accordion": "^1.2.4",
"@radix-ui/react-dialog": "^1.1.7",
"@radix-ui/react-label": "^2.1.3",
"@radix-ui/react-popover": "^1.1.7",
"@radix-ui/react-scroll-area": "^1.2.4",
"@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-separator": "^1.1.3",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-tabs": "^1.1.4",
"@radix-ui/react-tooltip": "^1.2.0",
"class-variance-authority": "^0.7.1",
"embla-carousel-react": "^8.5.2",
"lucide-react": "^0.476.0",
"embla-carousel-react": "^8.6.0",
"lucide-react": "^0.488.0",
"react": "^19.1.0",
"react-hook-form": "^7.55.0",
"react-resizable-panels": "^2.1.7",
"sonner": "^2.0.2",
"tailwind-merge": "^3.0.2"
"sonner": "^2.0.3",
"tailwind-merge": "^3.2.0"
},
"devDependencies": {
"@types/react": "^19.0.12",
"tailwindcss": "^4.0.17"
"@types/react": "^19.1.2",
"tailwindcss": "^4.1.4"
}
}
3 changes: 1 addition & 2 deletions packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"@evaluate/shapes": "workspace:^",
"fuse.js": "^7.1.0",
"lexure": "npm:@apteryxxyz/lexure@^0.17.0",
"pako": "^2.1.0",
"zod": "3.22.4"
"pako": "^2.1.0"
},
"devDependencies": {
"@types/pako": "^2.0.3"
Expand Down
3 changes: 1 addition & 2 deletions packages/engine/src/runtimes/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
type Runtime,
} from '@evaluate/shapes';
import Fuse from 'fuse.js';
import { z } from 'zod';
import {
getRuntimeAliases,
getRuntimeExamples,
Expand All @@ -30,7 +29,7 @@ export async function fetchRuntimes() {
'https://emkc.org/api/v2/piston/runtimes',
)
.then((response) => response.json())
.then(z.array(PistonRuntime).parse);
.then(PistonRuntime.array().parse);

for (const piston of pistonRuntimes) {
const identifier = makeIdentifier(piston.language, piston.runtime);
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"react": "^19"
},
"devDependencies": {
"@types/react": "^19.0.12"
"@types/react": "^19.1.2"
}
}
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@gerhobbelt/gitignore-parser": "0.2.0-9",
"@next/env": "^15.2.4",
"@next/env": "^15.3.0",
"archiver": "^7.0.1",
"commander": "^13.1.0",
"cross-spawn": "^7.0.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/shapes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"build": "tsc"
},
"dependencies": {
"zod": "3.22.4"
"zod": "4.0.0-beta.20250414T061543"
}
}
51 changes: 32 additions & 19 deletions packages/shapes/src/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,51 @@ export type ExecuteOptions = z.infer<typeof ExecuteOptions>;
export const ExecuteOptions = z
.object({
runtime: z
.string({ required_error: 'A runtime is required' })
.regex(/^(?:[\w]+\+)?[\w]+(?:@[\d.]+)?$/, 'Invalid runtime format'),
.string({ error: 'A runtime is required' })
.regex(/^(?:[\w]+\+)?[\w]+(?:@[\d.]+)?$/, {
error: 'Invalid runtime format',
}),
files: z
.record(
z
.string({ required_error: 'File path is required' })
.max(200, 'File path length is too long'),
.string({ error: 'File path is required' })
.max(200, { error: 'File path length is too long' }),
z
.string({ required_error: 'File content is required' })
.max(10_000, 'File content is too large'),
.string({ error: 'File content is required' })
.max(10_000, { error: 'File content is too large' }),
{
required_error: 'At least one file is required',
invalid_type_error: 'Files must be an object',
error: (issue) =>
issue.input === undefined
? 'At least one file is required'
: 'Files must be an object',
},
)
.refine((f) => Object.keys(f).length >= 0, 'Too few files')
.refine((f) => Object.keys(f).length <= 10, 'Too many files')
.refine((f) => Object.keys(f).length >= 0, { error: 'Too few files' })
.refine((f) => Object.keys(f).length <= 10, { error: 'Too many files' })
.refine(
(f) =>
Object.values(f).reduce((acc, val: string) => acc + val.length, 0) <=
10_000,
'Combined file content size is too large',
{ error: 'Combined file content size is too large' },
),
entry: z.string({ required_error: 'An entry file is required' }),
input: z.string().max(2_000, 'Input length is too long').optional(),
args: z.string().max(2_000, 'Arguments length is too long').optional(),
entry: z.string({ error: 'An entry file is required' }),
input: z
.string()
.max(2_000, { error: 'Input length is too long' })
.optional(),
args: z
.string()
.max(2_000, { error: 'Arguments length is too long' })
.optional(),
})
.refine((data) => {
// Omit is used elsewhere to remove files, so we need to check if it exists
if (!data.files) return true;
return data.entry in data.files;
}, 'Entry file does not exist');
.refine(
(data) => {
// Omit is used elsewhere to remove files, so we need to check if it exists
if (!data.files) return true;
return data.entry in data.files;
},
{ error: 'Entry file does not exist' },
);

export type ExecuteResult = z.infer<typeof ExecuteResult>;
export const ExecuteResult = z.object({
Expand Down
21 changes: 0 additions & 21 deletions packages/shapes/src/generate.ts

This file was deleted.

Loading