Skip to content

Commit

Permalink
PR review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed Jul 3, 2023
1 parent 094ba70 commit 215cb0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion packages/bundler-plugin-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,20 @@ export interface Options {

/**
* Metadata associated with this module.
*
* The metadata is serialized and can be looked up at runtime by URL.
*
* Metadata can either be passed directly or alternatively a callback can be provided that will be
* called with the following arguments:
* - `org`: The organization slug.
* - `project`: The project slug.
* - `release`: The release name.
*
*
* Note: This option is currently only supported by `@sentry/webpack-plugin`.
*/
moduleMetadata?: object | ModuleMetadataCallback;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleMetadata?: any | ModuleMetadataCallback;
};
}

Expand Down
4 changes: 2 additions & 2 deletions packages/bundler-plugin-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ export function generateModuleMetadataInjectorCode(metadata: any) {
self :
{};
_global2.__MODULE_METADATA__ = _global2.__MODULE_METADATA__ || {};
_global2.__MODULE_METADATA__[new Error().stack] = ${JSON.stringify(metadata)};`;
_global2._sentryModuleMetadata = _global2._sentryModuleMetadata || {};
_global2._sentryModuleMetadata[new Error().stack] = ${JSON.stringify(metadata)};`;
}

function getBuildInformation() {
Expand Down

0 comments on commit 215cb0b

Please sign in to comment.