Skip to content
Draft
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ dist
/docs
examples
node_modules
types
types/demo
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just test-node-compatibility
# typescript checks that the our Typescript definitions can be compiled without errors
# typescript checks that TypeScript declarations and compatibility tests compile without errors
typescript:
runs-on: ubuntu-latest
steps:
Expand All @@ -44,11 +44,7 @@ jobs:
- uses: actions/setup-node@v7
with:
node-version: 24
- run: |
cd types/demo
npm install
cd ../../
just install typescript
- run: just install typescript
lint:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 0 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
!/prop_types.js
!/README.md
!/src/**/*
!/types/**/*
!/UPGRADE_GUIDE.md

# Here we exclude files that we pulled in from above that should be removed
.DS_Store
types/.eslintrc
types/demo
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ examples
official/fixtures/
package-lock.json
style_guides/
types/
vendor/
venv/
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"homepage": "https://easypost.com",
"exports": {
".": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/easypost.mjs",
"require": "./dist/easypost.js"
}
},
"main": "./dist/easypost.js",
"module": "./dist/easypost.mjs",
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"repository": {
"type": "git",
"url": "git://github.com/easypost/easypost-node.git"
Expand All @@ -31,12 +31,12 @@
"formatCheck": "prettier --check .",
"lint": "eslint --ext .js,.ts --ignore-pattern 'examples/**' .",
"lintFix": "eslint --ext .js,.ts --ignore-pattern 'examples/**' --fix .",
"prepublishOnly": "npm run clean && npm run build && npm run test && npm run lint && npm run formatCheck",
"prepublishOnly": "npm run clean && npm run build && npm run typescript:declarations && npm run test && npm run lint && npm run formatCheck",
"scan": "npx audit-ci -m --config ./audit-ci.jsonc",
"test": "cross-env NODE_ENV=test vitest run",
"test:node-compatibility": "cross-env NODE_ENV=test node ./test/node_compatibility",
"typescript": "npm run typescript:declarations && npm run typescript:source && npm run typescript:compat",
"typescript:declarations": "npx tsc -p tsconfig.json",
"typescript:declarations": "rm -rf ./dist/types && npx tsc -p tsconfig.json",
"typescript:source": "npx tsc -p tsconfig.build.json",
"typescript:compat": "npx tsc -p tsconfig.type-tests.json",
"watch": "vite build --watch"
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import EasyPostClient from './easypost';

export default EasyPostClient;
2 changes: 1 addition & 1 deletion test/services/claim.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Claim from '../../src/models/claim';
import Fixture from '../helpers/fixture';
import * as setupPolly from '../helpers/setup_polly';

/** @typedef {import("../../types/EasyPost").default} Client */
/** @typedef {import("../../src/easypost").default} Client */

const CLAIM_AMOUNT = 100;

Expand Down
12 changes: 10 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": true
"allowJs": true,
"checkJs": false,
"noImplicitAny": false,
"declaration": true,
"emitDeclarationOnly": true,
"rootDir": "./src",
"outDir": "./dist/types",
"noEmit": false
},
"include": ["types"]
"include": ["src/**/*.js", "src/**/*.ts"],
"exclude": ["dist/**", "docs/**", "coverage/**", "node_modules/**"]
}
9 changes: 0 additions & 9 deletions types/.eslintrc

This file was deleted.

194 changes: 0 additions & 194 deletions types/Address/Address.d.ts

This file was deleted.

30 changes: 0 additions & 30 deletions types/Address/AddressCreateParameters.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions types/Address/AddressListParameters.d.ts

This file was deleted.

22 changes: 0 additions & 22 deletions types/Address/Verification.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions types/Address/VerificationDetails.d.ts

This file was deleted.

Loading