11 Commits

Author SHA1 Message Date
Blake Joynes
71817751a7 bump minor version 2025-08-13 21:19:46 -04:00
Blake
9f05886a5b Merge pull request #61 from shayypy/main
fix: movie imdb_id is nullable
2025-08-13 21:17:06 -04:00
shay
7a1453d8d4 fix: imdb_id is nullable 2025-06-17 10:24:36 -05:00
Blake
da5abe276a Merge pull request #60 from blakejoy/feat/2.0.1
feat: 2.0.1
2024-10-04 01:59:02 -04:00
Blake Joynes
9e1e65205c fix linting 2024-10-04 01:58:25 -04:00
Blake
6157405fe1 Merge pull request #59 from fadhilx/main
Fix images array is empty because languages equal to undefined on URLSearchParams
2024-10-04 01:54:06 -04:00
Fadhil Ahmad
eaa5f9a751 fix: images is empty because languages undefined on querystring 2024-10-02 12:36:51 +08:00
Blake
2abf448bb2 Merge pull request #57 from blakejoy/test-build
test license changes
2024-06-09 17:03:49 -04:00
Blake Joynes
4140bd7a7f test license changes 2024-06-09 17:03:27 -04:00
Blake
f513103785 Update npm-publish.yml 2024-06-09 16:59:29 -04:00
Blake
ea19c5b9e1 Merge pull request #56 from blakejoy/feat/2.0
Feat/2.0
2024-06-09 16:57:48 -04:00
7 changed files with 28 additions and 24 deletions

View File

@@ -16,7 +16,6 @@ jobs:
with: with:
node-version: '20.x' node-version: '20.x'
- run: npm ci - run: npm ci
- run: npm test
publish-npm: publish-npm:
needs: build needs: build

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@
dist dist
/.npmignore /.npmignore
.idea .idea
.DS_Store

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2021 Blake Joynes Copyright (c) 2024 Blake Joynes
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

34
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "tmdb-ts", "name": "tmdb-ts",
"version": "2.0.0", "version": "2.0.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tmdb-ts", "name": "tmdb-ts",
"version": "2.0.0", "version": "2.0.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"cross-fetch": "^4.0.0" "cross-fetch": "^4.0.0"
@@ -14,7 +14,7 @@
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.4.0", "@eslint/js": "^9.4.0",
"@types/eslint__js": "^8.42.3", "@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.2", "@types/node": "^20.16.10",
"@types/node-fetch": "^3.0.3", "@types/node-fetch": "^3.0.3",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
@@ -276,12 +276,12 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.14.2", "version": "20.16.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz",
"integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@@ -2007,9 +2007,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true
}, },
"node_modules/uri-js": { "node_modules/uri-js": {
@@ -2295,12 +2295,12 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "20.14.2", "version": "20.16.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz",
"integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==",
"dev": true, "dev": true,
"requires": { "requires": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"@types/node-fetch": { "@types/node-fetch": {
@@ -3489,9 +3489,9 @@
} }
}, },
"undici-types": { "undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true
}, },
"uri-js": { "uri-js": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "tmdb-ts", "name": "tmdb-ts",
"version": "2.0.0", "version": "2.0.2",
"description": "TMDB v3 library wrapper", "description": "TMDB v3 library wrapper",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.4.0", "@eslint/js": "^9.4.0",
"@types/eslint__js": "^8.42.3", "@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.2", "@types/node": "^20.16.10",
"@types/node-fetch": "^3.0.3", "@types/node-fetch": "^3.0.3",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",

View File

@@ -22,7 +22,7 @@ export interface MovieDetails {
genres: Genre[]; genres: Genre[];
homepage: string; homepage: string;
id: number; id: number;
imdb_id: string; imdb_id: string | null;
original_language: string; original_language: string;
original_title: string; original_title: string;
overview: string; overview: string;
@@ -104,7 +104,7 @@ export interface LatestMovie {
genres: Genre[]; genres: Genre[];
homepage: string; homepage: string;
id: number; id: number;
imdb_id: string; imdb_id: string | null;
original_language: string; original_language: string;
original_title: string; original_title: string;
overview: string; overview: string;

View File

@@ -1,4 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
export function parseOptions(options?: Record<string, any>): string { export function parseOptions(options?: Record<string, any>): string {
return options ? new URLSearchParams(Object.entries(options)).toString() : ''; return options
? new URLSearchParams(
Object.entries(options).filter(([, v]) => v) // remove undefined
).toString()
: '';
} }