Skip to content

Commit

Permalink
Merge pull request #455 from Yooooomi/misc/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
Yooooomi authored Nov 24, 2024
2 parents ccdb644 + 1c2b054 commit 7b62414
Show file tree
Hide file tree
Showing 14 changed files with 1,932 additions and 1,923 deletions.
36 changes: 18 additions & 18 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@mui/icons-material": "5.16.7",
"@mui/material": "5.16.7",
"@mui/system": "5.16.7",
"@mui/x-date-pickers": "7.14.0",
"@reduxjs/toolkit": "2.2.7",
"axios": "1.7.5",
"clsx": "2.1.1",
"date-fns": "3.6.0",
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@mui/icons-material": "^6.1.8",
"@mui/material": "^6.1.8",
"@mui/system": "^6.1.8",
"@mui/x-date-pickers": "^7.22.3",
"@reduxjs/toolkit": "^2.3.0",
"axios": "^1.7.7",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-redux": "9.1.2",
"react-router-dom": "6.26.1",
"recharts": "2.12.7",
"redux": "5.0.1"
"react-redux": "^9.1.2",
"react-router-dom": "^7.0.1",
"recharts": "^2.13.3",
"redux": "^5.0.1"
},
"devDependencies": {
"@types/node": "20.11.26",
"@types/react-copy-to-clipboard": "5.0.7",
"@types/react-date-range": "1.4.9",
"@types/react-dom": "18.3.0",
"@types/node": "^22.9.3",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-date-range": "^1.4.9",
"@types/react-dom": "^18.3.1",
"@your_spotify/dev": "*",
"react-scripts": "^5.0.1"
},
Expand Down
26 changes: 13 additions & 13 deletions apps/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.2.0",
"@typescript-eslint/parser": "8.2.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@vercel/ncc": "^0.38.1",
"concurrently": "8.2.2",
"eslint": "9.9.1",
"eslint-config-prettier": "9.1.0",
"concurrently": "^9.1.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.9.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "3.3.3",
"ts-node": "10.9.2",
"typescript": "5.5.4"
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}
}
28 changes: 14 additions & 14 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"axios": "1.7.5",
"axios": "^1.7.7",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "4.19.2",
"jsonwebtoken": "9.0.2",
"migrate": "2.1.0",
"mongodb": "6.8.0",
"mongoose": "8.5.4",
"express": "^4.21.1",
"jsonwebtoken": "^9.0.2",
"migrate": "^2.1.0",
"mongodb": "^6.11.0",
"mongoose": "^8.8.2",
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"uuid": "10.0.0",
"uuid": "^11.0.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/cookie-parser": "1.4.7",
"@types/cors": "2.8.17",
"@types/jsonwebtoken": "9.0.6",
"@types/morgan": "1.9.9",
"@types/multer": "1.4.12",
"@types/node": "20.11.26",
"@types/uuid": "10.0.0",
"@types/cookie-parser": "^1.4.7",
"@types/cors": "^2.8.17",
"@types/jsonwebtoken": "^9.0.7",
"@types/morgan": "^1.9.9",
"@types/multer": "^1.4.12",
"@types/node": "^22.9.3",
"@types/uuid": "^10.0.0",
"@your_spotify/dev": "*"
}
}
21 changes: 12 additions & 9 deletions apps/server/src/routes/album.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ router.get(
const { ids } = req.params as TypedPayload<typeof getAlbumsSchema>;
const albums = await getAlbums(ids.split(","));
if (!albums || albums.length === 0) {
return res.status(404).end();
res.status(404).end();
return;
}
return res.status(200).send(albums);
res.status(200).send(albums);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -49,7 +50,8 @@ router.get(
const { id } = req.params as TypedPayload<typeof getAlbumStats>;
const [album] = await getAlbums([id]);
if (!album) {
return res.status(404).end();
res.status(404).end();
return;
}
const promises = [
getFirstAndLastListenedAlbum(user, id),
Expand All @@ -58,15 +60,15 @@ router.get(
// getTotalListeningOfAlbum(user, id),
];
const [firstLast, tracks, artists] = await Promise.all(promises);
return res.status(200).send({
res.status(200).send({
album,
artists,
firstLast,
tracks,
});
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -81,13 +83,14 @@ router.get(
const { id } = req.params as TypedPayload<typeof getAlbumStats>;
const [album] = await getAlbums([id]);
if (!album) {
return res.status(404).end();
res.status(404).end();
return;
}
const rank = await getRankOf(ItemType.album, user, id);
return res.status(200).send(rank);
res.status(200).send(rank);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
36 changes: 20 additions & 16 deletions apps/server/src/routes/artist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ router.get(
const { ids } = req.params as TypedPayload<typeof getArtistsSchema>;
const artists = await getArtists(ids.split(","));
if (!artists || artists.length === 0) {
return res.status(404).end();
res.status(404).end();
return;
}
return res.status(200).send(artists);
res.status(200).send(artists);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -60,7 +61,8 @@ router.get(

const [artist] = await getArtists([id]);
if (!artist) {
return res.status(404).end();
res.status(404).end();
return;
}
const promises = [
getFirstAndLastListened(user, id),
Expand All @@ -79,11 +81,12 @@ router.get(
dayRepartition,
] = await Promise.all(promises);
if (!total) {
return res.status(200).send({
res.status(200).send({
code: "NEVER_LISTENED",
});
return;
}
return res.status(200).send({
res.status(200).send({
artist,
firstLast,
mostListened,
Expand All @@ -94,7 +97,7 @@ router.get(
});
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -110,13 +113,14 @@ router.get(
try {
const [artist] = await getArtists([id]);
if (!artist) {
return res.status(404).end();
res.status(404).end();
return;
}
const rank = await getRankOf(ItemType.artist, user, id);
return res.status(200).send(rank);
res.status(200).send(rank);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -134,10 +138,10 @@ router.get(

try {
const results = await searchArtist(query);
return res.status(200).send(results);
res.status(200).send(results);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -157,10 +161,10 @@ router.post(
try {
await blacklistArtist(user._id.toString(), id);
await blacklistByArtist(user._id.toString(), id);
return res.status(204).end();
res.status(204).end();
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -176,10 +180,10 @@ router.post(
try {
await unblacklistArtist(user._id.toString(), id);
await unblacklistByArtist(user._id.toString(), id);
return res.status(204).end();
res.status(204).end();
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
4 changes: 2 additions & 2 deletions apps/server/src/routes/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const router = Router();

router.get("/preferences", async (req, res) => {
const preferences = await getGlobalPreferences();
return res.status(200).send(preferences);
res.status(200).send(preferences);
});

const updateGlobalPreferencesSchema = z.object({
Expand All @@ -26,6 +26,6 @@ router.post(
>;

const newPrefs = await updateGlobalPreferences(modifications);
return res.status(200).send(newPrefs);
res.status(200).send(newPrefs);
},
);
14 changes: 8 additions & 6 deletions apps/server/src/routes/importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,18 @@ router.delete(
try {
const importState = await getImporterState(id);
if (!importState) {
return res.status(404).end();
res.status(404).end();
return;
}
if (importState.user.toString() !== user._id.toString()) {
return res.status(404).end();
res.status(404).end();
return;
}
await cleanupImport(importState._id.toString());
return res.status(204).end();
res.status(204).end();
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
},
);
Expand All @@ -186,9 +188,9 @@ router.get("/imports", logged, async (req, res) => {

try {
const state = await getUserImporterState(user._id.toString());
return res.status(200).send(state);
res.status(200).send(state);
} catch (e) {
logger.error(e);
return res.status(500).end();
res.status(500).end();
}
});
Loading

0 comments on commit 7b62414

Please sign in to comment.