Skip to content
Open
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: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
!/dist/**/*
!/LICENSE
!/package.json
!/prop_types.js
!/README.md
!/src/**/*
!/UPGRADE_GUIDE.md
Expand Down
44 changes: 0 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,8 @@ NOTE: This library is intended to be used in a backend Node service and not in a
npm install --save @easypost/api
```

**NOTE:** If you are using @easypost/api prior to v5 and a version of Node less than 6.9, you will need to install and include a polyfill, such as `babel-polyfill`, and include it in your project:

```bash
npm install --save babel-polyfill
```

```javascript
// Require the polyfill if necessary:
require('babel-polyfill');

// Require the EasyPost library:
const EasyPost = require('@easypost/api');
```

You can alternatively download the various built assets from this project's [releases page](https://github.com/EasyPost/easypost-node/releases).

### Compatibility

#### v4 and Earlier

- `require('@easypost/api/easypost.8-lts.js')` (Node 8.9+)
- `require('@easypost/api/easypost.6-lts.js')` (Node 6.9+)
- `require('@easypost/api/easypost.legacy.js')` (Node 0.10+)

#### v5

If using @easypost/api v5, you can require the base project which is built on Node v10 - v16

#### v6

If using @easypost/api v6, you can require the base project which is built on Node v12+

### Note on ES6 Usage

You can import specific versions of the compiled code if you're using later versions of Node and using @easypost/api prior to v5.

```javascript
// Imports the un-transformed es6
import '@easypost/api/src/easypost';

// Use the following to import mininally transformed versions
import '@easypost/api/easypost.6-lts';
import '@easypost/api/easypost.8-lts';
import '@easypost/api/easypost.legacy.js'; // (v0.10)
```

## Usage

A simple create & buy shipment example:
Expand Down
84 changes: 0 additions & 84 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@
"@typescript-eslint/parser": "^8.68.0",
"@vitest/coverage-istanbul": "^4.0.18",
"audit-ci": "^7.1",
"chai": "^5.2",
"chai-as-promised": "^8.0.1",
"cross-env": "^7.0.3",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-vitest-globals": "^1.5.0",
"jsdoc": "^4.0.5",
"prettier": "^3.8",
"typescript": "~5.3.0",
Expand Down
29 changes: 23 additions & 6 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
{
"extends": ["eslint:recommended", "prettier", "plugin:vitest-globals/recommended"],
"extends": ["eslint:recommended", "prettier"],

"env": {
"node": true,
"vitest-globals/env": true
"es2021": true,
},

"rules": {
"global-require": "off"
"global-require": "off",
},

"globals": {
"expect": true
"afterAll": true,
"afterEach": true,
"beforeAll": true,
"beforeEach": true,
"describe": true,
"expect": true,
"it": true,
"vi": true,
},
"overrides": [
{
"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-undef": "off",
"no-unused-vars": "off",
},
},
],
"parserOptions": {
"ecmaVersion": 13
}
"ecmaVersion": 13,
},
}
62 changes: 0 additions & 62 deletions test/helpers/fixture.d.ts

This file was deleted.

Loading