Skip to content

Commit 5e4b432

Browse files
Replaces Webpack/Babel/Mocha with Vite/Vitest (#485)
1 parent 24a1d05 commit 5e4b432

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+5060
-5991
lines changed

.babelrc

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,32 @@ on:
77
workflow_dispatch: ~
88

99
jobs:
10+
# build checks that the app can build and runs tests on the latest node version
1011
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make install install-styleguide build test
19+
# node-compatibility checks that the build version of the app can be imported
20+
# and used on older versions of node
21+
node-compatibility:
1122
runs-on: ubuntu-latest
1223
strategy:
1324
matrix:
1425
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
1526
steps:
1627
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make install install-styleguide build
1732
- uses: actions/setup-node@v4
1833
with:
1934
node-version: ${{ matrix.node-version }}
20-
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make install install-styleguide build test
35+
- run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test-node-compatibility
2136
lint:
2237
runs-on: ubuntu-latest
2338
steps:

.mocharc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.nycrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

Makefile

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

78+
## test-node-compatibility - Check the built project works for older versions of Node
79+
test-node-compatibility:
80+
npm run test:node-compatibility
81+
7882
## update - Update dependencies (Unix only)
7983
update: | update-examples-submodule
8084
npm update

audit-ci.jsonc

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,5 @@
22
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
33
"critical": true,
44
// Only fail the audit if there are critical vulnerabilities.
5-
"allowlist": [
6-
{
7-
"GHSA-8cp3-66vr-3r4c": {
8-
"active": true,
9-
"expiry": "2024-10-22",
10-
// Re-evaluate this vulnerability after this date.
11-
"notes": "Transitive dependency of `superagent`, awaiting new `superagent` release."
12-
// https://github.com/ladjs/superagent/issues/1799
13-
// Vulnerability fix only available in `[email protected]+`: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight.
14-
}
15-
},
16-
{
17-
"GHSA-grv7-fg5c-xmjg|braces": {
18-
"active": true,
19-
"expiry": "2024-12-22", // Re-evaluate this vulnerability after this date.
20-
"notes": "Transitive dependency of `chokidar` and `micromatch`"
21-
// (`braces` -> `chokidar` -> `mocha`), chokidar unlikely to get patched: https://github.com/paulmillr/chokidar/issues/1301, mocha maintenance questionable: https://github.com/mochajs/mocha/issues/5027
22-
// (`braces` -> `micromatch` -> `fast-glob` -> `globby` -> `typescript-eslint/typescript-estree`), micromatch is patched, but fast-glob not maintained: https://github.com/mrmlnc/fast-glob/issues/443
23-
}
24-
}
25-
]
5+
"allowlist": []
266
}

0 commit comments

Comments
 (0)