Skip to content

build(replay): Streamline tsconfig & jest config #6399

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

Merged
merged 5 commits into from
Dec 5, 2022
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 2, 2022

This PR goes some steps towards aligning tsconfig & jest config of replay with the rest of the packages.

  • Move some tsconfig stuff we need for tests only to tsconfig.test.json
  • Add some more common folders to vscode search.exclude
  • Stop using @test imports in replay
  • Make replay tests non-verbose

IMHO the goal should be to also re-export the jest config from /jest/jest.config.js, but I ran into a bunch of issues with that - I think related to typescript, and jest.setup.ts 😬 But this should be OK as a first step.

@mydea mydea added Dev: Build Package: replay Issues related to the Sentry Replay SDK labels Dec 2, 2022
@mydea mydea requested a review from Lms24 December 2, 2022 14:54
@mydea mydea self-assigned this Dec 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.6 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.69 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.37 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 54.26 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.13 KB (0%)
@sentry/browser - Webpack (minified) 65.83 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.16 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 46.96 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.44 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.87 KB (+0.02% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 41.74 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 37.23 KB (0%)

import { handleFetch } from '../../../src/coreHandlers/handleFetch';
import { mockSdk } from './../..';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just wondering about this path, wouldn't you normally have to specify the file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, should we make it ./../../index? WDYT? (Guess this applies at all places) - maybe a bit more explicit...!

"noEmitOnError": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"allowJs": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I thought we'd need at least allowJs here because of the worker 🤔 but not complaining if we don't need it either 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the worker is just loaded as plain text, not as actual js, that's why it works probably!

@mydea mydea force-pushed the fn/replay-tsconfig branch from 0aa284b to 8f6d90b Compare December 5, 2022 10:54
@mydea mydea force-pushed the fn/replay-tsconfig branch from 8f6d90b to 60682a0 Compare December 5, 2022 11:54
@mydea mydea merged commit 8bfa111 into master Dec 5, 2022
@mydea mydea deleted the fn/replay-tsconfig branch December 5, 2022 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev: Build Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants