Skip to content

Commit f35ccac

Browse files
Add Sentry types and update Rollup type declarations
Co-authored-by: rahul.chhabria <[email protected]>
1 parent 8f9d4e5 commit f35ccac

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@
151151
"vitest": "^3.0.7",
152152
"ws": "^8.17.1",
153153
"webpack": "^5.91.0",
154-
"rollup": "^4.18.0"
154+
"rollup": "^4.18.0",
155+
"@sentry/types": "^7.89.0"
155156
},
156157
"resolutions": {
157158
"dompurify": "3.2.4",

src/@types/third-party.d.ts

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,19 @@ declare module 'rolldown/dist/types/plugin';
1010

1111
declare module '@spotlightjs/sidecar/constants';
1212

13-
declare module '@sentry/types';
14-
15-
declare module '@sentry/types' {
16-
// Minimal Envelope type to satisfy imports
17-
export type Envelope = unknown;
13+
// rollup/parseAst helper (only this specific path is missing)
14+
declare module 'rollup/parseAst' {
15+
export function parseAst(code: string): unknown;
16+
export function parseAstAsync(code: string): Promise<unknown>;
1817
}
1918

20-
// -------------------- Rollup missing exports --------------------
19+
// Augment rollup types to add removed interfaces used by older plugins
2120
declare module 'rollup' {
21+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
2222
export interface AcornNode extends Record<string, unknown> {}
23-
// fallback placeholders
24-
export interface SourceMapInput extends Record<string, unknown> {}
25-
export interface EmittedAsset extends Record<string, unknown> {}
26-
export interface PluginContextMeta extends Record<string, unknown> {}
27-
export type Plugin<T = any> = any;
28-
}
29-
30-
declare module 'rollup/parseAst' {
31-
export function parseAst(code: string): unknown;
32-
export function parseAstAsync(code: string): Promise<unknown>;
3323
}
3424

35-
// Generic placeholders for mdx-bundler generics
25+
// Generic placeholders for mdx-bundler generics used in their .d.ts
3626
declare type ExportedObject = Record<string, unknown>;
3727
declare type Frontmatter = Record<string, unknown>;
3828

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3842,6 +3842,11 @@
38423842
"@sentry/core" "9.38.0"
38433843
hoist-non-react-statics "^3.3.2"
38443844

3845+
"@sentry/types@^7.89.0":
3846+
version "7.120.3"
3847+
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.120.3.tgz#25f69ae27f0c8430f1863ad2a9ee9cab7fccf232"
3848+
integrity sha512-C4z+3kGWNFJ303FC+FxAd4KkHvxpNFYAFN8iMIgBwJdpIl25KZ8Q/VdGn0MLLUEHNLvjob0+wvwlcRBBNLXOow==
3849+
38453850
38463851
version "9.38.0"
38473852
resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-9.38.0.tgz#b490941ae916aad3cd35a712c019b3c5d51d22cf"

0 commit comments

Comments
 (0)