@sentry/webpack-plugin
Advanced tools
Comparing version 1.18.4 to 1.18.5
@@ -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 @@ |
@@ -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", |
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52081
700
2