Compare commits
11 Commits
feat/2.0
...
chore/bump
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71817751a7 | ||
|
|
9f05886a5b | ||
|
|
7a1453d8d4 | ||
|
|
da5abe276a | ||
|
|
9e1e65205c | ||
|
|
6157405fe1 | ||
|
|
eaa5f9a751 | ||
|
|
2abf448bb2 | ||
|
|
4140bd7a7f | ||
|
|
f513103785 | ||
|
|
ea19c5b9e1 |
1
.github/workflows/npm-publish.yml
vendored
1
.github/workflows/npm-publish.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
with:
|
||||
node-version: '20.x'
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
publish-npm:
|
||||
needs: build
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
dist
|
||||
/.npmignore
|
||||
.idea
|
||||
.DS_Store
|
||||
@@ -1,6 +1,6 @@
|
||||
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
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
34
package-lock.json
generated
34
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "tmdb-ts",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tmdb-ts",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cross-fetch": "^4.0.0"
|
||||
@@ -14,7 +14,7 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.4.0",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/node": "^20.14.2",
|
||||
"@types/node": "^20.16.10",
|
||||
"@types/node-fetch": "^3.0.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
@@ -276,12 +276,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz",
|
||||
"integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==",
|
||||
"version": "20.16.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz",
|
||||
"integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
@@ -2007,9 +2007,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/uri-js": {
|
||||
@@ -2295,12 +2295,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "20.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz",
|
||||
"integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==",
|
||||
"version": "20.16.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz",
|
||||
"integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undici-types": "~5.26.4"
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
@@ -3489,9 +3489,9 @@
|
||||
}
|
||||
},
|
||||
"undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"dev": true
|
||||
},
|
||||
"uri-js": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tmdb-ts",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"description": "TMDB v3 library wrapper",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -31,7 +31,7 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.4.0",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/node": "^20.14.2",
|
||||
"@types/node": "^20.16.10",
|
||||
"@types/node-fetch": "^3.0.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface MovieDetails {
|
||||
genres: Genre[];
|
||||
homepage: string;
|
||||
id: number;
|
||||
imdb_id: string;
|
||||
imdb_id: string | null;
|
||||
original_language: string;
|
||||
original_title: string;
|
||||
overview: string;
|
||||
@@ -104,7 +104,7 @@ export interface LatestMovie {
|
||||
genres: Genre[];
|
||||
homepage: string;
|
||||
id: number;
|
||||
imdb_id: string;
|
||||
imdb_id: string | null;
|
||||
original_language: string;
|
||||
original_title: string;
|
||||
overview: string;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
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()
|
||||
: '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user