Skip to content

Commit

Permalink
chore: fix dependabot alerts
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Dec 8, 2024
1 parent 5a9533d commit b5019f2
Show file tree
Hide file tree
Showing 37 changed files with 376 additions and 587 deletions.
817 changes: 303 additions & 514 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@adobe/css-tools": "^4.4.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.7",
"@mui/lab": "^5.0.0-alpha.89",
"@mui/material": "^5.16.7",
"@mui/styles": "^5.16.7",
"@mui/x-date-pickers": "^6.20.2",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^12.1.2",
"@adobe/css-tools": "^4.4.1",
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@mui/icons-material": "^6.1.10",
"@mui/lab": "^6.0.0-beta.18",
"@mui/material": "^6.1.10",
"@mui/styles": "^6.1.10",
"@mui/x-date-pickers": "^7.23.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.7",
"@types/react": "^18.3.1",
"axios": "^1.7.8",
"downshift": "^6.1.12",
"export-from-json": "^1.7.4",
"lodash": "^4.17.21",
"luxon": "^3.5.0",
"markdown-to-jsx": "^7.5.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.27.0",
"markdown-to-jsx": "^7.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-sticky-el": "^2.1.1",
"web-vitals": "^2.1.3",
"xlsx": "^0.18.5"
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router';

import { isAuthenticated, isApiKeyEnabled } from 'utilities/authUtilities';
import { AuthWrapper } from 'utilities/AuthWrapper';
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/Explore/Explore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import userEvent from '@testing-library/user-event';
import { api } from 'api';
import Explore from 'components/Explore/Explore';
import React from 'react';
import { createSearchParams, MemoryRouter } from 'react-router-dom';
import { createSearchParams, MemoryRouter } from 'react-router';
import filterConstants from 'utilities/filterConstants.js';
import { sortByCriteria } from 'utilities/sortCriteria.js';
import MockThemeProvider from '__mocks__/MockThemeProvider';

// router mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/Explore/ExplorePage.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import ExplorePage from 'pages/ExplorePage';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { BrowserRouter, Route, Routes } from 'react-router';

jest.mock(
'components/Explore/Explore',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Header/UserAccountMenu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React from 'react';

const mockIsApiKeyEnabled = jest.fn();

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => {}
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/HomePage/Home.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import Home from 'components/Home/Home';
import React from 'react';
import { createSearchParams } from 'react-router-dom';
import { createSearchParams } from 'react-router';
import { sortByCriteria } from 'utilities/sortCriteria';
import MockThemeProvider from '__mocks__/MockThemeProvider';

// useNavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/HomePage/HomePage.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import HomePage from 'pages/HomePage';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { BrowserRouter, Route, Routes } from 'react-router';

jest.mock(
'components/Home/Home',
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/LoginPage/LoginPage.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import LoginPage from 'pages/LoginPage';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { BrowserRouter, Route, Routes } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';

it('renders the signin presentation component and signin components if auth enabled', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/LoginPage/SignIn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const mockMgmtResponse = {

// useNavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/RepoPage/Repo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import RepoDetails from 'components/Repo/RepoDetails';
import React from 'react';
import { api } from 'api';
import { createSearchParams } from 'react-router-dom';
import { createSearchParams } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';
import userEvent from '@testing-library/user-event';

Expand All @@ -22,8 +22,8 @@ const mockUseLocationValue = {

const mockUseNavigate = jest.fn();

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useParams: () => {
return { name: 'test' };
},
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/RepoPage/RepoPage.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { render, screen } from '@testing-library/react';
import RepoPage from 'pages/RepoPage';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { BrowserRouter, Route, Routes } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useLocation: () => ({
pathname: 'localhost:3000/image/test',
state: { lastDate: '' }
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/RepoPage/Tags.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const TagsThemeWrapper = () => {
};

const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Shared/PreviewCard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import PreviewCard from 'components/Shared/PreviewCard';

// usenavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/Shared/RepoCard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { render, screen, fireEvent } from '@testing-library/react';
import React from 'react';
import userEvent from '@testing-library/user-event';
import RepoCard from 'components/Shared/RepoCard';
import { createSearchParams } from 'react-router-dom';
import { createSearchParams } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';

// usenavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/Shared/SearchSuggestion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { api } from 'api';
import SearchSuggestion from 'components/Header/SearchSuggestion';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import React from 'react';

// router mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/TagPage/DependsOn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import DependsOn from 'components/Tag/Tabs/DependsOn';
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { BrowserRouter, Routes, Route } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';

const mockDependenciesList = {
Expand Down Expand Up @@ -65,8 +65,8 @@ const RouterDependsWrapper = () => {

// useNavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/TagPage/IsDependentOn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react';
import { api } from 'api';
import IsDependentOn from 'components/Tag/Tabs/IsDependentOn';
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { BrowserRouter, Routes, Route } from 'react-router';
import MockThemeProvider from '__mocks__/MockThemeProvider';

const mockDependentsList = {
Expand Down Expand Up @@ -65,8 +65,8 @@ const RouterDependsWrapper = () => {

// useNavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/TagPage/ReferredBy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const mockReferrersList = [

// useNavigate mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useNavigate: () => mockedUsedNavigate
}));

Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/TagPage/TagDetails.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';
import { api } from 'api';
import TagDetails from 'components/Tag/TagDetails';
import MockThemeProvider from '__mocks__/MockThemeProvider';
import { BrowserRouter, Routes, Route, useLocation } from 'react-router-dom';
import { BrowserRouter, Routes, Route, useLocation } from 'react-router';

const TagDetailsThemeWrapper = () => {
return (
Expand Down Expand Up @@ -855,8 +855,8 @@ Object.assign(navigator, {
}
});

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useParams: () => {
return { name: 'test', tag: '1.0.1' };
},
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/TagPage/TagPage.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import TagPage from 'pages/TagPage';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { BrowserRouter, Route, Routes } from 'react-router';

afterEach(() => {
// restore the spy created with spyOn
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/TagPage/VulnerabilitiesDetails.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import MockThemeProvider from '__mocks__/MockThemeProvider';
import { api } from 'api';
import VulnerabilitiesDetails from 'components/Tag/Tabs/VulnerabilitiesDetails';
import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';

jest.mock('xlsx');

Expand Down
2 changes: 1 addition & 1 deletion src/components/Explore/Explore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import makeStyles from '@mui/styles/makeStyles';
import { api, endpoints } from '../../api';
import { host } from '../../host';
import { mapToRepo } from 'utilities/objectModels.js';
import { useSearchParams } from 'react-router-dom';
import { useSearchParams } from 'react-router';
import FilterCard from '../Shared/FilterCard.jsx';
import { isEmpty, isNil } from 'lodash';
import filterConstants from 'utilities/filterConstants.js';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/ExploreHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// react global
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Link, useLocation, useNavigate } from 'react-router';

// components
import { Typography, Breadcrumbs } from '@mui/material';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// react global
import React, { useState, useEffect } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { Link, useLocation } from 'react-router';

import { isAuthenticated, isAuthenticationEnabled, logoutUser } from '../../utilities/authUtilities';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/SearchSuggestion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import { api, endpoints } from 'api';
import { host } from 'host';
import { mapToImage, mapToRepo } from 'utilities/objectModels';
import { createSearchParams, useNavigate, useSearchParams } from 'react-router-dom';
import { createSearchParams, useNavigate, useSearchParams } from 'react-router';
import { debounce, isEmpty } from 'lodash';
import { useCombobox } from 'downshift';
import { HEADER_SEARCH_PAGE_SIZE } from 'utilities/paginationConstants';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/UserAccountMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from 'react';
import { Menu, MenuItem, IconButton, Avatar, Divider } from '@mui/material';

import { getLoggedInUser, logoutUser, isApiKeyEnabled } from '../../utilities/authUtilities';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';

function UserAccountMenu() {
const [anchorEl, setAnchorEl] = useState(null);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import RepoCard from '../Shared/RepoCard';
import { mapToRepo } from 'utilities/objectModels';
import Loading from '../Shared/Loading';
import { useNavigate, createSearchParams } from 'react-router-dom';
import { useNavigate, createSearchParams } from 'react-router';
import { sortByCriteria } from 'utilities/sortCriteria';
import {
HOME_POPULAR_PAGE_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login/SignIn.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// react global
import React, { useEffect, useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';

// utility
import { api, endpoints } from '../../api';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Repo/RepoDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { isEmpty, uniq } from 'lodash';
// utility
import { api, endpoints } from '../../api';
import { host } from '../../host';
import { useParams, useNavigate, createSearchParams } from 'react-router-dom';
import { useParams, useNavigate, createSearchParams } from 'react-router';
import { mapToRepoFromRepoInfo } from 'utilities/objectModels';
import { isAuthenticated } from 'utilities/authUtilities';
import filterConstants from 'utilities/filterConstants';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/PreviewCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card, CardActionArea, CardContent, CardMedia, Grid, Stack, Tooltip, Typography } from '@mui/material';
import { makeStyles } from '@mui/styles';
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';

// placeholder images
import repocube1 from '../../assets/repocube-1.png';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/RepoCard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// react global
import React, { useRef, useMemo, useState } from 'react';
import { useNavigate, createSearchParams } from 'react-router-dom';
import { useNavigate, createSearchParams } from 'react-router';

// utility
import { DateTime } from 'luxon';
Expand Down
Loading

0 comments on commit b5019f2

Please sign in to comment.