From 2bd930e59c935901725a09734ceca8ab7cc8258e Mon Sep 17 00:00:00 2001 From: Stephen Cefali Date: Tue, 25 Oct 2022 00:05:01 +0200 Subject: [PATCH 1/3] adds pipeline argument --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index abd0123..02c0788 100644 --- a/src/index.js +++ b/src/index.js @@ -155,6 +155,8 @@ class SentryCliPlugin { this.cli = this.getSentryCli(); this.release = this.getReleasePromise(); + // Set the User-Agent string. + process.env['SENTRY_PIPELINE'] = `webpack-plugin/${this.release}`; } /** From dfc544134798b37d74fa65a3859878d99039f5ce Mon Sep 17 00:00:00 2001 From: Stephen Cefali Date: Tue, 25 Oct 2022 01:27:03 +0200 Subject: [PATCH 2/3] change sentry pipeline logic --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 02c0788..811b582 100644 --- a/src/index.js +++ b/src/index.js @@ -2,10 +2,14 @@ const SentryCli = require('@sentry/cli'); const path = require('path'); const util = require('util'); const { RawSource } = require('webpack-sources'); +const pjson = require('../package.json'); const SENTRY_LOADER = path.resolve(__dirname, 'sentry.loader.js'); const SENTRY_MODULE = path.resolve(__dirname, 'sentry-webpack.module.js'); +// Set the User-Agent string. +process.env['SENTRY_PIPELINE'] = `webpack-plugin/${pjson.version}`; + /** * Helper function that ensures an object key is defined. This mutates target! * @@ -155,8 +159,6 @@ class SentryCliPlugin { this.cli = this.getSentryCli(); this.release = this.getReleasePromise(); - // Set the User-Agent string. - process.env['SENTRY_PIPELINE'] = `webpack-plugin/${this.release}`; } /** From 2a5596f441ff3b9c51b4887e5c0dcab5174d190a Mon Sep 17 00:00:00 2001 From: Stephen Cefali Date: Tue, 25 Oct 2022 14:18:37 +0200 Subject: [PATCH 3/3] adds sentry pipeline --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 811b582..415c4eb 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ const SENTRY_LOADER = path.resolve(__dirname, 'sentry.loader.js'); const SENTRY_MODULE = path.resolve(__dirname, 'sentry-webpack.module.js'); // Set the User-Agent string. -process.env['SENTRY_PIPELINE'] = `webpack-plugin/${pjson.version}`; +process.env.SENTRY_PIPELINE = `webpack-plugin/${pjson.version}`; /** * Helper function that ensures an object key is defined. This mutates target!