Skip to content

Commit

Permalink
Merge branch 'release/1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
davesag committed Apr 8, 2019
2 parents c62378a + 6b91995 commit 6607254
Show file tree
Hide file tree
Showing 4 changed files with 911 additions and 438 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ git config user.email "username@domain.suffix"

#### Hotfixes and Support branches

It's basically the same process but use the word `hotfix` or `support` instead of `feature`. `git flow` knows what to do. Just keep in mind that any changes are going to happen to your fork, and not the upstream repo. If you need to merge a `hotfix` into upstream master you may only do it va a reviewed pull request.
It's basically the same process but use the word `hotfix` or `support` instead of `feature`. `git flow` knows what to do. Just keep in mind that any changes are going to happen to your fork, and not the upstream repo. If you need to merge a `hotfix` into upstream master you may only do it va a reviewed pull request.

### Releasing to production

Expand All @@ -56,7 +56,7 @@ It's basically the same process but use the word `hotfix` or `support` instead o
4. Now go back to GitHub and raise a Pull Request to merge the upstream master from your fork's `master` branch. When that goes through you are done.
5. In your command-line go back and clean up any outstanding branches and `git pull upstream` your local `master` and `develop` branches to ensure everything on your local machine is up to date with everyone's changes.

Note you will **never** push changes directly to the upstream project, *only to your own fork*.
Note you will **never** push changes directly to the upstream project, _only to your own fork_.

**Changes may only be introduced into the upstream project via a properly reviewed pull request.**

Expand All @@ -72,20 +72,20 @@ Note this will creating a feature via `git flow` will create a branch called `fe

### Commit Messages

When commiting something use the `-m` flag to add a short commit message of the format `{issue number} summary of what you changed`. So for example if you are working on issue `ABC-1` and you added a method to the `aardvark_controller` you might use the following commit message `"ABC-1 added anteater method to aardvark controller"`
When commiting something use the `-m` flag to add a short commit message of the format `{issue number} summary of what you changed`. So for example if you are working on issue `ABC-1` and you added a method to the `aardvark_controller` you might use the following commit message `"ABC-1 added anteater method to aardvark controller"`

Commit messages ought to be in the past tense.

In general try to group file changes wherever appropriate, so if your controller change also involved updating something in a helper file, the one commit message can happily encompas the changes to both files. The message ought to reflect the main aim of the change.

### Pull Requests

Pull requests must be named as follows `[issue type, issue number] high level description of change`. The following Issue Types are recognised
Pull requests must be named as follows `[issue type, issue number] high level description of change`. The following Issue Types are recognised

* `Bug Fix` - the change fixes a bug
* `Feature` - the change adds a new feature (the usual issue type)
* `Documentation` — The change is a documentation only change
* `Optimisation` - The change is an optimisation of the code base without any functional changes
- `Bug Fix` - the change fixes a bug
- `Feature` - the change adds a new feature (the usual issue type)
- `Documentation` — The change is a documentation only change
- `Optimisation` - The change is an optimisation of the code base without any functional changes

If your change does not fit any of these categories, use `Feature`. Likewise if your change is not tied to an issue number you may use `n/a` instead.

Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ Jose-Simple simplifies the encryption and decryption of data using the JOSE (JSO

## Caveats

* The project depends on [`node-jose`](https://github.com/cisco/node-jose) by Cisco.
* `node-jose` [does not allow you to use private keys with passwords](https://github.com/cisco/node-jose/issues/69#issuecomment-236133179), and [they have no intention of changing that](https://github.com/cisco/node-jose/issues/234#issuecomment-457615794).
* **Requires Node 10.12.0 or better** if you want to run the tests.
Works fine under Node 11.9+, and might run under versions of node going back to 8.x but no further.
- The project depends on [`node-jose`](https://github.com/cisco/node-jose) by Cisco.
- `node-jose` [does not allow you to use private keys with passwords](https://github.com/cisco/node-jose/issues/69#issuecomment-236133179), and [they have no intention of changing that](https://github.com/cisco/node-jose/issues/234#issuecomment-457615794).
- **Requires Node 10.12.0 or better** if you want to run the tests. Works fine under Node 11.13+, and might run under versions of node going back to 8.x but no further.

<!-- prettier-ignore -->
| Branch | Status | Coverage | Comment |
| ------ | ------ | -------- | ------- |
| `develop` | [![CircleCI](https://circleci.com/gh/davesag/jose-simple/tree/develop.svg?style=svg)](https://circleci.com/gh/davesag/jose-simple/tree/develop) | [![codecov](https://codecov.io/gh/davesag/jose-simple/branch/develop/graph/badge.svg)](https://codecov.io/gh/davesag/jose-simple) | Work in progress |
| `master` | [![CircleCI](https://circleci.com/gh/davesag/jose-simple/tree/master.svg?style=svg)](https://circleci.com/gh/davesag/jose-simple/tree/master) | [![codecov](https://codecov.io/gh/davesag/jose-simple/branch/master/graph/badge.svg)](https://codecov.io/gh/davesag/jose-simple) | Latest release |

[![NPM](https://nodei.co/npm/jose-simple.png)](https://nodei.co/npm/jose-simple/)

## Installation

npm install jose-simple
```
npm install jose-simple
```

## Useage

Expand Down Expand Up @@ -52,7 +56,7 @@ encrypt(someData).then((encrypted) => {

### Options

See [encrypt.js#L661](https://github.com/cisco/node-jose/blob/master/lib/jwe/encrypt.js#L661)
See [`encrypt.js#L662`](https://github.com/cisco/node-jose/blob/master/lib/jwe/encrypt.js#L662)

You can add `encrypt` options as follows:

Expand All @@ -69,11 +73,11 @@ const { encrypt, decrypt } = jose(privateKey, publicKey, {

### Prerequisites

* [NodeJS](https://nodejs.org) — Version `10.12.0` or better is needed to run the tests as they rely on `crypto.generateKeyPair`.
- [NodeJS](https://nodejs.org) — Version `10.12.0` or better is needed to run the tests as they rely on `crypto.generateKeyPair`.

### Test it

* `npm test` — runs the unit tests. The tests give an example of how to create key pairs too. (Leverages the [`crypto.generateKeyPair`](https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_generatekeypair_type_options_callback) libraries introduced in Node `10.12.0`.)
- `npm test` — runs the unit tests. The tests give an example of how to create key pairs too. (Leverages the [`crypto.generateKeyPair`](https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_generatekeypair_type_options_callback) libraries introduced in Node `10.12.0`.)

### Lint it

Expand Down
Loading

0 comments on commit 6607254

Please sign in to comment.