Warning: This note is for developer/maintainer of this package only
- Make your changes
- Update
versionvalue onpackage.jsonfile (anduser-agentheader version onhttpClient.jsfile) - To install dev dependencies
npm install --devon repo folder - To run test, run
npm testormocha - To run specific test
# specific single test
mocha --grep "fail to create transaction with zero gross_amount"
# or everything inside single `describe`
mocha --grep "Iris.js"
- To install the package locally
npm install /path/to/repo/folder - To update https://npmjs.com repo, run these on terminal:
npm publish
# You may be asked for login username and password for npmjs.comThis method useful to pass NPM Audit. I.e. to pass known security vulnerability of the npm package dependencies, but may not update dependency beyond patch version.
- run
npm audit - run
npm audit fixto fix vuln & update deps if any - run
npm testto make sure nothing breaks - Continue to Updating Package section above
This method is useful to update dependency to the latest version, including major & minor version. Using updated major & minor version may means the dependency is more stable & have better feature. This was based from this resource.
- run
npm install -g npm-check-updatesto install npm-check-updates helper tool - run
ncu -uto auto check & update the npm package.json dependencies' version values - run
npm installto install the updated dependencies - run
npm testto make sure nothing breaks
- To use docker-compose to test and run project,
cdto repo dir - Run
docker-compose up, which basically run pytest on container - Run
docker-compose down, to clean up when done
Development Notes - (click to expand)
- allow header override
- allow config x-override notification url header
- probably properly expose axios instance as public
- allow http client config such as timeout timer
- check & fix http client timeout config less than 10sec for test
able to throw connection failure exception - implement gopay checkout api
- implement cc subscription api
- write & create example app example for Iris