@sentry/webpack-plugin 1.18.3 → 1.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.craft.yml +1 -1
- package/CHANGELOG.md +22 -3
- package/README.md +3 -0
- package/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/index.js +20 -14
- package/src/sentry.loader.js +1 -1
package/.craft.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me." — Michael Scott
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
## 1.18.7
|
|
6
|
+
|
|
7
|
+
### Various fixes & improvements
|
|
8
|
+
|
|
9
|
+
- deps: Remove webpack from peerDep and move info about ver to readme (#354) by @kamilogorek
|
|
10
|
+
- misc: Correct 1.18.6 changelog (#353) by @kamilogorek
|
|
11
|
+
|
|
12
|
+
## 1.18.6
|
|
13
|
+
|
|
14
|
+
- ci: Change changelogPolicy to auto for Craft releases (#351)
|
|
15
|
+
- deps: Mark Webpack as optional peerDependency via peerDependenciesMeta ( #350)
|
|
16
|
+
|
|
17
|
+
## v1.18.5
|
|
18
|
+
|
|
19
|
+
- fix: Check if `rawSource` is available before use (#347)
|
|
20
|
+
- deps: Add Webpack as a peerDependency (#343)
|
|
21
|
+
|
|
22
|
+
## v1.18.4
|
|
23
|
+
|
|
24
|
+
- deps: Bump sentry-cli to 1.72.0
|
|
25
|
+
- ref: Use `var` instead of `const` for module loader for ES5-compat (#338)
|
|
7
26
|
|
|
8
27
|
## v1.18.3
|
|
9
28
|
|
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ A webpack plugin acting as an interface to
|
|
|
20
20
|
|
|
21
21
|
### Installation
|
|
22
22
|
|
|
23
|
+
`@sentry/webpack-plugin` requires at least `webpack@4.41.31` or any `webpack@5` version to be installed.
|
|
24
|
+
|
|
23
25
|
Using npm:
|
|
24
26
|
|
|
25
27
|
```bash
|
|
@@ -65,6 +67,7 @@ Also, check the [example](example) directory.
|
|
|
65
67
|
| project | `string` | optional | The slug of the Sentry project associated with the app. |
|
|
66
68
|
| authToken | `string` | optional | The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/settings/account/api/auth-tokens/. Required scopes: `project:releases` (and `org:read` if `setCommits` option is used). |
|
|
67
69
|
| url | `string` | optional | The base URL of your Sentry instance. Defaults to https://sentry.io/, which is the correct value for SAAS customers. |
|
|
70
|
+
| customHeader | `string` | optional | A header added to all outgoing requests. A string in the format `header-key: header-value` |
|
|
68
71
|
| vcsRemote | `string` | optional | The name of the remote in the version control system. Defaults to `origin`. |
|
|
69
72
|
| release | `string` | optional | Unique identifier for the release. Defaults to the output of the `sentry-cli releases propose-version` command, which automatically detects values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses `HEAD`'s commit SHA. (**For `HEAD` option, requires access to `git` CLI and for the root directory to be a valid repository**). |
|
|
70
73
|
| dist | `string` | optional | Unique identifier for the distribution, used to further segment your release. Usually your build number. |
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"source-map"
|
|
9
9
|
],
|
|
10
10
|
"author": "Sentry",
|
|
11
|
-
"version": "1.18.
|
|
11
|
+
"version": "1.18.7",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": "git@github.com:getsentry/sentry-webpack-plugin.git",
|
|
14
14
|
"homepage": "https://github.com/getsentry/sentry-webpack-plugin",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"node": ">= 8"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sentry/cli": "^1.
|
|
21
|
+
"@sentry/cli": "^1.72.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/webpack": "^4.41.31 || ^5.0.0",
|
package/src/index.js
CHANGED
|
@@ -108,23 +108,29 @@ function attachAfterCodeGenerationHook(compiler, options) {
|
|
|
108
108
|
compilation.hooks.afterCodeGeneration.tap('SentryCliPlugin', () => {
|
|
109
109
|
compilation.modules.forEach(module => {
|
|
110
110
|
// eslint-disable-next-line no-underscore-dangle
|
|
111
|
-
if (module._name !== moduleFederationPlugin._options.name)
|
|
111
|
+
if (module._name !== moduleFederationPlugin._options.name) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
112
115
|
const sourceMap = compilation.codeGenerationResults.get(module)
|
|
113
116
|
.sources;
|
|
114
117
|
const rawSource = sourceMap.get('javascript');
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
globalThis
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
|
|
119
|
+
if (rawSource) {
|
|
120
|
+
sourceMap.set(
|
|
121
|
+
'javascript',
|
|
122
|
+
new RawSource(
|
|
123
|
+
`${rawSource.source()}
|
|
124
|
+
(function (){
|
|
125
|
+
var globalThis = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
|
|
126
|
+
globalThis.SENTRY_RELEASES = globalThis.SENTRY_RELEASES || {};
|
|
127
|
+
globalThis.SENTRY_RELEASES["${options.project}@${
|
|
128
|
+
options.org
|
|
129
|
+
}"] = {"id":"${version}"};
|
|
130
|
+
})();`
|
|
131
|
+
)
|
|
132
|
+
);
|
|
133
|
+
}
|
|
128
134
|
});
|
|
129
135
|
});
|
|
130
136
|
cb();
|
package/src/sentry.loader.js
CHANGED
|
@@ -2,7 +2,7 @@ module.exports = function sentryLoader(content, map, meta) {
|
|
|
2
2
|
const { releasePromise, org, project } = this.query;
|
|
3
3
|
const callback = this.async();
|
|
4
4
|
releasePromise.then(version => {
|
|
5
|
-
let sentryRelease = `
|
|
5
|
+
let sentryRelease = `var _global = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); _global.SENTRY_RELEASE={id:"${version}"};`;
|
|
6
6
|
if (project) {
|
|
7
7
|
const key = org ? `${project}@${org}` : project;
|
|
8
8
|
sentryRelease += `
|