Skip to content

Commit

Permalink
Upgrade packages and deprecate un-used dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
switz committed Dec 6, 2023
1 parent 0ebb084 commit 8234fb7
Show file tree
Hide file tree
Showing 9 changed files with 315 additions and 684 deletions.
51 changes: 24 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,44 @@
"author": "Daniel Saewitz",
"license": "MIT",
"dependencies": {
"@floating-ui/react": "^0.25.4",
"@fortawesome/fontawesome-free": "^5.8.1",
"@floating-ui/react": "^0.26.3",
"@fortawesome/fontawesome-free": "^6.5.1",
"@reduxjs/toolkit": "^1.9.5",
"@tanstack/react-query": "^5.0.0-alpha.91",
"@tanstack/react-query-devtools": "^5.0.0-alpha.91",
"@tanstack/react-query-next-experimental": "^5.0.0-alpha.91",
"@types/react-redux": "^7.1.26",
"@tanstack/react-query": "^5.12.2",
"@tanstack/react-query-devtools": "^5.13.3",
"@tanstack/react-query-next-experimental": "^5.12.2",
"@types/react-redux": "^7.1.32",
"clsx": "^2.0.0",
"core-js": "^3.32.2",
"immutable": "4.3.2",
"isomorphic-fetch": "3.0.0",
"ky": "^1.0.1",
"ky": "^1.1.3",
"ky-universal": "^0.12.0",
"mousetrap": "1.6.5",
"next": "^13.5.1-canary.1",
"next": "^14.0.3",
"next-redux-wrapper": "8.1.0",
"node-device-detector": "^2.0.16",
"node-device-detector": "^2.0.17",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.2",
"react-timeago": "^7.2.0",
"react-transition-group": "4.4.5",
"redux": "^4.2.1",
"tailwind-merge": "^1.14.0",
"tailwind-merge": "^2.1.0",
"thenby": "^1.3.4",
"ua-parser-js": "^1.0.35"
"ua-parser-js": "^1.0.37"
},
"devDependencies": {
"@switz/eslint-config": "^10.0.2",
"@types/node": "^20.5.9",
"@types/react": "^18.2.21",
"@types/ua-parser-js": "^0.7.37",
"autoprefixer": "^10.4.15",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint_d": "^12.2.1",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.4",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2"
"@types/node": "^20.10.3",
"@types/react": "^18.2.42",
"@types/ua-parser-js": "^0.7.39",
"autoprefixer": "^10.4.16",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint_d": "^13.1.1",
"postcss": "^8.4.32",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.9",
"tailwindcss": "^3.3.6",
"typescript": "^5.3.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { RawParams } from '@/app/(main)/(home)/layout';
import { fetchShow } from '../layout';
import PlayerManager from './PlayerManager';
import { fetchArtists } from '@/app/queries';
import { fetchArtists, fetchShow } from '@/app/queries';
import { notFound } from 'next/navigation';
import { createShowDate } from '@/lib/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
import { MainLayoutProps } from '@/app/(main)/(home)/layout';
import { useIsMobile } from '@/app/(main)/(home)/page';
import { fetchShow } from '@/app/queries';
import SongsColumn from '@/components/SongsColumn';
import TapesColumn from '@/components/TapesColumn';
import { API_DOMAIN } from '@/lib/constants';
import { createShowDate } from '@/lib/utils';
import { Tape } from '@/types';
import ky from 'ky-universal';
import { notFound } from 'next/navigation';
import React from 'react';

export const fetchShow = async (
slug?: string,
year?: string,
displayDate?: string
): Promise<Partial<Tape>> => {
if (!slug || !year || !displayDate) return { sources: [] };

const parsed = (await ky(`${API_DOMAIN}/api/v2/artists/${slug}/years/${year}/${displayDate}`, {
cache: 'no-cache',
}).json()) as Tape;

return parsed;
};

export default async function Page({ params, children }: MainLayoutProps) {
const isMobile = useIsMobile();
const { artistSlug, year, month, day } = params;
Expand Down
16 changes: 15 additions & 1 deletion src/app/queries.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ky from 'ky-universal';
import { API_DOMAIN } from '../lib/constants';
import { Artist } from '@/types';
import { Artist, Tape } from '@/types';

export const fetchArtists = async (): Promise<Artist[]> => {
const parsed = await ky(`${API_DOMAIN}/api/v2/artists`, {
Expand All @@ -13,3 +13,17 @@ export const fetchArtists = async (): Promise<Artist[]> => {

return (parsed as Artist[]) ?? [];
};

export const fetchShow = async (
slug?: string,
year?: string,
displayDate?: string
): Promise<Partial<Tape>> => {
if (!slug || !year || !displayDate) return { sources: [] };

const parsed = (await ky(`${API_DOMAIN}/api/v2/artists/${slug}/years/${year}/${displayDate}`, {
cache: 'no-cache',
}).json()) as Tape;

return parsed;
};
201 changes: 0 additions & 201 deletions src/models/Tape.js

This file was deleted.

45 changes: 0 additions & 45 deletions src/models/TapeCollection.js

This file was deleted.

Empty file removed src/models/Track.js
Empty file.
Empty file removed src/models/index.js
Empty file.
Loading

0 comments on commit 8234fb7

Please sign in to comment.