comic-vine-sdk 1.2.8 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.gitattributes +0 -4
  2. package/.husky/pre-commit +0 -3
  3. package/.prettierignore +0 -1
  4. package/.projen/tasks.json +261 -0
  5. package/CHANGELOG.md +14 -0
  6. package/CONTRIBUTING.md +294 -0
  7. package/LICENSE +1 -1
  8. package/README.md +434 -12
  9. package/eslint.config.js +168 -0
  10. package/lib/cjs/errors/base-error.js +1 -1
  11. package/lib/cjs/errors/custom-error.js +1 -1
  12. package/lib/cjs/http-client/http-client.js +4 -2
  13. package/lib/cjs/http-client/url-builder.js +1 -1
  14. package/lib/cjs/options/index.d.ts +1 -3
  15. package/lib/cjs/options/index.js +1 -1
  16. package/lib/cjs/resources/base-resource.js +9 -8
  17. package/lib/cjs/resources/character/character.d.ts +1 -1
  18. package/lib/cjs/resources/character/character.js +1 -1
  19. package/lib/cjs/resources/concept/concept.d.ts +1 -1
  20. package/lib/cjs/resources/concept/concept.js +1 -1
  21. package/lib/cjs/resources/episode/episode.d.ts +1 -1
  22. package/lib/cjs/resources/episode/episode.js +1 -1
  23. package/lib/cjs/resources/issue/issue.d.ts +1 -1
  24. package/lib/cjs/resources/issue/issue.js +1 -1
  25. package/lib/cjs/resources/location/location.d.ts +1 -1
  26. package/lib/cjs/resources/location/location.js +1 -1
  27. package/lib/cjs/resources/movie/movie.d.ts +1 -1
  28. package/lib/cjs/resources/movie/movie.js +1 -1
  29. package/lib/cjs/resources/origin/origin.d.ts +1 -1
  30. package/lib/cjs/resources/origin/origin.js +1 -1
  31. package/lib/cjs/resources/person/person.d.ts +1 -1
  32. package/lib/cjs/resources/person/person.js +1 -1
  33. package/lib/cjs/resources/power/power.d.ts +1 -1
  34. package/lib/cjs/resources/power/power.js +1 -1
  35. package/lib/cjs/resources/promo/promo.d.ts +1 -1
  36. package/lib/cjs/resources/promo/promo.js +1 -1
  37. package/lib/cjs/resources/publisher/publisher.d.ts +1 -1
  38. package/lib/cjs/resources/publisher/publisher.js +1 -1
  39. package/lib/cjs/resources/resource-factory.js +20 -9
  40. package/lib/cjs/resources/resource-map.js +1 -1
  41. package/lib/cjs/resources/resource-type.js +2 -1
  42. package/lib/cjs/resources/series/series.d.ts +1 -1
  43. package/lib/cjs/resources/series/series.js +1 -1
  44. package/lib/cjs/resources/story-arc/story-arc.d.ts +1 -1
  45. package/lib/cjs/resources/story-arc/story-arc.js +1 -1
  46. package/lib/cjs/resources/team/team.d.ts +1 -1
  47. package/lib/cjs/resources/team/team.js +1 -1
  48. package/lib/cjs/resources/thing/thing.d.ts +1 -1
  49. package/lib/cjs/resources/thing/thing.js +1 -1
  50. package/lib/cjs/resources/video/video.d.ts +1 -1
  51. package/lib/cjs/resources/video/video.js +1 -1
  52. package/lib/cjs/resources/video-category/video-category.d.ts +1 -1
  53. package/lib/cjs/resources/video-category/video-category.js +1 -1
  54. package/lib/cjs/resources/video-type/video-type.d.ts +1 -1
  55. package/lib/cjs/resources/video-type/video-type.js +1 -1
  56. package/lib/cjs/resources/volume/volume.d.ts +1 -1
  57. package/lib/cjs/resources/volume/volume.js +1 -1
  58. package/lib/cjs/utils/case-converter.d.ts +2 -2
  59. package/lib/cjs/utils/case-converter.js +1 -1
  60. package/lib/cjs/utils/is-object.d.ts +1 -1
  61. package/lib/cjs/utils/is-object.js +1 -1
  62. package/lib/esm/errors/base-error.js +1 -1
  63. package/lib/esm/errors/custom-error.js +1 -1
  64. package/lib/esm/http-client/http-client.js +4 -2
  65. package/lib/esm/http-client/url-builder.js +1 -1
  66. package/lib/esm/options/index.d.ts +1 -3
  67. package/lib/esm/options/index.js +1 -1
  68. package/lib/esm/resources/base-resource.js +3 -3
  69. package/lib/esm/resources/character/character.d.ts +1 -1
  70. package/lib/esm/resources/character/character.js +1 -1
  71. package/lib/esm/resources/concept/concept.d.ts +1 -1
  72. package/lib/esm/resources/concept/concept.js +1 -1
  73. package/lib/esm/resources/episode/episode.d.ts +1 -1
  74. package/lib/esm/resources/episode/episode.js +1 -1
  75. package/lib/esm/resources/issue/issue.d.ts +1 -1
  76. package/lib/esm/resources/issue/issue.js +1 -1
  77. package/lib/esm/resources/location/location.d.ts +1 -1
  78. package/lib/esm/resources/location/location.js +1 -1
  79. package/lib/esm/resources/movie/movie.d.ts +1 -1
  80. package/lib/esm/resources/movie/movie.js +1 -1
  81. package/lib/esm/resources/origin/origin.d.ts +1 -1
  82. package/lib/esm/resources/origin/origin.js +1 -1
  83. package/lib/esm/resources/person/person.d.ts +1 -1
  84. package/lib/esm/resources/person/person.js +1 -1
  85. package/lib/esm/resources/power/power.d.ts +1 -1
  86. package/lib/esm/resources/power/power.js +1 -1
  87. package/lib/esm/resources/promo/promo.d.ts +1 -1
  88. package/lib/esm/resources/promo/promo.js +1 -1
  89. package/lib/esm/resources/publisher/publisher.d.ts +1 -1
  90. package/lib/esm/resources/publisher/publisher.js +1 -1
  91. package/lib/esm/resources/resource-factory.js +3 -2
  92. package/lib/esm/resources/resource-map.js +1 -1
  93. package/lib/esm/resources/resource-type.js +2 -1
  94. package/lib/esm/resources/series/series.d.ts +1 -1
  95. package/lib/esm/resources/series/series.js +1 -1
  96. package/lib/esm/resources/story-arc/story-arc.d.ts +1 -1
  97. package/lib/esm/resources/story-arc/story-arc.js +1 -1
  98. package/lib/esm/resources/team/team.d.ts +1 -1
  99. package/lib/esm/resources/team/team.js +1 -1
  100. package/lib/esm/resources/thing/thing.d.ts +1 -1
  101. package/lib/esm/resources/thing/thing.js +1 -1
  102. package/lib/esm/resources/video/video.d.ts +1 -1
  103. package/lib/esm/resources/video/video.js +1 -1
  104. package/lib/esm/resources/video-category/video-category.d.ts +1 -1
  105. package/lib/esm/resources/video-category/video-category.js +1 -1
  106. package/lib/esm/resources/video-type/video-type.d.ts +1 -1
  107. package/lib/esm/resources/video-type/video-type.js +1 -1
  108. package/lib/esm/resources/volume/volume.d.ts +1 -1
  109. package/lib/esm/resources/volume/volume.js +1 -1
  110. package/lib/esm/utils/case-converter.d.ts +2 -2
  111. package/lib/esm/utils/case-converter.js +1 -1
  112. package/lib/esm/utils/is-object.d.ts +1 -1
  113. package/lib/esm/utils/is-object.js +1 -1
  114. package/package.json +39 -45
  115. package/scripts/create-package-json.ts +0 -1
  116. package/.projenrc.ts +0 -38
  117. package/jest.setup.js +0 -2
  118. package/package-old.json +0 -90
package/.gitattributes CHANGED
@@ -1,4 +1,3 @@
1
- # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2
1
 
3
2
  /.eslintrc.json linguist-generated
4
3
  /.gitattributes linguist-generated
@@ -13,9 +12,6 @@
13
12
  /.npmrc linguist-generated
14
13
  /.prettierignore linguist-generated
15
14
  /.prettierrc.json linguist-generated
16
- /.projen/** linguist-generated
17
- /.projen/deps.json linguist-generated
18
- /.projen/files.json linguist-generated
19
15
  /.projen/tasks.json linguist-generated
20
16
  /LICENSE linguist-generated
21
17
  /package.json linguist-generated
package/.husky/pre-commit CHANGED
@@ -1,4 +1 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
1
  npx lint-staged
package/.prettierignore CHANGED
@@ -1,2 +1 @@
1
- # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2
1
  scripts/create-package-json.ts
@@ -0,0 +1,261 @@
1
+ {
2
+ "tasks": {
3
+ "build": {
4
+ "name": "build",
5
+ "description": "Full release build",
6
+ "steps": [
7
+ {
8
+ "spawn": "default"
9
+ },
10
+ {
11
+ "spawn": "pre-compile"
12
+ },
13
+ {
14
+ "spawn": "compile"
15
+ },
16
+ {
17
+ "spawn": "post-compile"
18
+ },
19
+ {
20
+ "spawn": "test"
21
+ },
22
+ {
23
+ "spawn": "package"
24
+ }
25
+ ]
26
+ },
27
+ "bump": {
28
+ "name": "bump",
29
+ "description": "Bumps version based on latest git tag and generates a changelog entry",
30
+ "env": {
31
+ "OUTFILE": "package.json",
32
+ "CHANGELOG": "dist/changelog.md",
33
+ "BUMPFILE": "dist/version.txt",
34
+ "RELEASETAG": "dist/releasetag.txt",
35
+ "RELEASE_TAG_PREFIX": ""
36
+ },
37
+ "steps": [
38
+ {
39
+ "builtin": "release/bump-version"
40
+ }
41
+ ],
42
+ "condition": "! git log --oneline -1 | grep -q \"chore(release):\""
43
+ },
44
+ "clobber": {
45
+ "name": "clobber",
46
+ "description": "hard resets to HEAD of origin and cleans the local repo",
47
+ "env": {
48
+ "BRANCH": "$(git branch --show-current)"
49
+ },
50
+ "steps": [
51
+ {
52
+ "exec": "git checkout -b scratch",
53
+ "name": "save current HEAD in \"scratch\" branch"
54
+ },
55
+ {
56
+ "exec": "git checkout $BRANCH"
57
+ },
58
+ {
59
+ "exec": "git fetch origin",
60
+ "name": "fetch latest changes from origin"
61
+ },
62
+ {
63
+ "exec": "git reset --hard origin/$BRANCH",
64
+ "name": "hard reset to origin commit"
65
+ },
66
+ {
67
+ "exec": "git clean -fdx",
68
+ "name": "clean all untracked files"
69
+ },
70
+ {
71
+ "say": "ready to rock! (unpushed commits are under the \"scratch\" branch)"
72
+ }
73
+ ],
74
+ "condition": "git diff --exit-code > /dev/null"
75
+ },
76
+ "compile": {
77
+ "name": "compile",
78
+ "description": "Only compile",
79
+ "steps": [
80
+ {
81
+ "exec": "tsc --project tsconfig.build.esm.json"
82
+ },
83
+ {
84
+ "exec": "ts-node ./scripts/create-package-json.ts --moduleType=\"esm\" --packageJsonType=module"
85
+ },
86
+ {
87
+ "exec": "tsc --project tsconfig.build.cjs.json"
88
+ },
89
+ {
90
+ "exec": "ts-node ./scripts/create-package-json.ts --moduleType=\"cjs\" --packageJsonType=commonjs"
91
+ }
92
+ ]
93
+ },
94
+ "default": {
95
+ "name": "default",
96
+ "description": "Synthesize project files",
97
+ "steps": [
98
+ {
99
+ "exec": "ts-node --project tsconfig.dev.json .projenrc.ts"
100
+ }
101
+ ]
102
+ },
103
+ "eject": {
104
+ "name": "eject",
105
+ "description": "Remove projen from the project",
106
+ "env": {
107
+ "PROJEN_EJECTING": "true"
108
+ },
109
+ "steps": [
110
+ {
111
+ "spawn": "default"
112
+ }
113
+ ]
114
+ },
115
+ "eslint": {
116
+ "name": "eslint",
117
+ "description": "Runs eslint against the codebase",
118
+ "steps": [
119
+ {
120
+ "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools projenrc .projenrc.ts"
121
+ }
122
+ ]
123
+ },
124
+ "install": {
125
+ "name": "install",
126
+ "description": "Install project dependencies and update lockfile (non-frozen)",
127
+ "steps": [
128
+ {
129
+ "exec": "pnpm i --no-frozen-lockfile"
130
+ }
131
+ ]
132
+ },
133
+ "install:ci": {
134
+ "name": "install:ci",
135
+ "description": "Install project dependencies using frozen lockfile",
136
+ "steps": [
137
+ {
138
+ "exec": "pnpm i --frozen-lockfile"
139
+ }
140
+ ]
141
+ },
142
+ "package": {
143
+ "name": "package",
144
+ "description": "Creates the distribution package",
145
+ "steps": [
146
+ {
147
+ "exec": "mkdir -p dist/js"
148
+ },
149
+ {
150
+ "exec": "mv $(npm pack) dist/js/"
151
+ }
152
+ ]
153
+ },
154
+ "post-compile": {
155
+ "name": "post-compile",
156
+ "description": "Runs after successful compilation"
157
+ },
158
+ "post-upgrade": {
159
+ "name": "post-upgrade",
160
+ "description": "Runs after upgrading dependencies"
161
+ },
162
+ "pre-compile": {
163
+ "name": "pre-compile",
164
+ "description": "Prepare the project for compilation"
165
+ },
166
+ "release": {
167
+ "name": "release",
168
+ "description": "Prepare a release from \"main\" branch",
169
+ "env": {
170
+ "RELEASE": "true",
171
+ "MIN_MAJOR": "1"
172
+ },
173
+ "steps": [
174
+ {
175
+ "exec": "rm -fr dist"
176
+ },
177
+ {
178
+ "spawn": "bump"
179
+ },
180
+ {
181
+ "spawn": "build"
182
+ },
183
+ {
184
+ "spawn": "unbump"
185
+ },
186
+ {
187
+ "exec": "git diff --ignore-space-at-eol --exit-code"
188
+ }
189
+ ]
190
+ },
191
+ "test": {
192
+ "name": "test",
193
+ "description": "Run tests",
194
+ "steps": [
195
+ {
196
+ "exec": "vitest --dir=src",
197
+ "receiveArgs": true
198
+ },
199
+ {
200
+ "spawn": "eslint"
201
+ }
202
+ ]
203
+ },
204
+ "unbump": {
205
+ "name": "unbump",
206
+ "description": "Restores version to 0.0.0",
207
+ "env": {
208
+ "OUTFILE": "package.json",
209
+ "CHANGELOG": "dist/changelog.md",
210
+ "BUMPFILE": "dist/version.txt",
211
+ "RELEASETAG": "dist/releasetag.txt",
212
+ "RELEASE_TAG_PREFIX": ""
213
+ },
214
+ "steps": [
215
+ {
216
+ "builtin": "release/reset-version"
217
+ }
218
+ ]
219
+ },
220
+ "upgrade": {
221
+ "name": "upgrade",
222
+ "description": "upgrade dependencies",
223
+ "env": {
224
+ "CI": "0"
225
+ },
226
+ "steps": [
227
+ {
228
+ "exec": "pnpm update npm-check-updates"
229
+ },
230
+ {
231
+ "exec": "npm-check-updates --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@ally-murray/projen-modules,@types/node,@typescript-eslint/eslint-plugin,@typescript-eslint/parser,commander,commitizen,eslint-config-prettier,eslint-import-resolver-node,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,eslint,husky,lint-staged,nock,npm-check-updates,prettier,projen,rimraf,standard-version,ts-node,typescript,vitest,axios,zod"
232
+ },
233
+ {
234
+ "exec": "pnpm i --no-frozen-lockfile"
235
+ },
236
+ {
237
+ "exec": "pnpm update @ally-murray/projen-modules @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commander commitizen eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint husky lint-staged nock npm-check-updates prettier projen rimraf standard-version ts-node typescript vitest axios zod"
238
+ },
239
+ {
240
+ "exec": "npx projen"
241
+ },
242
+ {
243
+ "spawn": "post-upgrade"
244
+ }
245
+ ]
246
+ },
247
+ "watch": {
248
+ "name": "watch",
249
+ "description": "Watch & compile in the background",
250
+ "steps": [
251
+ {
252
+ "exec": "tsc --build -w"
253
+ }
254
+ ]
255
+ }
256
+ },
257
+ "env": {
258
+ "PATH": "$(pnpm -c exec \"node --print process.env.PATH\")"
259
+ },
260
+ "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
261
+ }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ### [1.3.1](https://github.com/AllyMurray/comic-vine/compare/v1.3.0...v1.3.1) (2025-07-03)
6
+
7
+ ## [1.2.8] - 2024-01-01
8
+
9
+ ### Changed
10
+
11
+ - Migrated from Projen to standard npm project structure
12
+ - Updated GitHub Actions workflows to use artifact actions v4
13
+ - Improved build process and release workflow
14
+
1
15
  ## [1.2.5](https://github.com/AllyMurray/comic-vine/compare/v1.2.4...v1.2.5) (2023-03-18)
2
16
 
3
17
  ### Bug Fixes
@@ -0,0 +1,294 @@
1
+ # Contributing to Comic Vine SDK
2
+
3
+ Thank you for your interest in contributing to the Comic Vine SDK! This document provides guidelines and information to help you contribute effectively to the project.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Code of Conduct](#code-of-conduct)
8
+ - [Getting Started](#getting-started)
9
+ - [Development Setup](#development-setup)
10
+ - [Development Workflow](#development-workflow)
11
+ - [Code Standards](#code-standards)
12
+ - [Testing](#testing)
13
+ - [Submitting Changes](#submitting-changes)
14
+ - [Project Structure](#project-structure)
15
+ - [Resources](#resources)
16
+
17
+ ## Code of Conduct
18
+
19
+ This project adheres to a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [allymurray88@gmail.com](mailto:allymurray88@gmail.com).
20
+
21
+ ## Getting Started
22
+
23
+ ### Prerequisites
24
+
25
+ Before you begin, ensure you have the following installed:
26
+
27
+ - **Node.js**: Version 20.0.0 or higher
28
+ - **pnpm**: Version 9.15.4+ (specified in package.json)
29
+ ```bash
30
+ npm install -g pnpm@9.15.4
31
+ ```
32
+
33
+ ### Development Setup
34
+
35
+ 1. **Fork and Clone**
36
+
37
+ ```bash
38
+ git clone https://github.com/your-username/comic-vine.git
39
+ cd comic-vine
40
+ ```
41
+
42
+ 2. **Install Dependencies**
43
+
44
+ ```bash
45
+ pnpm install
46
+ ```
47
+
48
+ 3. **Verify Setup**
49
+ ```bash
50
+ pnpm test
51
+ ```
52
+
53
+ If all tests pass, you're ready to start developing!
54
+
55
+ ## Development Workflow
56
+
57
+ ### Creating a Branch
58
+
59
+ 1. Create a feature branch from `main`:
60
+
61
+ ```bash
62
+ git checkout -b feature/your-feature-name
63
+ # or
64
+ git checkout -b fix/issue-description
65
+ ```
66
+
67
+ 2. Use descriptive branch names:
68
+ - `feature/add-search-pagination`
69
+ - `fix/handle-rate-limiting`
70
+ - `docs/update-readme-examples`
71
+
72
+ ### Making Changes
73
+
74
+ 1. **Write Code**: Follow the [Code Standards](#code-standards) below
75
+ 2. **Add Tests**: Ensure new functionality has corresponding tests
76
+ 3. **Run Tests**: `pnpm test` to run tests and linting
77
+ 4. **Build**: `pnpm compile` to ensure your changes compile correctly
78
+
79
+ ### Commit Messages
80
+
81
+ Follow conventional commit format:
82
+
83
+ ```
84
+ type(scope): description
85
+
86
+ [optional body]
87
+
88
+ [optional footer]
89
+ ```
90
+
91
+ **Types:**
92
+
93
+ - `feat`: New feature
94
+ - `fix`: Bug fix
95
+ - `docs`: Documentation changes
96
+ - `style`: Code style changes (formatting, etc.)
97
+ - `refactor`: Code refactoring
98
+ - `test`: Adding or updating tests
99
+ - `chore`: Maintenance tasks
100
+
101
+ **Examples:**
102
+
103
+ ```
104
+ feat(resources): add pagination support to character list
105
+ fix(http-client): handle network timeout errors
106
+ docs(readme): update installation instructions
107
+ ```
108
+
109
+ ## Code Standards
110
+
111
+ ### TypeScript Guidelines
112
+
113
+ - **Type Safety**: Prefer explicit types over `any`
114
+ - **Interfaces**: Use interfaces for object shapes
115
+ - **Generics**: Leverage generics for reusable components
116
+ - **Strict Mode**: The project uses strict TypeScript settings
117
+
118
+ ### Code Style
119
+
120
+ The project uses **ESLint** and **Prettier** for code formatting:
121
+
122
+ ```bash
123
+ # Auto-fix linting issues and format code
124
+ pnpm lint
125
+
126
+ # Check linting without fixing
127
+ npx eslint src --ext .ts
128
+ ```
129
+
130
+ **Key Style Rules:**
131
+
132
+ - Use camelCase for variables and functions
133
+ - Use PascalCase for classes and interfaces
134
+ - Prefer `const` over `let` when possible
135
+ - Use meaningful variable names
136
+ - Add JSDoc comments for public APIs
137
+
138
+ ### Import Organization
139
+
140
+ Imports should be organized as follows:
141
+
142
+ ```typescript
143
+ // 1. Built-in Node.js modules
144
+ import { readFile } from 'fs/promises';
145
+
146
+ // 2. External dependencies
147
+ import axios from 'axios';
148
+ import { z } from 'zod';
149
+
150
+ // 3. Internal modules (ordered alphabetically)
151
+ import { BaseResource } from './base-resource';
152
+ import { HttpClient } from './http-client';
153
+ ```
154
+
155
+ ## Testing
156
+
157
+ ### Running Tests
158
+
159
+ ```bash
160
+ # Run all tests with linting
161
+ pnpm test
162
+
163
+ # Run tests only (without linting)
164
+ pnpm test:run
165
+
166
+ # Run tests in watch mode
167
+ npx vitest --dir=src
168
+ ```
169
+
170
+ ### Writing Tests
171
+
172
+ 1. **Location**: Place test files alongside source files with `.test.ts` extension
173
+ 2. **Naming**: Use descriptive test names that explain the behavior being tested
174
+ 3. **Structure**: Follow Arrange-Act-Assert pattern
175
+
176
+ **Example Test:**
177
+
178
+ ```typescript
179
+ import { describe, test, expect } from 'vitest';
180
+
181
+ describe('ResourceName', () => {
182
+ test('should return correct data when field list is specified', async () => {
183
+ // Arrange
184
+ const expectedFields = ['id', 'name'];
185
+
186
+ // Act
187
+ const result = await resource.retrieve(123, { fieldList: expectedFields });
188
+
189
+ // Assert
190
+ expect(Object.keys(result)).toEqual(expectedFields);
191
+ });
192
+ });
193
+ ```
194
+
195
+ ### Test Coverage
196
+
197
+ - Write tests for all new functionality
198
+ - Include both success and error scenarios
199
+ - Mock external dependencies using **nock** for HTTP requests
200
+ - Test files are located in `src/__mocks__/` for mock data
201
+
202
+ ## Submitting Changes
203
+
204
+ ### Pull Request Process
205
+
206
+ 1. **Update Documentation**: Ensure README, JSDoc, and other docs reflect your changes
207
+
208
+ 2. **Verify Quality Checks**: All checks must pass before merging
209
+
210
+ ```bash
211
+ pnpm test:run # All tests pass
212
+ pnpm lint # No linting errors
213
+ pnpm compile # Code compiles successfully
214
+ ```
215
+
216
+ 3. **Create Pull Request**:
217
+ - Use a descriptive title
218
+ - Reference any related issues
219
+ - Provide clear description of changes
220
+ - Include examples if adding new features
221
+
222
+ 4. **Review Process**:
223
+ - Maintainers will review your PR
224
+ - Address any feedback promptly
225
+ - See [CODE_REVIEW.md](./CODE_REVIEW.md) for review criteria
226
+
227
+ ### Pre-commit Hooks
228
+
229
+ The project uses **Husky** and **lint-staged** to ensure code quality:
230
+
231
+ - **Auto-formatting**: Prettier formats code on commit
232
+ - **Linting**: ESLint checks are enforced
233
+ - **Type checking**: TypeScript compilation is verified
234
+
235
+ If pre-commit hooks fail, fix the issues before committing:
236
+
237
+ ```bash
238
+ pnpm lint # Fix linting issues
239
+ git add . # Stage the fixes
240
+ git commit # Try committing again
241
+ ```
242
+
243
+ ## Project Structure
244
+
245
+ ```
246
+ src/
247
+ ├── comic-vine.ts # Main SDK class
248
+ ├── errors/ # Custom error classes
249
+ ├── http-client/ # HTTP client and URL builder
250
+ ├── options/ # Configuration options
251
+ ├── resources/ # API resource implementations
252
+ │ ├── base-resource.ts # Base class for all resources
253
+ │ ├── character/ # Character-specific code
254
+ │ ├── issue/ # Issue-specific code
255
+ │ └── ... # Other Comic Vine resources
256
+ ├── types/ # TypeScript type definitions
257
+ └── utils/ # Utility functions
258
+ ```
259
+
260
+ ### Adding New Resources
261
+
262
+ When adding support for a new Comic Vine API resource:
263
+
264
+ 1. Create a new directory under `src/resources/`
265
+ 2. Implement the resource class extending `BaseResource`
266
+ 3. Add TypeScript types in a `types/` subdirectory
267
+ 4. Write comprehensive tests
268
+ 5. Update the main `ComicVine` class to include the new resource
269
+ 6. Add mock data for testing
270
+
271
+ ## Resources
272
+
273
+ ### Documentation
274
+
275
+ - [Comic Vine API Documentation](https://comicvine.gamespot.com/api/documentation)
276
+ - [Project README](./README.md)
277
+ - [Code Review Guidelines](./CODE_REVIEW.md)
278
+
279
+ ### Getting Help
280
+
281
+ - **Issues**: [GitHub Issues](https://github.com/AllyMurray/comic-vine/issues)
282
+ - **Discussions**: Use GitHub Discussions for questions
283
+
284
+ ### Development Tools
285
+
286
+ - **Package Manager**: [pnpm](https://pnpm.io/)
287
+ - **Testing**: [Vitest](https://vitest.dev/)
288
+ - **Linting**: [ESLint](https://eslint.org/) + [TypeScript ESLint](https://typescript-eslint.io/)
289
+ - **Formatting**: [Prettier](https://prettier.io/)
290
+ - **Git Hooks**: [Husky](https://typicode.github.io/husky/)
291
+
292
+ ---
293
+
294
+ Thank you for contributing to Comic Vine SDK! Your contributions help make this library better for everyone. 🚀
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 Ally Murray
1
+ Copyright (c) 2025 Ally Murray
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal