Socket
Socket
Sign inDemoInstall

@sentry/webpack-plugin

Package Overview
Dependencies
Maintainers
12
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/webpack-plugin - npm Package Compare versions

Comparing version 1.18.4 to 1.18.5

5

CHANGELOG.md

@@ -8,2 +8,7 @@ # Changelog

## v1.18.5
- fix: Check if `rawSource` is available before use (#347)
- deps: Add Webpack as a peerDependency (#343)
## v1.18.4

@@ -10,0 +15,0 @@

5

package.json

@@ -11,3 +11,3 @@ {

"author": "Sentry",
"version": "1.18.4",
"version": "1.18.5",
"license": "MIT",

@@ -24,2 +24,5 @@ "repository": "git@github.com:getsentry/sentry-webpack-plugin.git",

},
"peerDependencies": {
"webpack": "^4.41.31 || ^5.0.0"
},
"devDependencies": {

@@ -26,0 +29,0 @@ "@types/webpack": "^4.41.31 || ^5.0.0",

34

src/index.js

@@ -111,19 +111,25 @@ const SentryCli = require('@sentry/cli');

// eslint-disable-next-line no-underscore-dangle
if (module._name !== moduleFederationPlugin._options.name) return;
if (module._name !== moduleFederationPlugin._options.name) {
return;
}
const sourceMap = compilation.codeGenerationResults.get(module)
.sources;
const rawSource = sourceMap.get('javascript');
sourceMap.set(
'javascript',
new RawSource(
`${rawSource.source()}
(function (){
var globalThis = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
globalThis.SENTRY_RELEASES = globalThis.SENTRY_RELEASES || {};
globalThis.SENTRY_RELEASES["${options.project}@${
options.org
}"] = {"id":"${version}"};
})();`
)
);
if (rawSource) {
sourceMap.set(
'javascript',
new RawSource(
`${rawSource.source()}
(function (){
var globalThis = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
globalThis.SENTRY_RELEASES = globalThis.SENTRY_RELEASES || {};
globalThis.SENTRY_RELEASES["${options.project}@${
options.org
}"] = {"id":"${version}"};
})();`
)
);
}
});

@@ -130,0 +136,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc