Thanks for your willingness to contribute!
Please check open issues. Please respond to questions/bug reports/feature requests!
- Fork and clone the repo
- Run
npm install
to install dependencies. This also downloads the specmatic.jar file of the version specified in src/config.ts. - Create a branch for your PR with
git checkout -b your-branch-name
Tip: Keep your
master
branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:git remote add upstream https://github.com/znsio/specmatic-node.git git fetch upstream git branch --set-upstream-to=upstream/master master
This will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local
master
branch to use the upstream master branch whenever you rungit pull
. Then you can make all of your pull request branches based on thismaster
branch. Whenever you want to update your version ofmaster
, do a regulargit pull
.
Please make sure to run the tests before you commit your changes by using the command
npm test
Build the dist files locally once to make sure build works
npm run build
Finally commit
- Push access to master branch
- Node version 14 or higher
If the specmatic jar version is to be updated, modify the specmaticVersion property in package.json accordingly and check it in.
- Goto github releases and draft a new release
- Click
choose a tag
and enter the required version. If the tag exists then you might be releasing a wrong version. Reverify the tag and version number. Ideally the tag should not exist as this is a new version and thus you should be presented with option to+ Create new tag: <version> on publish
option. Click it. - Give a release title of format
v<version>
. - Describe the changes in this release briefly
- You can either save this draft and come back later to publish it or publish it now.
- On publish, a github action is triggered that updates the release on npm repository.
You can check the publish status in github actions. Though, it might take some time to reflect in the specmatic npm page because of the npm caching.
Building npm locally
- npm run build
- npm pack
- And use the generated ".tgz" file with "file:.tgz"
- Be sure to run npm remove before specmatic before installing the tgz file