Skip to content

Commit 13ee06f

Browse files
committed
chore: update package configuration and TypeScript settings
- Updated package.json to specify module and types file extensions for ESM support. - Added publishConfig for public access. - Modified tsconfig.json to target ES2022 and adjusted compiler options for improved compatibility. - Enhanced tsdown.config.ts with platform and output directory settings for better build management.
1 parent a187a9d commit 13ee06f

3 files changed

Lines changed: 36 additions & 38 deletions

File tree

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
"name": "@tdanks2000/igdb-wrapper",
33
"version": "0.3.3",
44
"description": "Type-safe TypeScript client for the IGDB API with a fluent query builder, automatic retries, and built-in rate limiting",
5+
"module": "./dist/index.mjs",
56
"type": "module",
67
"main": "./dist/index.cjs",
7-
"module": "./dist/index.js",
8-
"types": "./dist/index.d.ts",
8+
"types": "./dist/index.d.mts",
99
"exports": {
1010
".": {
11-
"types": "./dist/index.d.ts",
12-
"import": "./dist/index.js",
11+
"types": "./dist/index.d.mts",
12+
"import": "./dist/index.mjs",
1313
"require": "./dist/index.cjs"
1414
}
1515
},
16+
"publishConfig": {
17+
"access": "public"
18+
},
1619
"files": [
1720
"dist",
1821
"README.md",
@@ -42,7 +45,7 @@
4245
"nodejs",
4346
"bun"
4447
],
45-
"author": "Prostarz",
48+
"author": "tdanks2000",
4649
"license": "MIT",
4750
"repository": {
4851
"type": "git",

tsconfig.json

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
{
2-
"compilerOptions": {
3-
// Environment setup & latest features
4-
"lib": ["ESNext"],
5-
"target": "ESNext",
6-
"module": "Preserve",
7-
"moduleDetection": "force",
8-
"jsx": "react-jsx",
9-
"allowJs": true,
10-
11-
// Bundler mode
12-
"moduleResolution": "bundler",
13-
"allowImportingTsExtensions": true,
14-
"verbatimModuleSyntax": true,
15-
"noEmit": true,
16-
17-
// Best practices
18-
"strict": true,
19-
"skipLibCheck": true,
20-
"noFallthroughCasesInSwitch": true,
21-
"noUncheckedIndexedAccess": true,
22-
"noImplicitOverride": true,
23-
24-
// Some stricter flags (disabled by default)
25-
"noUnusedLocals": false,
26-
"noUnusedParameters": false,
27-
"noPropertyAccessFromIndexSignature": false
28-
}
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"lib": ["ES2022"],
6+
"outDir": "./dist",
7+
"rootDir": "./src",
8+
"strict": true,
9+
"esModuleInterop": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"skipLibCheck": true,
12+
"resolveJsonModule": true,
13+
"declaration": true,
14+
"declarationMap": true,
15+
"moduleResolution": "bundler",
16+
"allowSyntheticDefaultImports": true
17+
},
18+
"include": ["src"],
19+
"exclude": ["node_modules", "dist"]
2920
}

tsdown.config.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { defineConfig } from "tsdown";
22

33
export default defineConfig({
4-
entry: ["src/index.ts"],
5-
format: ["esm", "cjs"],
6-
dts: true,
7-
clean: true,
8-
sourcemap: true,
9-
target: false,
4+
entry: "./src/index.ts",
5+
platform: "neutral",
6+
target: "es2022",
7+
format: ["esm", "cjs"],
8+
outDir: "./dist",
9+
dts: true,
10+
skipNodeModulesBundle: true,
11+
clean: true,
12+
shims: true,
13+
fixedExtension: true,
1014
});

0 commit comments

Comments
 (0)