knotapi-js
v1.1.0
Published
Provide a seamless way for end users to link their merchant accounts to your web app.
Readme
Please see https://docs.knotapi.com/ for installation instructions.
Setup
Run:
git clone https://github.com/millionscard/knotapi-js.git
cd knotapi-js
cp .env.example .envCopy values in the 1Password into .env
Install packages and start
yarn
yarn startReleasing a New Version
To create a new release:
Create a release branch with the version number:
git checkout -b release/X.Y.Z(e.g.,
release/1.0.7)Update the version in
package.jsonfollowing semantic versioning:- Patch version (1.0.6 → 1.0.7) for bug fixes
- Minor version (1.0.6 → 1.1.0) for new features
- Major version (1.0.6 → 2.0.0) for breaking changes
Commit and push the version change:
git add package.json git commit -m "chore: bump version to X.Y.Z" git push origin release/X.Y.ZMerge the release branch to
main(via pull request or directly):git checkout main git merge release/X.Y.Z git push origin mainCreate and push a git tag from the main branch:
git tag vX.Y.Z git push origin vX.Y.ZGitHub Actions will automatically:
- Generate a changelog from merged PRs
- Create a GitHub Release with the changelog
- Run tests
- Publish the package to npm
The release workflow is triggered by pushing a tag, so make sure the tag matches the version in package.json.
Troubleshooting: Expired npm Token
If the GitHub Actions workflow fails with an npm authentication error (e.g., "npm ERR! code E401" or "npm ERR! 401 Unauthorized"), the npm token may have expired. Follow these steps to create a new token and update the secret:
Create a new npm access token:
- Go to npmjs.com and log in
- Click on your profile → Access Tokens (or go directly to https://www.npmjs.com/settings/YOUR_USERNAME/tokens)
- Click Generate New Token → Automation (or Classic Token with "Automation" type)
- Copy the token immediately (you won't be able to see it again)
Update the GitHub secret:
- Go to the repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Find the
NODE_AUTH_TOKENsecret - Click Update and paste the new token
- Save the changes
Re-run the failed workflow:
- Go to the Actions tab
- Find the failed workflow run
- Click Re-run all jobs (or re-run the specific failed job)
Alternatively, you can push the tag again to trigger a new release workflow:
git push origin vX.Y.Z --force