Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(core): split exports by browser/server for bundle size#20435
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -10,6 +10,25 @@ export const insertAt = (arr, index, ...insertees) => { | ||
| return newArr; | ||
| }; | ||
| /** | ||
| * Turn a list of module IDs into a test function | ||
| * Includes submodule exports by checking that it starts with the name | ||
| * plus a / character. The list would contain something like `'@sentry/core'` | ||
| * and we might test it against a module id like `'@sentry/core/browser'` | ||
| */ | ||
| const toFilterFunction = list => (Array.isArray(list) ? id => list.some(test => filterTest(test, id)) : list); | ||
| const filterTest = (test, id) => (test instanceof RegExp ? test.test(id) : id === test || id.startsWith(`${test}/`)); | ||
| /** | ||
| * Merge two external configs (function or array), returning a function that handles both. | ||
| */ | ||
| export function mergeExternals(base, specific) { | ||
| const baseFn = toFilterFunction(base); | ||
| const specificFn = toFilterFunction(specific); | ||
| return id => baseFn(id) || specificFn(id); | ||
| } | ||
cursor[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| /** | ||
| * Merge two arrays of plugins, making sure they're sorted in the correct order. | ||
| */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,6 +4,7 @@ | ||
| "include": ["src/**/*"], | ||
| "compilerOptions": { | ||
| "moduleResolution": "bundler" | ||
| // package-specific options | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { captureConsoleIntegration } from '@sentry/core'; | ||
| export { captureConsoleIntegration } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { createLangChainCallbackHandler } from '@sentry/core'; | ||
| export { createLangChainCallbackHandler } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { dedupeIntegration } from '@sentry/core'; | ||
| export { dedupeIntegration } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { extraErrorDataIntegration } from '@sentry/core'; | ||
| export { extraErrorDataIntegration } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { instrumentAnthropicAiClient } from '@sentry/core'; | ||
| export { instrumentAnthropicAiClient } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { instrumentGoogleGenAIClient } from '@sentry/core'; | ||
| export { instrumentGoogleGenAIClient } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { instrumentLangChainEmbeddings } from '@sentry/core'; | ||
| export { instrumentLangChainEmbeddings } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { instrumentLangGraph } from '@sentry/core'; | ||
| export { instrumentLangGraph } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { instrumentOpenAiClient } from '@sentry/core'; | ||
| export { instrumentOpenAiClient } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { moduleMetadataIntegration } from '@sentry/core'; | ||
| export { moduleMetadataIntegration } from '@sentry/core/browser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { rewriteFramesIntegration } from '@sentry/core'; | ||
| export { rewriteFramesIntegration } from '@sentry/core/browser'; |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.