Skip to content

Commit 9da63ef

Browse files
authored
Add querystring peer dep and readme instructions (#19)
1 parent 4d20a3e commit 9da63ef

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.2.45 - 2020-01-07
11+
12+
### Added
13+
14+
- Added [`querystring`](https://www.npmjs.com/package/querystring) as a peer dependency in the package.json and an explanation in the README for when you'd need to install it manually.
15+
16+
### Fixed
17+
18+
- Fixed a spec that was breaking due to Patch core changes.
19+
1020
## [1.2.4] - 2020-10-14
1121

1222
### Added

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ const patch = Patch('key_test_1234');
4343
var patch = require('@patch-technology/patch').default('key_test_1234');
4444
```
4545

46+
#### Peer dependencies
47+
48+
For environments that do not include the Node Standard Library, such as React Native, you will need to install the listed peer dependencies in order for the package to work as expected. You can install the peer dependencies by running:
49+
50+
```
51+
npm install install-peers
52+
```
53+
4654
### Orders
4755

4856
In Patch, orders represent a purchase of carbon offsets or negative emissions by mass.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"description": "JavaScript wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {
@@ -45,6 +45,9 @@
4545
"mocha": ">=8.1.0",
4646
"prettier": "2.0.5"
4747
},
48+
"peerDependencies": {
49+
"querystring": "^0.2.0"
50+
},
4851
"files": [
4952
"dist"
5053
],

test/integration/orders.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Orders Integration', function () {
2525

2626
expect(createOrderResponse.data.price_cents_usd).to.equal('500.0');
2727
expect(createOrderResponse.data.patch_fee_cents_usd).to.equal('0.0');
28-
expect(createOrderResponse.data.mass_g).to.equal(5000000);
28+
expect(createOrderResponse.data.mass_g).to.equal(500000);
2929
});
3030

3131
it('supports placing orders in a `draft` state', async function () {

0 commit comments

Comments
 (0)