-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Upgrade to Remix Vite #1496
base: main
Are you sure you want to change the base?
Upgrade to Remix Vite #1496
Changes from all commits
6b56008
b5047d6
f0fc62d
4fb9bc8
752e49d
60034b9
8916c01
3b46db6
2e05691
5eb52c4
ac3815e
3cfc949
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createCookie } from "@remix-run/node"; | ||
|
||
export const redirectCookie = createCookie("redirect-to", { | ||
maxAge: 60 * 60, // 1 hour | ||
httpOnly: true, | ||
}); | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,16 @@ | |
"name": "webapp", | ||
"version": "1.0.0", | ||
"sideEffects": false, | ||
"type": "module", | ||
"scripts": { | ||
"build": "run-s build:**", | ||
"build:db:seed": "esbuild --platform=node --bundle --minify --format=cjs ./prisma/seed.ts --outdir=prisma", | ||
"build:remix": "remix build", | ||
"build:server": "esbuild --platform=node --format=cjs ./server.ts --outdir=build", | ||
"dev": "cross-env PORT=3030 remix dev -c \"node ./build/server.js\"", | ||
"dev:worker": "cross-env NODE_PATH=../../node_modules/.pnpm/node_modules node ./build/server.js", | ||
"build:remix": "remix vite:build", | ||
"dev": "cross-env NODE_ENV=development PORT=3030 node ./server.js", | ||
"dev:worker": "cross-env NODE_PATH=../../node_modules/.pnpm/node_modules NODE_ENV=development node ./server.js", | ||
"format": "prettier --write .", | ||
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .", | ||
"start": "cross-env NODE_ENV=production node --max-old-space-size=8192 ./build/server.js", | ||
"start:local": "cross-env node --max-old-space-size=8192 ./build/server.js", | ||
"start": "cross-env NODE_ENV=production node --max-old-space-size=8192 ./server.js", | ||
"start:local": "cross-env NODE_ENV=development node --max-old-space-size=8192 ./server.js", | ||
"typecheck": "tsc -p ./tsconfig.check.json", | ||
"db:seed": "node prisma/seed.js", | ||
"db:seed:local": "ts-node prisma/seed.ts", | ||
|
@@ -80,12 +79,12 @@ | |
"@react-aria/datepicker": "^3.9.1", | ||
"@react-stately/datepicker": "^3.9.1", | ||
"@react-types/datepicker": "^3.7.1", | ||
"@remix-run/express": "2.1.0", | ||
"@remix-run/node": "2.1.0", | ||
"@remix-run/react": "2.1.0", | ||
"@remix-run/router": "^1.15.3", | ||
"@remix-run/serve": "2.1.0", | ||
"@remix-run/server-runtime": "2.1.0", | ||
"@remix-run/express": "2.15.0", | ||
"@remix-run/node": "2.15.0", | ||
"@remix-run/react": "2.15.0", | ||
"@remix-run/router": "^1.21.0", | ||
"@remix-run/serve": "2.15.0", | ||
"@remix-run/server-runtime": "2.15.0", | ||
Comment on lines
+82
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify Node.js version compatibility The upgrade includes significant version changes:
However, the "engines": {
- "node": ">=16.0.0"
+ "node": ">=20.0.0"
} Also applies to: 191-193, 209-209, 254-255 |
||
"@remix-run/v1-meta": "^0.1.3", | ||
"@slack/web-api": "^6.8.1", | ||
"@socket.io/redis-adapter": "^8.3.0", | ||
|
@@ -181,16 +180,17 @@ | |
"tiny-invariant": "^1.2.0", | ||
"ulid": "^2.3.0", | ||
"ulidx": "^2.2.1", | ||
"vite": "5", | ||
"ws": "^8.11.0", | ||
"zod": "3.23.8", | ||
"zod-error": "1.5.0", | ||
"zod-validation-error": "^1.5.0" | ||
}, | ||
"devDependencies": { | ||
"@internal/testcontainers": "workspace:*", | ||
"@remix-run/dev": "2.1.0", | ||
"@remix-run/eslint-config": "2.1.0", | ||
"@remix-run/testing": "^2.1.0", | ||
"@remix-run/dev": "2.15.0", | ||
"@remix-run/eslint-config": "2.15.0", | ||
"@remix-run/testing": "^2.15.0", | ||
"@swc/core": "^1.3.4", | ||
"@swc/helpers": "^0.4.11", | ||
"@tailwindcss/forms": "^0.5.3", | ||
|
@@ -206,7 +206,7 @@ | |
"@types/lodash.omit": "^4.5.7", | ||
"@types/marked": "^4.0.3", | ||
"@types/morgan": "^1.9.3", | ||
"@types/node": "^18.11.15", | ||
"@types/node": "^20.14.14", | ||
"@types/node-fetch": "^2.6.2", | ||
"@types/prismjs": "^1.26.0", | ||
"@types/qs": "^6.9.7", | ||
|
@@ -228,6 +228,8 @@ | |
"babel-preset-react-app": "^10.0.1", | ||
"css-loader": "^6.10.0", | ||
"datepicker": "link:@types/@react-aria/datepicker", | ||
"dotenv-cli": "^7.4.4", | ||
"dotenv-expand": "^12.0.1", | ||
"engine.io": "^6.5.4", | ||
"esbuild": "^0.15.10", | ||
"eslint": "^8.24.0", | ||
|
@@ -249,10 +251,11 @@ | |
"ts-node": "^10.7.0", | ||
"tsconfig-paths": "^3.14.1", | ||
"typescript": "^5.1.6", | ||
"vite-tsconfig-paths": "^4.0.5", | ||
"vite-plugin-cjs-interop": "^2.1.5", | ||
"vite-tsconfig-paths": "^4.3.2", | ||
"vitest": "^1.4.0" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider enhancing cookie security configuration
The basic implementation looks good, but consider adding these security-related cookie attributes:
secure: true
to ensure HTTPS-onlysameSite: 'lax'
to prevent CSRF attackspath: '/auth'
to restrict cookie scope📝 Committable suggestion