Skip to content

Commit

Permalink
Polyfill fetch with cross-fetch library (#6)
Browse files Browse the repository at this point in the history
to be compatible with Node version <20
  • Loading branch information
mrkvon authored Oct 11, 2023
1 parent 094d40b commit 86ba1e5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@koa/router": "^12.0.0",
"@solid/access-token-verifier": "^2.0.5",
"bcryptjs": "^2.4.3",
"cross-fetch": "^4.0.0",
"dotenv": "^16.0.0",
"koa": "^2.14.2",
"koa-helmet": "^7.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/controllers/integration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { compare, hash } from 'bcryptjs'
import fetch from 'cross-fetch'
import crypto from 'crypto'
import { Middleware } from 'koa'
import { pick } from 'lodash'
Expand Down
1 change: 1 addition & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
generateDpopKeyPair,
} from '@inrupt/solid-client-authn-core'
import { expect } from 'chai'
import fetch from 'cross-fetch'
import * as uuid from 'uuid'

type Credentials = { email: string; password: string }
Expand Down
1 change: 1 addition & 0 deletions src/test/integration-finish.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from 'chai'
import * as cheerio from 'cheerio'
import fetch from 'cross-fetch'
import { describe } from 'mocha'
import Mail from 'nodemailer/lib/mailer'
import { SinonSandbox, SinonSpy, createSandbox } from 'sinon'
Expand Down
1 change: 1 addition & 0 deletions src/test/integration-start.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from 'chai'
import fetch from 'cross-fetch'
import { describe } from 'mocha'
import Mail from 'nodemailer/lib/mailer'
import { SinonSandbox, SinonSpy, createSandbox } from 'sinon'
Expand Down
1 change: 1 addition & 0 deletions src/test/notification.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from 'chai'
import * as cheerio from 'cheerio'
import fetch from 'cross-fetch'
import { describe } from 'mocha'
import Mail from 'nodemailer/lib/mailer'
import { SinonSandbox, SinonSpy, createSandbox } from 'sinon'
Expand Down
1 change: 1 addition & 0 deletions src/test/status.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from 'chai'
import * as cheerio from 'cheerio'
import fetch from 'cross-fetch'
import { describe } from 'mocha'
import Mail from 'nodemailer/lib/mailer'
import { SinonSandbox, SinonSpy, createSandbox } from 'sinon'
Expand Down

0 comments on commit 86ba1e5

Please sign in to comment.