diff --git a/.github/workflows/build_and_deploy.yaml b/.github/workflows/build_and_deploy.yaml index b3b300c52..40a0efe19 100644 --- a/.github/workflows/build_and_deploy.yaml +++ b/.github/workflows/build_and_deploy.yaml @@ -11,15 +11,16 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 16 + node-version: 16 - name: Install Dependencies - working-directory: frontend # Specify the frontend folder + working-directory: frontend run: npm install - name: Run Tests @@ -37,8 +38,8 @@ jobs: steps: - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@3.7.1 + uses: JamesIves/github-pages-deploy-action@v4 with: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} BRANCH: gh-pages - FOLDER: frontend/build # Adjust this path to match your structure + FOLDER: frontend/build diff --git a/docker/frontend/frontend.Dockerfile b/docker/frontend/frontend.Dockerfile index 015f93312..d7ed5479d 100644 --- a/docker/frontend/frontend.Dockerfile +++ b/docker/frontend/frontend.Dockerfile @@ -8,7 +8,9 @@ RUN npm install && \ npm install react-router-dom --save && \ npm install tailwindcss postcss autoprefixer --save && \ npm install react-slick slick-carousel --save && \ - npm install react-i18next i18next --save + npm install react-i18next i18next --save && \ + npm install --save-dev @babel/plugin-proposal-private-property-in-object && \ + npm install matchmedia-polyfill COPY . . diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f5aa50596..228a41d5f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -537,9 +537,16 @@ } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==" + "version": "7.21.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", + "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -1335,6 +1342,11 @@ "semver": "^6.3.1" }, "dependencies": { + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==" + }, "semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -9504,6 +9516,11 @@ "tmpl": "1.0.5" } }, + "matchmedia-polyfill": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/matchmedia-polyfill/-/matchmedia-polyfill-0.3.2.tgz", + "integrity": "sha512-B2zRzjqxZFUusBZrZux59XFFLoTN99SbGranxIHfjZVLGZuy8Iaf/s5iNR3qJwRQZBjBKsU6qBSUCltLV82gdw==" + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index fd8e8dd8b..fe052dff3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,6 +9,7 @@ "@testing-library/user-event": "^13.5.0", "autoprefixer": "^10.4.16", "i18next": "^23.7.11", + "matchmedia-polyfill": "^0.3.2", "postcss": "^8.4.32", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -27,7 +28,7 @@ "watch:css": "postcss src/styles/tailwind.css -o src/index.css --watch", "start": "react-scripts start", "build": "react-scripts build", - "test": "react-scripts test", + "test": "react-scripts test --detectOpenHandles", "eject": "react-scripts eject" }, "eslintConfig": { @@ -47,5 +48,8 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11" } } diff --git a/frontend/src/setupTests.js b/frontend/src/setupTests.js index 8f2609b7b..70df9d473 100644 --- a/frontend/src/setupTests.js +++ b/frontend/src/setupTests.js @@ -3,3 +3,4 @@ // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; +import 'matchmedia-polyfill';