Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ jobs:
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Lint source files
run: yarn lint:lerna
- name: Lint C++ files
run: yarn lint:clang
- name: Lint for ES compatibility
run: yarn lint:es-compatibility

Expand All @@ -289,7 +287,7 @@ jobs:
id: install_dependencies

- name: Check file formatting
run: yarn lint:prettier && yarn lint:biome
run: yarn lint:prettier

job_circular_dep_check:
name: Circular Dependency Check
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages/browser/test/loader.js
packages/replay-worker/examples/worker.min.js
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all"
}
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// for the documentation about the extensions.json format
"recommendations": [
"esbenp.prettier-vscode",
"biomejs.biome",
"dbaeumer.vscode-eslint",
"augustocdias.tasks-shell-input",
"denoland.vscode-deno"
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
}
],
"deno.enablePaths": ["packages/deno/test"],
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
103 changes: 0 additions & 103 deletions biome.json

This file was deleted.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@
"clean:tarballs": "rimraf {packages,dev-packages}/*/*.tgz",
"clean:watchman": "watchman watch-del \".\"",
"clean:all": "run-s clean:build clean:tarballs clean:caches clean:deps clean:watchman",
"fix": "run-s fix:biome fix:prettier fix:lerna",
"fix": "run-s fix:prettier fix:lerna",
"fix:lerna": "lerna run fix",
"fix:biome": "biome check --apply .",
"fix:prettier": "prettier \"**/*.md\" \"**/*.css\" --write",
"fix:prettier": "prettier \"**/*.md\" \"**/*.css\" \"packages/**/**.{ts,js}\" --write",
"changelog": "ts-node ./scripts/get-commit-list.ts",
"link:yarn": "lerna exec yarn link",
"lint": "run-s lint:lerna lint:biome lint:prettier",
"lint:clang": "lerna run lint:clang",
"lint": "run-s lint:prettier lint:lerna",
"lint:lerna": "lerna run lint",
"lint:biome": "biome check .",
"lint:prettier": "prettier \"**/*.md\" \"**/*.css\" --check",
"lint:prettier": "prettier \"**/*.md\" \"**/*.css\" \"packages/**/**.{ts,js}\" --check",
"lint:es-compatibility": "es-check es2020 ./packages/*/build/{bundles,npm/cjs,cjs}/*.js && es-check es2020 ./packages/*/build/{npm/esm,esm}/*.js --module",
"postpublish": "lerna run --stream --concurrency 1 postpublish",
"test": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests}\" test",
Expand Down Expand Up @@ -98,7 +95,6 @@
"dev-packages/rollup-utils"
],
"devDependencies": {
"@biomejs/biome": "^1.5.2",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-esm-shim": "^0.1.5",
"@rollup/plugin-json": "^6.1.0",
Expand Down
8 changes: 1 addition & 7 deletions packages/browser/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@ export {
} from './stack-parsers';
export { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder';
export { createUserFeedbackEnvelope } from './userfeedback';
export {
getDefaultIntegrations,
forceLoad,
init,
onLoad,
showReportDialog,
} from './sdk';
export { getDefaultIntegrations, forceLoad, init, onLoad, showReportDialog } from './sdk';

export { breadcrumbsIntegration } from './integrations/breadcrumbs';
export { globalHandlersIntegration } from './integrations/globalhandlers';
Expand Down
5 changes: 1 addition & 4 deletions packages/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ export { makeBrowserOfflineTransport } from './transports/offline';
export { browserProfilingIntegration } from './profiling/integration';
export { spotlightBrowserIntegration } from './integrations/spotlight';
export { browserSessionIntegration } from './integrations/browsersession';
export {
featureFlagsIntegration,
type FeatureFlagsIntegration,
} from './integrations/featureFlags';
export { featureFlagsIntegration, type FeatureFlagsIntegration } from './integrations/featureFlags';
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly';
export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
export { unleashIntegration } from './integrations/featureFlags/unleash';
Expand Down
11 changes: 2 additions & 9 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ export {
getClient,
getTraceContextFromScope,
} from './currentScopes';
export {
getDefaultCurrentScope,
getDefaultIsolationScope,
} from './defaultScopes';
export { getDefaultCurrentScope, getDefaultIsolationScope } from './defaultScopes';
export { setAsyncContextStrategy } from './asyncContext';
export { getGlobalSingleton, getMainCarrier } from './carrier';
export { makeSession, closeSession, updateSession } from './session';
Expand All @@ -60,11 +57,7 @@ export { initAndBind, setCurrentClient } from './sdk';
export { createTransport } from './transports/base';
export { makeOfflineTransport } from './transports/offline';
export { makeMultiplexedTransport } from './transports/multiplexed';
export {
getIntegrationsToSetup,
addIntegration,
defineIntegration,
} from './integration';
export { getIntegrationsToSetup, addIntegration, defineIntegration } from './integration';
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';
export { prepareEvent } from './utils/prepareEvent';
export { createCheckInEnvelope } from './checkin';
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/tracing/dynamicSamplingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ export function getDynamicSamplingContextFromSpan(span: Span): Readonly<Partial<
// The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
traceState?.get('sentry.sample_rand') ??
// On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
getCapturedScopesOnSpan(rootSpan)
.scope?.getPropagationContext()
.sampleRand.toString();
getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();
}

applyLocalSampleRateToDsc(dsc);
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/tracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ export { setCapturedScopesOnSpan, getCapturedScopesOnSpan } from './utils';
export { startIdleSpan, TRACING_DEFAULTS } from './idleSpan';
export { SentrySpan } from './sentrySpan';
export { SentryNonRecordingSpan } from './sentryNonRecordingSpan';
export {
setHttpStatus,
getSpanStatusFromHttpCode,
} from './spanstatus';
export { setHttpStatus, getSpanStatusFromHttpCode } from './spanstatus';
export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';
export {
startSpan,
Expand Down
11 changes: 2 additions & 9 deletions packages/core/src/types-hoist/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ export type {
SendFeedbackParams,
UserFeedback,
} from './feedback';
export type {
QueryParams,
RequestEventData,
SanitizedRequestData,
} from './request';
export type { QueryParams, RequestEventData, SanitizedRequestData } from './request';
export type { Runtime } from './runtime';
export type { SdkInfo } from './sdkinfo';
export type { SdkMetadata } from './sdkmetadata';
Expand Down Expand Up @@ -119,10 +115,7 @@ export type { StackFrame } from './stackframe';
export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';
export type { PropagationContext, TracePropagationTargets, SerializedTraceData } from './tracing';
export type { StartSpanOptions } from './startSpanOptions';
export type {
TraceparentData,
TransactionSource,
} from './transaction';
export type { TraceparentData, TransactionSource } from './transaction';
export type { CustomSamplingContext, SamplingContext } from './samplingcontext';
export type {
DurationUnit,
Expand Down
24 changes: 4 additions & 20 deletions packages/core/src/utils-hoist/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
export { applyAggregateErrorsToEvent } from './aggregate-errors';
export { getBreadcrumbLogLevelFromHttpStatusCode } from './breadcrumb-log-level';
export {
getComponentName,
getLocationHref,
htmlTreeAsString,
} from './browser';
export { getComponentName, getLocationHref, htmlTreeAsString } from './browser';
export { dsnFromString, dsnToString, makeDsn } from './dsn';
export { SentryError } from './error';
export { GLOBAL_OBJ } from './worldwide';
Expand All @@ -13,12 +9,7 @@ export { addConsoleInstrumentationHandler } from './instrument/console';
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch';
export { addGlobalErrorInstrumentationHandler } from './instrument/globalError';
export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection';
export {
addHandler,
maybeInstrument,
resetInstrumentationHandlers,
triggerHandlers,
} from './instrument/handlers';
export { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers } from './instrument/handlers';
export {
isDOMError,
isDOMException,
Expand Down Expand Up @@ -88,11 +79,7 @@ export {
supportsReportingObserver,
} from './supports';
export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './syncpromise';
export {
browserPerformanceTimeOrigin,
dateTimestampInSeconds,
timestampInSeconds,
} from './time';
export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './time';
export {
TRACEPARENT_REGEXP,
extractTraceparentData,
Expand Down Expand Up @@ -137,10 +124,7 @@ export { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment } from './url
export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames } from './eventbuilder';
export { callFrameToStackFrame, watchdogTimer } from './anr';
export { LRUMap } from './lru';
export {
generateTraceId,
generateSpanId,
} from './propagationContext';
export { generateTraceId, generateSpanId } from './propagationContext';
export { vercelWaitUntil } from './vercelWaitUntil';
export { SDK_VERSION } from './version';
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './debug-ids';
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function getAbsoluteUrl({
url,
protocol,
host,
}: { url?: string; protocol: string; host?: string }): string | undefined {
}: {
url?: string;
protocol: string;
host?: string;
}): string | undefined {
if (url?.startsWith('http')) {
return url;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/core/test/lib/utils/meta.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('getTraceMetaTags', () => {
baggage: 'sentry-environment=production',
});

expect(getTraceMetaTags()).toBe(`<meta name="sentry-trace" content="12345678901234567890123456789012-1234567890123456-1"/>
expect(getTraceMetaTags())
.toBe(`<meta name="sentry-trace" content="12345678901234567890123456789012-1234567890123456-1"/>
<meta name="baggage" content="sentry-environment=production"/>`);
});

Expand Down
5 changes: 1 addition & 4 deletions packages/deno/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ export {

export { DenoClient } from './client';

export {
getDefaultIntegrations,
init,
} from './sdk';
export { getDefaultIntegrations, init } from './sdk';

export { denoContextIntegration } from './integrations/context';
export { globalHandlersIntegration } from './integrations/globalhandlers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ interface FunctionComponent {
}

interface ClassComponent {
new (
...args: unknown[]
): {
new (...args: unknown[]): {
props?: unknown;
render(...args: unknown[]): unknown;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,11 @@ export function recordRequestSession({
requestIsolationScope,
response,
sessionFlushingDelayMS,
}: { requestIsolationScope: Scope; response: EventEmitter; sessionFlushingDelayMS?: number }): void {
}: {
requestIsolationScope: Scope;
response: EventEmitter;
sessionFlushingDelayMS?: number;
}): void {
requestIsolationScope.setSDKProcessingMetadata({
requestSession: { status: 'ok' },
});
Expand Down
Loading
Loading