Skip to content

Commit be96ca7

Browse files
authored
feat: typescript testing, correcting typescript errors (#542)
# Description - Adds missing Typescript params for FedEx MFA - I realized that we don't actually test if the Typescript definitions in this project are valid, we now run the Typescript compiler (`just typescript`) to ensure syntax errors can't pass into prod (doing so exposed a couple small issues that needed to be fixed in the definitions) - Bumps dependencies to get Typescript happy with config added - Removes a couple of lingering references to the removed `repl` - Bumps version to release FedEx MFA <!-- Please provide a general summary of your PR changes and link any related issues or other pull requests. --> # Testing `just typescript` now runs on CI to catch future errors, fixed the ones it caught here. <!-- Please provide details on how you tested this code. See below. - All pull requests must be tested (unit tests where possible with accompanying cassettes, or provide a screenshot of end-to-end testing when unit tests are not possible) - New features must get a new unit test - Bug fixes/refactors must re-record existing cassettes --> # Pull Request Type Please select the option(s) that are relevant to this PR. - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Improvement (fixing a typo, updating readme, renaming a variable name, etc)
1 parent a33eeb5 commit be96ca7

File tree

15 files changed

+725
-403
lines changed

15 files changed

+725
-403
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
strategy:
2525
matrix:
26-
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 24.x]
26+
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x, 24.x, 25.x]
2727
steps:
2828
- uses: actions/checkout@v6
2929
- uses: extractions/setup-just@v3
@@ -35,6 +35,20 @@ jobs:
3535
with:
3636
node-version: ${{ matrix.node-version }}
3737
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just test-node-compatibility
38+
# typescript checks that the our Typescript definitions can be compiled without errors
39+
typescript:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v6
43+
- uses: extractions/setup-just@v3
44+
- uses: actions/setup-node@v6
45+
with:
46+
node-version: 24
47+
- run: |
48+
cd types/demo
49+
npm install
50+
cd ../../
51+
just install install-styleguide typescript
3852
lint:
3953
runs-on: ubuntu-latest
4054
steps:

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# CHANGELOG
22

3+
## v8.6.0 (2026-02-20)
4+
5+
- Adds the following functions:
6+
- `FedExRegistration.registerAddress`
7+
- `FedExRegistration.requestPin`
8+
- `FedExRegistration.validatePin`
9+
- `FedExRegistration.submitInvoice`
10+
- Corrects additional Typescript definitions (eg: reference to `Rate` on `Shipment`, `Claim` missing `reference`)
11+
- Adds automated testing to catch Typescript errors in the future
12+
- Bumps dependencies
13+
314
## v8.5.0 (2026-02-03)
415

516
- Adds the following functions usable by child and referral customer users:
@@ -14,8 +25,8 @@
1425
## v8.4.0 (2025-11-24)
1526

1627
- Adds the following functions:
17-
- `embeddable.createSession`
18-
- `customerPortal.createAccountLink`
28+
- `Embeddable.createSession`
29+
- `CustomerPortal.createAccountLink`
1930
- Bumps dependencies
2031

2132
## v8.3.0 (2025-11-10)

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,6 @@ const client = new EasyPostClient('my-key', {
159159
});
160160
```
161161

162-
### Interactive CLI
163-
164-
Replace `easypost.js` with whatever compatible version you wish, as defined under `Compatibility`.
165-
166-
```bash
167-
API_KEY=yourkey ./repl.js --local easypost.js
168-
```
169-
170162
### HTTP Hooks
171163

172164
If you would need or want to view what requests are being made to the EasyPost API behind the scenes, you can provide functions to listen for the request and/or responses. This can be done with helper functions on the created client.

audit-ci.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
// Only fail the audit if there are critical vulnerabilities.
44
"critical": true,
55
// Can't update ESLint yet because we must support Node 16
6-
"allowlist": ["GHSA-p5wg-g6qr-c7cg"],
6+
"allowlist": ["GHSA-p5wg-g6qr-c7cg", "GHSA-2g4f-4pwh-qvx6", "GHSA-3ppc-4f35-3m26"],
77
}

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ test:
7575
test-node-compatibility:
7676
npm run test:node-compatibility
7777

78+
# Run the TypeScript compiler to check for type errors
79+
typescript:
80+
npm run typescript
81+
7882
# Update dependencies (Unix only)
7983
update: update-examples-submodule
8084
npm update

0 commit comments

Comments
 (0)