@sentry/webpack-plugin
Advanced tools
Comparing version
@@ -171,29 +171,30 @@ 'use strict'; | ||
} | ||
function webpackDebugIdUploadPlugin() { | ||
function webpackDebugIdUploadPlugin(upload, logger, createDependencyOnBuildArtifacts, forceExitOnBuildCompletion) { | ||
var pluginName = "sentry-webpack-debug-id-upload-plugin"; | ||
return function (upload, logger, forceExitOnBuildCompletion) { | ||
return { | ||
name: pluginName, | ||
webpack: function webpack(compiler) { | ||
compiler.hooks.afterEmit.tapAsync(pluginName, function (compilation, callback) { | ||
var _ref; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
var outputPath = (_ref = compilation.outputOptions.path) !== null && _ref !== void 0 ? _ref : path__namespace.resolve(); | ||
var buildArtifacts = Object.keys(compilation.assets).map(function (asset) { | ||
return path__namespace.join(outputPath, asset); | ||
return { | ||
name: pluginName, | ||
webpack: function webpack(compiler) { | ||
var freeGlobalDependencyOnDebugIdSourcemapArtifacts = createDependencyOnBuildArtifacts(); | ||
compiler.hooks.afterEmit.tapAsync(pluginName, function (compilation, callback) { | ||
var _ref; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
var outputPath = (_ref = compilation.outputOptions.path) !== null && _ref !== void 0 ? _ref : path__namespace.resolve(); | ||
var buildArtifacts = Object.keys(compilation.assets).map(function (asset) { | ||
return path__namespace.join(outputPath, asset); | ||
}); | ||
void upload(buildArtifacts).then(function () { | ||
callback(); | ||
})["finally"](function () { | ||
freeGlobalDependencyOnDebugIdSourcemapArtifacts(); | ||
}); | ||
}); | ||
if (forceExitOnBuildCompletion && compiler.options.mode === "production") { | ||
compiler.hooks.done.tap(pluginName, function () { | ||
setTimeout(function () { | ||
logger.debug("Exiting process after debug file upload"); | ||
process.exit(0); | ||
}); | ||
void upload(buildArtifacts).then(function () { | ||
callback(); | ||
}); | ||
}); | ||
if (forceExitOnBuildCompletion && compiler.options.mode === "production") { | ||
compiler.hooks.done.tap(pluginName, function () { | ||
setTimeout(function () { | ||
logger.debug("Exiting process after debug file upload"); | ||
process.exit(0); | ||
}); | ||
}); | ||
} | ||
} | ||
}; | ||
} | ||
}; | ||
@@ -245,3 +246,3 @@ } | ||
debugIdInjectionPlugin: webpackDebugIdInjectionPlugin(BannerPlugin), | ||
debugIdUploadPlugin: webpackDebugIdUploadPlugin(), | ||
debugIdUploadPlugin: webpackDebugIdUploadPlugin, | ||
bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin(DefinePlugin) | ||
@@ -248,0 +249,0 @@ }); |
{ | ||
"name": "@sentry/webpack-plugin", | ||
"version": "3.3.1", | ||
"version": "3.4.0", | ||
"description": "Official Sentry Webpack plugin", | ||
@@ -56,3 +56,3 @@ "repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git", | ||
"dependencies": { | ||
"@sentry/bundler-plugin-core": "3.3.1", | ||
"@sentry/bundler-plugin-core": "3.4.0", | ||
"unplugin": "1.0.1", | ||
@@ -67,4 +67,4 @@ "uuid": "^9.0.0" | ||
"@rollup/plugin-commonjs": "22.0.1", | ||
"@sentry-internal/eslint-config": "3.3.1", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.3.1", | ||
"@sentry-internal/eslint-config": "3.4.0", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.4.0", | ||
"@swc/core": "^1.2.205", | ||
@@ -71,0 +71,0 @@ "@swc/jest": "^0.2.21", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
92822
1.03%597
0.34%0
-100%+ Added
+ Added
- Removed
- Removed