Skip to content

Commit

Permalink
Updated all npm / Python deps [Mar 2025] + set Prettier objectWrap
Browse files Browse the repository at this point in the history
…to collapse (#231)
  • Loading branch information
jwngr authored Mar 1, 2025
1 parent b9105c8 commit 63c5ec4
Show file tree
Hide file tree
Showing 13 changed files with 429 additions and 457 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"bracketSpacing": false,
"printWidth": 100,
"singleQuote": true,
"objectWrap": "collapse",
"trailingComma": "es5",
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
"importOrder": ["<BUILT_IN_MODULES>", "", "<THIRD_PARTY_MODULES>", "", "^[.]"]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flask == 3.1.0
flask-compress == 1.17
flask-cors == 5.0.0
flask-cors == 5.0.1
litecli == 1.14.4
google-cloud-logging == 3.11.4
google-compute-engine == 2.8.13
Expand Down
792 changes: 396 additions & 396 deletions website/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@
"react-dom": "^19.0.0",
"react-helmet": "^6.1.0",
"react-modal": "^3.16.3",
"react-router-dom": "^6.27.0",
"styled-components": "^6.1.14",
"react-router-dom": "^6.30.0",
"styled-components": "^6.1.15",
"typeface-crimson-text": "1.1.13",
"typeface-quicksand": "1.1.13"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@types/d3": "^7.4.3",
"@types/lodash": "^4.17.15",
"@types/node": "^22.13.0",
"@types/react": "^19.0.8",
"@types/lodash": "^4.17.16",
"@types/node": "^22.13.8",
"@types/react": "^19.0.10",
"@types/react-autosuggest": "^10.1.11",
"@types/react-dom": "^19.0.3",
"@types/react-dom": "^19.0.4",
"@types/react-helmet": "^6.1.11",
"@types/react-modal": "^3.16.3",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.1.0",
"globals": "^15.14.0",
"prettier": "^3.4.2",
"eslint": "^9.21.0",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^16.0.0",
"prettier": "^3.5.2",
"source-map-explorer": "^2.5.3",
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0",
"vite": "^6.0.11"
"typescript-eslint": "^8.25.0",
"vite": "^6.2.0"
},
"scripts": {
"analyze": "source-map-explorer build/static/js/*",
Expand Down
9 changes: 2 additions & 7 deletions website/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,8 @@ export async function fetchShortestPaths({
}): Promise<FetchShortestPathsResponse> {
const response = await fetch(`${SDOW_API_URL}/paths`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
source: sourcePageTitle,
target: targetPageTitle,
}),
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({source: sourcePageTitle, target: targetPageTitle}),
});

if (!response.ok) {
Expand Down
4 changes: 1 addition & 3 deletions website/src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ const ErrorMessageWrapper = styled.p`
}
`;

const ErrorMessage: React.FC<{
readonly text: string;
}> = ({text}) => {
const ErrorMessage: React.FC<{readonly text: string}> = ({text}) => {
const tokens = text.split('"');

return (
Expand Down
4 changes: 1 addition & 3 deletions website/src/components/NavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ const TextLinkInternal = styled(Link)`
${linkStyles}
`;

export const NavLinks: React.FC<{
readonly handleOpenModal: () => void;
}> = ({handleOpenModal}) => {
export const NavLinks: React.FC<{readonly handleOpenModal: () => void}> = ({handleOpenModal}) => {
return (
<Wrapper>
<TextLink href="#" onClick={() => handleOpenModal()}>
Expand Down
11 changes: 2 additions & 9 deletions website/src/components/PageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ export const PageInput: React.FC<{
try {
const response = await fetch(url, {
method: 'GET',
headers: {
'Api-User-Agent': SDOW_USER_AGENT,
},
headers: {'Api-User-Agent': SDOW_USER_AGENT},
});

const data = await response.json();
Expand All @@ -153,12 +151,7 @@ export const PageInput: React.FC<{
if (ns === 0) {
let description = get(terms, 'description.0', '');
description = description.charAt(0).toUpperCase() + description.slice(1);
newSuggestions.push({
id,
title,
description,
thumbnailUrl: get(thumbnail, 'source'),
});
newSuggestions.push({id, title, description, thumbnailUrl: get(thumbnail, 'source')});
}
});
setSuggestions(filter(newSuggestions));
Expand Down
12 changes: 5 additions & 7 deletions website/src/components/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ const TwitterBirdSvg = styled.svg`
* Adds some character to the results by rendering a snarky comment for certain degress of
* separation.
*/
const SnarkyContent: React.FC<{
readonly degreesOfSeparation: number;
}> = ({degreesOfSeparation}) => {
const SnarkyContent: React.FC<{readonly degreesOfSeparation: number}> = ({degreesOfSeparation}) => {
if (degreesOfSeparation >= 2 && degreesOfSeparation <= 4) {
return null;
}
Expand Down Expand Up @@ -101,10 +99,10 @@ const SnarkyContent: React.FC<{
/**
* Adds a warning if the source and/or target page(s) were redirects.
*/
const RedirectWarning: React.FC<{
isSourceRedirected: boolean;
isTargetRedirected: boolean;
}> = ({isSourceRedirected, isTargetRedirected}) => {
const RedirectWarning: React.FC<{isSourceRedirected: boolean; isTargetRedirected: boolean}> = ({
isSourceRedirected,
isTargetRedirected,
}) => {
let redirectContent;
if (isSourceRedirected && isTargetRedirected) {
redirectContent = (
Expand Down
11 changes: 2 additions & 9 deletions website/src/components/ResultsGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ export const ResultsGraph: React.FC<{
}

if (!seenNodes.has(currentPageId)) {
nodesData.push({
id: currentPageId,
title: currentPage.title,
degree: i,
});
nodesData.push({id: currentPageId, title: currentPage.title, degree: i});
seenNodes.add(currentPageId);
}

Expand All @@ -210,10 +206,7 @@ export const ResultsGraph: React.FC<{
console.error('Failed to find source or target node');
return;
}
linksData.push({
source: sourceNode,
target: targetNode,
});
linksData.push({source: sourceNode, target: targetNode});
}

previousPageId = currentPageId;
Expand Down
4 changes: 1 addition & 3 deletions website/src/components/charts/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ const BarChartSvg = styled.svg`
}
`;

export const BarChart: React.FC<{
readonly data: number[];
}> = ({data}) => {
export const BarChart: React.FC<{readonly data: number[]}> = ({data}) => {
const barChartRef = useRef<SVGSVGElement>(null);
const barChartWrapperRef = useRef<HTMLDivElement>(null);
const barChartSvgRef = useRef<d3.Selection<SVGSVGElement, unknown, null, undefined> | null>(null);
Expand Down
8 changes: 4 additions & 4 deletions website/src/components/charts/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ const TableWrapper = styled.div`
}
`;

export const Table: React.FC<{
readonly headers: string[];
readonly rows: React.ReactNode[][];
}> = ({headers, rows}) => {
export const Table: React.FC<{readonly headers: string[]; readonly rows: React.ReactNode[][]}> = ({
headers,
rows,
}) => {
const headerRow = (
<tr key="table-header-row">
{headers.map((header, i) => (
Expand Down
4 changes: 1 addition & 3 deletions website/src/components/common/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const LogoImg = styled.img`
}
`;

export const Logo: React.FC<{
readonly onClick?: () => void;
}> = ({onClick}) => (
export const Logo: React.FC<{readonly onClick?: () => void}> = ({onClick}) => (
<Link to="/" onClick={onClick}>
<LogoImg
srcSet={`${logo} 462w, ${logo2x} 924w`}
Expand Down

0 comments on commit 63c5ec4

Please sign in to comment.