Skip to content

Commit

Permalink
fix: background-worker compatibiltiy
Browse files Browse the repository at this point in the history
update transport tests

fix test suite

fix linting issues

fix linting issues

downgrade jest version number

package downgrade

fix test suite

cleanup comment

fix package version

linting

add comments on Cloudflare workers

add comments on Cloudflare workers

fix references to document
  • Loading branch information
KonnorRogers committed Nov 25, 2022
1 parent 2a4dd4e commit 9dac42a
Show file tree
Hide file tree
Showing 17 changed files with 5,175 additions and 1,681 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ node_modules
*/**/dist
*/**/.DS_Store
*/**/node_modules

lerna-debug.log
browserstack.err
8 changes: 7 additions & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,16 @@ export type ProcessStats = {

export type TransportOptions = {
method: 'GET' | 'POST',
// @TODO: This should probably follow the fetch "HeadersInit"
// headers?: HeadersInit
headers?: Record<string, number | string | string[] | undefined>,
endpoint: string,
endpoint: string | URL,
maxObjectDepth?: number,
logger: Logger
/** @deprecated
* transport no longer uses fetch instead XMLHTTPRequest.
* This option only existed for synchronous XMLHTTPRequest calls.
*/
async?: boolean // don't like this here because it's only for browser
}

Expand Down
3 changes: 3 additions & 0 deletions packages/js/jest-browser-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// require("isomorphic-fetch") // Sets up globals for things like fetch, Response, Headers, Request, etc that are part of Node 18.
const fetchMock = require('jest-fetch-mock')
fetchMock.enableFetchMocks()
Loading

0 comments on commit 9dac42a

Please sign in to comment.