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
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"vite.config.chrome.ts": "vite",
"vite.config.firefox.ts": "vite"
},
"typescript.preferences.importModuleSpecifierEnding": "js",
"cSpell.words": ["color", "posthog", "Resolvables"],
"todo-tree.general.tags": ["=====", "NOTE", "IDEA", "TODO", "FIX", "HACK"],
"todo-tree.highlights.customHighlight": {
Expand Down
1 change: 0 additions & 1 deletion apps/browser-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.2.2",
"type": "module",
"scripts": {
"check": "tsc --noEmit",
"build": "pnpm run \"/build:.*/\"",
"build:chrome": "use-env -p VITE -P -- vite build --config vite.config.chrome.ts",
"build:firefox": "use-env -p VITE -P -- vite build --config vite.config.firefox.ts && ff-zip || true",
Expand Down
13 changes: 2 additions & 11 deletions apps/browser-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*", "vite-env.d.ts"],
"exclude": ["@types/node"],
"compilerOptions": {
"baseUrl": ".",
"outDir": "dist",
"paths": { "~/*": ["src/*"] },
"moduleResolution": "Bundler",
"jsx": "preserve",
"lib": ["DOM", "ES2023"]
}
"extends": "../../tsconfig.react.json",
"include": ["src/**/*", "vite-env.d.ts"]
}
13 changes: 13 additions & 0 deletions apps/browser-extension/vite-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,16 @@ export function removeExternalScriptLoading(): Plugin {
},
};
}

/**
* Vite plugin to remove import attributes from import statements.
*/
export function removeImportAttributes(): Plugin {
return {
name: 'remove-import-attributes',
enforce: 'pre',
transform(code) {
return code.replaceAll(/(from\s['"](?:.*?)['"])(\swith\s\{.*?\})/g, '$1');
},
};
}
6 changes: 5 additions & 1 deletion apps/browser-extension/vite.config.chrome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import { defineConfig } from 'vite';
import zipPack from 'vite-plugin-zip-pack';
import tsconfigPaths from 'vite-tsconfig-paths';
import manifest from './manifest.json';
import { removeExternalScriptLoading } from './vite-plugins';
import {
removeExternalScriptLoading,
removeImportAttributes,
} from './vite-plugins';

export default defineConfig({
plugins: [
removeExternalScriptLoading(),
removeImportAttributes(),
tailwindCss(),
tsconfigPaths(),
react(),
Expand Down
6 changes: 5 additions & 1 deletion apps/browser-extension/vite.config.firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import { defineConfig } from 'vite';
import zipPack from 'vite-plugin-zip-pack';
import tsconfigPaths from 'vite-tsconfig-paths';
import manifest from './manifest.json';
import { removeExternalScriptLoading } from './vite-plugins';
import {
removeExternalScriptLoading,
removeImportAttributes,
} from './vite-plugins';

export default defineConfig({
plugins: [
removeExternalScriptLoading(),
removeImportAttributes(),
tailwindCss(),
tsconfigPaths(),
react(),
Expand Down
9 changes: 5 additions & 4 deletions apps/discord-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@
}
},
"scripts": {
"check": "tsc --noEmit",
"build": "tsup",
"dev": "pnpm build --watch"
"build": "pnpm tsup"
},
"dependencies": {
"@buape/carbon": "0.7.0",
"@evaluate/engine": "workspace:^",
"@evaluate/helpers": "workspace:^",
"@evaluate/shapes": "workspace:^",
"@t3-oss/env-core": "^0.11.1",
"es-toolkit": "^1.32.0",
"date-fns": "^4.1.0",
"es-toolkit": "^1.32.0",
"posthog-node": "^4.7.0",
"zod": "3.22.4"
},
"devDependencies": {
"tsup": "^8.4.0"
}
}
13 changes: 1 addition & 12 deletions apps/discord-bot/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*", "scripts/**/*"],
"exclude": ["node_modules", ".next/**/*"],
"compilerOptions": {
"baseUrl": ".",
"outDir": "dist",
"noImplicitOverride": false,
"paths": { "~/*": ["src/*"] },
"lib": ["DOM", "ES2023"]
}
}
{ "extends": "../../tsconfig.base.json" }
1 change: 0 additions & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "2.0.0",
"type": "module",
"scripts": {
"check": "tsc --noEmit",
"build": "use-env -p NEXT -P -- next build --no-lint",
"start": "use-env -p NEXT -P -- next start",
"dev": "use-env -p NEXT -- next dev --turbo",
Expand Down
20 changes: 4 additions & 16 deletions apps/website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*", ".next/types/**/*.ts"],
"exclude": ["node_modules"],
"extends": "../../tsconfig.react.json",
"include": ["src/**/*", "next-env.d.ts", ".next/types/**/*.ts"],

"compilerOptions": {
"baseUrl": ".",
"outDir": "dist",
"paths": {
"~/*": ["src/*"]
},
"jsx": "preserve",
"allowJs": true,
"skipLibCheck": true,
"noEmit": true,
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"lib": ["dom", "es2023"],
"plugins": [{ "name": "next" }],
"strictNullChecks": true
}
}
11 changes: 1 addition & 10 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": [
"node_modules/*",
"dist/*",
"build/*",
".next/*",
".plasmo/*",
".ignore/*"
]
},
"files": { "ignore": ["node_modules/*", "dist/*", ".next/*"] },
"formatter": {
"enabled": true,
"indentStyle": "space",
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
"packageManager": "pnpm@9.15.5",
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"lint": "biome check . --write",
"format": "biome check . --write",
"check": "turbo run check",
"build": "turbo run build",
"build:packages": "turbo run build --filter=\"./packages/*\"",
"dev": "pnpm run \"/dev:.*/\"",
"dev:packages": "turbo watch build --filter=\"./packages/*\"",
"dev:apps": "turbo run dev --filter=\"./apps/*\"",
"prepare": "husky",
"prepare": "husky & ts-patch install",
"graph": "pnpx nx@18 graph"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@evaluate/scripts": "workspace:^",
"@types/node": "^22.13.4",
"husky": "^9.1.7",
"tsup": "^8.3.6",
"ts-patch": "^3.3.0",
"turbo": "^2.4.2",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"typescript-transform-paths": "^3.5.5"
},
"pnpm": {
"patchedDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"style": "./src/styles.css"
},
"./*": {
"import": "./dist/*.js",
"import": "./dist/*.jsx",
"types": "./dist/*.d.ts"
}
},
"scripts": {
"check": "tsc --noEmit",
"build": "tsup"
"build": "tsc"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useEmblaCarousel, {
import { ArrowLeft, ArrowRight } from 'lucide-react';
import * as React from 'react';
import { twMerge as cn } from 'tailwind-merge';
import { Button } from './button';
import { Button } from './button.jsx';

type CarouselApi = UseEmblaCarouselType[1];
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useFormState,
} from 'react-hook-form';
import { twMerge as cn } from 'tailwind-merge';
import { Label } from './label';
import { Label } from './label.jsx';

const Form = FormProvider;

Expand Down
9 changes: 1 addition & 8 deletions packages/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": { "~/*": ["./src/*"], "react": ["./node_modules/@types/react"] },
"jsx": "react-jsx"
}
}
{ "extends": "../../tsconfig.react.json" }
8 changes: 0 additions & 8 deletions packages/components/tsup.config.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
}
},
"scripts": {
"check": "tsc --noEmit",
"build": "pnpm tsup"
"build": "tsc"
},
"dependencies": {
"@evaluate/helpers": "workspace:^",
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/src/execute/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
PistonExecuteOptions,
PistonExecuteResult,
} from '@evaluate/shapes';
import { getRuntime } from '~/runtimes';
import { extractIdentifier } from '~/runtimes/identifier';
import { parseArguments } from './arguments';
import { extractIdentifier } from '~/runtimes/identifier.js';
import { getRuntime } from '~/runtimes/index.js';
import { parseArguments } from './arguments.js';

/**
* Execute code using the Piston API.
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/execute/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './fetch';
export * from './fetch.js';
4 changes: 2 additions & 2 deletions packages/engine/src/runtimes/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
getRuntimePopularity,
getRuntimeTags,
isRuntimeIdentifier,
} from './getters';
import { makeIdentifier } from './identifier';
} from './getters.js';
import { makeIdentifier } from './identifier.js';

const Runtimes = new Map<string, PartialRuntime>();

Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/runtimes/getters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import RuntimeExamples from './data/examples.json';
import RuntimeExtensions from './data/extensions.json';
import RuntimeIcons from './data/icons.json';
import RuntimeNames from './data/names.json';
import RuntimeExamples from './data/examples.json' with { type: 'json' };
import RuntimeExtensions from './data/extensions.json' with { type: 'json' };
import RuntimeIcons from './data/icons.json' with { type: 'json' };
import RuntimeNames from './data/names.json' with { type: 'json' };

/**
* Check if the given identifier is a valid runtime identifier.
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/src/runtimes/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './fetch';
export * from './getters';
export * from './fetch.js';
export * from './getters.js';
5 changes: 1 addition & 4 deletions packages/engine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": { "baseUrl": ".", "paths": { "~/*": ["src/*"] } }
}
{ "extends": "../../tsconfig.base.json" }
7 changes: 0 additions & 7 deletions packages/engine/tsup.config.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
}
},
"scripts": {
"check": "tsc --noEmit",
"build": "tsup"
"build": "tsc"
}
}
2 changes: 1 addition & 1 deletion packages/helpers/src/better-fetch/better-fetch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpError, TooManyRequestsError } from './http-error';
import { HttpError, TooManyRequestsError } from './http-error.js';

export async function betterFetch(url: RequestInfo, options?: RequestInit) {
let attempts = 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/helpers/src/better-fetch/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './better-fetch';
export * from './better-fetch.js';
2 changes: 1 addition & 1 deletion packages/helpers/src/create-logger/create-logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hexToAnsi } from './hex-to-ansi';
import { hexToAnsi } from './hex-to-ansi.js';

function isCssSupported() {
return typeof location !== 'undefined';
Expand Down
2 changes: 1 addition & 1 deletion packages/helpers/src/create-logger/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './create-logger';
export * from './create-logger.js';
8 changes: 1 addition & 7 deletions packages/helpers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": { "~/*": ["src/*"] }
}
}
{ "extends": "../../tsconfig.base.json" }
7 changes: 0 additions & 7 deletions packages/helpers/tsup.config.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
}
},
"scripts": {
"check": "tsc --noEmit",
"build": "tsup"
"build": "tsc"
},
"peerDependencies": {
"react": "^19"
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/event-callback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useRef } from 'react';
import { useIsomorphicLayoutEffect } from './isomorphic-layout-effect';
import { useIsomorphicLayoutEffect } from './isomorphic-layout-effect.js';

export function useEventCallback<Args extends unknown[], R>(
fn: (...args: Args) => R,
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/event-listener.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type RefObject, useEffect, useRef } from 'react';
import { useIsomorphicLayoutEffect } from './isomorphic-layout-effect';
import { useIsomorphicLayoutEffect } from './isomorphic-layout-effect.js';

// MediaQueryList Event based useEventListener interface
export function useEventListener<K extends keyof MediaQueryListEventMap>(
Expand Down
Loading