Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).
Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organisation and the individual CLA is for those contributing as an individual.
- Write tests for any changes
- Follow existing code style and conventions
- Separate unrelated changes into multiple pull requests
- For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change
- Use conventional changelog conventions in your commit messages
- nvm 0.30.2
Install nodejs
nvm install
Install project dependencies
npm install
Ensure your environment is working by running the pre-commit check
npm test
Commits to this codebase should follow the conventional changelog conventions.
To get fast test feedback run npm run watch
in one terminal window and npm run watch-e2e
in another.
npm test
- A pre-commit check to be run before pushing any changes.npm run watch
- Automatically compiles the code and runs the unit tests whenever you edit a relevant file.npm run watch-e2e
- Automatically runs the e2e tests whenever you edit a relevant file. This command does not compile the code and must be run in combination with the watch command.
To run the compiled development code locally change to the bin directory and run the swagger-mock-validator-local app via node. This compiled version preserves any console logs for development purposes.
cd bin
node swagger-mock-validator-local <example_swagger_json> <example_pactfile_json> --outputDepth 5
See Releasing
- In
.nvmrc
update the version number to the latest node LTS version. - In
bitbucket-pipelines.yml
update the node versions to install the latest version of all currently supported major releases of node, e.g. the latest 10.x, 12.x, etc. See https://nodejs.org/en/about/releases/ for version details. - Run
nvm install
. - Delete your local
package-lock.json
file andnode_modules/
directory. - Run
npm install
. - Run:
npx npm-check -u
and follow the instructions. - Change the version of
@types/node
to match the version of node in the.nvmrc
folder. For example, if.nvmrc
contains10.16.2
then@types/node
should be^10
. - Test your changes:
npm test
- Note that
typescript
does not follow semver, so go into the package.json and remove the ^ symbol from in front of its dependency version number to prevent it from automatically being bumped during builds. This ensures build stability.