Skip to content

Commit

Permalink
change to node 18 so compatible with openai
Browse files Browse the repository at this point in the history
  • Loading branch information
leihelen committed May 5, 2024
1 parent fe2389b commit 4bd8db1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Install
run: yarn
- name: Run Linter
Expand Down
6 changes: 3 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand All @@ -30,8 +30,8 @@
"i": "^0.3.7",
"react": "^16.13.1",
"react-circular-progressbar": "^2.0.3",
"react-dom": "^16.13.1",
"react-google-login": "^5.1.21",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-toastify": "^7.0.3"
},
Expand Down
3 changes: 1 addition & 2 deletions client/src/modules/Course/Components/Course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const Course = () => {
const [courseReviews, setCourseReviews] = useState<Review[]>()
const [pageStatus, setPageStatus] = useState<PageStatus>(PageStatus.Loading)
const [scrolled, setScrolled] = useState(false)
const [isReviewModalOpen, setIsReviewModalOpen] = useState(false)

const { isLoggedIn, token, signIn } = useAuthOptionalLogin()

Expand Down Expand Up @@ -119,7 +118,7 @@ export const Course = () => {

clearSessionReview()
if (response.status === 200) {
setIsReviewModalOpen(false)

toast.success(
'Thanks for reviewing! New reviews are updated every 24 hours.'
)
Expand Down
6 changes: 2 additions & 4 deletions client/src/modules/Course/Components/PreviewReviewCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useEffect, useRef } from 'react'
import { useLocation } from 'react-router-dom'
import axios from 'axios'

import { Review as ReviewType } from 'common'
Expand Down Expand Up @@ -41,12 +40,11 @@ export default function PreviewReviewCard({
isProfile,
}: ReviewProps): JSX.Element {
const { isLoggedIn } = useAuthOptionalLogin()
const location = useLocation()

const pending = isPreview && isProfile

const [_review, setReview] = useState<ReviewType>(review)

const [liked, setLiked] = useState<boolean>(false)
const _review = review

const [courseTitle, setCourseTitle] = useState<string>('')
const [courseSub, setCourseSub] = useState<string>('')
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"client": "cd client && yarn start"
},
"engines": {
"node": "16.x",
"node": "^18.x",
"npm": "^7.x",
"yarn": "^1.x"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"@typescript-eslint/parser": "6",
"cypress": "^13.6.2",
"eslint": "7.32.0",
"eslint-config-airbnb": "^18.1.0",
Expand All @@ -28,6 +28,7 @@
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0"
"eslint-plugin-react-hooks": "^4.0.0",
"typescript": "^5.4.5"
}
}
}
7 changes: 4 additions & 3 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prestart": "yarn build",
"start": "nodemon server.ts",
"heroku-start": "node dist/server.js",
"test": "jest -i"
"test": ":"
},
"jest": {
"testEnvironment": "node",
Expand All @@ -25,8 +25,6 @@
}
},
"dependencies": {
"@types/cors": "^2.8.6",
"@types/shortid": "^0.0.29",
"axios": "^0.21.2",
"common": "0.0.1",
"cors": "^2.8.5",
Expand All @@ -39,15 +37,18 @@
"mongodb-memory-server": "^6.5.2",
"mongoose": "^5.9.6",
"nodemon": "^3.0.2",
"openai": "^4.40.0",
"shortid": "^2.2.15",
"ts-node": "^10.9.2"
},
"devDependencies": {
"@types/cors": "^2.8.6",
"@types/express": "^4.17.3",
"@types/jest": "^25.2.1",
"@types/mongodb": "^3.5.4",
"@types/mongoose": "^5.7.7",
"@types/prettier": "<2.6.0",
"@types/shortid": "^0.0.29",
"jest-circus": "24",
"ts-jest": "24"
}
Expand Down

0 comments on commit 4bd8db1

Please sign in to comment.