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

ts-standard for easier diff

remove async option

working on diffs

working on diffs

working on diffs

working on diffs

working on diffs

remove async

one more time
  • Loading branch information
KonnorRogers committed Nov 25, 2022
1 parent 2a4dd4e commit 5a261a8
Show file tree
Hide file tree
Showing 18 changed files with 4,515 additions and 1,244 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
3 changes: 1 addition & 2 deletions packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
filterUrl,
formatCGIData,
getSourceForBacktrace,
runAfterNotifyHandlers, endpoint, isBrowserConfig, getCauses
runAfterNotifyHandlers, endpoint, getCauses
} from './util'
import {
Config,
Expand Down Expand Up @@ -206,7 +206,6 @@ export abstract class Client {
endpoint: endpoint(this.config.endpoint, '/v1/notices/js'),
maxObjectDepth: this.config.maxObjectDepth,
logger: this.logger,
async: isBrowserConfig(this.config) ? this.config.async : undefined,
}, payload)
.then(res => {
if (res.statusCode !== 201) {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ 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,
maxObjectDepth?: number,
logger: Logger
async?: boolean // don't like this here because it's only for browser
}

export type NoticeTransportPayload = {
Expand Down
2 changes: 2 additions & 0 deletions packages/js/jest-browser-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const fetchMock = require('jest-fetch-mock')
fetchMock.enableFetchMocks()

0 comments on commit 5a261a8

Please sign in to comment.