Skip to content

Commit 9de321c

Browse files
ANGkeithfirecow
andauthored
Refactor/esm (#1331)
* esm * ts2esm vodoo * bump axios major version for esm support * replace ts-node with tsx * importing json files in esm * refactor: yargs esm * quickfix: downgrade axios to fix type problems with axios-mock-adapter * fix import issues * jest + esm * replace global jest with import.meta.jest - https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs * install esbuild * pkg+esbuild * make it possible to run jest without npm run build * manage to get ts-node to work - when using tsx unable to get source-mapping to work * fix npm run test-except-dind * tweak tsconfig * attempt to run npm coverage without building * only way i manage to get npm run coverage to work - was getting the exact same error as per jestjs/jest#15000 * resolve esbuild warning with direct eval * fix `pkg` warnings * docs: update docs * Use @yao-pkg/pkg. Use bin/ instead of pkg/ folder * Upgrade axios * Reintroduce babel-jest * Rename github action job to smoke-test * Use node20 for pkg vm * Fix user-agent --------- Co-authored-by: Mads Jon Nielsen <[email protected]>
1 parent 8266f03 commit 9de321c

File tree

148 files changed

+1293
-868
lines changed

Some content is hidden

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

148 files changed

+1293
-868
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
strict: true
2323

24-
pkg:
24+
smoke-test:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
@@ -33,9 +33,9 @@ jobs:
3333
path: ${{ env.PKG_CACHE_PATH }}
3434
key: pkg-cache-${{ matrix.node-version }}
3535
- run: npm ci
36-
- run: npm run build
36+
- run: npm run esbuild
3737
- run: npm run pkg-linux
38-
- run: node src/index.js --version
38+
- run: node bin/index.cjs --version
3939
- run: bin/linux/gitlab-ci-local --version
4040
- run: bin/linux/gitlab-ci-local --help
4141

@@ -70,7 +70,7 @@ jobs:
7070
cache: 'npm'
7171
- run: npm ci
7272
- name: Run Tests
73-
run: FORCE_COLOR=1 npx jest --coverage --testTimeout 90000 --verbose
73+
run: npm run coverage
7474
- uses: sonarsource/[email protected]
7575
env:
7676
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ tsconfig.tsbuildinfo
2020
.DS_Store
2121

2222
.vscode
23+
pkg
2324

2425
/.gitlab-ci.yml

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ You need nodejs 18+
368368
# Install node_modules
369369
npm install
370370
371-
# Compiled typescript to javascript
372-
npm run build
373-
374371
# Run all tests
375372
npm run test
376373

0 commit comments

Comments
 (0)