Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to AppRouter #216

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
yarn ts:check
yarn lint
# pnpm run ts:check
# pnpm run lint
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public-hoist-pattern[]=@types/*
public-hoist-pattern[]=playwright-core
public-hoist-pattern[]=zod
side-effects-cache=false
strict-peer-dependencies=false
prefer-workspace-packages=true
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "3.22.1",
"packages": ["packages/*"],
"npmClient": "yarn",
"npmClient": "pnpm",
"useWorkspaces": true
}
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
compiler: {
styledComponents: true,
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"node": ">=12.20.0"
},
"devDependencies": {
"husky": "^7.0.1",
"lerna": "^3.22.1",
"lint-staged": "^11.1.0",
"prettier": "^2.1.2"
"husky": "^9.1.6",
"lerna": "^8.1.8",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3"
},
"lint-staged": {
"**/*.{ts,tsx,js,jsx,md,json,html}": [
"prettier --write"
]
},
"license": "MIT"
"license": "MIT",
"packageManager": "[email protected]+sha512.5d4bf97b349faf1a51318aa1ba887e99d9c36e203dbcb55938a91fddd2454246cb00723d6642f54d463a0f52a2701dadf8de002a37fc613c9cdc94ed5675ddce"
}
10 changes: 5 additions & 5 deletions packages/create-orca-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
},
"license": "MIT",
"dependencies": {
"chalk": "^2.4.2",
"commander": "^2.20.0",
"cross-spawn": "^6.0.5",
"rimraf": "^3.0.0",
"validate-npm-package-name": "^3.0.0"
"chalk": "^5.3.0",
"commander": "^12.1.0",
"cross-spawn": "^7.0.3",
"rimraf": "^6.0.1",
"validate-npm-package-name": "^5.0.1"
}
}
2 changes: 0 additions & 2 deletions packages/orca-api/.eslintignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/orca-api/createSuperAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (!email.match(emailRegex)) {
async function connectToDb() {
try {
const client = await mongoose.connect(process.env.MONGO_URL, {
dbName: 'orca',
useCreateIndex: true,
useNewUrlParser: true,
useFindAndModify: false,
Expand Down
36 changes: 36 additions & 0 deletions packages/orca-api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["**/node_modules", "**/build"],
}, ...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
},

rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
}];
57 changes: 30 additions & 27 deletions packages/orca-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "ts-node-dev --respawn --transpile-only --watch \"src/**\" --poll src/index.ts",
"build": "tsc",
"start": "NODE_ENV=production node build/index.js",
"lint": "eslint . --ext .ts",
"lint": "eslint ./src",
"ts:check": "tsc -p tsconfig.json --noEmit"
},
"repository": {
Expand All @@ -15,47 +15,50 @@
"directory": "packages/orca-api"
},
"dependencies": {
"bcrypt": "^5.0.1",
"cloudinary": "^1.23.0",
"bcrypt": "^5.1.1",
"cloudinary": "^2.4.0",
"compression": "^1.7.4",
"connect-mongo": "^3.2.0",
"cookie-parser": "^1.4.5",
"connect-mongo": "^5.1.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"dotenv": "^16.4.5",
"esm": "^3.2.25",
"express": "^4.16.4",
"express-session": "^1.17.1",
"jsonwebtoken": "^8.5.1",
"express": "^4.21.0",
"express-session": "^1.18.0",
"jsonwebtoken": "^9.0.2",
"mailgun-js": "^0.22.0",
"mongoose": "^5.10.8",
"mongoose": "^5.13.22",
"multer": "^1.4.2",
"nodemailer": "^6.6.3",
"nodemailer-mailgun-transport": "^2.1.3",
"passport": "^0.4.1",
"passport-facebook": "^3.0.0",
"passport-github2": "^0.1.12",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"socket.io": "^3.1.1",
"socket.io": "^4.7.5",
"streamifier": "^0.1.1",
"subscriptions-transport-ws": "^0.9.18",
"uuid": "^8.3.1"
"subscriptions-transport-ws": "^0.11.0",
"uuid": "^10.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.10.0",
"@eslint/migrate-config": "^1.3.0",
"@types/dotenv": "^8.2.0",
"@types/express-session": "^1.17.3",
"@types/mongoose": "^5.10.1",
"@types/multer": "^1.4.5",
"@types/node": "^14.14.10",
"@types/nodemailer": "^6.4.0",
"@types/passport": "^1.0.4",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"eslint": "^7.31.0",
"faker": "^5.4.0",
"ts-node-dev": "^1.1.6",
"typescript": "^4.1.2"
"@types/express-session": "^1.18.0",
"@types/mongoose": "^5.11.97",
"@types/multer": "^1.4.12",
"@types/node": "^22.5.4",
"@types/nodemailer": "^6.4.15",
"@types/passport": "^1.0.16",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"eslint": "^9.10.0",
"faker": "^6.6.6",
"ts-node-dev": "^2.0.0",
"typescript": "^5.6.2"
}
}
Loading