diff --git a/Dockerfile b/Dockerfile index 79555821..bca69338 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,10 @@ WORKDIR /usr/src/app COPY . . # Install dependencies -RUN yarn install +RUN pnpm install # Generate Prisma client -RUN cd packages/db && npx prisma generate +RUN cd packages/db && pnpm dlx prisma generate # Expose ports for both applications EXPOSE 3000 @@ -18,4 +18,4 @@ EXPOSE 3000 WORKDIR /usr/src/app # Command to start both services -CMD ["yarn", "run", "dev:docker"] +CMD ["pnpm", "run", "dev:docker"] diff --git a/README.md b/README.md index ad54dd71..69f3a820 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ docker-compose up -d ``` 3. Install dependencies ```bash -yarn install +pnpm install ``` 4. Copy env files ```bash @@ -18,11 +18,11 @@ cp packages/db/.env.example packages/db/.env 5. Update the mount path in the ``apps/web/.env`` 6. Migrate Database and install local package ```bash -npx turbo db:migrate && yarn install +pnpm dlx turbo db:migrate && yarn install ``` 7. Start Dev ```bash -yarn dev +pnpm dev ``` --- ### Own Configuration @@ -36,7 +36,7 @@ docker-compose up server workers -d ``` 4. Install dependencies ```bash -yarn install +pnpm install ``` 5. Copy env files and configure with the same conf you updated in the judge0 ```bash @@ -46,11 +46,11 @@ cp packages/db/.env.example packages/db/.env 6. Update the mount path in the ``apps/web/.env`` 7. Migrate Database and install local package ```bash -npx turbo db:migrate && yarn install +pnpm dlx turbo db:migrate && yarn install ``` 8. Start Dev ```bash -yarn dev +pnpm dev ``` ### If you use JUDGE0 in windows, change the mount path to have the \ instead of / for the mounting of judge0.conf and mounting of problems. diff --git a/apps/boilerplate-generator/package.json b/apps/boilerplate-generator/package.json index 4a2be686..b59ac2ef 100644 --- a/apps/boilerplate-generator/package.json +++ b/apps/boilerplate-generator/package.json @@ -4,8 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "build": "npx esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js", - "boiler:generate": "npm run build && node dist/index.js", + "build": "pnpm esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js", + "boiler:generate": "pnpm run build && node dist/index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], @@ -13,6 +13,7 @@ "license": "ISC", "dependencies": { "@types/node": "^20.12.12", - "antlr4": "^4.13.1-patch-1" + "antlr4": "^4.13.1-patch-1", + "esbuild": "^0.21.5" } } diff --git a/apps/sweeper/package.json b/apps/sweeper/package.json index 104588f7..08b77ee2 100644 --- a/apps/sweeper/package.json +++ b/apps/sweeper/package.json @@ -4,9 +4,10 @@ "main": "index.js", "license": "MIT", "dependencies": { - "@repo/db": "*", + "@repo/db": "workspace:*", "esbuild": "^0.21.5", - "nodemon": "^3.1.3" + "nodemon": "^3.1.3", + "ts-node": "^10.9.2" }, "scripts": { "build": "esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.js --sourcemap", @@ -14,5 +15,8 @@ "dev": "nodemon ./src/index.ts", "docker": "nodemon ./src/index.ts", "test": "echo \"Error: no test specified\" && exit 1" + }, + "devDependencies": { + "@types/node": "^20.14.6" } } diff --git a/apps/sweeper/tsconfig.json b/apps/sweeper/tsconfig.json index a645c5b1..59323e5e 100644 --- a/apps/sweeper/tsconfig.json +++ b/apps/sweeper/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Projects */ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ @@ -9,9 +8,8 @@ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ @@ -23,10 +21,9 @@ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - "rootDir": "./src", /* Specify the root folder within your source files. */ + "module": "commonjs", /* Specify what module code is generated. */ + "rootDir": "./src", /* Specify the root folder within your source files. */ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ @@ -42,12 +39,10 @@ // "resolveJsonModule": true, /* Enable importing .json files. */ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - /* Emit */ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ @@ -55,7 +50,7 @@ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ @@ -72,17 +67,15 @@ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ + "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ @@ -101,9 +94,8 @@ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ } } diff --git a/apps/web/components/ModeToggle.tsx b/apps/web/components/ModeToggle.tsx index 0a3e7235..d0a847bc 100644 --- a/apps/web/components/ModeToggle.tsx +++ b/apps/web/components/ModeToggle.tsx @@ -13,11 +13,11 @@ import { } from "../../../packages/ui/src/@/components/ui/dropdown-menu" export function ModeToggle() { - const { resolvedTheme,setTheme } = useTheme() + const { resolvedTheme, setTheme } = useTheme() return ( -