From 887d92a9eeac2050a410de5352520b135f2d13d8 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sat, 9 Sep 2023 13:52:58 +0200 Subject: [PATCH 01/20] first test --- package.json | 7 +- src/components/Player/Player.tsx | 2 +- src/components/SideBar/SideBar.tsx | 7 +- .../Playlists/PlaylistItem/PlaylistItem.tsx | 4 +- src/pages/Playlists/Playlists.test.tsx | 18 + src/pages/Playlists/Playlists.tsx | 3 +- src/types/image.interface.ts | 4 +- src/types/playlist.interface.ts | 10 +- src/types/playlists.interface.ts | 31 +- src/types/track.interface.ts | 4 +- tests/mockData.ts | 1333 +++++++++++++++++ vite.config.ts | 3 + yarn.lock | 547 ++++++- 13 files changed, 1949 insertions(+), 24 deletions(-) create mode 100644 src/pages/Playlists/Playlists.test.tsx create mode 100644 tests/mockData.ts diff --git a/package.json b/package.json index 78b6f92..2e943c4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "build": "tsc && vite build", "serve": "vite preview", "lint": "yarn rome check src/", - "format": "yarn rome format src/ --write" + "format": "yarn rome format src/ --write", + "test": "vitest" }, "browserslist": { "production": [ @@ -45,10 +46,12 @@ "@types/react-redux": "^7.1.25", "@types/react-router-dom": "^5.3.3", "@vitejs/plugin-react": "^4.0.4", + "jsdom": "^22.1.0", "vite": "^4.4.9", "vite-plugin-checker": "^0.6.1", "vite-plugin-svgr": "^3.2.0", - "vite-tsconfig-paths": "^4.2.0" + "vite-tsconfig-paths": "^4.2.0", + "vitest": "^0.34.3" }, "repository": "https://github.com/bastiendmt/spotify-like-web.git", "author": "Bastien DUMONT ", diff --git a/src/components/Player/Player.tsx b/src/components/Player/Player.tsx index 695c68e..bc6001e 100644 --- a/src/components/Player/Player.tsx +++ b/src/components/Player/Player.tsx @@ -85,7 +85,7 @@ const Player = () => {
-
); -const ListItem = ({ playlist }: { playlist: PlaylistType }) => ( +const ListItem = ({ playlist }: { playlist: PlaylistTrackDetails }) => ( {playlist.name} diff --git a/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx b/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx index 49e52ca..7fd377b 100644 --- a/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx +++ b/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx @@ -1,9 +1,9 @@ import { Link } from 'react-router-dom'; import { ReactComponent as Play } from '../../../assets/play.svg'; -import { PlaylistType } from '../../../types/playlist.interface'; +import { PlaylistTrackDetails } from '../../../types/playlists.interface'; import styles from './PlaylistItem.module.scss'; -const PlaylistItem = ({ playlist }: { playlist: PlaylistType }) => ( +const PlaylistItem = ({ playlist }: { playlist: PlaylistTrackDetails }) => (
Tokyo diff --git a/src/pages/Playlists/Playlists.test.tsx b/src/pages/Playlists/Playlists.test.tsx new file mode 100644 index 0000000..71bd346 --- /dev/null +++ b/src/pages/Playlists/Playlists.test.tsx @@ -0,0 +1,18 @@ +import { render, screen } from "@testing-library/react"; +import Playlists from "./Playlists"; +import { test, describe, expect } from 'vitest' +import { mockPlaylists } from "../../../tests/mockData"; +import { BrowserRouter } from "react-router-dom"; + +describe('', () => { + + test('should render playlists', async () => { + render( + + + ) + + expect((await screen.findByRole("heading")).textContent).toBe("Playlists - mock message") + expect((await screen.getByText("Hits du Moment"))).toBeTruthy() + }) +}) diff --git a/src/pages/Playlists/Playlists.tsx b/src/pages/Playlists/Playlists.tsx index 5603574..2d4eb66 100644 --- a/src/pages/Playlists/Playlists.tsx +++ b/src/pages/Playlists/Playlists.tsx @@ -1,4 +1,3 @@ -import { PlaylistType } from '../../types/playlist.interface'; import { PlaylistsType } from '../../types/playlists.interface'; import PlaylistItem from './PlaylistItem/PlaylistItem'; import styles from './Playlists.module.scss'; @@ -13,7 +12,7 @@ const Playlists = ({

Playlists - {message}

- {playlists.items.map((item: PlaylistType) => ( + {playlists.items.map((item) => ( ))}
diff --git a/src/types/image.interface.ts b/src/types/image.interface.ts index 879fd45..7867202 100644 --- a/src/types/image.interface.ts +++ b/src/types/image.interface.ts @@ -1,5 +1,5 @@ export interface Image { - height: number; + height: number | null; + width: number | null; url: string; - width: number; } diff --git a/src/types/playlist.interface.ts b/src/types/playlist.interface.ts index 86eaaa1..2af545d 100644 --- a/src/types/playlist.interface.ts +++ b/src/types/playlist.interface.ts @@ -5,6 +5,10 @@ export interface PlaylistType { collaborative: boolean; description: string; external_urls: { spotify: string }; + followers: { + href: null | string; + total: number; + }; href: string; id: string; images: Image[]; @@ -17,14 +21,14 @@ export interface PlaylistType { type: string; uri: string; }; - primary_color: null; - public: null; + primary_color: string; + public: boolean; snapshot_id: string; tracks: { href: string; items: Track[]; limit: number; - next: string; + next: null | string; offset: number; previous: null; total: number; diff --git a/src/types/playlists.interface.ts b/src/types/playlists.interface.ts index e335105..962c2b8 100644 --- a/src/types/playlists.interface.ts +++ b/src/types/playlists.interface.ts @@ -1,8 +1,35 @@ -import { PlaylistType } from './playlist.interface'; +import { Image } from './image.interface'; + +export interface PlaylistTrackDetails { + collaborative: boolean; + description: string; + external_urls: { spotify: string }; + href: string; + id: string; + images: Image[]; + name: string; + owner: { + display_name: string; + external_urls: { spotify: string }; + href: string; + id: string; + type: string; + uri: string; + }; + primary_color: null; + public: null; + snapshot_id: string; + tracks: { + href: string; + total: number; + }; + type: string; + uri: string; +} export interface PlaylistsType { href: string; - items: PlaylistType[]; + items: PlaylistTrackDetails[]; limit: number; next: null; offset: number; diff --git a/src/types/track.interface.ts b/src/types/track.interface.ts index 270dfbd..44b3ab4 100644 --- a/src/types/track.interface.ts +++ b/src/types/track.interface.ts @@ -48,11 +48,11 @@ export interface Track { is_local: boolean; name: string; popularity: number; - preview_url: string; + preview_url: null | string; track: boolean; track_number: number; type: string; uri: string; }; - video_thumbnail: { url?: string }; + video_thumbnail: { url?: null | string }; } diff --git a/tests/mockData.ts b/tests/mockData.ts new file mode 100644 index 0000000..442d281 --- /dev/null +++ b/tests/mockData.ts @@ -0,0 +1,1333 @@ +import { PlaylistType } from '../src/types/playlist.interface'; +import { PlaylistsType } from '../src/types/playlists.interface'; + +export const mockPlaylists: PlaylistsType = { + href: 'https://api.spotify.com/v1/browse/featured-playlists?country=FR×tamp=2023-09-03T16%3A51%3A53&offset=0&limit=20', + limit: 20, + next: null, + offset: 0, + previous: null, + total: 10, + items: [ + { + collaborative: false, + description: + 'Imagine Dragons au sommet de la première playlist de France.', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DWVuV87wUBNwc', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWVuV87wUBNwc', + id: '37i9dQZF1DWVuV87wUBNwc', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003329694841f13f3d4b1820e58', + width: null, + }, + ], + name: 'Hits du Moment', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxMDk5NSwwMDAwMDAwMGNiNGFlNTYwMTJkM2EyZTJkYmQ1NjEwMDRiYmIwZjc4', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWVuV87wUBNwc/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DWVuV87wUBNwc', + }, + { + collaborative: false, + description: 'La discothèque idéale.', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX5wSQbrOxKS2', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX5wSQbrOxKS2', + id: '37i9dQZF1DX5wSQbrOxKS2', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f000000030a6f93a44cd25a2897664132', + width: null, + }, + ], + name: 'On connaît la chanson', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY4NjkxODI5MywwMDAwMDAwMGNkNmEzYmEwYjczOGMxODUzY2JmNDQ2NDljMzUwNDRh', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX5wSQbrOxKS2/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX5wSQbrOxKS2', + }, + { + collaborative: false, + description: 'The best jazz new releases. Cover: Cautious Clay', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX1S1NduGwpsa', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX1S1NduGwpsa', + id: '37i9dQZF1DX1S1NduGwpsa', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003c9af83aa50da566d4a960e99', + width: null, + }, + ], + name: 'Jazz Club', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxOTI2MCwwMDAwMDAwMGIwN2I3OTRjM2E1M2VhNWFkYjJhMTM5NWVhN2Y4ZWE2', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX1S1NduGwpsa/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX1S1NduGwpsa', + }, + { + collaborative: false, + description: + 'Les meilleurs morceaux alternatifs du moment. Photo : My Ugly Clementine', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DWUa8WMYIRY8Y', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWUa8WMYIRY8Y', + id: '37i9dQZF1DWUa8WMYIRY8Y', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f000000032e260d4f2e7971047da4ef58', + width: null, + }, + ], + name: 'Hot Alternative', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxOTIwMCwwMDAwMDAwMDQxMDQyZGNhNTIyZjEyODk3NzgyODlhMTdiNjk4MjQ5', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWUa8WMYIRY8Y/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DWUa8WMYIRY8Y', + }, + { + collaborative: false, + description: 'Peaceful piano to help you slow down, breathe, and relax. ', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX4sWSpwq3LiO', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX4sWSpwq3LiO', + id: '37i9dQZF1DX4sWSpwq3LiO', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003d073e656e546e43bc387ad79', + width: null, + }, + ], + name: 'Peaceful Piano', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzMwMTYzOSwwMDAwMDAwMDFlMTZhYWRlYzM2OTExYTc4NTVhN2NiYWM4MjQ5MzVk', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX4sWSpwq3LiO/tracks', + total: 302, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX4sWSpwq3LiO', + }, + { + collaborative: false, + description: + 'Les meilleurs hits pour accompagner votre séance de sport !', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX39mId53VASc', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX39mId53VASc', + id: '37i9dQZF1DX39mId53VASc', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f0000000311bd1ea7ae0bb32b0e900a6f', + width: null, + }, + ], + name: 'Motivation pour le sport', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzU1MjM4NiwwMDAwMDAwMDYzYjg2YWRiOWUwNDU1ZDNkNjY1ZDQzMjNmYTcwMTUw', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX39mId53VASc/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX39mId53VASc', + }, + { + collaborative: false, + description: 'Le meilleur des années 2010 en 100 titres.', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX8E06AbSENEw', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX8E06AbSENEw', + id: '37i9dQZF1DX8E06AbSENEw', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f000000032a0a82d4d4cf990b76bf5496', + width: null, + }, + ], + name: 'Années 2010', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MjgwMjgwMCwwMDAwMDAwMDFkMWNmZGNlNDQzYzMwZDNiNWM3NzYzYjk5YzdiNDY2', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX8E06AbSENEw/tracks', + total: 100, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX8E06AbSENEw', + }, + { + collaborative: false, + description: 'La variété française fait un pas de côté. Photo: 47ter', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DX9h4FeDa1xsw', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX9h4FeDa1xsw', + id: '37i9dQZF1DX9h4FeDa1xsw', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f000000038061165c7888798fc7d37d31', + width: null, + }, + ], + name: 'Vice Versa', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxOTIwMCwwMDAwMDAwMGM2MDc2NTZkMmM4ZDdkMmJiZGM4ZjdmZWEwOTRlMWU1', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DX9h4FeDa1xsw/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DX9h4FeDa1xsw', + }, + { + collaborative: false, + description: 'The magical world map! Play it in shuffle ☀️', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DWXjv2J1ebzlh', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWXjv2J1ebzlh', + id: '37i9dQZF1DWXjv2J1ebzlh', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003004bb060bb805361451bb8fe', + width: null, + }, + ], + name: 'Bon Voyage', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxOTIwMCwwMDAwMDAwMDU1MTM1MWY5YzEzMjNlODViOTM3MTBhNDJmZmEzZmFl', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWXjv2J1ebzlh/tracks', + total: 1175, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DWXjv2J1ebzlh', + }, + { + collaborative: false, + description: 'Tîësto au top des nouveautés electro !', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DWTIfBdh7WtFL', + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWTIfBdh7WtFL', + id: '37i9dQZF1DWTIfBdh7WtFL', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003d1639046ca6bc6c76ba2bac0', + width: null, + }, + ], + name: 'Nouveautés Electro', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: null, + public: null, + snapshot_id: + 'MTY5MzUxOTIwMCwwMDAwMDAwMDc4YjAwODVkZGUxZDE5ZGE4MDVjMTMwYWI4YmMwZGY5', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWTIfBdh7WtFL/tracks', + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DWTIfBdh7WtFL', + }, + ], +}; + +export const mockPlaylistDetails: PlaylistType = { + collaborative: false, + description: 'Imagine Dragons au sommet de la première playlist de France.', + external_urls: { + spotify: 'https://open.spotify.com/playlist/37i9dQZF1DWVuV87wUBNwc', + }, + followers: { + href: null, + total: 2180666, + }, + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWVuV87wUBNwc', + id: '37i9dQZF1DWVuV87wUBNwc', + images: [ + { + height: null, + url: 'https://i.scdn.co/image/ab67706f00000003329694841f13f3d4b1820e58', + width: null, + }, + ], + name: 'Hits du Moment', + owner: { + display_name: 'Spotify', + external_urls: { + spotify: 'https://open.spotify.com/user/spotify', + }, + href: 'https://api.spotify.com/v1/users/spotify', + id: 'spotify', + type: 'user', + uri: 'spotify:user:spotify', + }, + primary_color: '#FFFFFF', + public: false, + snapshot_id: 'MCwxZDU1OGM2NWRiNjBhYTZlNzZjYmVkZTQ2YTZhMWFkZDMzYWFiN2I5', + tracks: { + href: 'https://api.spotify.com/v1/playlists/37i9dQZF1DWVuV87wUBNwc/tracks?offset=0&limit=100&locale=en-US,en;q=0.9,fr-FR;q=0.8,fr;q=0.7', + items: [ + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'album', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/53XhwfbYqKCa1cC15pYq2q', + }, + href: 'https://api.spotify.com/v1/artists/53XhwfbYqKCa1cC15pYq2q', + id: '53XhwfbYqKCa1cC15pYq2q', + name: 'Imagine Dragons', + type: 'artist', + uri: 'spotify:artist:53XhwfbYqKCa1cC15pYq2q', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/6yiXkzHvC0OTmhfDQOEWtS', + }, + href: 'https://api.spotify.com/v1/albums/6yiXkzHvC0OTmhfDQOEWtS', + id: '6yiXkzHvC0OTmhfDQOEWtS', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273fc915b69600dce2991a61f13', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02fc915b69600dce2991a61f13', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851fc915b69600dce2991a61f13', + width: 64, + }, + ], + name: 'Mercury - Acts 1 & 2', + release_date: '2022-07-01', + release_date_precision: 'day', + total_tracks: 32, + type: 'album', + uri: 'spotify:album:6yiXkzHvC0OTmhfDQOEWtS', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/53XhwfbYqKCa1cC15pYq2q', + }, + href: 'https://api.spotify.com/v1/artists/53XhwfbYqKCa1cC15pYq2q', + id: '53XhwfbYqKCa1cC15pYq2q', + name: 'Imagine Dragons', + type: 'artist', + uri: 'spotify:artist:53XhwfbYqKCa1cC15pYq2q', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 2, + duration_ms: 225431, + episode: false, + explicit: false, + external_ids: { + isrc: 'USUM72205470', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/0YbFEoJi7Esa7lhIrEpBjl', + }, + href: 'https://api.spotify.com/v1/tracks/0YbFEoJi7Esa7lhIrEpBjl', + id: '0YbFEoJi7Esa7lhIrEpBjl', + is_local: false, + name: 'Waves', + popularity: 77, + preview_url: null, + track: true, + track_number: 9, + type: 'track', + uri: 'spotify:track:0YbFEoJi7Esa7lhIrEpBjl', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3HqP3nd8WI0VfHRhApPlan', + }, + href: 'https://api.spotify.com/v1/artists/3HqP3nd8WI0VfHRhApPlan', + id: '3HqP3nd8WI0VfHRhApPlan', + name: 'Trinix', + type: 'artist', + uri: 'spotify:artist:3HqP3nd8WI0VfHRhApPlan', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/70W0ftdGNlFkgrqu5O0QiI', + }, + href: 'https://api.spotify.com/v1/artists/70W0ftdGNlFkgrqu5O0QiI', + id: '70W0ftdGNlFkgrqu5O0QiI', + name: 'One-T', + type: 'artist', + uri: 'spotify:artist:70W0ftdGNlFkgrqu5O0QiI', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/015JXvTq9kGDXlJs0z8fYY', + }, + href: 'https://api.spotify.com/v1/albums/015JXvTq9kGDXlJs0z8fYY', + id: '015JXvTq9kGDXlJs0z8fYY', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273172ec92da271e71498440056', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02172ec92da271e71498440056', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851172ec92da271e71498440056', + width: 64, + }, + ], + name: 'The Magic Key', + release_date: '2023-04-07', + release_date_precision: 'day', + total_tracks: 1, + type: 'album', + uri: 'spotify:album:015JXvTq9kGDXlJs0z8fYY', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3HqP3nd8WI0VfHRhApPlan', + }, + href: 'https://api.spotify.com/v1/artists/3HqP3nd8WI0VfHRhApPlan', + id: '3HqP3nd8WI0VfHRhApPlan', + name: 'Trinix', + type: 'artist', + uri: 'spotify:artist:3HqP3nd8WI0VfHRhApPlan', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/70W0ftdGNlFkgrqu5O0QiI', + }, + href: 'https://api.spotify.com/v1/artists/70W0ftdGNlFkgrqu5O0QiI', + id: '70W0ftdGNlFkgrqu5O0QiI', + name: 'One-T', + type: 'artist', + uri: 'spotify:artist:70W0ftdGNlFkgrqu5O0QiI', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 171211, + episode: false, + explicit: false, + external_ids: { + isrc: 'QM4TX2333885', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/6vHkJ4L8gqCwedvhXkSCsa', + }, + href: 'https://api.spotify.com/v1/tracks/6vHkJ4L8gqCwedvhXkSCsa', + id: '6vHkJ4L8gqCwedvhXkSCsa', + is_local: false, + name: 'The Magic Key', + popularity: 76, + preview_url: + 'https://p.scdn.co/mp3-preview/487459b247de57bd882c159025a27130d2bb762d?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:6vHkJ4L8gqCwedvhXkSCsa', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/49aaHxvAJ0tCh0F15OnwIl', + }, + href: 'https://api.spotify.com/v1/artists/49aaHxvAJ0tCh0F15OnwIl', + id: '49aaHxvAJ0tCh0F15OnwIl', + name: 'Loreen', + type: 'artist', + uri: 'spotify:artist:49aaHxvAJ0tCh0F15OnwIl', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/0LRTS7FyYLppkDLOZT02Xp', + }, + href: 'https://api.spotify.com/v1/albums/0LRTS7FyYLppkDLOZT02Xp', + id: '0LRTS7FyYLppkDLOZT02Xp', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b2732b0ba87db609976eee193bd6', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e022b0ba87db609976eee193bd6', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d000048512b0ba87db609976eee193bd6', + width: 64, + }, + ], + name: 'Tattoo', + release_date: '2023-02-25', + release_date_precision: 'day', + total_tracks: 1, + type: 'album', + uri: 'spotify:album:0LRTS7FyYLppkDLOZT02Xp', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/49aaHxvAJ0tCh0F15OnwIl', + }, + href: 'https://api.spotify.com/v1/artists/49aaHxvAJ0tCh0F15OnwIl', + id: '49aaHxvAJ0tCh0F15OnwIl', + name: 'Loreen', + type: 'artist', + uri: 'spotify:artist:49aaHxvAJ0tCh0F15OnwIl', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 183374, + episode: false, + explicit: false, + external_ids: { + isrc: 'SEUM72201638', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/1DmW5Ep6ywYwxc2HMT5BG6', + }, + href: 'https://api.spotify.com/v1/tracks/1DmW5Ep6ywYwxc2HMT5BG6', + id: '1DmW5Ep6ywYwxc2HMT5BG6', + is_local: false, + name: 'Tattoo', + popularity: 90, + preview_url: null, + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:1DmW5Ep6ywYwxc2HMT5BG6', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/5c0lDrNyT2RnFhujZpPIas', + }, + href: 'https://api.spotify.com/v1/artists/5c0lDrNyT2RnFhujZpPIas', + id: '5c0lDrNyT2RnFhujZpPIas', + name: 'Victor Thompson', + type: 'artist', + uri: 'spotify:artist:5c0lDrNyT2RnFhujZpPIas', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/5OLkn5GT6EcMuJzjwgvQnu', + }, + href: 'https://api.spotify.com/v1/artists/5OLkn5GT6EcMuJzjwgvQnu', + id: '5OLkn5GT6EcMuJzjwgvQnu', + name: 'Vacra', + type: 'artist', + uri: 'spotify:artist:5OLkn5GT6EcMuJzjwgvQnu', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/1Fut8RnDlNYmDLb5oqDySz', + }, + href: 'https://api.spotify.com/v1/albums/1Fut8RnDlNYmDLb5oqDySz', + id: '1Fut8RnDlNYmDLb5oqDySz', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b2732bb47476de70c0de9c9a29be', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e022bb47476de70c0de9c9a29be', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d000048512bb47476de70c0de9c9a29be', + width: 64, + }, + ], + name: 'THIS YEAR (Blessings) [French Remix]', + release_date: '2023-04-14', + release_date_precision: 'day', + total_tracks: 1, + type: 'album', + uri: 'spotify:album:1Fut8RnDlNYmDLb5oqDySz', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/5c0lDrNyT2RnFhujZpPIas', + }, + href: 'https://api.spotify.com/v1/artists/5c0lDrNyT2RnFhujZpPIas', + id: '5c0lDrNyT2RnFhujZpPIas', + name: 'Victor Thompson', + type: 'artist', + uri: 'spotify:artist:5c0lDrNyT2RnFhujZpPIas', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/5OLkn5GT6EcMuJzjwgvQnu', + }, + href: 'https://api.spotify.com/v1/artists/5OLkn5GT6EcMuJzjwgvQnu', + id: '5OLkn5GT6EcMuJzjwgvQnu', + name: 'Vacra', + type: 'artist', + uri: 'spotify:artist:5OLkn5GT6EcMuJzjwgvQnu', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/6QdzKE9cMAEFZj1pYcxpsf', + }, + href: 'https://api.spotify.com/v1/artists/6QdzKE9cMAEFZj1pYcxpsf', + id: '6QdzKE9cMAEFZj1pYcxpsf', + name: "Ehis 'D' Greatest", + type: 'artist', + uri: 'spotify:artist:6QdzKE9cMAEFZj1pYcxpsf', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 134972, + episode: false, + explicit: false, + external_ids: { + isrc: 'QM6N22300921', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/4cVnXm3iHSlOYRtHZcEEbj', + }, + href: 'https://api.spotify.com/v1/tracks/4cVnXm3iHSlOYRtHZcEEbj', + id: '4cVnXm3iHSlOYRtHZcEEbj', + is_local: false, + name: 'THIS YEAR (Blessings) - French Remix', + popularity: 75, + preview_url: + 'https://p.scdn.co/mp3-preview/1b211bfe3f8f4d02eb8017fc8ba1fd90987eadff?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:4cVnXm3iHSlOYRtHZcEEbj', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/07YZf4WDAMNwqr4jfgOZ8y', + }, + href: 'https://api.spotify.com/v1/artists/07YZf4WDAMNwqr4jfgOZ8y', + id: '07YZf4WDAMNwqr4jfgOZ8y', + name: 'Jason Derulo', + type: 'artist', + uri: 'spotify:artist:07YZf4WDAMNwqr4jfgOZ8y', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/2mpeljBig2IXLXRAFO9AAs', + }, + href: 'https://api.spotify.com/v1/artists/2mpeljBig2IXLXRAFO9AAs', + id: '2mpeljBig2IXLXRAFO9AAs', + name: 'Dido', + type: 'artist', + uri: 'spotify:artist:2mpeljBig2IXLXRAFO9AAs', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/0BmbK3Ayd0Q9BWOCQYOdQw', + }, + href: 'https://api.spotify.com/v1/albums/0BmbK3Ayd0Q9BWOCQYOdQw', + id: '0BmbK3Ayd0Q9BWOCQYOdQw', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273028b9a72c08db84217babfb0', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02028b9a72c08db84217babfb0', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851028b9a72c08db84217babfb0', + width: 64, + }, + ], + name: 'When Love Sucks (feat. Dido)', + release_date: '2023-05-18', + release_date_precision: 'day', + total_tracks: 2, + type: 'album', + uri: 'spotify:album:0BmbK3Ayd0Q9BWOCQYOdQw', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/07YZf4WDAMNwqr4jfgOZ8y', + }, + href: 'https://api.spotify.com/v1/artists/07YZf4WDAMNwqr4jfgOZ8y', + id: '07YZf4WDAMNwqr4jfgOZ8y', + name: 'Jason Derulo', + type: 'artist', + uri: 'spotify:artist:07YZf4WDAMNwqr4jfgOZ8y', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/2mpeljBig2IXLXRAFO9AAs', + }, + href: 'https://api.spotify.com/v1/artists/2mpeljBig2IXLXRAFO9AAs', + id: '2mpeljBig2IXLXRAFO9AAs', + name: 'Dido', + type: 'artist', + uri: 'spotify:artist:2mpeljBig2IXLXRAFO9AAs', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 169645, + episode: false, + explicit: false, + external_ids: { + isrc: 'USAT22305231', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/59vMO9rkUuefwLMKzohNo5', + }, + href: 'https://api.spotify.com/v1/tracks/59vMO9rkUuefwLMKzohNo5', + id: '59vMO9rkUuefwLMKzohNo5', + is_local: false, + name: 'When Love Sucks (feat. Dido)', + popularity: 75, + preview_url: + 'https://p.scdn.co/mp3-preview/7e857493dc17d503c16edc7921f78865d99db549?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:59vMO9rkUuefwLMKzohNo5', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3HqP3nd8WI0VfHRhApPlan', + }, + href: 'https://api.spotify.com/v1/artists/3HqP3nd8WI0VfHRhApPlan', + id: '3HqP3nd8WI0VfHRhApPlan', + name: 'Trinix', + type: 'artist', + uri: 'spotify:artist:3HqP3nd8WI0VfHRhApPlan', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/6n45wsxj6sDedgwEyTza6d', + }, + href: 'https://api.spotify.com/v1/artists/6n45wsxj6sDedgwEyTza6d', + id: '6n45wsxj6sDedgwEyTza6d', + name: 'Fafá de Belém', + type: 'artist', + uri: 'spotify:artist:6n45wsxj6sDedgwEyTza6d', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/3yP0Nsb8jyXY4HMNb6tkO9', + }, + href: 'https://api.spotify.com/v1/albums/3yP0Nsb8jyXY4HMNb6tkO9', + id: '3yP0Nsb8jyXY4HMNb6tkO9', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273635884f3123d858676bdab81', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02635884f3123d858676bdab81', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851635884f3123d858676bdab81', + width: 64, + }, + ], + name: 'Emorio', + release_date: '2023-04-28', + release_date_precision: 'day', + total_tracks: 1, + type: 'album', + uri: 'spotify:album:3yP0Nsb8jyXY4HMNb6tkO9', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3HqP3nd8WI0VfHRhApPlan', + }, + href: 'https://api.spotify.com/v1/artists/3HqP3nd8WI0VfHRhApPlan', + id: '3HqP3nd8WI0VfHRhApPlan', + name: 'Trinix', + type: 'artist', + uri: 'spotify:artist:3HqP3nd8WI0VfHRhApPlan', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/6n45wsxj6sDedgwEyTza6d', + }, + href: 'https://api.spotify.com/v1/artists/6n45wsxj6sDedgwEyTza6d', + id: '6n45wsxj6sDedgwEyTza6d', + name: 'Fafá de Belém', + type: 'artist', + uri: 'spotify:artist:6n45wsxj6sDedgwEyTza6d', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 163840, + episode: false, + explicit: false, + external_ids: { + isrc: 'FR9W12310051', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/14VthBnru6kiREQUYAuNSL', + }, + href: 'https://api.spotify.com/v1/tracks/14VthBnru6kiREQUYAuNSL', + id: '14VthBnru6kiREQUYAuNSL', + is_local: false, + name: 'Emorio', + popularity: 76, + preview_url: + 'https://p.scdn.co/mp3-preview/aa7b2f323e4dec354416d354add83e5ec6fa8bfb?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:14VthBnru6kiREQUYAuNSL', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'album', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3YwqjMyrRfuixi2pbgTGCE', + }, + href: 'https://api.spotify.com/v1/artists/3YwqjMyrRfuixi2pbgTGCE', + id: '3YwqjMyrRfuixi2pbgTGCE', + name: "Heuss L'enfoiré", + type: 'artist', + uri: 'spotify:artist:3YwqjMyrRfuixi2pbgTGCE', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/65Zsfpx3BX9uriUQ5Nvuq7', + }, + href: 'https://api.spotify.com/v1/albums/65Zsfpx3BX9uriUQ5Nvuq7', + id: '65Zsfpx3BX9uriUQ5Nvuq7', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273e867057ecb11903ffe53224b', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02e867057ecb11903ffe53224b', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851e867057ecb11903ffe53224b', + width: 64, + }, + ], + name: "Chef D'orchestre", + release_date: '2023-06-30', + release_date_precision: 'day', + total_tracks: 14, + type: 'album', + uri: 'spotify:album:65Zsfpx3BX9uriUQ5Nvuq7', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/3YwqjMyrRfuixi2pbgTGCE', + }, + href: 'https://api.spotify.com/v1/artists/3YwqjMyrRfuixi2pbgTGCE', + id: '3YwqjMyrRfuixi2pbgTGCE', + name: "Heuss L'enfoiré", + type: 'artist', + uri: 'spotify:artist:3YwqjMyrRfuixi2pbgTGCE', + }, + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/5gqmbbfjcikQBzPB5Hv13I', + }, + href: 'https://api.spotify.com/v1/artists/5gqmbbfjcikQBzPB5Hv13I', + id: '5gqmbbfjcikQBzPB5Hv13I', + name: 'Gazo', + type: 'artist', + uri: 'spotify:artist:5gqmbbfjcikQBzPB5Hv13I', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 189840, + episode: false, + explicit: true, + external_ids: { + isrc: 'FR1DC2300200', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/2BvjmY4Mp5q1AHL0laetd6', + }, + href: 'https://api.spotify.com/v1/tracks/2BvjmY4Mp5q1AHL0laetd6', + id: '2BvjmY4Mp5q1AHL0laetd6', + is_local: false, + name: 'Saiyan', + popularity: 75, + preview_url: + 'https://p.scdn.co/mp3-preview/58d86b35819bf30c3cd3779b590511b3f672edd2?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 6, + type: 'track', + uri: 'spotify:track:2BvjmY4Mp5q1AHL0laetd6', + }, + video_thumbnail: { + url: null, + }, + }, + { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'single', + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/54NKhABnyGAvbek0n63TAu', + }, + href: 'https://api.spotify.com/v1/artists/54NKhABnyGAvbek0n63TAu', + id: '54NKhABnyGAvbek0n63TAu', + name: 'Aden Foyer', + type: 'artist', + uri: 'spotify:artist:54NKhABnyGAvbek0n63TAu', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/0oHwFrjiH6pkhFp8C4LWa3', + }, + href: 'https://api.spotify.com/v1/albums/0oHwFrjiH6pkhFp8C4LWa3', + id: '0oHwFrjiH6pkhFp8C4LWa3', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b27347ec34af123096d55e5391e8', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e0247ec34af123096d55e5391e8', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d0000485147ec34af123096d55e5391e8', + width: 64, + }, + ], + name: 'The Ballet Girl', + release_date: '2022-10-21', + release_date_precision: 'day', + total_tracks: 1, + type: 'album', + uri: 'spotify:album:0oHwFrjiH6pkhFp8C4LWa3', + }, + artists: [ + { + external_urls: { + spotify: + 'https://open.spotify.com/artist/54NKhABnyGAvbek0n63TAu', + }, + href: 'https://api.spotify.com/v1/artists/54NKhABnyGAvbek0n63TAu', + id: '54NKhABnyGAvbek0n63TAu', + name: 'Aden Foyer', + type: 'artist', + uri: 'spotify:artist:54NKhABnyGAvbek0n63TAu', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 1, + duration_ms: 201424, + episode: false, + explicit: false, + external_ids: { + isrc: 'USQX92206389', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/3aiOu3VFNOD9omIGG7nSq1', + }, + href: 'https://api.spotify.com/v1/tracks/3aiOu3VFNOD9omIGG7nSq1', + id: '3aiOu3VFNOD9omIGG7nSq1', + is_local: false, + name: 'The Ballet Girl', + popularity: 77, + preview_url: + 'https://p.scdn.co/mp3-preview/6d30d10cb20ee42c46008b5f25e6a9ce141d2ee4?cid=8d87635387164a479f08a30d3ea8c944', + track: true, + track_number: 1, + type: 'track', + uri: 'spotify:track:3aiOu3VFNOD9omIGG7nSq1', + }, + video_thumbnail: { + url: null, + }, + }, + ], + limit: 100, + next: null, + offset: 0, + previous: null, + total: 50, + }, + type: 'playlist', + uri: 'spotify:playlist:37i9dQZF1DWVuV87wUBNwc', +}; diff --git a/vite.config.ts b/vite.config.ts index 2579b11..13233ae 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,4 +23,7 @@ export default defineConfig({ '/authorization/': '...', }, }, + test: { + environment: 'jsdom' + } }); diff --git a/yarn.lock b/yarn.lock index b7e2ece..c273b4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -325,6 +325,13 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" @@ -344,7 +351,7 @@ resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -432,6 +439,11 @@ resolved "https://registry.yarnpkg.com/@rometools/cli-win32-x64/-/cli-win32-x64-12.1.3.tgz#b4f53491d2ca8f1234b3613b7cc73418ad8d76bb" integrity sha512-yHSKYidqJMV9nADqg78GYA+cZ0hS1twANAjiFibQdXj9aGzD+s/IzIFEIi/U/OBLvWYg/SCw0QVozi2vTlKFDQ== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + "@svgr/babel-plugin-add-jsx-attribute@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-7.0.0.tgz" @@ -530,7 +542,7 @@ "@testing-library/react@^14.0.0": version "14.0.0" - resolved "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.0.0.tgz#59030392a6792450b9ab8e67aea5f3cc18d6347c" integrity sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg== dependencies: "@babel/runtime" "^7.12.5" @@ -542,11 +554,28 @@ resolved "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz" integrity sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q== +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@types/aria-query@^5.0.1": version "5.0.1" resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz" integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== +"@types/chai-subset@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" + integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" + integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== + "@types/cookie@^0.5.1": version "0.5.1" resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.5.1.tgz#b29aa1f91a59f35e29ff8f7cb24faf1a3a750554" @@ -570,6 +599,11 @@ "@types/react" "*" hoist-non-react-statics "^3.3.0" +"@types/node@*": + version "20.5.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.9.tgz#a70ec9d8fa0180a314c3ede0e20ea56ff71aed9a" + integrity sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ== + "@types/prop-types@*": version "15.7.5" resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" @@ -643,6 +677,71 @@ "@babel/plugin-transform-react-jsx-source" "^7.22.5" react-refresh "^0.14.0" +"@vitest/expect@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.3.tgz#576e1fd6a3a8b8b7a79a06477f3d450a77d67852" + integrity sha512-F8MTXZUYRBVsYL1uoIft1HHWhwDbSzwAU9Zgh8S6WFC3YgVb4AnFV2GXO3P5Em8FjEYaZtTnQYoNwwBrlOMXgg== + dependencies: + "@vitest/spy" "0.34.3" + "@vitest/utils" "0.34.3" + chai "^4.3.7" + +"@vitest/runner@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.3.tgz#ce09b777d133bbcf843e1a67f4a743365764e097" + integrity sha512-lYNq7N3vR57VMKMPLVvmJoiN4bqwzZ1euTW+XXYH5kzr3W/+xQG3b41xJn9ChJ3AhYOSoweu974S1V3qDcFESA== + dependencies: + "@vitest/utils" "0.34.3" + p-limit "^4.0.0" + pathe "^1.1.1" + +"@vitest/snapshot@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.3.tgz#cb4767aa44711a1072bd2e06204b659275c4f0f2" + integrity sha512-QyPaE15DQwbnIBp/yNJ8lbvXTZxS00kRly0kfFgAD5EYmCbYcA+1EEyRalc93M0gosL/xHeg3lKAClIXYpmUiQ== + dependencies: + magic-string "^0.30.1" + pathe "^1.1.1" + pretty-format "^29.5.0" + +"@vitest/spy@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.3.tgz#d4cf25e6ca9230991a0223ecd4ec2df30f0784ff" + integrity sha512-N1V0RFQ6AI7CPgzBq9kzjRdPIgThC340DGjdKdPSE8r86aUSmeliTUgkTqLSgtEwWWsGfBQ+UetZWhK0BgJmkQ== + dependencies: + tinyspy "^2.1.1" + +"@vitest/utils@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.3.tgz#6e243189a358b736b9fc0216e6b6979bc857e897" + integrity sha512-kiSnzLG6m/tiT0XEl4U2H8JDBjFtwVlaE8I3QfGiMFR0QvnRDfYfdP3YvTBWM/6iJDAyaPY6yVQiCTUc7ZzTHA== + dependencies: + diff-sequences "^29.4.3" + loupe "^2.3.6" + pretty-format "^29.5.0" + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.10.0, acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" @@ -702,6 +801,11 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -756,6 +860,11 @@ browserslist@^4.21.9: node-releases "^2.0.13" update-browserslist-db "^1.0.11" +cac@^6.7.14: + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -779,6 +888,19 @@ caniuse-lite@^1.0.30001517: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz" integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== +chai@^4.3.7: + version "4.3.8" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.8.tgz#40c59718ad6928da6629c70496fe990b2bb5b17c" + integrity sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^4.1.2" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -796,6 +918,11 @@ chalk@^4.1.0, chalk@^4.1.1: ansi-styles "^4.1.0" supports-color "^7.1.0" +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + "chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" @@ -872,18 +999,46 @@ cosmiconfig@^8.1.3: parse-json "^5.0.0" path-type "^4.0.0" +cssstyle@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" + integrity sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg== + dependencies: + rrweb-cssom "^0.6.0" + csstype@^3.0.2: version "3.1.2" resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -debug@^4.1.0, debug@^4.1.1: +data-urls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" + integrity sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g== + dependencies: + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^12.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" +decimal.js@^10.4.3: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +deep-eql@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + deep-equal@^2.0.5: version "2.2.2" resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz" @@ -921,11 +1076,23 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +diff-sequences@^29.4.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz" integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + electron-to-chromium@^1.4.477: version "1.4.490" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.490.tgz" @@ -1081,6 +1248,11 @@ gensync@^1.0.0-beta.2: resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz" @@ -1173,6 +1345,37 @@ hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: dependencies: react-is "^16.7.0" +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + immer@^9.0.21: version "9.0.21" resolved "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz" @@ -1285,6 +1488,11 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -1356,6 +1564,35 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsdom@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-22.1.0.tgz#0fca6d1a37fbeb7f4aac93d1090d782c56b611c8" + integrity sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw== + dependencies: + abab "^2.0.6" + cssstyle "^3.0.0" + data-urls "^4.0.0" + decimal.js "^10.4.3" + domexception "^4.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.4" + parse5 "^7.1.2" + rrweb-cssom "^0.6.0" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^12.0.1" + ws "^8.13.0" + xml-name-validator "^4.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" @@ -1371,6 +1608,11 @@ json5@^2.2.2: resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" @@ -1385,6 +1627,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +local-pkg@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" + integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" @@ -1402,6 +1649,13 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +loupe@^2.3.1, loupe@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== + dependencies: + get-func-name "^2.0.0" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" @@ -1421,6 +1675,13 @@ lz-string@^1.5.0: resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== +magic-string@^0.30.1: + version "0.30.3" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.3.tgz#403755dfd9d6b398dfa40635d52e96c5ac095b85" + integrity sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + merge2@^1.3.0: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" @@ -1453,6 +1714,16 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +mlly@^1.2.0, mlly@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.1.tgz#7ab9cbb040bf8bd8205a0c341ce9acc3ae0c3a74" + integrity sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg== + dependencies: + acorn "^8.10.0" + pathe "^1.1.1" + pkg-types "^1.0.3" + ufo "^1.3.0" + ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" @@ -1480,6 +1751,11 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +nwsapi@^2.2.4: + version "2.2.7" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" + integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== + object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" @@ -1508,6 +1784,13 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" @@ -1525,6 +1808,13 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse5@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + path-key@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" @@ -1535,6 +1825,16 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathe@^1.1.0, pathe@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" + integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" @@ -1545,6 +1845,15 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pkg-types@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" + integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== + dependencies: + jsonc-parser "^3.2.0" + mlly "^1.2.0" + pathe "^1.1.0" + postcss@^8.4.27: version "8.4.27" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz" @@ -1563,11 +1872,30 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-format@^29.5.0: + version "29.6.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.3.tgz#d432bb4f1ca6f9463410c3fb25a0ba88e594ace7" + integrity sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +punycode@^2.1.1, punycode@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + qs@^6.11.2: version "6.11.2" resolved "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz" @@ -1575,6 +1903,11 @@ qs@^6.11.2: dependencies: side-channel "^1.0.4" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" @@ -1675,6 +2008,11 @@ regexp.prototype.flags@^1.5.0: define-properties "^1.2.0" functions-have-names "^1.2.3" +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + reselect@^4.1.8: version "4.1.8" resolved "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz" @@ -1709,6 +2047,11 @@ rome@^12.1.3: "@rometools/cli-win32-arm64" "12.1.3" "@rometools/cli-win32-x64" "12.1.3" +rrweb-cssom@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1" + integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" @@ -1716,6 +2059,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + sass@^1.66.0: version "1.66.0" resolved "https://registry.yarnpkg.com/sass/-/sass-1.66.0.tgz#74728eed49b0e490cd729c233e7f1c6ce356e638" @@ -1725,6 +2073,13 @@ sass@^1.66.0: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + scheduler@^0.23.0: version "0.23.0" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz" @@ -1753,11 +2108,26 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + +std-env@^3.3.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.4.3.tgz#326f11db518db751c83fd58574f449b7c3060910" + integrity sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q== + stop-iteration-iterator@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz" @@ -1772,6 +2142,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.1" +strip-literal@^1.0.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07" + integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg== + dependencies: + acorn "^8.10.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" @@ -1791,11 +2168,31 @@ svg-parser@^2.0.4: resolved "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz" integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ== +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + tiny-invariant@^1.1.0: version "1.3.1" resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== +tinybench@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.0.tgz#4711c99bbf6f3e986f67eb722fed9cddb3a68ba5" + integrity sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA== + +tinypool@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" + integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== + +tinyspy@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.1.1.tgz#9e6371b00c259e5c5b301917ca18c01d40ae558c" + integrity sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" @@ -1808,11 +2205,33 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tough-cookie@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" + integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== + dependencies: + punycode "^2.3.0" + tsconfck@^2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz" integrity sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg== +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" @@ -1823,6 +2242,11 @@ typescript@^5.1.6: resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== +ufo@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.0.tgz#c92f8ac209daff607c57bbd75029e190930a0019" + integrity sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw== + universal-cookie@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/universal-cookie/-/universal-cookie-5.0.0.tgz#e20b5a5aabb595cf3eae49dbbcd9a311d9be0e87" @@ -1831,6 +2255,11 @@ universal-cookie@^5.0.0: "@types/cookie" "^0.5.1" cookie "^0.5.0" +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" @@ -1844,11 +2273,31 @@ update-browserslist-db@^1.0.11: escalade "^3.1.1" picocolors "^1.0.0" +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + use-sync-external-store@^1.0.0: version "1.2.0" resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== +vite-node@0.34.3: + version "0.34.3" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.3.tgz#de134fe38bc1555ac8ab5e489d7df6159a3e1a4c" + integrity sha512-+0TzJf1g0tYXj6tR2vEyiA42OPq68QkRZCu/ERSo2PtsDJfBpDyEfuKbRvLmZqi/CgC7SCBtyC+WjTGNMRIaig== + dependencies: + cac "^6.7.14" + debug "^4.3.4" + mlly "^1.4.0" + pathe "^1.1.1" + picocolors "^1.0.0" + vite "^3.0.0 || ^4.0.0" + vite-plugin-checker@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.6.1.tgz" @@ -1890,7 +2339,7 @@ vite-tsconfig-paths@^4.2.0: globrex "^0.1.2" tsconfck "^2.1.0" -vite@^4.4.9: +"vite@^3.0.0 || ^4.0.0", vite@^4.4.9: version "4.4.9" resolved "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz" integrity sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA== @@ -1901,6 +2350,36 @@ vite@^4.4.9: optionalDependencies: fsevents "~2.3.2" +vitest@^0.34.3: + version "0.34.3" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.3.tgz#863d61c133d01b16e49fd52d380c09fa5ac03188" + integrity sha512-7+VA5Iw4S3USYk+qwPxHl8plCMhA5rtfwMjgoQXMT7rO5ldWcdsdo3U1QD289JgglGK4WeOzgoLTsGFu6VISyQ== + dependencies: + "@types/chai" "^4.3.5" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + "@vitest/expect" "0.34.3" + "@vitest/runner" "0.34.3" + "@vitest/snapshot" "0.34.3" + "@vitest/spy" "0.34.3" + "@vitest/utils" "0.34.3" + acorn "^8.9.0" + acorn-walk "^8.2.0" + cac "^6.7.14" + chai "^4.3.7" + debug "^4.3.4" + local-pkg "^0.4.3" + magic-string "^0.30.1" + pathe "^1.1.1" + picocolors "^1.0.0" + std-env "^3.3.3" + strip-literal "^1.0.1" + tinybench "^2.5.0" + tinypool "^0.7.0" + vite "^3.0.0 || ^4.0.0" + vite-node "0.34.3" + why-is-node-running "^2.2.2" + vscode-jsonrpc@6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz" @@ -1945,6 +2424,38 @@ vscode-uri@^3.0.2: resolved "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz" integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== + dependencies: + xml-name-validator "^4.0.0" + +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^12.0.0, whatwg-url@^12.0.1: + version "12.0.1" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-12.0.1.tgz#fd7bcc71192e7c3a2a97b9a8d6b094853ed8773c" + integrity sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ== + dependencies: + tr46 "^4.1.1" + webidl-conversions "^7.0.0" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" @@ -1977,6 +2488,29 @@ which-typed-array@^1.1.11, which-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +why-is-node-running@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" + integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + +ws@^8.13.0: + version "8.14.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.1.tgz#4b9586b4f70f9e6534c7bb1d3dc0baa8b8cf01e0" + integrity sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A== + +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" @@ -1986,3 +2520,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== From ecd0ddab665479a7286dbf5f9e7b764c34dc7670 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sat, 9 Sep 2023 13:54:07 +0200 Subject: [PATCH 02/20] coverage --- package.json | 3 +- yarn.lock | 155 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 152 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2e943c4..1ecae5d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "serve": "vite preview", "lint": "yarn rome check src/", "format": "yarn rome format src/ --write", - "test": "vitest" + "test": "vitest run --coverage" }, "browserslist": { "production": [ @@ -46,6 +46,7 @@ "@types/react-redux": "^7.1.25", "@types/react-router-dom": "^5.3.3", "@vitejs/plugin-react": "^4.0.4", + "@vitest/coverage-v8": "^0.34.4", "jsdom": "^22.1.0", "vite": "^4.4.9", "vite-plugin-checker": "^0.6.1", diff --git a/yarn.lock b/yarn.lock index c273b4e..f4958f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.2.0": +"@ampproject/remapping@^2.2.0", "@ampproject/remapping@^2.2.1": version "2.2.1" resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== @@ -215,6 +215,11 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" @@ -325,6 +330,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -356,7 +366,7 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.19" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz" integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== @@ -599,6 +609,11 @@ "@types/react" "*" hoist-non-react-statics "^3.3.0" +"@types/istanbul-lib-coverage@^2.0.1": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" + integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + "@types/node@*": version "20.5.9" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.9.tgz#a70ec9d8fa0180a314c3ede0e20ea56ff71aed9a" @@ -677,6 +692,23 @@ "@babel/plugin-transform-react-jsx-source" "^7.22.5" react-refresh "^0.14.0" +"@vitest/coverage-v8@^0.34.4": + version "0.34.4" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-0.34.4.tgz#c4e827ef54e3b2a6b8c4befd0a78792f7615f2c9" + integrity sha512-TZ5ghzhmg3COQqfBShL+zRQEInHmV9TSwghTdfkHpCTyTOr+rxo6x41vCNcVfWysWULtqtBVpY6YFNovxnESfA== + dependencies: + "@ampproject/remapping" "^2.2.1" + "@bcoe/v8-coverage" "^0.2.3" + istanbul-lib-coverage "^3.2.0" + istanbul-lib-report "^3.0.1" + istanbul-lib-source-maps "^4.0.1" + istanbul-reports "^3.1.5" + magic-string "^0.30.1" + picocolors "^1.0.0" + std-env "^3.3.3" + test-exclude "^6.0.0" + v8-to-istanbul "^9.1.0" + "@vitest/expect@0.34.3": version "0.34.3" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.3.tgz#576e1fd6a3a8b8b7a79a06477f3d450a77d67852" @@ -979,7 +1011,7 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -convert-source-map@^1.7.0: +convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.9.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== @@ -1228,6 +1260,11 @@ fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + fsevents@~2.3.2: version "2.3.2" resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" @@ -1270,6 +1307,18 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" @@ -1352,6 +1401,11 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" @@ -1394,6 +1448,19 @@ import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + internal-slot@^1.0.4: version "1.0.5" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz" @@ -1552,6 +1619,37 @@ isarray@^2.0.5: resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + +istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" @@ -1682,6 +1780,13 @@ magic-string@^0.30.1: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + merge2@^1.3.0: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" @@ -1707,7 +1812,7 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1784,6 +1889,13 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + p-limit@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" @@ -1815,6 +1927,11 @@ parse5@^7.1.2: dependencies: entities "^4.4.0" +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + path-key@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" @@ -2092,7 +2209,7 @@ semver@^6.3.1: resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.4, semver@^7.5.0: +semver@^7.3.4, semver@^7.5.0, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2118,6 +2235,11 @@ siginfo@^2.0.0: resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + stackback@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" @@ -2173,6 +2295,15 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + tiny-invariant@^1.1.0: version "1.3.1" resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz" @@ -2286,6 +2417,15 @@ use-sync-external-store@^1.0.0: resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== +v8-to-istanbul@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" + integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + vite-node@0.34.3: version "0.34.3" resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.3.tgz#de134fe38bc1555ac8ab5e489d7df6159a3e1a4c" @@ -2496,6 +2636,11 @@ why-is-node-running@^2.2.2: siginfo "^2.0.0" stackback "0.0.2" +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + ws@^8.13.0: version "8.14.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.1.tgz#4b9586b4f70f9e6534c7bb1d3dc0baa8b8cf01e0" From 20f181caeaf4bec5277fd44580c94ad00a5939f3 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sat, 9 Sep 2023 13:55:44 +0200 Subject: [PATCH 03/20] format --- src/components/SideBar/SideBar.tsx | 5 ++++- src/pages/Playlists/Playlists.test.tsx | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index fc0a036..b983237 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -1,6 +1,9 @@ import { Link } from 'react-router-dom'; import { ReactComponent as Logo } from '../../assets/logo.svg'; -import { PlaylistTrackDetails, PlaylistsType } from '../../types/playlists.interface'; +import { + PlaylistTrackDetails, + PlaylistsType, +} from '../../types/playlists.interface'; import styles from './SideBar.module.scss'; const SideBar = ({ playlists }: { playlists: PlaylistsType }) => ( diff --git a/src/pages/Playlists/Playlists.test.tsx b/src/pages/Playlists/Playlists.test.tsx index 71bd346..1d32acc 100644 --- a/src/pages/Playlists/Playlists.test.tsx +++ b/src/pages/Playlists/Playlists.test.tsx @@ -1,18 +1,20 @@ -import { render, screen } from "@testing-library/react"; -import Playlists from "./Playlists"; -import { test, describe, expect } from 'vitest' -import { mockPlaylists } from "../../../tests/mockData"; -import { BrowserRouter } from "react-router-dom"; +import { render, screen } from '@testing-library/react'; +import Playlists from './Playlists'; +import { test, describe, expect } from 'vitest'; +import { mockPlaylists } from '../../../tests/mockData'; +import { BrowserRouter } from 'react-router-dom'; describe('', () => { - test('should render playlists', async () => { render( - - ) + + , + ); - expect((await screen.findByRole("heading")).textContent).toBe("Playlists - mock message") - expect((await screen.getByText("Hits du Moment"))).toBeTruthy() - }) -}) + expect((await screen.findByRole('heading')).textContent).toBe( + 'Playlists - mock message', + ); + expect(screen.getByText('Hits du Moment')).toBeTruthy(); + }); +}); From b791f308cfb9e29dfba014a2665c739a4e53a1e9 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sat, 9 Sep 2023 14:00:50 +0200 Subject: [PATCH 04/20] coverage all --- vite.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 13233ae..a59adf5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,9 @@ export default defineConfig({ }, }, test: { - environment: 'jsdom' - } + environment: 'jsdom', + coverage: { + all: true, + }, + }, }); From 2316737e7dcd201d809d50cecfd88ed3c588edf6 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sat, 9 Sep 2023 14:15:45 +0200 Subject: [PATCH 05/20] wip --- .../PlaylistDetail/PlaylistDetail.spec.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/pages/PlaylistDetail/PlaylistDetail.spec.tsx diff --git a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx new file mode 100644 index 0000000..cd0f6d5 --- /dev/null +++ b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx @@ -0,0 +1,28 @@ +import { render, screen } from '@testing-library/react'; +import Playlists from './Playlists'; +import { test, describe, expect, beforeEach, vi } from 'vitest'; +import { mockPlaylistDetails, mockPlaylists } from '../../../tests/mockData'; +import { BrowserRouter } from 'react-router-dom'; +import PlaylistDetail from './PlaylistDetail'; +import * as hooks from '../../store/hooks'; + +const mockSelector = vi.fn(); + +vi.mock('../../store/hooks.ts', () => ({ + useAppSelector: mockSelector, +})); + +describe('Playlist details', () => { + beforeEach(() => { + mockSelector.mockReturnValue({ + playlist: mockPlaylistDetails, + loading: false, + error: false, + }); + }); + test('should render playlist details', async () => { + render(); + + expect(await screen.getAllByRole('heading')).toBe('Hits du Moment'); + }); +}); From cd8f23cb0cbfbc8b2ff1ce67d3db1d3333ec233c Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 00:36:23 +0200 Subject: [PATCH 06/20] test details --- .../PlaylistDetail/PlaylistDetail.spec.tsx | 48 +++++++++++-------- src/pages/PlaylistDetail/PlaylistDetail.tsx | 9 ++-- yarn.lock | 20 ++++++-- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx index cd0f6d5..ca4b5b1 100644 --- a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx +++ b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx @@ -1,28 +1,38 @@ +import { configureStore } from '@reduxjs/toolkit'; import { render, screen } from '@testing-library/react'; -import Playlists from './Playlists'; -import { test, describe, expect, beforeEach, vi } from 'vitest'; -import { mockPlaylistDetails, mockPlaylists } from '../../../tests/mockData'; -import { BrowserRouter } from 'react-router-dom'; +import { Provider } from 'react-redux'; +import { describe, expect, test } from 'vitest'; +import { mockPlaylistDetails } from '../../../tests/mockData'; +import currentSongSlice from '../../store/reducers/currentSong.slice'; +import featuredPlaylistSlice from '../../store/reducers/featuredPlaylists.slice'; +import playlistDetailSlice from '../../store/reducers/playlistDetail.slice'; import PlaylistDetail from './PlaylistDetail'; -import * as hooks from '../../store/hooks'; -const mockSelector = vi.fn(); - -vi.mock('../../store/hooks.ts', () => ({ - useAppSelector: mockSelector, -})); - -describe('Playlist details', () => { - beforeEach(() => { - mockSelector.mockReturnValue({ +const store = configureStore({ + reducer: { + currentSong: currentSongSlice.reducer, + featuredPlaylists: featuredPlaylistSlice.reducer, + playlistDetail: playlistDetailSlice.reducer, + }, + preloadedState: { + playlistDetail: { playlist: mockPlaylistDetails, loading: false, - error: false, - }); - }); + error: '', + }, + }, +}); + +describe('Playlist details', () => { test('should render playlist details', async () => { - render(); + render( + + + , + ); - expect(await screen.getAllByRole('heading')).toBe('Hits du Moment'); + expect((await screen.findByRole('heading')).textContent).toBe( + 'Hits du Moment', + ); }); }); diff --git a/src/pages/PlaylistDetail/PlaylistDetail.tsx b/src/pages/PlaylistDetail/PlaylistDetail.tsx index cc2ee10..6fbee93 100644 --- a/src/pages/PlaylistDetail/PlaylistDetail.tsx +++ b/src/pages/PlaylistDetail/PlaylistDetail.tsx @@ -5,10 +5,7 @@ import { ReactComponent as Time } from '../../assets/time.svg'; import Loader from '../../components/Loader/Loader'; import NotFound from '../../components/NotFound/NotFound'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; -import { - loadSong, - selectCurrentSong, -} from '../../store/reducers/currentSong.slice'; +// import { loadSong } from '../../store/reducers/currentSong.slice'; import { fetchPlaylistById, playlistDetailsSelector, @@ -23,7 +20,7 @@ const PlaylistDetail = () => { const coverRef = useRef(null); const dispatch = useAppDispatch(); const { playlist, loading, error } = useAppSelector(playlistDetailsSelector); - const { song } = useAppSelector(selectCurrentSong); + const { song } = useAppSelector((state) => state.currentSong); useEffect(() => { if (id != null) { @@ -55,7 +52,7 @@ const PlaylistDetail = () => { const songClicked = (clickedSong: Track): void => { if (clickedSong.track.preview_url !== '') { - dispatch(loadSong(clickedSong)); + // dispatch(loadSong(clickedSong)); } }; diff --git a/yarn.lock b/yarn.lock index b414fdc..1e088da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -215,6 +215,11 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "@biomejs/biome@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.1.2.tgz#f747e0e5bf0a024e83fdd2ce9bab9c265e1634b6" @@ -257,11 +262,6 @@ resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.1.2.tgz#2bd8d0c4ab6277baf3d4eedd5258caa972814152" integrity sha512-qebNvIrFj2TJ+K0JVGo1HkgV2y5jis6aOZDC1SWuk53GnqjSLdR+p1v86ZByOjYr1v+tjc67EXmEepk06VVvpA== -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" @@ -461,6 +461,11 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + "@svgr/babel-plugin-add-jsx-attribute@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-7.0.0.tgz" @@ -2159,6 +2164,11 @@ rollup@^3.27.1: optionalDependencies: fsevents "~2.3.2" +rrweb-cssom@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1" + integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" From 8989cee139b4cb1ada5f0f851b187adf7dc649c4 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:22:18 +0200 Subject: [PATCH 07/20] add test workflow --- .github/workflows/actions.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index dde8445..d063bd1 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -28,6 +28,16 @@ jobs: run: yarn lint continue-on-error: false + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run tests + run: yarn test + analyze: name: Analyze runs-on: ubuntu-latest From a3b04a8e915f635e41d4484450c678ed2792d957 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:26:38 +0200 Subject: [PATCH 08/20] add vitest --- .github/workflows/actions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b0ddc0c..4da8637 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -35,6 +35,9 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Install vitest + run: yarn add vitest + - name: Run tests run: yarn test From 1a19c58d40ab59a4325f5a89b56b357ec6ddeb55 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:28:41 +0200 Subject: [PATCH 09/20] format --- .github/workflows/actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 4da8637..d37c567 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -11,7 +11,7 @@ on: jobs: lint: - name: Lint + name: Format runs-on: ubuntu-latest permissions: contents: read @@ -24,8 +24,8 @@ jobs: - name: Install Biome run: yarn add @biomejs/biome - - name: Run lint - run: yarn lint + - name: Run format + run: yarn format continue-on-error: false test: From 01b5757bad3a17816d08e477183bb5c6a9c6a167 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:32:46 +0200 Subject: [PATCH 10/20] Revert "format" This reverts commit 1a19c58d40ab59a4325f5a89b56b357ec6ddeb55. --- .github/workflows/actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index d37c567..4da8637 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -11,7 +11,7 @@ on: jobs: lint: - name: Format + name: Lint runs-on: ubuntu-latest permissions: contents: read @@ -24,8 +24,8 @@ jobs: - name: Install Biome run: yarn add @biomejs/biome - - name: Run format - run: yarn format + - name: Run lint + run: yarn lint continue-on-error: false test: From 6249a819fde5b7b2d3fbfa536624a91cb21c8cae Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:33:24 +0200 Subject: [PATCH 11/20] format --- src/pages/Playlists/Playlists.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Playlists/Playlists.test.tsx b/src/pages/Playlists/Playlists.test.tsx index 1d32acc..366a65c 100644 --- a/src/pages/Playlists/Playlists.test.tsx +++ b/src/pages/Playlists/Playlists.test.tsx @@ -1,14 +1,14 @@ import { render, screen } from '@testing-library/react'; -import Playlists from './Playlists'; -import { test, describe, expect } from 'vitest'; -import { mockPlaylists } from '../../../tests/mockData'; import { BrowserRouter } from 'react-router-dom'; +import { describe, expect, test } from 'vitest'; +import { mockPlaylists } from '../../../tests/mockData'; +import Playlists from './Playlists'; describe('', () => { test('should render playlists', async () => { render( - + , ); From 6fd3fad44173cdcadd6e2e8a942fbc0221a6a500 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 12:36:01 +0200 Subject: [PATCH 12/20] rename file to .spec --- src/pages/Playlists/{Playlists.test.tsx => Playlists.spec.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/pages/Playlists/{Playlists.test.tsx => Playlists.spec.tsx} (100%) diff --git a/src/pages/Playlists/Playlists.test.tsx b/src/pages/Playlists/Playlists.spec.tsx similarity index 100% rename from src/pages/Playlists/Playlists.test.tsx rename to src/pages/Playlists/Playlists.spec.tsx From 835a51efbcbfc2fa079d9b0b25eeb0435f076407 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Sun, 10 Sep 2023 13:00:17 +0200 Subject: [PATCH 13/20] createMockStore --- src/components/Loader/Loader.tsx | 2 +- .../PlaylistDetail/PlaylistDetail.spec.tsx | 54 +++++++++++++------ src/pages/PlaylistDetail/PlaylistDetail.tsx | 13 +++-- src/store/store.ts | 10 ++++ 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/src/components/Loader/Loader.tsx b/src/components/Loader/Loader.tsx index db3f82e..58fe570 100644 --- a/src/components/Loader/Loader.tsx +++ b/src/components/Loader/Loader.tsx @@ -1,5 +1,5 @@ import styles from './Loader.module.scss'; -const Loader = () =>
; +const Loader = () =>
; export default Loader; diff --git a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx index ca4b5b1..efe1023 100644 --- a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx +++ b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx @@ -1,29 +1,39 @@ -import { configureStore } from '@reduxjs/toolkit'; -import { render, screen } from '@testing-library/react'; +import { cleanup, render, screen } from '@testing-library/react'; import { Provider } from 'react-redux'; -import { describe, expect, test } from 'vitest'; +import { afterEach, describe, expect, test } from 'vitest'; import { mockPlaylistDetails } from '../../../tests/mockData'; -import currentSongSlice from '../../store/reducers/currentSong.slice'; -import featuredPlaylistSlice from '../../store/reducers/featuredPlaylists.slice'; -import playlistDetailSlice from '../../store/reducers/playlistDetail.slice'; +import { createMockStore } from '../../store/store'; import PlaylistDetail from './PlaylistDetail'; -const store = configureStore({ - reducer: { - currentSong: currentSongSlice.reducer, - featuredPlaylists: featuredPlaylistSlice.reducer, - playlistDetail: playlistDetailSlice.reducer, +const store = createMockStore({ + playlistDetail: { + playlist: mockPlaylistDetails, + loading: false, + error: '', }, - preloadedState: { - playlistDetail: { - playlist: mockPlaylistDetails, - loading: false, - error: '', - }, +}); + +const loadingStore = createMockStore({ + playlistDetail: { + playlist: null, + loading: true, + error: '', }, }); describe('Playlist details', () => { + afterEach(cleanup); + + test('should render loader', async () => { + render( + + + , + ); + + expect(screen.getByTestId('loader')).toBeTruthy(); + }); + test('should render playlist details', async () => { render( @@ -35,4 +45,14 @@ describe('Playlist details', () => { 'Hits du Moment', ); }); + + // test('should have a background color', async () => { + // render( + // + // + // , + // ); + + // expect(screen.getByTestId('Background').style.backgroundColor).toBeTruthy(); + // }); }); diff --git a/src/pages/PlaylistDetail/PlaylistDetail.tsx b/src/pages/PlaylistDetail/PlaylistDetail.tsx index 6fbee93..bdbf259 100644 --- a/src/pages/PlaylistDetail/PlaylistDetail.tsx +++ b/src/pages/PlaylistDetail/PlaylistDetail.tsx @@ -5,7 +5,8 @@ import { ReactComponent as Time } from '../../assets/time.svg'; import Loader from '../../components/Loader/Loader'; import NotFound from '../../components/NotFound/NotFound'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; -// import { loadSong } from '../../store/reducers/currentSong.slice'; +import { selectCurrentSong } from '../../store/reducers/currentSong.slice'; +import { loadSong } from '../../store/reducers/currentSong.slice'; import { fetchPlaylistById, playlistDetailsSelector, @@ -20,7 +21,7 @@ const PlaylistDetail = () => { const coverRef = useRef(null); const dispatch = useAppDispatch(); const { playlist, loading, error } = useAppSelector(playlistDetailsSelector); - const { song } = useAppSelector((state) => state.currentSong); + const { song } = useAppSelector(selectCurrentSong); useEffect(() => { if (id != null) { @@ -52,7 +53,7 @@ const PlaylistDetail = () => { const songClicked = (clickedSong: Track): void => { if (clickedSong.track.preview_url !== '') { - // dispatch(loadSong(clickedSong)); + dispatch(loadSong(clickedSong)); } }; @@ -77,7 +78,11 @@ const PlaylistDetail = () => { {playlist != null && (
-
+
) => + configureStore({ + reducer: { + currentSong: currentSongSlice.reducer, + featuredPlaylists: featuredPlaylistSlice.reducer, + playlistDetail: playlistDetailSlice.reducer, + }, + preloadedState, + }); + // Infer the `RootState` and `AppDispatch` types from the store itself export type RootState = ReturnType; // Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} From a82d34ef98764eee5c1c4aa9a2c1b6cdf1629b0c Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Wed, 3 Jan 2024 14:36:11 +0100 Subject: [PATCH 14/20] wip --- .vscode/settings.json | 4 ++-- src/components/SideBar/SideBar.spec.tsx | 18 ++++++++++++++++++ src/components/SideBar/SideBar.tsx | 4 ++-- src/pages/Playlists/Playlists.spec.tsx | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/components/SideBar/SideBar.spec.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index 910058e..b68f6d8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,7 +15,7 @@ }, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "quickfix.biome": true, - "source.organizeImports.biome": true + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" } } diff --git a/src/components/SideBar/SideBar.spec.tsx b/src/components/SideBar/SideBar.spec.tsx new file mode 100644 index 0000000..66315c6 --- /dev/null +++ b/src/components/SideBar/SideBar.spec.tsx @@ -0,0 +1,18 @@ +import { render, screen } from '@testing-library/react'; +import { BrowserRouter } from 'react-router-dom'; +import { describe, expect, test } from 'vitest'; +import { mockPlaylists } from '../../../tests/mockData'; +import SideBar from './SideBar'; + +describe('SideBar', () => { + test('should render playlists', async () => { + render( + + + , + ); + + expect((await screen.findByRole('heading')).textContent).toBe('Playlists'); + expect(await screen.findByRole('link')).toBeTruthy(); + }); +}); diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index 2807918..9cc4afc 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -18,11 +18,11 @@ const SideBar = ({ playlists }: { playlists: PlaylistsType }) => (

Playlists


-
+
+
); diff --git a/src/pages/Playlists/Playlists.spec.tsx b/src/pages/Playlists/Playlists.spec.tsx index 366a65c..103439f 100644 --- a/src/pages/Playlists/Playlists.spec.tsx +++ b/src/pages/Playlists/Playlists.spec.tsx @@ -4,7 +4,7 @@ import { describe, expect, test } from 'vitest'; import { mockPlaylists } from '../../../tests/mockData'; import Playlists from './Playlists'; -describe('', () => { +describe('Playlists', () => { test('should render playlists', async () => { render( From 97d38fa28030b2500feeb2bb84892fb7c8eb031d Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 00:22:52 +0200 Subject: [PATCH 15/20] disable jest runner --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b68f6d8..dacb9fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,5 +17,6 @@ "editor.codeActionsOnSave": { "quickfix.biome": "explicit", "source.organizeImports.biome": "explicit" - } + }, + "jestrunner.codeLens": [] } From e5ad49232d91635c6c48f13627a2b51daa42cf40 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 00:22:59 +0200 Subject: [PATCH 16/20] add some more tests --- src/components/Loader/Loader.tsx | 11 ++- src/components/NotFound/NotFound.spec.tsx | 16 +++ src/components/SideBar/SideBar.spec.tsx | 2 +- .../PlaylistDetail/PlaylistDetail.spec.tsx | 8 +- src/store/reducers/currentSong.slice.ts | 6 +- src/store/reducers/currentSong.spec.ts | 28 ++++++ tests/mockData.ts | 98 +++++++++++++++++++ 7 files changed, 158 insertions(+), 11 deletions(-) create mode 100644 src/components/NotFound/NotFound.spec.tsx create mode 100644 src/store/reducers/currentSong.spec.ts diff --git a/src/components/Loader/Loader.tsx b/src/components/Loader/Loader.tsx index 58fe570..4f5cdae 100644 --- a/src/components/Loader/Loader.tsx +++ b/src/components/Loader/Loader.tsx @@ -1,5 +1,14 @@ import styles from './Loader.module.scss'; -const Loader = () =>
; +const Loader = () => ( +
+); export default Loader; diff --git a/src/components/NotFound/NotFound.spec.tsx b/src/components/NotFound/NotFound.spec.tsx new file mode 100644 index 0000000..db0defd --- /dev/null +++ b/src/components/NotFound/NotFound.spec.tsx @@ -0,0 +1,16 @@ +import { render, screen } from '@testing-library/react'; +import { BrowserRouter } from 'react-router-dom'; +import { describe, expect, test } from 'vitest'; +import NotFound from './NotFound'; + +describe('NotFound', () => { + test('should render NotFound', async () => { + render( + + + , + ); + + expect((await screen.findAllByRole('link')).length).toBeTruthy(); + }); +}); diff --git a/src/components/SideBar/SideBar.spec.tsx b/src/components/SideBar/SideBar.spec.tsx index 66315c6..9530b06 100644 --- a/src/components/SideBar/SideBar.spec.tsx +++ b/src/components/SideBar/SideBar.spec.tsx @@ -13,6 +13,6 @@ describe('SideBar', () => { ); expect((await screen.findByRole('heading')).textContent).toBe('Playlists'); - expect(await screen.findByRole('link')).toBeTruthy(); + expect((await screen.findAllByRole('link')).length).toBeTruthy(); }); }); diff --git a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx index efe1023..e9a4708 100644 --- a/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx +++ b/src/pages/PlaylistDetail/PlaylistDetail.spec.tsx @@ -30,8 +30,7 @@ describe('Playlist details', () => { , ); - - expect(screen.getByTestId('loader')).toBeTruthy(); + expect(screen.getByRole('progressbar', { busy: true })).toBeTruthy(); }); test('should render playlist details', async () => { @@ -40,10 +39,7 @@ describe('Playlist details', () => { , ); - - expect((await screen.findByRole('heading')).textContent).toBe( - 'Hits du Moment', - ); + expect(screen.findByText('Hits du Moment')).toBeTruthy(); }); // test('should have a background color', async () => { diff --git a/src/store/reducers/currentSong.slice.ts b/src/store/reducers/currentSong.slice.ts index aeb46b9..fc3e115 100644 --- a/src/store/reducers/currentSong.slice.ts +++ b/src/store/reducers/currentSong.slice.ts @@ -7,14 +7,14 @@ interface CurrentSongState { song: Track | null; } -const initialState: CurrentSongState = { - playing: true, +export const initialCurrentSongState: CurrentSongState = { + playing: false, song: null, }; const currentSongSlice = createSlice({ name: 'currentSong', - initialState, + initialState: initialCurrentSongState, reducers: { loadSong: (state, action: PayloadAction) => { state.playing = true; diff --git a/src/store/reducers/currentSong.spec.ts b/src/store/reducers/currentSong.spec.ts new file mode 100644 index 0000000..e3260ac --- /dev/null +++ b/src/store/reducers/currentSong.spec.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from 'vitest'; +import { mockTrack } from '../../../tests/mockData'; +import currentSongSlice, { + initialCurrentSongState, + loadSong, + playPause, +} from './currentSong.slice'; + +describe('currentSong', () => { + const initialState = currentSongSlice.reducer(undefined, { type: 'unknown' }); + + it('should return the initial state', () => { + expect(initialState).toEqual(initialCurrentSongState); + }); + + it('should handle loadSong', () => { + const newState = currentSongSlice.reducer(undefined, loadSong(mockTrack)); + expect(newState.playing).toBe(true); + expect(newState.song).toEqual(mockTrack); + }); + it('should handle playPause', () => { + const newState = currentSongSlice.reducer( + { playing: true, song: null }, + playPause(), + ); + expect(newState.playing).toBe(false); + }); +}); diff --git a/tests/mockData.ts b/tests/mockData.ts index 442d281..03bcb8f 100644 --- a/tests/mockData.ts +++ b/tests/mockData.ts @@ -1,5 +1,103 @@ import { PlaylistType } from '../src/types/playlist.interface'; import { PlaylistsType } from '../src/types/playlists.interface'; +import { Track } from '../src/types/track.interface'; + +export const mockTrack: Track = { + added_at: '2023-08-31T11:01:00Z', + added_by: { + external_urls: { + spotify: 'https://open.spotify.com/user/', + }, + href: 'https://api.spotify.com/v1/users/', + id: '', + type: 'user', + uri: 'spotify:user:', + }, + is_local: false, + primary_color: null, + track: { + album: { + album_type: 'album', + artists: [ + { + external_urls: { + spotify: 'https://open.spotify.com/artist/53XhwfbYqKCa1cC15pYq2q', + }, + href: 'https://api.spotify.com/v1/artists/53XhwfbYqKCa1cC15pYq2q', + id: '53XhwfbYqKCa1cC15pYq2q', + name: 'Imagine Dragons', + type: 'artist', + uri: 'spotify:artist:53XhwfbYqKCa1cC15pYq2q', + }, + ], + available_markets: ['AR', 'AU'], + external_urls: { + spotify: 'https://open.spotify.com/album/6yiXkzHvC0OTmhfDQOEWtS', + }, + href: 'https://api.spotify.com/v1/albums/6yiXkzHvC0OTmhfDQOEWtS', + id: '6yiXkzHvC0OTmhfDQOEWtS', + images: [ + { + height: 640, + url: 'https://i.scdn.co/image/ab67616d0000b273fc915b69600dce2991a61f13', + width: 640, + }, + { + height: 300, + url: 'https://i.scdn.co/image/ab67616d00001e02fc915b69600dce2991a61f13', + width: 300, + }, + { + height: 64, + url: 'https://i.scdn.co/image/ab67616d00004851fc915b69600dce2991a61f13', + width: 64, + }, + ], + name: 'Mercury - Acts 1 & 2', + release_date: '2022-07-01', + release_date_precision: 'day', + total_tracks: 32, + type: 'album', + uri: 'spotify:album:6yiXkzHvC0OTmhfDQOEWtS', + }, + artists: [ + { + external_urls: { + spotify: 'https://open.spotify.com/artist/53XhwfbYqKCa1cC15pYq2q', + }, + href: 'https://api.spotify.com/v1/artists/53XhwfbYqKCa1cC15pYq2q', + id: '53XhwfbYqKCa1cC15pYq2q', + name: 'Imagine Dragons', + type: 'artist', + uri: 'spotify:artist:53XhwfbYqKCa1cC15pYq2q', + }, + ], + available_markets: ['AR', 'AU'], + disc_number: 2, + duration_ms: 225431, + episode: false, + explicit: false, + external_ids: { + isrc: 'USUM72205470', + }, + external_urls: { + spotify: 'https://open.spotify.com/track/0YbFEoJi7Esa7lhIrEpBjl', + }, + href: 'https://api.spotify.com/v1/tracks/0YbFEoJi7Esa7lhIrEpBjl', + id: '0YbFEoJi7Esa7lhIrEpBjl', + is_local: false, + name: 'Waves', + popularity: 77, + preview_url: null, + track: true, + track_number: 9, + type: 'track', + uri: 'spotify:track:0YbFEoJi7Esa7lhIrEpBjl', + }, + video_thumbnail: { + url: null, + }, +}; export const mockPlaylists: PlaylistsType = { href: 'https://api.spotify.com/v1/browse/featured-playlists?country=FR×tamp=2023-09-03T16%3A51%3A53&offset=0&limit=20', From c79876ec712dc97a45965c62278a47f3a3821d1c Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 00:30:26 +0200 Subject: [PATCH 17/20] format files --- src/components/SideBar/SideBar.tsx | 50 +++++++------- .../Playlists/PlaylistItem/PlaylistItem.tsx | 32 ++++----- src/pages/Playlists/Playlists.tsx | 32 ++++----- src/types/playlists.interface.ts | 68 +++++++++---------- 4 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index ce7ff64..17d223f 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -1,33 +1,33 @@ -import { Link } from "react-router-dom"; -import Logo from "../../assets/logo.svg?react"; -import type { PlaylistType } from "../../types/playlist.interface"; -import type { PlaylistsType } from "../../types/playlists.interface"; -import styles from "./SideBar.module.scss"; +import { Link } from 'react-router-dom'; +import Logo from '../../assets/logo.svg?react'; +import type { PlaylistType } from '../../types/playlist.interface'; +import type { PlaylistsType } from '../../types/playlists.interface'; +import styles from './SideBar.module.scss'; const SideBar = ({ playlists }: { playlists: PlaylistsType }) => ( -
- - - -

Playlists

-
- -
+
+ + + +

Playlists

+
+ +
); const ListItem = ({ playlist }: { playlist: PlaylistTrackDetails }) => ( - - {playlist.name} - + + {playlist.name} + ); export default SideBar; diff --git a/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx b/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx index 6e754fa..b4a5c89 100644 --- a/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx +++ b/src/pages/Playlists/PlaylistItem/PlaylistItem.tsx @@ -1,21 +1,21 @@ -import { Link } from "react-router-dom"; -import Play from "../../../assets/play.svg?react"; -import type { PlaylistTrackDetails } from "../../../types/playlists.interface"; -import styles from "./PlaylistItem.module.scss"; +import { Link } from 'react-router-dom'; +import Play from '../../../assets/play.svg?react'; +import type { PlaylistTrackDetails } from '../../../types/playlists.interface'; +import styles from './PlaylistItem.module.scss'; const PlaylistItem = ({ playlist }: { playlist: PlaylistTrackDetails }) => ( - -
- Tokyo -
- -
-
-
{playlist.name}
-
{playlist.owner?.display_name}
- + +
+ Tokyo +
+ +
+
+
{playlist.name}
+
{playlist.owner?.display_name}
+ ); export default PlaylistItem; diff --git a/src/pages/Playlists/Playlists.tsx b/src/pages/Playlists/Playlists.tsx index 126d807..7b79847 100644 --- a/src/pages/Playlists/Playlists.tsx +++ b/src/pages/Playlists/Playlists.tsx @@ -1,23 +1,23 @@ -import type { PlaylistType } from "../../types/playlist.interface"; -import type { PlaylistsType } from "../../types/playlists.interface"; -import PlaylistItem from "./PlaylistItem/PlaylistItem"; -import styles from "./Playlists.module.scss"; +import type { PlaylistType } from '../../types/playlist.interface'; +import type { PlaylistsType } from '../../types/playlists.interface'; +import PlaylistItem from './PlaylistItem/PlaylistItem'; +import styles from './Playlists.module.scss'; const Playlists = ({ - message, - playlists, + message, + playlists, }: { - message: string; - playlists: PlaylistsType; + message: string; + playlists: PlaylistsType; }) => ( -
-

Playlists - {message}

-
- {playlists.items.map((item) => ( - - ))} -
-
+
+

Playlists - {message}

+
+ {playlists.items.map((item) => ( + + ))} +
+
); export default Playlists; diff --git a/src/types/playlists.interface.ts b/src/types/playlists.interface.ts index a2a44cd..9ff1e9d 100644 --- a/src/types/playlists.interface.ts +++ b/src/types/playlists.interface.ts @@ -1,43 +1,43 @@ -import type { Image } from "./image.interface"; +import type { Image } from './image.interface'; export interface PlaylistTrackDetails { - collaborative: boolean; - description: string; - external_urls: { spotify: string }; - href: string; - id: string; - images: Image[]; - name: string; - owner: { - display_name: string; - external_urls: { spotify: string }; - href: string; - id: string; - type: string; - uri: string; - }; - primary_color: null; - public: null; - snapshot_id: string; - tracks: { - href: string; - total: number; - }; - type: string; - uri: string; + collaborative: boolean; + description: string; + external_urls: { spotify: string }; + href: string; + id: string; + images: Image[]; + name: string; + owner: { + display_name: string; + external_urls: { spotify: string }; + href: string; + id: string; + type: string; + uri: string; + }; + primary_color: null; + public: null; + snapshot_id: string; + tracks: { + href: string; + total: number; + }; + type: string; + uri: string; } export interface PlaylistsType { - href: string; - items: PlaylistTrackDetails[]; - limit: number; - next: null; - offset: number; - previous: null; - total: number; + href: string; + items: PlaylistTrackDetails[]; + limit: number; + next: null; + offset: number; + previous: null; + total: number; } export interface FeaturedPlaylistsResponse { - message: string; - playlists: PlaylistsType; + message: string; + playlists: PlaylistsType; } From a6ebe9482616b9470e71c71e037e294d7b0e5d0e Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 00:53:25 +0200 Subject: [PATCH 18/20] fix build --- src/components/SideBar/SideBar.tsx | 6 ++++-- src/pages/Playlists/Playlists.tsx | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index 17d223f..50d9300 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -1,7 +1,9 @@ import { Link } from 'react-router-dom'; import Logo from '../../assets/logo.svg?react'; -import type { PlaylistType } from '../../types/playlist.interface'; -import type { PlaylistsType } from '../../types/playlists.interface'; +import type { + PlaylistTrackDetails, + PlaylistsType, +} from '../../types/playlists.interface'; import styles from './SideBar.module.scss'; const SideBar = ({ playlists }: { playlists: PlaylistsType }) => ( diff --git a/src/pages/Playlists/Playlists.tsx b/src/pages/Playlists/Playlists.tsx index 7b79847..c55e6d5 100644 --- a/src/pages/Playlists/Playlists.tsx +++ b/src/pages/Playlists/Playlists.tsx @@ -1,4 +1,3 @@ -import type { PlaylistType } from '../../types/playlist.interface'; import type { PlaylistsType } from '../../types/playlists.interface'; import PlaylistItem from './PlaylistItem/PlaylistItem'; import styles from './Playlists.module.scss'; From 7d139e0b60a9c8b6f3b80d8643cf408158143cc0 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 22:06:09 +0200 Subject: [PATCH 19/20] bump vitest to 1.6 --- package.json | 4 +- yarn.lock | 385 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 235 insertions(+), 154 deletions(-) diff --git a/package.json b/package.json index 7a6bec0..d21ec51 100644 --- a/package.json +++ b/package.json @@ -48,13 +48,13 @@ "@types/react-redux": "^7.1.26", "@types/react-router-dom": "^5.3.3", "@vitejs/plugin-react": "^4.2.1", - "@vitest/coverage-v8": "^0.34.4", + "@vitest/coverage-v8": "^1.6.0", "jsdom": "^22.1.0", "vite": "^5.2.9", "vite-plugin-checker": "^0.6.4", "vite-plugin-svgr": "^4.2.0", "vite-tsconfig-paths": "^4.3.2", - "vitest": "^0.34.3" + "vitest": "^1.6.0" }, "repository": "https://github.com/bastiendmt/spotify-like-web.git", "author": "Bastien DUMONT ", diff --git a/yarn.lock b/yarn.lock index d5df0a9..4b295ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -156,7 +156,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.24.0", "@babel/parser@^7.24.4", "@babel/parser@^7.24.5": version "7.24.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== @@ -426,7 +426,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -718,18 +718,6 @@ dependencies: "@babel/types" "^7.20.7" -"@types/chai-subset@^1.3.3": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.5.tgz#3fc044451f26985f45625230a7f22284808b0a9a" - integrity sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.3.5": - version "4.3.16" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82" - integrity sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ== - "@types/cookie@^0.6.0": version "0.6.0" resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" @@ -753,18 +741,6 @@ "@types/react" "*" hoist-non-react-statics "^3.3.0" -"@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - -"@types/node@*": - version "20.12.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" - integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== - dependencies: - undici-types "~5.26.4" - "@types/prop-types@*": version "15.7.12" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" @@ -833,77 +809,80 @@ "@types/babel__core" "^7.20.5" react-refresh "^0.14.0" -"@vitest/coverage-v8@^0.34.4": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-0.34.6.tgz#931d9223fa738474e00c08f52b84e0f39cedb6d1" - integrity sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw== +"@vitest/coverage-v8@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz#2f54ccf4c2d9f23a71294aba7f95b3d2e27d14e7" + integrity sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew== dependencies: "@ampproject/remapping" "^2.2.1" "@bcoe/v8-coverage" "^0.2.3" - istanbul-lib-coverage "^3.2.0" + debug "^4.3.4" + istanbul-lib-coverage "^3.2.2" istanbul-lib-report "^3.0.1" - istanbul-lib-source-maps "^4.0.1" - istanbul-reports "^3.1.5" - magic-string "^0.30.1" + istanbul-lib-source-maps "^5.0.4" + istanbul-reports "^3.1.6" + magic-string "^0.30.5" + magicast "^0.3.3" picocolors "^1.0.0" - std-env "^3.3.3" + std-env "^3.5.0" + strip-literal "^2.0.0" test-exclude "^6.0.0" - v8-to-istanbul "^9.1.0" -"@vitest/expect@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.6.tgz#608a7b7a9aa3de0919db99b4cc087340a03ea77e" - integrity sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw== +"@vitest/expect@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.6.0.tgz#0b3ba0914f738508464983f4d811bc122b51fb30" + integrity sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ== dependencies: - "@vitest/spy" "0.34.6" - "@vitest/utils" "0.34.6" + "@vitest/spy" "1.6.0" + "@vitest/utils" "1.6.0" chai "^4.3.10" -"@vitest/runner@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.6.tgz#6f43ca241fc96b2edf230db58bcde5b974b8dcaf" - integrity sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ== +"@vitest/runner@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.6.0.tgz#a6de49a96cb33b0e3ba0d9064a3e8d6ce2f08825" + integrity sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg== dependencies: - "@vitest/utils" "0.34.6" - p-limit "^4.0.0" + "@vitest/utils" "1.6.0" + p-limit "^5.0.0" pathe "^1.1.1" -"@vitest/snapshot@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.6.tgz#b4528cf683b60a3e8071cacbcb97d18b9d5e1d8b" - integrity sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w== +"@vitest/snapshot@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.6.0.tgz#deb7e4498a5299c1198136f56e6e0f692e6af470" + integrity sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ== dependencies: - magic-string "^0.30.1" + magic-string "^0.30.5" pathe "^1.1.1" - pretty-format "^29.5.0" + pretty-format "^29.7.0" -"@vitest/spy@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.6.tgz#b5e8642a84aad12896c915bce9b3cc8cdaf821df" - integrity sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ== +"@vitest/spy@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.6.0.tgz#362cbd42ccdb03f1613798fde99799649516906d" + integrity sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw== dependencies: - tinyspy "^2.1.1" + tinyspy "^2.2.0" -"@vitest/utils@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.6.tgz#38a0a7eedddb8e7291af09a2409cb8a189516968" - integrity sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A== +"@vitest/utils@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.6.0.tgz#5c5675ca7d6f546a7b4337de9ae882e6c57896a1" + integrity sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw== dependencies: - diff-sequences "^29.4.3" - loupe "^2.3.6" - pretty-format "^29.5.0" + diff-sequences "^29.6.3" + estree-walker "^3.0.3" + loupe "^2.3.7" + pretty-format "^29.7.0" abab@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -acorn-walk@^8.2.0: +acorn-walk@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.10.0, acorn@^8.11.3, acorn@^8.9.0: +acorn@^8.11.3: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -1184,6 +1163,15 @@ cosmiconfig@^8.1.3: parse-json "^5.2.0" path-type "^4.0.0" +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + cssstyle@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" @@ -1271,7 +1259,7 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -diff-sequences@^29.4.3: +diff-sequences@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== @@ -1384,6 +1372,28 @@ estree-walker@^2.0.2: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + fast-average-color@^9.4.0: version "9.4.0" resolved "https://registry.yarnpkg.com/fast-average-color/-/fast-average-color-9.4.0.tgz#eea0182fa8818ea0c70dcc7a85b945f3c716b11b" @@ -1485,6 +1495,11 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1608,6 +1623,11 @@ https-proxy-agent@^5.0.1: agent-base "6" debug "4" +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -1764,6 +1784,11 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.7" +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -1796,7 +1821,12 @@ isarray@^2.0.5: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== @@ -1810,16 +1840,16 @@ istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: make-dir "^4.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== +istanbul-lib-source-maps@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.4.tgz#1947003c72a91b6310efeb92d2a91be8804d92c2" + integrity sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw== dependencies: + "@jridgewell/trace-mapping" "^0.3.23" debug "^4.1.1" istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" -istanbul-reports@^3.1.5: +istanbul-reports@^3.1.6: version "3.1.7" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== @@ -1832,6 +1862,11 @@ istanbul-reports@^3.1.5: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-tokens@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.0.tgz#0f893996d6f3ed46df7f0a3b12a03f5fd84223c1" + integrity sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ== + js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -1897,10 +1932,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -local-pkg@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" - integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== +local-pkg@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" + integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== + dependencies: + mlly "^1.4.2" + pkg-types "^1.0.3" loose-envify@^1.1.0: version "1.4.0" @@ -1909,7 +1947,7 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.6: +loupe@^2.3.6, loupe@^2.3.7: version "2.3.7" resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== @@ -1935,13 +1973,22 @@ lz-string@^1.5.0: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== -magic-string@^0.30.1: +magic-string@^0.30.5: version "0.30.10" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e" integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ== dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +magicast@^0.3.3: + version "0.3.4" + resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.4.tgz#bbda1791d03190a24b00ff3dd18151e7fd381d19" + integrity sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q== + dependencies: + "@babel/parser" "^7.24.4" + "@babel/types" "^7.24.0" + source-map-js "^1.2.0" + make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -1949,6 +1996,11 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -1974,6 +2026,11 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1981,7 +2038,7 @@ minimatch@^3.0.4, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -mlly@^1.4.0, mlly@^1.7.0: +mlly@^1.4.2, mlly@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.0.tgz#587383ae40dda23cadb11c3c3cc972b277724271" integrity sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ== @@ -2026,6 +2083,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== + dependencies: + path-key "^4.0.0" + nwsapi@^2.2.4: version "2.2.10" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.10.tgz#0b77a68e21a0b483db70b11fad055906e867cda8" @@ -2066,10 +2130,17 @@ once@^1.3.0: dependencies: wrappy "1" -p-limit@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" - integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + +p-limit@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" + integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== dependencies: yocto-queue "^1.0.0" @@ -2102,11 +2173,16 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.0.0: +path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -2132,7 +2208,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-types@^1.1.0: +pkg-types@^1.0.3, pkg-types@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.1.tgz#07b626880749beb607b0c817af63aac1845a73f2" integrity sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ== @@ -2164,7 +2240,7 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^29.5.0: +pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== @@ -2418,6 +2494,18 @@ set-function-name@^2.0.1: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -2433,6 +2521,11 @@ siginfo@^2.0.0: resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -2446,17 +2539,12 @@ snake-case@^3.0.4: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== -source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - stackback@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== -std-env@^3.3.3: +std-env@^3.5.0: version "3.7.0" resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== @@ -2475,12 +2563,17 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.1" -strip-literal@^1.0.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07" - integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + +strip-literal@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.0.tgz#6d82ade5e2e74f5c7e8739b6c84692bd65f0bd2a" + integrity sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw== dependencies: - acorn "^8.10.0" + js-tokens "^9.0.0" supports-color@^5.3.0: version "5.5.0" @@ -2520,17 +2613,17 @@ tiny-invariant@^1.1.0: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== -tinybench@^2.5.0: +tinybench@^2.5.1: version "2.8.0" resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.8.0.tgz#30e19ae3a27508ee18273ffed9ac7018949acd7b" integrity sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw== -tinypool@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" - integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== +tinypool@^0.8.3: + version "0.8.4" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.4.tgz#e217fe1270d941b39e98c625dcecebb1408c9aa8" + integrity sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ== -tinyspy@^2.1.1: +tinyspy@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== @@ -2594,11 +2687,6 @@ ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - universal-cookie@^6.1.1: version "6.1.3" resolved "https://registry.yarnpkg.com/universal-cookie/-/universal-cookie-6.1.3.tgz#891386460f4407f8443d416d07f7334440c5516c" @@ -2638,26 +2726,16 @@ use-sync-external-store@^1.0.0: resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== -v8-to-istanbul@^9.1.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - -vite-node@0.34.6: - version "0.34.6" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.6.tgz#34d19795de1498562bf21541a58edcd106328a17" - integrity sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA== +vite-node@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.6.0.tgz#2c7e61129bfecc759478fa592754fd9704aaba7f" + integrity sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw== dependencies: cac "^6.7.14" debug "^4.3.4" - mlly "^1.4.0" pathe "^1.1.1" picocolors "^1.0.0" - vite "^3.0.0 || ^4.0.0 || ^5.0.0-0" + vite "^5.0.0" vite-plugin-checker@^0.6.4: version "0.6.4" @@ -2698,7 +2776,7 @@ vite-tsconfig-paths@^4.3.2: globrex "^0.1.2" tsconfck "^3.0.3" -"vite@^3.0.0 || ^4.0.0 || ^5.0.0-0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0", vite@^5.2.9: +vite@^5.0.0, vite@^5.2.9: version "5.2.11" resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.11.tgz#726ec05555431735853417c3c0bfb36003ca0cbd" integrity sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ== @@ -2709,34 +2787,30 @@ vite-tsconfig-paths@^4.3.2: optionalDependencies: fsevents "~2.3.3" -vitest@^0.34.3: - version "0.34.6" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.6.tgz#44880feeeef493c04b7f795ed268f24a543250d7" - integrity sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q== - dependencies: - "@types/chai" "^4.3.5" - "@types/chai-subset" "^1.3.3" - "@types/node" "*" - "@vitest/expect" "0.34.6" - "@vitest/runner" "0.34.6" - "@vitest/snapshot" "0.34.6" - "@vitest/spy" "0.34.6" - "@vitest/utils" "0.34.6" - acorn "^8.9.0" - acorn-walk "^8.2.0" - cac "^6.7.14" +vitest@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.6.0.tgz#9d5ad4752a3c451be919e412c597126cffb9892f" + integrity sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA== + dependencies: + "@vitest/expect" "1.6.0" + "@vitest/runner" "1.6.0" + "@vitest/snapshot" "1.6.0" + "@vitest/spy" "1.6.0" + "@vitest/utils" "1.6.0" + acorn-walk "^8.3.2" chai "^4.3.10" debug "^4.3.4" - local-pkg "^0.4.3" - magic-string "^0.30.1" + execa "^8.0.1" + local-pkg "^0.5.0" + magic-string "^0.30.5" pathe "^1.1.1" picocolors "^1.0.0" - std-env "^3.3.3" - strip-literal "^1.0.1" - tinybench "^2.5.0" - tinypool "^0.7.0" - vite "^3.1.0 || ^4.0.0 || ^5.0.0-0" - vite-node "0.34.6" + std-env "^3.5.0" + strip-literal "^2.0.0" + tinybench "^2.5.1" + tinypool "^0.8.3" + vite "^5.0.0" + vite-node "1.6.0" why-is-node-running "^2.2.2" vscode-jsonrpc@6.0.0: @@ -2847,6 +2921,13 @@ which-typed-array@^1.1.13: gopd "^1.0.1" has-tostringtag "^1.0.2" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + why-is-node-running@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" From ff33ed495dc15e3ffb5971a4347e1ddc6e549184 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Thu, 16 May 2024 22:30:04 +0200 Subject: [PATCH 20/20] add tests for player --- src/components/Player/Player.spec.tsx | 34 +++++++++++++++++++++++++++ src/components/Player/Player.tsx | 22 +++++++++++------ 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 src/components/Player/Player.spec.tsx diff --git a/src/components/Player/Player.spec.tsx b/src/components/Player/Player.spec.tsx new file mode 100644 index 0000000..682deba --- /dev/null +++ b/src/components/Player/Player.spec.tsx @@ -0,0 +1,34 @@ +import { render, screen } from '@testing-library/react'; +import { Provider } from 'react-redux'; +import { describe, expect, test } from 'vitest'; +import { mockTrack } from '../../../tests/mockData'; +import { createMockStore } from '../../store/store'; +import Player from './Player'; + +const playerStore = createMockStore({ + currentSong: { song: null, playing: false }, +}); + +const playerStoreWithSong = createMockStore({ + currentSong: { song: mockTrack, playing: true }, +}); + +describe('Player', () => { + test('should render nothing', async () => { + render( + + + , + ); + expect(screen.queryByTestId('audioEml')).toBeFalsy(); + }); + + test('should render audio element', async () => { + render( + + + , + ); + expect(screen.getByTestId('audioEml')).toBeTruthy(); + }); +}); diff --git a/src/components/Player/Player.tsx b/src/components/Player/Player.tsx index d3d640e..bc000c0 100644 --- a/src/components/Player/Player.tsx +++ b/src/components/Player/Player.tsx @@ -32,18 +32,22 @@ const Player = () => { // If the songs changes, plays it // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { - audioEml.current?.play().catch(() => { - console.log('Unable to play'); - }); + try { + audioEml.current?.play(); + } catch (error) { + console.error('Unable to play', error); + } resetTime(); }, [song]); // Handles play / pause useEffect(() => { if (playing) { - audioEml.current?.play().catch(() => { - console.log('Unable to play'); - }); + try { + audioEml.current?.play(); + } catch (error) { + console.error('Unable to play', error); + } toggleStopwatch(true); } else { audioEml.current?.pause(); @@ -86,7 +90,11 @@ const Player = () => {
-