Skip to content

Commit 7542482

Browse files
authored
chore(various): Fix comments and docstrings (#5651)
Typo/grammar/clarification fixes in comments and docstrings. No behavior changes.
1 parent aff06e0 commit 7542482

File tree

28 files changed

+76
-47
lines changed

28 files changed

+76
-47
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
22
// lives
33

4+
// ESLint config docs: https://eslint.org/docs/user-guide/configuring/
5+
46
module.exports = {
57
root: true,
68
env: {

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ jobs:
211211

212212
job_lint:
213213
name: Lint
214+
# Even though the linter only checks source code, not built code, it needs the built code in order check that all
215+
# inter-package dependencies resolve cleanly.
214216
needs: [job_get_metadata, job_build]
215217
timeout-minutes: 10
216218
runs-on: ubuntu-latest

.vscode/launch.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
// Use IntelliSense to learn about possible Node.js debug attributes.
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
// For available variables, visit: https://code.visualstudio.com/docs/editor/variables-reference
56
"version": "0.2.0",
67
"inputs": [
78
{
9+
// Get the name of the package containing the file in the active tab.
810
"id": "getPackageName",
911
"type": "command",
1012
"command": "shellCommand.execute",
1113
"args": {
14+
// Get the current file's absolute path, chop off everything up to and including the repo's `packages`
15+
// directory, then split on `/` and take the first entry
1216
"command": "echo '${file}' | sed s/'.*sentry-javascript\\/packages\\/'// | grep --extended-regexp --only-matching --max-count 1 '[^\\/]+' | head -1",
1317
"cwd": "${workspaceFolder}",
1418
// normally `input` commands bring up a selector for the user, but given that there should only be one

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Work in this release contributed by @7inspire, @jaeseokk, and @rchl. Thank you f
514514
This patch contains a breaking change for anyone setting the undocumented `rethrowAfterCapture` option for `@sentry/serverless`'s AWS wrapper to `false`, as its functionality has been removed. For backwards compatibility with anyone setting it to `true` (which is also the default), the option remains in the `WrapperOptions` type for now. It will be removed in the next major release, though, so we recommend removing it from your code.
515515

516516
- ref(serverless): Remove `rethrowAfterCapture` use in AWS lambda wrapper (#4448)
517-
- fix(utils): Remove dom is casting (#4451)
517+
- fix(utils): Remove dom `is` casting (#4451)
518518

519519
## 6.17.1
520520

jest/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
// this is the package root, even when tests are being run at the repo level
23
rootDir: process.cwd(),
34
collectCoverage: true,
45
transform: {

packages/core/src/transports/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function createTransport(
8686
result => result,
8787
error => {
8888
if (error instanceof SentryError) {
89-
__DEBUG_BUILD__ && logger.error('Skipped sending event due to full buffer');
89+
__DEBUG_BUILD__ && logger.error('Skipped sending event because buffer is full.');
9090
recordEnvelopeLoss('queue_overflow');
9191
return resolvedSyncPromise();
9292
} else {

packages/gatsby/gatsby-browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ exports.onClientEntry = function (_, pluginParams) {
99
if (areOptionsDefined) {
1010
console.warn(
1111
'Sentry Logger [Warn]: The SDK was initialized in the Sentry config file, but options were found in the Gatsby config. ' +
12-
'These have been ignored, merge them to the Sentry config if you want to use them.\n' +
13-
'Learn more about the Gatsby SDK on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
12+
'These have been ignored. Merge them to the Sentry config if you want to use them.\n' +
13+
'Learn more about the Gatsby SDK in https://docs.sentry.io/platforms/javascript/guides/gatsby/.',
1414
);
1515
}
1616
return;
@@ -19,7 +19,7 @@ exports.onClientEntry = function (_, pluginParams) {
1919
if (!areOptionsDefined) {
2020
console.error(
2121
'Sentry Logger [Error]: No config for the Gatsby SDK was found.\n' +
22-
'Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/',
22+
'Learn how to configure it in https://docs.sentry.io/platforms/javascript/guides/gatsby/.',
2323
);
2424
return;
2525
}

packages/gatsby/test/gatsby-browser.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ describe('onClientEntry', () => {
8181
// eslint-disable-next-line no-console
8282
expect((console.warn as jest.Mock).mock.calls[0]).toMatchInlineSnapshot(`
8383
Array [
84-
"Sentry Logger [Warn]: The SDK was initialized in the Sentry config file, but options were found in the Gatsby config. These have been ignored, merge them to the Sentry config if you want to use them.
85-
Learn more about the Gatsby SDK on https://docs.sentry.io/platforms/javascript/guides/gatsby/",
84+
"Sentry Logger [Warn]: The SDK was initialized in the Sentry config file, but options were found in the Gatsby config. These have been ignored. Merge them to the Sentry config if you want to use them.
85+
Learn more about the Gatsby SDK in https://docs.sentry.io/platforms/javascript/guides/gatsby/.",
8686
]
8787
`);
8888
// eslint-disable-next-line no-console
@@ -98,7 +98,7 @@ describe('onClientEntry', () => {
9898
expect((console.error as jest.Mock).mock.calls[0]).toMatchInlineSnapshot(`
9999
Array [
100100
"Sentry Logger [Error]: No config for the Gatsby SDK was found.
101-
Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/",
101+
Learn how to configure it in https://docs.sentry.io/platforms/javascript/guides/gatsby/.",
102102
]
103103
`);
104104
});

packages/hub/src/scope.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,10 @@ export class Scope implements ScopeInterface {
441441
}
442442

443443
/**
444-
* Applies the current context and fingerprint to the event.
445-
* Note that breadcrumbs will be added by the client.
446-
* Also if the event has already breadcrumbs on it, we do not merge them.
444+
* Applies data from the scope to the event and runs all event processors on it.
445+
*
447446
* @param event Event
448-
* @param hint May contain additional information about the original exception.
447+
* @param hint Object containing additional information about the original exception, for use by the event processors.
449448
* @hidden
450449
*/
451450
public applyToEvent(event: Event, hint: EventHint = {}): PromiseLike<Event | null> {

packages/hub/test/exports.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ describe('Top Level API', () => {
106106
});
107107

108108
// NOTE: We left custom level as 2nd argument to not break the API. Should be removed and unified in v6.
109+
// TODO: Before we release v8, check if this is still a thing
109110
test('Message with custom level', () => {
110111
const client: any = { captureMessage: jest.fn(async () => Promise.resolve()) };
111112
getCurrentHub().withScope(() => {

0 commit comments

Comments
 (0)