-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drop @bugsnag/core/(client|event|session) exports #2317
Changes from 7 commits
944ebf1
50bebe4
a1d1a39
57b0f2d
bd375c7
2264e53
457bb7b
dc7c41e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,7 @@ const plugins = [ | |
babel({ babelHelpers: 'bundled' }), | ||
] | ||
|
||
const external = [ | ||
'@bugsnag/cuid', | ||
] | ||
const external = [/node_modules/] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as i mentioned in previous PR i think its right that core externalises all its dependencies leaving the individual notifiers to bundle what they need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may be misunderstanding the point of the external dependencies, but why do we need node_modules here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This statement makes rollup treat all node_modules as external - see https://stackoverflow.com/questions/44844088/how-to-set-as-external-all-node-modules-in-rollup This means that instead of pulling a load of code into the core bundle they contine to be referenced externally:
The thing is if What I'm saying is that for all these shared libraries like core and plugins that are consumed by multiple notifiers they should externalise all their dependencies. Then its left to the notifier builds themselves to pull in a single copy of every external dependency (as you would always want for a browser build). You may or may not want this for a node notifier build, but this gives use the option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, understood! that definitely makes sense then. thanks! 👍🏻 |
||
|
||
export default [ | ||
createRollupConfig({ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type BreadcrumbType = 'error' | 'log' | 'manual' | 'navigation' | 'process' | 'request' | 'state' | 'user'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
export interface Schema { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
apiKey: { | ||
defaultValue: () => null | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
appVersion: { | ||
defaultValue: () => undefined | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
appType: { | ||
defaultValue: () => undefined | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
autoDetectErrors: { | ||
defaultValue: () => true | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
enabledErrorTypes: { | ||
defaultValue: () => { unhandledExceptions: boolean, unhandledRejections: boolean } | ||
message: string | ||
allowPartialObject: boolean | ||
validate: (value: unknown) => boolean | ||
} | ||
onError: { | ||
defaultValue: () => [] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
onSession: { | ||
defaultValue: () => [] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
onBreadcrumb: { | ||
defaultValue: () => [] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
endpoints: { | ||
defaultValue: (endpoints: { notify: string, sessions: string } | undefined) => { notify: string | null, sessions: string | null } | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
autoTrackSessions: { | ||
defaultValue: () => boolean | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
enabledReleaseStages: { | ||
defaultValue: () => null | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
releaseStage: { | ||
defaultValue: () => 'production' | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
maxBreadcrumbs: { | ||
defaultValue: () => 25 | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
enabledBreadcrumbTypes: { | ||
defaultValue: () => ['navigation', 'request', 'process', 'log', 'user', 'state', 'error', 'manual'] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
context: { | ||
defaultValue: () => undefined | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
user: { | ||
defaultValue: () => {} | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
metadata: { | ||
defaultValue: () => {} | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
logger: { | ||
defaultValue: () => undefined | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
redactedKeys: { | ||
defaultValue: () => ['password'] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
plugins: { | ||
defaultValue: () => [] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
featureFlags: { | ||
defaultValue: () => [] | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
reportUnhandledPromiseRejectionsAsHandled: { | ||
defaultValue: () => false | ||
message: string | ||
validate: (value: unknown) => boolean | ||
} | ||
} | ||
|
||
export const schema: Schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also exporting
schema
now