Skip to content

Commit 99606ed

Browse files
committed
Release igdb-wrapper 1.0.0
1 parent d77ab4d commit 99606ed

6 files changed

Lines changed: 42 additions & 7 deletions

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"commit": false,
55
"fixed": [],
66
"linked": [],
7-
"access": "restricted",
7+
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
1010
"ignore": []

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ jobs:
2323
run: bun install --frozen-lockfile
2424

2525
- name: Typecheck
26-
run: bunx tsc --noEmit
26+
run: bun run typecheck
27+
28+
- name: Run tests
29+
run: bun run test
2730

2831
- name: Build
2932
run: bun run build

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @api-wrappers/igdb-wrapper
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- Promote the IGDB wrapper to V1 with the full current IGDB v4 endpoint surface, typed APICalypse query building, multi-query, webhooks, metadata, protobuf, retry, rate-limit, image URL, and tag-number support.
8+
39
## 0.6.1
410

511
### Patch Changes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[![npm version](https://img.shields.io/npm/v/@api-wrappers/igdb-wrapper?color=blue&logo=npm)](https://www.npmjs.com/package/@api-wrappers/igdb-wrapper)
44
[![npm downloads](https://img.shields.io/npm/dm/@api-wrappers/igdb-wrapper?color=blue&logo=npm)](https://www.npmjs.com/package/@api-wrappers/igdb-wrapper)
5-
[![license](https://img.shields.io/github/license/TDanks2000/igdb-wrapper?color=green)](https://github.com/TDanks2000/igdb-wrapper/blob/main/LICENSE)
6-
[![CI](https://img.shields.io/github/actions/workflow/status/TDanks2000/igdb-wrapper/ci.yml?branch=main)](https://github.com/TDanks2000/igdb-wrapper/actions)
5+
[![license](https://img.shields.io/github/license/Api-Wrappers/igdb-wrapper?color=green)](https://github.com/Api-Wrappers/igdb-wrapper/blob/main/LICENSE)
6+
[![CI](https://img.shields.io/github/actions/workflow/status/Api-Wrappers/igdb-wrapper/ci.yml?branch=main)](https://github.com/Api-Wrappers/igdb-wrapper/actions)
77

88
A type-safe TypeScript client for the [IGDB API](https://api.igdb.com) with a fluent
99
query builder, automatic retries, and built-in rate limiting.
@@ -87,7 +87,7 @@ console.log(game?.name); // "Elden Ring"
8787

8888
## License
8989

90-
This project is licensed under the MIT License - see the [LICENSE](https://github.com/api-wrappers/igdb-wrapper/blob/main/LICENSE) file for details.
90+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Api-Wrappers/igdb-wrapper/blob/main/LICENSE) file for details.
9191

9292
<br/>
9393

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@api-wrappers/igdb-wrapper",
3-
"version": "0.6.1",
3+
"version": "1.0.0",
44
"description": "Type-safe TypeScript client for the IGDB API with a fluent query builder, automatic retries, and built-in rate limiting",
55
"module": "./dist/index.mjs",
66
"type": "module",
@@ -18,7 +18,9 @@
1818
},
1919
"files": [
2020
"dist",
21+
"docs",
2122
"README.md",
23+
"CHANGELOG.md",
2224
"LICENSE"
2325
],
2426
"sideEffects": false,
@@ -30,7 +32,7 @@
3032
"changeset": "changeset",
3133
"version-packages": "changeset version",
3234
"release": "changeset publish",
33-
"prepublishOnly": "npm run typecheck && npm run build"
35+
"prepublishOnly": "npm run typecheck && npm run test && npm run build"
3436
},
3537
"keywords": [
3638
"igdb",

src/__tests__/igdb-client.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { describe, expect, test } from "bun:test";
22
import { IGDBClient } from "../client/IGDBClient";
3+
import {
4+
IGDB_ENDPOINTS,
5+
IGDB_SEARCHABLE_ENDPOINTS,
6+
} from "../endpoints/registry";
37
import { IGDBRateLimitError } from "../errors";
48
import { buildImageUrl, createTagNumber } from "../index";
59

@@ -131,6 +135,26 @@ describe("IGDBClient", () => {
131135
});
132136
});
133137

138+
test("exposes every registered IGDB endpoint as a client property", async () => {
139+
const client = new IGDBClient({
140+
...testConfig,
141+
fetch: (async () => new Response()) as unknown as typeof fetch,
142+
});
143+
144+
for (const [property, path] of Object.entries(IGDB_ENDPOINTS)) {
145+
expect(
146+
(client as unknown as Record<string, { path: string }>)[property]
147+
?.path,
148+
).toBe(path);
149+
}
150+
151+
for (const path of IGDB_SEARCHABLE_ENDPOINTS) {
152+
expect(Object.values(IGDB_ENDPOINTS)).toContain(path);
153+
}
154+
155+
await client.dispose();
156+
});
157+
134158
test("compiles documented APICalypse features", () => {
135159
const client = new IGDBClient({
136160
...testConfig,

0 commit comments

Comments
 (0)