diff --git a/package-lock.json b/package-lock.json index 1eaba42..de1b36e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tmdb-ts", - "version": "1.0.0", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tmdb-ts", - "version": "1.0.0", + "version": "1.4.0", "license": "MIT", "dependencies": { "cross-fetch": "^3.1.4" diff --git a/package.json b/package.json index 4f3031a..db2aa60 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,11 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "compile": "rm -rf dist && tsc -d && npm run copy-types", + "compile": "rm -rf dist && tsc -d", "lint": "eslint --ext .ts src/", "lint:fix": "eslint --ext .ts src/ --fix", "format": "npx prettier --write src", - "pre-commit": "npm run lint", - "copy-types": "mkdir dist/types && cp src/types/*.d.ts dist/types" + "pre-commit": "npm run lint" }, "bugs": { "url": "https://github.com/blakejoy/tmdb-ts/issues", diff --git a/src/endpoints/companies.ts b/src/endpoints/companies.ts index ee257e5..88b0d5f 100644 --- a/src/endpoints/companies.ts +++ b/src/endpoints/companies.ts @@ -1,4 +1,8 @@ -import { CompanyDetails, AlternativeNames, CompanyImages } from './../types/companies'; +import { + CompanyDetails, + AlternativeNames, + CompanyImages, +} from './../types/companies'; import { BaseEndpoint } from './base'; export class CompaniesEndpoint extends BaseEndpoint { @@ -11,7 +15,9 @@ export class CompaniesEndpoint extends BaseEndpoint { } async alternativeNames(id: number): Promise { - return await this.api.get(`/company/${id}/alternative_names`); + return await this.api.get( + `/company/${id}/alternative_names` + ); } async images(id: number): Promise { diff --git a/src/endpoints/index.ts b/src/endpoints/index.ts index 5e950d5..06728d8 100644 --- a/src/endpoints/index.ts +++ b/src/endpoints/index.ts @@ -16,4 +16,3 @@ export * from './keywords'; export * from './collections'; export * from './tv-seasons'; export * from './tv-episode'; - diff --git a/src/endpoints/movies.ts b/src/endpoints/movies.ts index e81064e..087953a 100644 --- a/src/endpoints/movies.ts +++ b/src/endpoints/movies.ts @@ -58,8 +58,14 @@ export class MoviesEndpoint extends BaseEndpoint { ); } - async changes(id: number, options?: ChangeOption): Promise> { - return await this.api.get>(`${BASE_MOVIE}/${id}/changes`, options); + async changes( + id: number, + options?: ChangeOption + ): Promise> { + return await this.api.get>( + `${BASE_MOVIE}/${id}/changes`, + options + ); } async credits(id: number): Promise { diff --git a/src/endpoints/tv-shows.ts b/src/endpoints/tv-shows.ts index 4073dc8..f97cd77 100644 --- a/src/endpoints/tv-shows.ts +++ b/src/endpoints/tv-shows.ts @@ -59,8 +59,14 @@ export class TvShowsEndpoint extends BaseEndpoint { ); } - async changes(id: number, options?: ChangeOption): Promise> { - return await this.api.get>(`${BASE_TV}/${id}/changes`, options); + async changes( + id: number, + options?: ChangeOption + ): Promise> { + return await this.api.get>( + `${BASE_TV}/${id}/changes`, + options + ); } async contentRatings(id: number): Promise { diff --git a/src/tmdb.ts b/src/tmdb.ts index 5d61502..528b3d7 100644 --- a/src/tmdb.ts +++ b/src/tmdb.ts @@ -94,7 +94,7 @@ export class TMDB { return new CollectionsEndpoint(this.accessToken); } - get tvSeasons() : TvSeasonsEndpoint { + get tvSeasons(): TvSeasonsEndpoint { return new TvSeasonsEndpoint(this.accessToken); } } diff --git a/src/types/companies.ts b/src/types/companies.ts index 3ec621a..261cc8a 100644 --- a/src/types/companies.ts +++ b/src/types/companies.ts @@ -28,6 +28,6 @@ export interface Name { } export interface CompanyImages { - id: number; - logos: Image[]; + id: number; + logos: Image[]; } diff --git a/src/types/options.ts b/src/types/options.ts index 0432f59..12b78a7 100644 --- a/src/types/options.ts +++ b/src/types/options.ts @@ -164,9 +164,9 @@ export type AppendToResponse< ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue - : Media extends 'tvSeason' - ? TvSeasonChangeValue : - TvEpisodeChangeValue + : Media extends 'tvSeason' + ? TvSeasonChangeValue + : TvEpisodeChangeValue >; } : object) & diff --git a/src/types/tv-episode.ts b/src/types/tv-episode.ts index 8212d2e..de2f833 100644 --- a/src/types/tv-episode.ts +++ b/src/types/tv-episode.ts @@ -55,4 +55,4 @@ export interface TvEpisodeTranslations { }; } -export type TvEpisodeChangeValue = string | unknown; \ No newline at end of file +export type TvEpisodeChangeValue = string | unknown;