Skip to content

Bump minimum version of node + update superagent #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node: ['10', '12', '14', '16']
node: ['18', '20', '22']
max-parallel: 1

name: Node ${{ matrix.node }} Test
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
18.18.2
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] - 2024-05-06

### Breaking

- Drops support for node.js < 18

## [2.1.1] - 2023-04-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.16 AS base
FROM node:18.18 AS base

WORKDIR /data

Expand Down
5,714 changes: 3,231 additions & 2,483 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patch-technology/patch",
"version": "2.1.1",
"version": "2.2.0",
"description": "Node.js wrapper for the Patch API",
"license": "MIT",
"repository": {
Expand All @@ -12,8 +12,7 @@
"fs": false
},
"engines": {
"node": ">=10.16.3",
"npm": ">=6.9.0"
"node": ">=18.0.0"
},
"scripts": {
"build": "babel src -d dist",
Expand All @@ -22,11 +21,11 @@
},
"dependencies": {
"query-string": "^7.0.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: updating this was causing a bunch of problems due to ES modules

"superagent": "^5.3.1"
"superagent": "^9.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/cli": "^7.24.0",
"@babel/core": "^7.24.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
Expand All @@ -43,14 +42,14 @@
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.16.0",
"@babel/register": "^7.16.0",
"chai": "^4.3.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.1",
"mocha": "^9.1.0",
"sinon": "^7.2.0",
"prettier": "^2.0.5"
"@babel/preset-env": "^7.24.0",
"@babel/register": "^7.23.0",
"chai": "^4.4.0",
"husky": "^4.2.5",
"lint-staged": "^10.5.4",
"mocha": "^10.4.0",
"sinon": "^17.0.1",
"prettier": "^3.2.5"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiClient {
};

this.defaultHeaders = {
'User-Agent': 'patch-node/2.1.1',
'User-Agent': 'patch-node/2.2.0',
'Patch-Version': 2
};

Expand Down
5 changes: 2 additions & 3 deletions test/integration/estimates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ describe('Estimates Integration', function () {
});
const estimateId = createEstimateResponse.data.id;

const retrieveEstimateResponse = await patch.estimates.retrieveEstimate(
estimateId
);
const retrieveEstimateResponse =
await patch.estimates.retrieveEstimate(estimateId);
expect(retrieveEstimateResponse.data.id).to.equal(estimateId);
expect(retrieveEstimateResponse.data.order.state).to.equal('reserved');

Expand Down
Loading
Loading