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: 0 additions & 54 deletions .babelrc

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ 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 ${{ matrix.node-version }}
- name: Use Node.js To Build
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 22.x
- 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
Comment on lines +25 to +29

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we actually care that you can build, test, and generally dev on the project in Node.js 12. This builds the app on a modern version, then uses the older version to run a small script that imports and attempts to use the lib.

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": ["@babel/register", "dotenv/config", "./test/helpers/common.js"],
"require": ["@swc-node/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": ["@babel/register", "./test/helpers/common.js"]
"require": ["@swc-node/register", "./test/helpers/common.js"]
}
7 changes: 7 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://swc.rs/schema.json",
"sourceMaps": true,
"env": {
"targets": "Node >= 12"
}
}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ 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: 0 additions & 1 deletion index.js

This file was deleted.

Loading