Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
And adapt to recent vue-tsc typing changes
  • Loading branch information
usox committed Jan 22, 2022
1 parent 564ea40 commit 6bcd10c
Show file tree
Hide file tree
Showing 11 changed files with 245 additions and 174 deletions.
364 changes: 209 additions & 155 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"amplitudejs": "^5.3.2",
"ansi-regex": "^5.0.1",
"axios": "^0.24.0",
"class-transformer": "^0.4.0",
"class-transformer": "^0.5.0",
"mitt": "^3.0.0",
"quicktype": "^15.0.260",
"reflect-metadata": "^0.1.13",
Expand All @@ -29,6 +29,6 @@
"@vue/compiler-sfc": "^3.2.28",
"typescript": "^4.5.5",
"vite": "^2.7.13",
"vue-tsc": "^0.2.3"
"vue-tsc": "^0.31"
}
}
7 changes: 4 additions & 3 deletions src/components/Album/AlbumFavoriteView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { defineComponent } from 'vue'
import { plainToClass } from 'class-transformer'
import AlbumCover from './Lib/AlbumCover.vue'
import AlbumListItem from './Lib/AlbumListItem.vue'
import Album from '../../model/Album'
import HttpRequest from '../Lib/HttpRequest'
import AlbumInterface from '../../model/AlbumInterface'
export default defineComponent({
name: 'AlbumList',
name: 'AlbumFavoriteView',
data() {
return {
albumList: [] as PropType<Array<Album>>
albumList: [] as Array<AlbumInterface>
}
},
components: {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Album/AlbumListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { defineComponent } from 'vue'
import { plainToClass } from 'class-transformer'
import Album from '../../model/Album'
import AlbumListItem from './Lib/AlbumListItem.vue'
import HttpRequest from '../Lib/HttpRequest'
import formatDurationLength from '../Lib/FormatDurationLength'
import AlbumInterface from '../../model/AlbumInterface'
export default defineComponent({
name: 'AlbumList',
data() {
return {
albumList: [] as PropType<Array<Album>>,
albumList: [] as Array<AlbumInterface>,
quantity: 0,
}
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/Album/Lib/AlbumCover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<script lang="ts">
import { defineComponent } from 'vue'
import Player from '../../Lib/Player';
import Album from '../../../model/Album';
import AlbumInterface from '../../../model/AlbumInterface';
export default defineComponent({
name: 'AlbumCover',
props: {
album: {
type: Album,
type: Object as () => AlbumInterface,
required: true
},
size: {
Expand All @@ -25,7 +25,7 @@ export default defineComponent({
}
},
methods: {
async play(album: Album): Promise<void> {
async play(album: AlbumInterface): Promise<void> {
Player.playAlbum(album.getId(), this);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Album/Lib/AlbumListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<script lang="ts">
import { defineComponent } from 'vue'
import AlbumCover from './AlbumCover.vue';
import Album from '../../../model/Album';
import AlbumInterface from '../../../model/AlbumInterface';
export default defineComponent({
name: 'AlbumListItem',
props: {
album: {
type: Album,
type: Object as () => AlbumInterface,
required: true
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Artist/ArtistListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineComponent({
name: 'ArtistList',
data() {
return {
artistList: [] as PropType<Array<Artist>>
artistList: []
}
},
async created(): Promise<void> {
Expand Down
7 changes: 4 additions & 3 deletions src/components/Home/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
</div>
</template>
<script lang="ts">
import { defineComponent } from '@vue/runtime-core';
import { AxiosResponse } from 'axios';
import HttpRequest from '../Lib/HttpRequest';
export default {
data() {
export default defineComponent({
setup() {
return {
username: '',
password: '',
Expand Down Expand Up @@ -64,7 +65,7 @@ export default {
});
}
}
};
});
</script>
<style scoped>
div.errorMessage {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Random/RandomSongsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<script lang="ts">
import { AxiosResponse } from 'axios';
import { plainToClass } from 'class-transformer';
import { defineComponent, PropType } from 'vue'
import { defineComponent } from 'vue'
import { useRoute } from 'vue-router';
import SongListItem from '../../model/SongListItem';
import SongListItemInterface from '../../model/SongListItemInterface';
Expand All @@ -56,7 +56,7 @@ import SongCover from '../Lib/SongCover.vue'
export default defineComponent({
data() {
return {
songList: [] as PropType<Array<SongListItemInterface>>,
songList: [] as Array<SongListItemInterface>,
limit: 100,
length: 0
};
Expand Down
4 changes: 3 additions & 1 deletion src/model/Album.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default class Album {
import AlbumInterface from "./AlbumInterface";

export default class Album implements AlbumInterface {
private id: number = 0;
private name: string = '';
private artistId: number = 0;
Expand Down
12 changes: 12 additions & 0 deletions src/model/AlbumInterface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default interface AlbumInterface {

getId(): number;

getName(): string;

getArtistId(): number;

getCover(): string;

getArtistName(): string;
}

0 comments on commit 6bcd10c

Please sign in to comment.