Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0682630
chore: update .github/workflows/publish.yml
haxurn Feb 13, 2026
e85ad8c
chore: update .gitignore
haxurn Feb 13, 2026
f195586
chore: update README.md
haxurn Feb 13, 2026
4c99869
chore: update jest.config.js
haxurn Feb 13, 2026
a15fa78
chore: update package.json
haxurn Feb 13, 2026
ac2a7d2
chore: update pnpm-lock.yaml
haxurn Feb 13, 2026
9391262
chore: update src/chapa.ts
haxurn Feb 13, 2026
cd57630
chore: update src/enums/chapa-urls.enum.ts
haxurn Feb 13, 2026
6365ee6
chore: update src/http-exception.ts
haxurn Feb 13, 2026
552c4bc
chore: update src/index.ts
haxurn Feb 13, 2026
f13b8d6
chore: update src/interfaces/chapa-options.interface.ts
haxurn Feb 13, 2026
e3fd7a4
chore: update src/interfaces/get-banks.interface.ts
haxurn Feb 13, 2026
ed685f2
chore: update src/interfaces/index.ts
haxurn Feb 13, 2026
9e9b8d2
chore: update src/interfaces/payment.interface.ts
haxurn Feb 13, 2026
02d560f
chore: update src/interfaces/refund.interface.ts
haxurn Feb 13, 2026
c0c298c
chore: update src/interfaces/transaction.interface.ts
haxurn Feb 13, 2026
8e7a241
chore: update src/interfaces/transfer.interface.ts
haxurn Feb 13, 2026
bf86d2f
chore: update src/validations/create-subaccount.validation.ts
haxurn Feb 13, 2026
82d9953
chore: update src/validations/direct-charge.validation.ts
haxurn Feb 13, 2026
ad4250a
chore: remove src/validations/gen-tx-ref.validation.ts
haxurn Feb 13, 2026
01a10bd
chore: update src/validations/payment.validation.ts
haxurn Feb 13, 2026
e29c894
chore: update src/validations/refund.validation.ts
haxurn Feb 13, 2026
9f736c9
chore: add changeset configuration
haxurn Feb 13, 2026
93ff1c3
chore: add GitHub issue templates
haxurn Feb 13, 2026
5fa1ccf
ci: add GitHub Actions CI workflow
haxurn Feb 13, 2026
6a42a97
chore: add pull request template
haxurn Feb 13, 2026
c465920
chore: add husky pre-commit hook
haxurn Feb 13, 2026
04aea88
feat(types): add error types and type guards
haxurn Feb 13, 2026
707e822
chore: migrate validation schemas from yup to zod
haxurn Feb 13, 2026
9449134
feat(http): add axios instance factory with logging and retry support
haxurn Feb 13, 2026
de7d6ae
feat(error-handler): add centralized error handling for axios and val…
haxurn Feb 13, 2026
5f72afc
feat(utils): add error handling wrapper utility
haxurn Feb 13, 2026
f1c294d
feat(webhook): add webhook signature verification utility
haxurn Feb 13, 2026
5cbe7f7
test(webhook): add signature verification test suite
haxurn Feb 13, 2026
fdd0d1c
test(validations): add comprehensive validation test suite
haxurn Feb 13, 2026
147de52
chore(tsconfig): streamline TypeScript configuration
haxurn Feb 13, 2026
fc32dec
docs(security): add comprehensive security policy and guidelines
haxurn Feb 13, 2026
ac0f1e2
chore(build): add Rollup configuration for library bundling
haxurn Feb 13, 2026
84a60fe
test(core): add comprehensive test suite for Chapa SDK
haxurn Feb 13, 2026
d1904db
docs(conduct): add code of conduct for community guidelines
haxurn Feb 13, 2026
ca33e9f
chore(editor): add EditorConfig for consistent code formatting
haxurn Feb 13, 2026
5bfcfab
chore(config): add development tooling and npm publishing configuration
haxurn Feb 13, 2026
f0b5815
docs: add changelog, contributing guide, and version bump config
haxurn Feb 13, 2026
5cb6701
docs(readme): remove codecov coverage badge
haxurn Feb 13, 2026
e9fc1fd
fix(publish): resolve things requested by the owner
haxurn Feb 13, 2026
0314c0b
feat: add configurable timeout and exponential backoff for retries
haxurn Feb 13, 2026
6541411
feat: add AbortSignal support for request cancellation, remove unnece…
haxurn Feb 13, 2026
331a683
feat: add timeout option to ChapaOptions interface
haxurn Feb 13, 2026
d9ecaaf
chore: update TypeScript target to ES2020
haxurn Feb 13, 2026
d15d0a8
chore: add AbortSignal and AbortController to ESLint globals
haxurn Feb 13, 2026
53023af
test: update tests to accommodate signal parameter
haxurn Feb 13, 2026
48865fe
docs: update README with timeout, AbortSignal support, and exponentia…
haxurn Feb 13, 2026
f0e2c82
chore: bump version to 2.1.1
haxurn Feb 13, 2026
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug Report
description: Report a bug or issue with chapa-nodejs
title: "[Bug]: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the form below.

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Tell us what you see!
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Initialize Chapa with...
2. Call method...
3. See error...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
validations:
required: true

- type: textarea
id: code
attributes:
label: Code Sample
description: Please provide a minimal code sample that reproduces the issue
render: typescript
validations:
required: false

- type: input
id: version
attributes:
label: Package Version
description: What version of chapa-nodejs are you using?
placeholder: e.g., 2.3.1
validations:
required: true

- type: input
id: node-version
attributes:
label: Node.js Version
description: What version of Node.js are you using?
placeholder: e.g., 20.10.0
validations:
required: true

- type: dropdown
id: environment
attributes:
label: Environment
description: Where are you running this?
options:
- Development
- Production
- Testing
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://github.com/fireayehu/chapa-nodejs#readme
about: Check the documentation for usage examples
- name: Chapa API Documentation
url: https://developer.chapa.co/docs
about: Official Chapa API documentation
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Feature Request
description: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature!

- type: textarea
id: problem
attributes:
label: Problem Statement
description: Is your feature request related to a problem? Please describe.
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like
placeholder: I would like to see...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe alternatives you've considered
validations:
required: false

- type: textarea
id: example
attributes:
label: Example Usage
description: Show how you'd like to use this feature
render: typescript
validations:
required: false

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request
validations:
required: false
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Question
description: Ask a question about chapa-nodejs
title: "[Question]: "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Have a question? We're here to help!

- type: textarea
id: question
attributes:
label: Your Question
description: What would you like to know?
validations:
required: true

- type: textarea
id: context
attributes:
label: Context
description: Provide any relevant context or what you've tried so far
validations:
required: false

- type: textarea
id: code
attributes:
label: Code Sample
description: If applicable, provide a code sample
render: typescript
validations:
required: false
49 changes: 49 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Description
<!-- Provide a brief description of the changes -->

## Type of Change
<!-- Mark the relevant option with an "x" -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test coverage improvement

## Related Issue
<!-- Link to the issue this PR addresses -->
Closes #

## Changes Made
<!-- List the specific changes made in this PR -->

-
-
-

## Testing
<!-- Describe the tests you ran to verify your changes -->

- [ ] All existing tests pass
- [ ] Added new tests for new functionality
- [ ] Manual testing completed

## Checklist
<!-- Mark completed items with an "x" -->

- [ ] My code follows the project's code style
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Screenshots (if applicable)
<!-- Add screenshots to help explain your changes -->

## Additional Notes
<!-- Add any additional notes or context -->
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Format check
run: pnpm run format:check

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm test

- name: Build
run: pnpm run build

- name: Upload coverage
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
19 changes: 14 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,34 @@ jobs:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
cache: true

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: '24'
node-version: '20'
Comment thread
haxurn marked this conversation as resolved.
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
Comment thread
haxurn marked this conversation as resolved.

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Format check
run: pnpm run format:check

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm test

- name: Build
run: pnpm build
run: pnpm run build
Comment thread
haxurn marked this conversation as resolved.

- name: Publish to npm
run: pnpm publish --provenance --access public --no-git-checks
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
.DS_Store
node_modules
dist
coverage
.changeset/*.md
!.changeset/README.md
*.tsbuildinfo
.env
.env.local
.env.*.local
.vscode
.idea
*.swp
*.swo
*~
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pnpm lint
pnpm format:check
pnpm test
Loading