15 Commits

Author SHA1 Message Date
e32ed16a48 build(config): update TypeScript module resolution and type roots
Changed moduleResolution from 'node' to 'bundler' for modern bundler compatibility and expanded typeRoots to include Node.js types from node_modules/@types, improving type discovery and ensuring proper TypeScript compilation in the current environment.
2025-09-30 17:39:26 +07:00
670ab42b16 chore: remove unnecessary configuration and documentation files 2025-09-30 16:56:41 +07:00
32e282a2e1 docs: add comprehensive documentation file with detailed API reference and usage examples 2025-09-30 16:49:02 +07:00
Blake
fdf00f6655 Merge pull request #62 from blakejoy/chore/bump-2.0.2
bump minor version
2025-08-13 21:20:11 -04:00
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
15 changed files with 1344 additions and 3694 deletions

View File

@@ -1,38 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,34 +0,0 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run compile
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

1
.gitignore vendored
View File

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

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint

1
.nvmrc
View File

@@ -1 +0,0 @@
v20.14.0

View File

@@ -1,3 +0,0 @@
dist
node_modules
.github

View File

@@ -1,12 +0,0 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"proseWrap": "never",
"htmlWhitespaceSensitivity": "strict"
}

1328
DOCUMENTATION.md Normal file

File diff suppressed because it is too large Load Diff

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

3565
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,8 @@
{ {
"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": "src/index.js",
"types": "dist/index.d.ts",
"scripts": { "scripts": {
"compile": "rm -rf dist && tsc -d", "compile": "rm -rf dist && tsc -d",
"lint": "eslint src/", "lint": "eslint src/",
@@ -29,19 +28,14 @@
"author": "Blake Joynes", "author": "Blake Joynes",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.4.0", "@types/node": "^20.16.10",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.2",
"@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",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"globals": "^15.4.0", "globals": "^15.4.0",
"husky": "^9.0.11",
"prettier": "^3.3.1",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.4.5", "typescript": "^5.4.5"
"typescript-eslint": "^7.12.0"
}, },
"dependencies": { "dependencies": {
"cross-fetch": "^4.0.0" "cross-fetch": "^4.0.0"
@@ -54,4 +48,4 @@
"files": [ "files": [
"dist" "dist"
] ]
} }

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()
: '';
} }

View File

@@ -2,7 +2,7 @@
"compilerOptions": { "compilerOptions": {
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "CommonJS" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "module": "CommonJS" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"moduleResolution": "node", "moduleResolution": "bundler",
"sourceMap": true /* Generates corresponding '.map' file. */, "sourceMap": true /* Generates corresponding '.map' file. */,
"outDir": "dist" /* Redirect output structure to the directory. */, "outDir": "dist" /* Redirect output structure to the directory. */,
"strict": true /* Enable all strict type-checking options. */, "strict": true /* Enable all strict type-checking options. */,
@@ -10,7 +10,7 @@
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"skipLibCheck": true /* Skip type checking of declaration files. */, "skipLibCheck": true /* Skip type checking of declaration files. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
"typeRoots": ["./src/types"] "typeRoots": ["./src/types", "./node_modules/@types"]
}, },
"types": ["node"], "types": ["node"],
"include": ["src"], "include": ["src"],