Skip to content

Latest commit

 

History

History
102 lines (89 loc) · 2.36 KB

CONTRIBUTING.md

File metadata and controls

102 lines (89 loc) · 2.36 KB

Contributing to djv

This guide contains the information about to contribute to djv library.

Table of contents

How to

This section contains help hints how to

Debug tests

When some of the tests are failing use the following vscode configuration

// windows
{
  "type": "node",
  "request": "launch",
  "name": "debug tests",
  "program": "${workspaceRoot}\\node_modules\\jasmine\\bin\\jasmine",
  "cwd": "${workspaceRoot}\\",
  "args": [
    "JASMINE_CONFIG_PATH=package.json"
  ]
},
// other
{
  "type": "node",
  "request": "launch",
  "name": "debug tests",
  "program": "${workspaceRoot}/node_modules/jasmine/bin/jasmine",
  "cwd": "${workspaceRoot}/",
  "args": [
    "JASMINE_CONFIG_PATH=package.json"
  ]
}

For json-schema-test suite put a debugger on node_modules/json-schema-test/index.js:147

testCase.result = validator.validate(testCase.data);
// something like
if(~test.description.indexOf('no additional items present')) {
  debugger;
}
return doTest(validators)

Release

To release a package to npm follow the steps

  • Create a release ticket in github. Copy this checklist.
  • Make a release branch
VERSION="..."
VERSIONALPHA="$VERSION-alpha.0"
ISSUE="..."

git checkout -b release/$VERSION
  • Update package.json version to $VERSIONALPHA and commit
git commit -m "release: Update package version to $VERSIONALPHA #$ISSUE"
  • Tag with the alpha version
git tag $VERSIONALPHA
  • Publish test npm version $VERSIONALPHA
npm publish
  • Check package internals - contains all required files (lib/, README.md, ./djv.js, package.json, ...), no extra files
  • Check with updated json-schema test suite - check generated report
  • Check speed metrics
  • Update package.json version to $VERSION and commit
git commit -m "release: Update package version to $VERSION #$ISSUE"
  • Create a changelog
npm run changelog
  • Update Readme
  • Tag $VERSION
git tag $VERSION
  • Merge release branch to master (via github)
  • Publish version $VERSION
npm publish
  • Send update to gitter