Skip to content

Commit 90edf65

Browse files
authored
chore: Ensure prettier is run on all files (#17497)
This simplifies our prettier setup to also run on e2e-tests, and aligns the `fix:prettier` and `lint:prettier` targets (which were previously not aligned). Changes being done here: 1. Apply prettier to all e2e test apps normally (no special prettier handling inside of the test apps) 2. Removed `.prettierrc.json` file, this was duplicated from the config in the root package.json 3. Ensure prettier is applied to JSON files as well 4. Ensure prettier is applied to .astro files (needs astro plugin)
1 parent e19c3ef commit 90edf65

File tree

205 files changed

+2056
-1568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+2056
-1568
lines changed

.claude/settings.local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
],
1212
"deny": []
1313
}
14-
}
14+
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
packages/browser/test/loader.js
22
packages/replay-worker/examples/worker.min.js
33
dev-packages/browser-integration-tests/fixtures
4+
**/test.ts-snapshots/**

.prettierrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
We will follow up with docs how to set up the SDK soon.
1717
For now, If you're on SvelteKit version `2.31.0` or newer, you can easily opt into the new feature:
18-
1918
1. Enable [experimental tracing and instrumentation support](https://svelte.dev/docs/kit/observability) in `svelte.config.js`:
2019
2. Move your `Sentry.init()` call from `src/hooks.server.(js|ts)` to the new `instrumentation.server.(js|ts)` file:
2120

@@ -650,7 +649,6 @@ Work in this release was contributed by @0xbad0c0d3 and @alSergey. Thank you for
650649
- **feat(nuxt): Add Cloudflare Nitro plugin ([#15597](https://github.com/getsentry/sentry-javascript/pull/15597))**
651650

652651
A Nitro plugin for `@sentry/nuxt` which initializes Sentry when deployed to Cloudflare (`cloudflare-pages` preset).
653-
654652
1. Remove the previous server config file: `sentry.server.config.ts`
655653
2. Add a plugin in `server/plugins` (e.g. `server/plugins/sentry-cloudflare-setup.ts`)
656654
3. Add this code in your plugin file
@@ -1215,7 +1213,6 @@ This PR adds trace propagation to `@sentry/react-router` by providing utilities
12151213
- **Logging Improvements**
12161214

12171215
Sentry is adding support for [structured logging](https://github.com/getsentry/sentry-javascript/discussions/15916). In this release we've made a variety of improvements to logging functionality in the Sentry SDKs.
1218-
12191216
- feat(node): Add server.address to nodejs logs ([#16006](https://github.com/getsentry/sentry-javascript/pull/16006))
12201217
- feat(core): Add sdk name and version to logs ([#16005](https://github.com/getsentry/sentry-javascript/pull/16005))
12211218
- feat(core): Add sentry origin attribute to console logs integration ([#15998](https://github.com/getsentry/sentry-javascript/pull/15998))
@@ -1264,7 +1261,6 @@ Work in this release was contributed by @Page- and @Fryuni. Thank you for your c
12641261
### Important Changes
12651262

12661263
- **feat: Add support for logs**
1267-
12681264
- feat(node): Add logging public APIs to Node SDKs ([#15764](https://github.com/getsentry/sentry-javascript/pull/15764))
12691265
- feat(core): Add support for `beforeSendLog` ([#15814](https://github.com/getsentry/sentry-javascript/pull/15814))
12701266
- feat(core): Add support for parameterizing logs ([#15812](https://github.com/getsentry/sentry-javascript/pull/15812))
@@ -1314,13 +1310,11 @@ Work in this release was contributed by @Page- and @Fryuni. Thank you for your c
13141310
```
13151311

13161312
The result will be an object with the following properties:
1317-
13181313
- `"no-client-active"`: There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
13191314
- `"sentry-unreachable"`: The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
13201315
- `undefined`: The SDK is working as expected.
13211316

13221317
- **SDK Tracing Performance Improvements for Node SDKs**
1323-
13241318
- feat: Stop using `dropUndefinedKeys` ([#15796](https://github.com/getsentry/sentry-javascript/pull/15796))
13251319
- feat(node): Only add span listeners for instrumentation when used ([#15802](https://github.com/getsentry/sentry-javascript/pull/15802))
13261320
- ref: Avoid `dropUndefinedKeys` for `spanToJSON` calls ([#15792](https://github.com/getsentry/sentry-javascript/pull/15792))

dev-packages/browser-integration-tests/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ occur while writing tests for Sentry Browser SDK.
9595

9696
Before running, a page for each test case is built under the case folder inside `dist`. If a page build is failed,
9797
it's recommended to check:
98-
9998
- If both default `template.hbs` and `init.js` are defined for the test group.
10099
- If a `subject.js` is defined for the test case.
101100
- If either of `init.js` or `subject.js` contain non-browser code.

dev-packages/browser-integration-tests/suites/replay/ignoreMutations/test.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ sentryTest('allows to ignore mutations via `ignoreMutations` option', async ({ g
2626
const requests = await requestsPromise;
2727

2828
// All transform mutatinos are ignored and not captured
29-
const transformMutations = requests.replayRecordingSnapshots.filter(
30-
item =>
31-
(item.data as mutationData)?.attributes?.some(
32-
attr => attr.attributes['style'] && attr.attributes['class'] !== 'moved',
33-
),
29+
const transformMutations = requests.replayRecordingSnapshots.filter(item =>
30+
(item.data as mutationData)?.attributes?.some(
31+
attr => attr.attributes['style'] && attr.attributes['class'] !== 'moved',
32+
),
3433
);
3534

3635
// Should capture the final class mutation
37-
const classMutations = requests.replayRecordingSnapshots.filter(
38-
item => (item.data as mutationData)?.attributes?.some(attr => attr.attributes['class']),
36+
const classMutations = requests.replayRecordingSnapshots.filter(item =>
37+
(item.data as mutationData)?.attributes?.some(attr => attr.attributes['class']),
3938
);
4039

4140
expect(transformMutations).toEqual([]);

dev-packages/browser-integration-tests/utils/helpers.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,10 @@ export const countEnvelopes = async (
142142

143143
page.on('request', requestHandler);
144144

145-
setTimeout(
146-
() => {
147-
page.off('request', requestHandler);
148-
resolve(reqCount);
149-
},
150-
options?.timeout || 1000,
151-
);
145+
setTimeout(() => {
146+
page.off('request', requestHandler);
147+
resolve(reqCount);
148+
}, options?.timeout || 1000);
152149
});
153150

154151
if (options?.url) {

dev-packages/cloudflare-integration-tests/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
// Although this seems wrong to include `DOM` here, it's necessary to make
88
// global fetch available in tests in lower Node versions.
99
"lib": ["ES2020"],
10-
"esModuleInterop": true,
10+
"esModuleInterop": true
1111
}
1212
}

dev-packages/e2e-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ for it to work with both regular and prerelease versions:
8181
"scripts": {
8282
"test": "echo \"Hello world!\"",
8383
"test:build": "pnpm install",
84-
"test:assert": "pnpm test"
84+
"test:assert": "pnpm test",
8585
},
8686
"dependencies": {
87-
"@sentry/node": "latest || *"
88-
}
87+
"@sentry/node": "latest || *",
88+
},
8989
}
9090
```
9191

dev-packages/e2e-tests/test-applications/angular-17/angular.json

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,10 @@
1616
"outputPath": "dist/angular-17",
1717
"index": "src/index.html",
1818
"browser": "src/main.ts",
19-
"polyfills": [
20-
"zone.js"
21-
],
19+
"polyfills": ["zone.js"],
2220
"tsConfig": "tsconfig.app.json",
23-
"assets": [
24-
"src/favicon.ico",
25-
"src/assets"
26-
],
27-
"styles": [
28-
"src/styles.css"
29-
],
21+
"assets": ["src/favicon.ico", "src/assets"],
22+
"styles": ["src/styles.css"],
3023
"scripts": []
3124
},
3225
"configurations": {
@@ -74,18 +67,10 @@
7467
"test": {
7568
"builder": "@angular-devkit/build-angular:karma",
7669
"options": {
77-
"polyfills": [
78-
"zone.js",
79-
"zone.js/testing"
80-
],
70+
"polyfills": ["zone.js", "zone.js/testing"],
8171
"tsConfig": "tsconfig.spec.json",
82-
"assets": [
83-
"src/favicon.ico",
84-
"src/assets"
85-
],
86-
"styles": [
87-
"src/styles.css"
88-
],
72+
"assets": ["src/favicon.ico", "src/assets"],
73+
"styles": ["src/styles.css"],
8974
"scripts": []
9075
}
9176
}

0 commit comments

Comments
 (0)