Skip to content
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Next Release

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

## v7.5.5 (2025-02-06)
Expand Down
2 changes: 0 additions & 2 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
// Only fail the audit if there are critical vulnerabilities.
"critical": true,
// TODO: `GHSA-67mh-4wv8-2f99` requires us to update `vite` once they bump their own dependencies to fix `esbuild`
"allowlist": ["GHSA-67mh-4wv8-2f99"]
}
976 changes: 429 additions & 547 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"types": "types/index.d.ts",
"license": "MIT",
"engines": {
"node": ">= 12.0"
"node": ">= 16.0"
},
"scripts": {
"build": "vite build",
Expand All @@ -34,25 +34,25 @@
"watch": "vite build --watch"
},
"dependencies": {
"core-js": "~3.30.2",
"core-js": "~3.41",
"nodent-runtime": "~3.2.1",
"regenerator-runtime": "~0.13.11",
"regenerator-runtime": "~0.14.1",
"source-map-support": "~0.5.21",
"superagent": "~8.0.9",
"uuid": "^9.0.0",
"superagent": "~10.1.1",
"uuid": "^11.1.0",
"yargs": "~17.7.2",
"yargs-parser": "~21.1.1"
},
"devDependencies": {
"@pollyjs/adapter-node-http": "^6.0.5",
"@pollyjs/core": "^6.0.5",
"@pollyjs/persister-fs": "^6.0.5",
"@pollyjs/adapter-node-http": "^6.0.6",
"@pollyjs/core": "^6.0.6",
"@pollyjs/persister-fs": "^6.0.6",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@vitest/coverage-istanbul": "^3.0.6",
"audit-ci": "^6.6.1",
"chai": "4.3.10",
"chai-as-promised": "^7.1.1",
"audit-ci": "^7.1",
"chai": "5.2",
"chai-as-promised": "^8.0.1",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.40.0",
Expand All @@ -65,9 +65,9 @@
"eslint-plugin-react": "^7.32.1",
"eslint-plugin-vitest-globals": "^1.5.0",
"jsdoc": "^4.0.2",
"prettier": "^2.8.8",
"prettier": "^3.5",
"typescript": "^4.9.5 || ~5.0.0",
"vite": "^6.1.0",
"vite": "^6.2",
"vite-plugin-externals": "^0.6.2",
"vitest": "^3.0.6",
"vows": "^0.8.3"
Expand Down
84 changes: 0 additions & 84 deletions repl.js

This file was deleted.

10 changes: 6 additions & 4 deletions test/helpers/mocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class MockMiddleware {
// eslint-disable-next-line class-methods-use-this,no-unused-vars,consistent-return
send(body) {
// we don't need to do anything with the body
const mockRequest = this.findMatchingMockRequest(this.request);
const mockRequest = this._findMatchingMockRequest(this.request);
if (mockRequest) {
this.body = mockRequest.responseInfo.body;
return mockRequest.responseInfo;
Expand All @@ -45,16 +45,18 @@ export class MockMiddleware {
// eslint-disable-next-line no-unused-vars
query(params) {
// we don't need to do anything with the params
const mockRequest = this.findMatchingMockRequest(this.request);
const mockRequest = this._findMatchingMockRequest(this.request);
if (mockRequest) {
this.body = mockRequest.responseInfo.body;
return mockRequest.responseInfo;
}
return {};
}

// TODO: Make private in the future
findMatchingMockRequest(request) {
/**
* @private
*/
_findMatchingMockRequest(request) {
// for each mock request, check if the method and url match
for (let i = 0; i < this.mockRequests.length; i += 1) {
const mockRequest = this.mockRequests[i];
Expand Down
3 changes: 1 addition & 2 deletions test/services/address.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ describe('Address Service', function () {

// Delivery verification assertions
expect(address.verifications.delivery.success).to.be.false;
// TODO: details is not deserializing correctly, related to the larger "double EasyPostObject" wrapping issue
// expect(address.verifications.delivery.details).to.equal({});
expect(address.verifications.delivery.details).to.not.be.null;
expect(address.verifications.delivery.errors[0].code).to.equal('E.ADDRESS.NOT_FOUND');
expect(address.verifications.delivery.errors[0].field).to.equal('address');
expect(address.verifications.delivery.errors[0].suggestion).to.be.null;
Expand Down
2 changes: 0 additions & 2 deletions types/PaymentMethod/PaymentMethod.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { IObjectWithId } from '../base';

/**
* The Payment method object can be either credit card or bank account.
*
* TODO: Add the link to the API doc once its updated
*/
export declare interface IPaymentMethod extends IObjectWithId<'PaymentMethod'> {
/**
Expand Down
1 change: 0 additions & 1 deletion types/errors/ErrorCode.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// TODO: there seems to be a lot of duplicate codes listed here https://www.easypost.com/errors-guide
export declare type TErrorCode =
| 'ADDRESS.COUNTRY.INVALID'
| 'ADDRESS.PARAMETERS.INVALID_CHARACTER'
Expand Down