Skip to content

fix(types): Fix node types & add E2E test - #7429

Merged
AbhiPrasad merged 1 commit into
developfrom
fn/fix-types
Mar 13, 2023
Merged

fix(types): Fix node types & add E2E test#7429
AbhiPrasad merged 1 commit into
developfrom
fn/fix-types

Conversation

@mydea

@mydeamydea commented Mar 13, 2023

Copy link
Copy Markdown
Member

This ensures we only export generic code from @sentry/types that works both in node & browser.

  • Replace fetch/XMLHttpRequest stuff with unknown in types - ensure to type this at call site
  • Ensure eslint & tsconfig for @sentry/types is setup correctly
  • Add a node/express/TS E2E test that actually tests this works as expected.

Fixes#7422

@mydeamydea self-assigned this Mar 13, 2023
@github-actions

github-actionsBot commented Mar 13, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)20.24 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified)62.95 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)18.87 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified)55.87 KB (0%)
@sentry/browser - Webpack (gzipped + minified)20.62 KB (0%)
@sentry/browser - Webpack (minified)67.39 KB (0%)
@sentry/react - Webpack (gzipped + minified)20.65 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified)48.54 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)27.51 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)25.76 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified)43.17 KB (+0.01% 🔺)
@sentry/replay - Webpack (gzipped + minified)37.19 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)61.18 KB (+0.01% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified)54.35 KB (+0.01% 🔺)


"compilerOptions": {
// package-specific options
"lib": ["ES6"]

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Note: This setting actually leads to the old code failing at build time, so this should also prevent this happening again for types, at least.

@mydea
mydea marked this pull request as ready for review March 13, 2023 11:50
@mydea
mydea requested a review from Lms24March 13, 2023 12:02
@mydea
mydea requested review from AbhiPrasad and lforstMarch 13, 2023 12:02
@mydeamydea changed the title Fix node types & add E2E testfix(types): Fix node types & add E2E testMar 13, 2023
@AbhiPrasad
AbhiPrasad merged commit 161b8f0 into developMar 13, 2023
@AbhiPrasad
AbhiPrasad deleted the fn/fix-types branch March 13, 2023 12:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript error in @sentry/types introduced in 7.42.0

2 participants

@mydea@AbhiPrasad