Skip to content

Commit acfee75

Browse files
authored
Merge pull request #496 from EasyPost/breaking_changes
Breaking changes
2 parents d45a961 + 4caa2dc commit acfee75

10 files changed

Lines changed: 453 additions & 656 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
25+
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-node@v4

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Next Release
44

5+
- Drop support for Node 12, 13, 14, and 15
56
- Adds `webhook_secret` and `custom_headers` properties to Typescript definitions of a Webhook
7+
- `findMatchingMockRequest` mocking function made private
8+
- Removes undocumented and unmaintained `repl`
69
- Bumps dependencies
710

811
## v7.5.5 (2025-02-06)

audit-ci.jsonc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
33
// Only fail the audit if there are critical vulnerabilities.
44
"critical": true,
5-
// TODO: `GHSA-67mh-4wv8-2f99` requires us to update `vite` once they bump their own dependencies to fix `esbuild`
6-
"allowlist": ["GHSA-67mh-4wv8-2f99"]
75
}

package-lock.json

Lines changed: 429 additions & 547 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"types": "types/index.d.ts",
1616
"license": "MIT",
1717
"engines": {
18-
"node": ">= 12.0"
18+
"node": ">= 16.0"
1919
},
2020
"scripts": {
2121
"build": "vite build",
@@ -34,25 +34,25 @@
3434
"watch": "vite build --watch"
3535
},
3636
"dependencies": {
37-
"core-js": "~3.30.2",
37+
"core-js": "~3.41",
3838
"nodent-runtime": "~3.2.1",
39-
"regenerator-runtime": "~0.13.11",
39+
"regenerator-runtime": "~0.14.1",
4040
"source-map-support": "~0.5.21",
41-
"superagent": "~8.0.9",
42-
"uuid": "^9.0.0",
41+
"superagent": "~10.1.1",
42+
"uuid": "^11.1.0",
4343
"yargs": "~17.7.2",
4444
"yargs-parser": "~21.1.1"
4545
},
4646
"devDependencies": {
47-
"@pollyjs/adapter-node-http": "^6.0.5",
48-
"@pollyjs/core": "^6.0.5",
49-
"@pollyjs/persister-fs": "^6.0.5",
47+
"@pollyjs/adapter-node-http": "^6.0.6",
48+
"@pollyjs/core": "^6.0.6",
49+
"@pollyjs/persister-fs": "^6.0.6",
5050
"@typescript-eslint/eslint-plugin": "^5.59.5",
5151
"@typescript-eslint/parser": "^5.59.5",
5252
"@vitest/coverage-istanbul": "^3.0.6",
53-
"audit-ci": "^6.6.1",
54-
"chai": "4.3.10",
55-
"chai-as-promised": "^7.1.1",
53+
"audit-ci": "^7.1",
54+
"chai": "5.2",
55+
"chai-as-promised": "^8.0.1",
5656
"cross-env": "^7.0.3",
5757
"dotenv": "^16.4.5",
5858
"eslint": "^8.40.0",
@@ -65,9 +65,9 @@
6565
"eslint-plugin-react": "^7.32.1",
6666
"eslint-plugin-vitest-globals": "^1.5.0",
6767
"jsdoc": "^4.0.2",
68-
"prettier": "^2.8.8",
68+
"prettier": "^3.5",
6969
"typescript": "^4.9.5 || ~5.0.0",
70-
"vite": "^6.1.0",
70+
"vite": "^6.2",
7171
"vite-plugin-externals": "^0.6.2",
7272
"vitest": "^3.0.6",
7373
"vows": "^0.8.3"

repl.js

Lines changed: 0 additions & 84 deletions
This file was deleted.

test/helpers/mocking.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class MockMiddleware {
3434
// eslint-disable-next-line class-methods-use-this,no-unused-vars,consistent-return
3535
send(body) {
3636
// we don't need to do anything with the body
37-
const mockRequest = this.findMatchingMockRequest(this.request);
37+
const mockRequest = this._findMatchingMockRequest(this.request);
3838
if (mockRequest) {
3939
this.body = mockRequest.responseInfo.body;
4040
return mockRequest.responseInfo;
@@ -45,16 +45,18 @@ export class MockMiddleware {
4545
// eslint-disable-next-line no-unused-vars
4646
query(params) {
4747
// we don't need to do anything with the params
48-
const mockRequest = this.findMatchingMockRequest(this.request);
48+
const mockRequest = this._findMatchingMockRequest(this.request);
4949
if (mockRequest) {
5050
this.body = mockRequest.responseInfo.body;
5151
return mockRequest.responseInfo;
5252
}
5353
return {};
5454
}
5555

56-
// TODO: Make private in the future
57-
findMatchingMockRequest(request) {
56+
/**
57+
* @private
58+
*/
59+
_findMatchingMockRequest(request) {
5860
// for each mock request, check if the method and url match
5961
for (let i = 0; i < this.mockRequests.length; i += 1) {
6062
const mockRequest = this.mockRequests[i];

test/services/address.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ describe('Address Service', function () {
4747

4848
// Delivery verification assertions
4949
expect(address.verifications.delivery.success).to.be.false;
50-
// TODO: details is not deserializing correctly, related to the larger "double EasyPostObject" wrapping issue
51-
// expect(address.verifications.delivery.details).to.equal({});
50+
expect(address.verifications.delivery.details).to.not.be.null;
5251
expect(address.verifications.delivery.errors[0].code).to.equal('E.ADDRESS.NOT_FOUND');
5352
expect(address.verifications.delivery.errors[0].field).to.equal('address');
5453
expect(address.verifications.delivery.errors[0].suggestion).to.be.null;

types/PaymentMethod/PaymentMethod.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { IObjectWithId } from '../base';
22

33
/**
44
* The Payment method object can be either credit card or bank account.
5-
*
6-
* TODO: Add the link to the API doc once its updated
75
*/
86
export declare interface IPaymentMethod extends IObjectWithId<'PaymentMethod'> {
97
/**

types/errors/ErrorCode.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// TODO: there seems to be a lot of duplicate codes listed here https://www.easypost.com/errors-guide
21
export declare type TErrorCode =
32
| 'ADDRESS.COUNTRY.INVALID'
43
| 'ADDRESS.PARAMETERS.INVALID_CHARACTER'

0 commit comments

Comments
 (0)