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
54 changes: 54 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"presets": [
[
"@babel/env",
{
"targets": {
"node": "10.0"
}
}
]
],
"plugins": [
[
"@babel/plugin-proposal-class-properties",
{
"loose": false
}
],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"babel-plugin-transform-export-extensions"
],
"env": {
"test": {
"presets": [
[
"@babel/env",
{
"targets": {
"node": "10.0"
}
}
]
],
"plugins": [
[
"@babel/plugin-proposal-class-properties",
{
"loose": false
}
],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"babel-plugin-transform-export-extensions",
[
"istanbul",
{
"exclude": ["test/**/*"]
}
]
]
}
}
}
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@ jobs:
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js To Build
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 22.x
node-version: ${{ matrix.node-version }}
- run: make install
- run: make install-styleguide
- run: make build
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test
- name: Use Node.js ${{ matrix.node-version }} to test importing and using
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: make test-import-and-use
lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"timeout": 10000,
"require": ["@swc-node/register", "dotenv/config", "./test/helpers/common.js"],
"require": ["@babel/register", "dotenv/config", "./test/helpers/common.js"],
"recursive": true
}
2 changes: 1 addition & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"lines": 90,
"reporter": ["lcov", "text"],
"include": ["src/**/*.js"],
"require": ["@swc-node/register", "./test/helpers/common.js"]
"require": ["@babel/register", "./test/helpers/common.js"]
}
7 changes: 0 additions & 7 deletions .swcrc

This file was deleted.

4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ scan:
test:
npm run test

## test actually importing and useing the built version
test-import-and-use:
npm run test-import-and-use

## update - Update dependencies (Unix only)
update: | update-examples-submodule
npm update
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/easypost.js').default;
Loading