Skip to content

Commit e32a6e5

Browse files
authored
chore(various): Wordsmith comments and docstrings (getsentry#4390)
A whole bunch of proofreading edits I stashed away while working on other things. No code changes.
1 parent d53ed78 commit e32a6e5

File tree

17 files changed

+31
-29
lines changed

17 files changed

+31
-29
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ jobs:
120120
if: github.ref == 'refs/heads/master' || github.event_name == 'pull_request'
121121
with:
122122
github_token: ${{ secrets.GITHUB_TOKEN }}
123+
# see https://github.com/getsentry/size-limit-action#usage
123124
skip_step: build
124125
workflow_name: 'build'
125126

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"program": "${workspaceFolder}/node_modules/.bin/jest",
3030
"args": [
3131
"--watch",
32-
// this makes the output less noisy (and at some point in the past seemed necessary to fix... something)
32+
// this runs one test at a time, rather than running them in parallel (necessary for debugging so that you know
33+
// you're hitting a single test's breakpoints, in order)
3334
"--runInBand",
3435
// TODO: when we unify jest config, we may need to change this
3536
"--config",

packages/browser/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const terserInstance = terser({
2121
// captureExceptions and captureMessage are public API methods and they don't need to be listed here
2222
// as mangler doesn't touch user-facing thing, however sentryWrapped is not, and it would be mangled into a minified version.
2323
// We need those full names to correctly detect our internal frames for stripping.
24-
// I listed all of them here just for the clarity sake, as they are all used in the frames manipulation process.
24+
// I listed all of them here just for the clarity's sake, as they are all used in the frame-manipulation process.
2525
reserved: ['captureException', 'captureMessage', 'sentryWrapped'],
2626
properties: {
2727
regex: /^_[^_]/,

packages/browser/src/eventbuilder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from
1515
import { computeStackTrace } from './tracekit';
1616

1717
/**
18-
* Builds and Event from a Exception
18+
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
1919
* @hidden
2020
*/
2121
export function eventFromException(options: Options, exception: unknown, hint?: EventHint): PromiseLike<Event> {
@@ -104,9 +104,9 @@ export function eventFromUnknownInput(
104104
return event;
105105
}
106106
if (isPlainObject(exception) || isEvent(exception)) {
107-
// If it is plain Object or Event, serialize it manually and extract options
108-
// This will allow us to group events based on top-level keys
109-
// which is much better than creating new group when any key/value change
107+
// If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
108+
// it manually. This will allow us to group events based on top-level keys which is much better than creating a new
109+
// group on any key/value change.
110110
const objectException = exception as Record<string, unknown>;
111111
event = eventFromPlainObject(objectException, syntheticException, options.rejection);
112112
addExceptionMechanism(event, {

packages/browser/src/transports/fetch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export class FetchTransport extends BaseTransport {
3737
const options: RequestInit = {
3838
body: sentryRequest.body,
3939
method: 'POST',
40-
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
41-
// https://caniuse.com/#feat=referrer-policy
42-
// It doesn't. And it throw exception instead of ignoring this parameter...
40+
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
41+
// (see https://caniuse.com/#feat=referrer-policy),
42+
// it doesn't. And it throws an exception instead of ignoring this parameter...
4343
// REF: https://github.com/getsentry/raven-js/issues/1233
4444
referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,
4545
};

packages/core/src/basebackend.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import { NoopTransport } from './transports/noop';
2424
* @hidden
2525
*/
2626
export interface Backend {
27-
/** Creates a {@link Event} from an exception. */
27+
/** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */
2828
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2929
eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
3030

31-
/** Creates a {@link Event} from a plain message. */
31+
/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
3232
eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
3333

3434
/** Submits the event to Sentry */

packages/eslint-config-sdk/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module.exports = {
179179
},
180180
},
181181
{
182-
// Configuration for config files like webpack/rollback
182+
// Configuration for config files like webpack/rollup
183183
files: ['*.config.js'],
184184
parserOptions: {
185185
sourceType: 'module',

packages/nextjs/test/run-integration-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for NEXTJS_VERSION in 10 11 12; do
5858
fi
5959
yarn --no-lockfile --silent >/dev/null 2>&1
6060
# if applicable, use local versions of `@sentry/cli` and/or `@sentry/webpack-plugin` (these commands no-op unless
61-
# LINKED_CLI_REPO and/or LINKED_PLUGIN_REPO is set)
61+
# LINKED_CLI_REPO and/or LINKED_PLUGIN_REPO are set)
6262
linkcli && linkplugin
6363
mv -f package.json.bak package.json 2>/dev/null || true
6464

packages/serverless/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as domain from 'domain';
55
/**
66
* Event processor that will override SDK details to point to the serverless SDK instead of Node,
77
* as well as set correct mechanism type, which should be set to `handled: false`.
8-
* We do it like this, so that we don't introduce any side-effects in this module, which makes it tree-shakeable.
8+
* We do it like this so that we don't introduce any side-effects in this module, which makes it tree-shakeable.
99
* @param event Event
1010
* @param integration Name of the serverless integration ('AWSLambda', 'GCPFunction', etc)
1111
*/

packages/tracing/src/hubextensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function traceHeaders(this: Hub): { [key: string]: string } {
3434
* Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
3535
* sent to Sentry.
3636
*
37-
* @param hub: The hub off of which to read config options
3837
* @param transaction: The transaction needing a sampling decision
38+
* @param options: The current client's options, so we can access `tracesSampleRate` and/or `tracesSampler`
3939
* @param samplingContext: Default and user-provided data which may be used to help make the decision
4040
*
4141
* @returns The given transaction with its `sampled` value set

0 commit comments

Comments
 (0)