-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from qgustavor/replacing-request
Replace request with fetch (and fix other bugs)
- Loading branch information
Showing
45 changed files
with
13,011 additions
and
1,680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# This workflow will do a clean install of node dependencies, cache/restore them, run tests across different versions of node and deno | ||
|
||
name: Test library | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
pre_check: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@master | ||
|
||
test-node: | ||
needs: pre_check | ||
if: ${{ needs.pre_check.outputs.should_skip != 'true' }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm run lint-js | ||
- run: npm run lint-ts | ||
if: ${{ matrix.node-version != '14.x' }} | ||
- run: npm run test-runner node | ||
|
||
test-deno: | ||
needs: pre_check | ||
if: ${{ needs.pre_check.outputs.should_skip != 'true' }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
deno-version: [v1.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# Testing code still depends on Node | ||
# (mostly because mega-mock: no plan to migrate it to Deno) | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Use Deno ${{ matrix.deno-version }} | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ matrix.deno-version }} | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test deno |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
files: [ | ||
'test/**/*.test.mjs' | ||
], | ||
timeout: '20s', | ||
failFast: true, | ||
extensions: { | ||
js: true, | ||
mjs: true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const fetch = globalThis.fetch | ||
export default fetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const Agent = null | ||
export default Agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export { Buffer } from 'buffer' | ||
export const process = { | ||
env: {}, | ||
nextTick: (fn, ...argv) => { | ||
globalThis.setTimeout(fn, 0, ...argv) | ||
} | ||
} | ||
export const global = globalThis |
Oops, something went wrong.