Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paystack/paystack-sdk",
"version": "1.2.1-beta.2",
"version": "1.2.2",
"description": "Paystack API wrapper for Node",
"author": "Paystack <integrations@paystack.com> (https://paystack.com/docs)",
"keywords": [
Expand All @@ -22,6 +22,11 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md",
"LICENSE"
],
"tsup": {
"entry": [
"src/index.ts"
Expand All @@ -31,8 +36,9 @@
"clean": true
},
"scripts": {
"build": "npm run clean && tsup --format esm,cjs --dts",
"build": "tsup --format esm,cjs --dts",
"clean": "rm -rf ./dist",
"prepare": "npm run build",
"compile": "tsc -p tsconfig.esm.json && tsc -p ./tsconfig.cjs.json && tsc -p ./tsconfig.types.json"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


import * as https from 'https';
import { version } from '../package.json';

const BASE_PATH = "https://api.paystack.co".replace(/\/+$/, "");
type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
Expand Down Expand Up @@ -55,7 +56,7 @@ export class BaseAPI {
path: tempPath,
headers: {
"authorization": `Bearer ${this.apiKey}`,
"user-agent": `@paystack/paystack-sdk - 1.2.1-beta.2`
"user-agent": `@paystack/paystack-sdk - ${version}`
}
}

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": false,
"resolveJsonModule": true,
},
"include": ["src"]
}