Warning: This note is for developer/maintainer of this package only
- Make your changes
- Update
version
value onpackage.json
file (anduser-agent
header version onhttpClient.js
file) - To install dev dependencies
npm install --dev
on repo folder - To run test, run
npm test
ormocha
- 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.com
This 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 fix
to fix vuln & update deps if any - run
npm test
to 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-updates
to install npm-check-updates helper tool - run
ncu -u
to auto check & update the npm package.json dependencies' version values - run
npm install
to install the updated dependencies - run
npm test
to make sure nothing breaks
- To use docker-compose to test and run project,
cd
to 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