@sentry/webpack-plugin 1.20.0 → 2.0.0-alpha.1
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/LICENSE +25 -17
- package/README.md +93 -92
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +66 -38
- package/.craft.yml +0 -13
- package/.eslintrc +0 -6
- package/.prettierrc +0 -6
- package/CHANGELOG.md +0 -196
- package/index.d.ts +0 -149
- package/jest.config.js +0 -5
- package/scripts/craft-pre-release.sh +0 -8
- package/src/cjs.js +0 -20
- package/src/index.js +0 -596
- package/src/sentry-webpack.module.js +0 -1
- package/src/sentry.loader.js +0 -15
package/CHANGELOG.md
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
## 1.20.0
|
|
6
|
-
|
|
7
|
-
- build: Bump `@sentry/cli` version to `1.74.6` (#406)
|
|
8
|
-
- feat: Add a means to detect if the CLI binary exists (#402)
|
|
9
|
-
- feat: Add pipeline argument (#403)
|
|
10
|
-
|
|
11
|
-
## 1.19.1
|
|
12
|
-
|
|
13
|
-
- fix(deps): Add `webpack-sources` dependency (#397)
|
|
14
|
-
|
|
15
|
-
## 1.19.0
|
|
16
|
-
|
|
17
|
-
- feat(config): Support reading release from environment (#389)
|
|
18
|
-
- docs: Add example to `options.include` (#384)
|
|
19
|
-
|
|
20
|
-
## 1.18.9
|
|
21
|
-
|
|
22
|
-
- ref: Update sentry-cli to latest v1 version and refresh GH actions (#368) by @kamilogorek
|
|
23
|
-
- docs: Update dryRun documentation to reflect auto-configuration. (#366) by @fiveable-jferg
|
|
24
|
-
|
|
25
|
-
## 1.18.8
|
|
26
|
-
|
|
27
|
-
- deps: Bump sentry-cli to 1.73.0 (#356) by @kamilogorek
|
|
28
|
-
|
|
29
|
-
## 1.18.7
|
|
30
|
-
|
|
31
|
-
- deps: Remove webpack from peerDep and move info about ver to readme (#354) by @kamilogorek
|
|
32
|
-
- misc: Correct 1.18.6 changelog (#353) by @kamilogorek
|
|
33
|
-
|
|
34
|
-
## 1.18.6
|
|
35
|
-
|
|
36
|
-
- ci: Change changelogPolicy to auto for Craft releases (#351)
|
|
37
|
-
- deps: Mark Webpack as optional peerDependency via peerDependenciesMeta ( #350)
|
|
38
|
-
|
|
39
|
-
## v1.18.5
|
|
40
|
-
|
|
41
|
-
- fix: Check if `rawSource` is available before use (#347)
|
|
42
|
-
- deps: Add Webpack as a peerDependency (#343)
|
|
43
|
-
|
|
44
|
-
## v1.18.4
|
|
45
|
-
|
|
46
|
-
- deps: Bump sentry-cli to 1.72.0
|
|
47
|
-
- ref: Use `var` instead of `const` for module loader for ES5-compat (#338)
|
|
48
|
-
|
|
49
|
-
## v1.18.3
|
|
50
|
-
|
|
51
|
-
- types: Fix typo in vcsRemote config option (#327)
|
|
52
|
-
- deps: Bump sentry-cli to 1.70.1 (#327)
|
|
53
|
-
|
|
54
|
-
## v1.18.2
|
|
55
|
-
|
|
56
|
-
- deps: Update sentry-cli to v1.70
|
|
57
|
-
|
|
58
|
-
## v1.18.1
|
|
59
|
-
|
|
60
|
-
- fix: Reexport `SourceMapsPathDescriptor` type (#323)
|
|
61
|
-
|
|
62
|
-
## v1.18.0
|
|
63
|
-
|
|
64
|
-
- feat: Add support for multiple apps using Webpack Module Federation (#307)
|
|
65
|
-
|
|
66
|
-
## v1.17.3
|
|
67
|
-
|
|
68
|
-
- fix: Switch compilation type in error handler to `unknown` (#322)
|
|
69
|
-
|
|
70
|
-
## v1.17.2
|
|
71
|
-
|
|
72
|
-
- docs: Fix description and default value for sourceMapReferences (#318)
|
|
73
|
-
- fix: Increase stack size of errors in CI (#319)
|
|
74
|
-
- fix: Enable plugin to be imported under ES6 (#316)
|
|
75
|
-
- fix: Add `options` to main plugin type (#314)
|
|
76
|
-
- fix: Update types of SentryCliPluginOptions.errorHandler (#308)
|
|
77
|
-
|
|
78
|
-
## v1.17.1
|
|
79
|
-
|
|
80
|
-
- fix: Fix types and array normalization for `include` option (#302)
|
|
81
|
-
|
|
82
|
-
## v1.17.0
|
|
83
|
-
|
|
84
|
-
- feat: Allow `include` option to be an object (#299)
|
|
85
|
-
- deps: Update sentry-cli to v1.68 (#297)
|
|
86
|
-
|
|
87
|
-
## v1.16.0
|
|
88
|
-
|
|
89
|
-
- feat: Add `ignoreMissing` sub-option to `setCommits` option (#281)
|
|
90
|
-
- fix: Add missing `dist` option to `SentryCliPluginOptions` type (#285)
|
|
91
|
-
- deps: Update sentry-cli to v1.67
|
|
92
|
-
|
|
93
|
-
## v1.15.1
|
|
94
|
-
|
|
95
|
-
- deps: Update sentry-cli to v1.64
|
|
96
|
-
|
|
97
|
-
## v1.15.0
|
|
98
|
-
|
|
99
|
-
- feat: Add `cleanAftifacts` option to remove all previously uploaded files in a
|
|
100
|
-
release (#264)
|
|
101
|
-
- feat: Add `runOnce` option to allow for skipping multiple uploads with the
|
|
102
|
-
same config (#270)
|
|
103
|
-
|
|
104
|
-
## v1.14.2
|
|
105
|
-
|
|
106
|
-
- deps: Update sentry-cli to v1.63 for ARM support
|
|
107
|
-
|
|
108
|
-
## v1.14.1
|
|
109
|
-
|
|
110
|
-
- fix: Use `WebpackPluginInstance` type for Webpack v4 and v5 compatibility
|
|
111
|
-
(#259)
|
|
112
|
-
|
|
113
|
-
## v1.14.0
|
|
114
|
-
|
|
115
|
-
- feat: Add support for Webpack 5 entry descriptors (#241)
|
|
116
|
-
|
|
117
|
-
## v1.13.0
|
|
118
|
-
|
|
119
|
-
- feat: Support minimal CLI options (#225)
|
|
120
|
-
- fix: Return an actual error for propagation (#224)
|
|
121
|
-
- deps: Bump sentry-cli to `1.58.0`
|
|
122
|
-
|
|
123
|
-
## v1.12.1
|
|
124
|
-
|
|
125
|
-
- fix(deploy): change deploy to newDeploy in mocked CLI object (#206)
|
|
126
|
-
- fix(types): add deploy configuration to type definitions (#208)
|
|
127
|
-
|
|
128
|
-
## v1.12.0
|
|
129
|
-
|
|
130
|
-
- feat: Allow to perform release deploys (#192)
|
|
131
|
-
- fix: CJS/TS Exports Interop (#190)
|
|
132
|
-
- fix: make setCommits.repo type optional (#200)
|
|
133
|
-
- deps: Bump sentry-cli to `1.55.0`
|
|
134
|
-
|
|
135
|
-
## v1.11.1
|
|
136
|
-
|
|
137
|
-
- meta: Bump sentry-cli to `1.52.3` which fixes output handlers
|
|
138
|
-
|
|
139
|
-
## v1.11.0
|
|
140
|
-
|
|
141
|
-
**This release sets `node.engine: >=8` which makes it incompatible with Node
|
|
142
|
-
v6** If you need to support Node v6, please pin your dependency to `1.10.0` and
|
|
143
|
-
use selective version resolution:
|
|
144
|
-
https://classic.yarnpkg.com/en/docs/selective-version-resolutions/
|
|
145
|
-
|
|
146
|
-
- meta: Bump sentry-cli to `1.52.2`
|
|
147
|
-
- meta: Drop support for `node v6` due to new `sentry-cli` requiring `node >=8`
|
|
148
|
-
- chore: Fix setCommits types (#169)
|
|
149
|
-
|
|
150
|
-
## v1.10.0
|
|
151
|
-
|
|
152
|
-
- feat: Allow for skiping release finalization (#157)
|
|
153
|
-
- fix: Ensure afterEmit hook exists (#165)
|
|
154
|
-
- chore: Update TS definitions (#168)
|
|
155
|
-
|
|
156
|
-
## v1.9.3
|
|
157
|
-
|
|
158
|
-
- chore: Bump sentry-cli to `1.49.0`
|
|
159
|
-
- fix: Dont fail compilation if there is no release available (#155)
|
|
160
|
-
- fix: Update auto/repo logic for `setCommit` option (#156)
|
|
161
|
-
|
|
162
|
-
## v1.9.2
|
|
163
|
-
|
|
164
|
-
- chore: Resolve Snyk as dependency issues (#152)
|
|
165
|
-
|
|
166
|
-
## v1.9.1
|
|
167
|
-
|
|
168
|
-
- ref: Allow for nested setCommits (#142)
|
|
169
|
-
- fix: Fixed TS definitions export error (#145)
|
|
170
|
-
|
|
171
|
-
## v1.9.0
|
|
172
|
-
|
|
173
|
-
- feat: Add `setCommits` options (#139)
|
|
174
|
-
- chore: Add `TypeScript` definition file (#137)
|
|
175
|
-
- meta: Bump sentry-cli to `1.48.0`
|
|
176
|
-
|
|
177
|
-
## v1.8.1
|
|
178
|
-
|
|
179
|
-
- meta: Bump sentry-cli to `1.47.1`
|
|
180
|
-
|
|
181
|
-
## v1.8.0
|
|
182
|
-
|
|
183
|
-
- feat: Add errorHandler option (#133)
|
|
184
|
-
|
|
185
|
-
## v1.7.0
|
|
186
|
-
|
|
187
|
-
- feat: Add silent option to disable all output to stdout (#127)
|
|
188
|
-
|
|
189
|
-
## v1.6.2
|
|
190
|
-
|
|
191
|
-
- fix: Extract loader name in more reliable way
|
|
192
|
-
- build: Craft integration
|
|
193
|
-
|
|
194
|
-
## v1.6.1
|
|
195
|
-
|
|
196
|
-
- https://github.com/getsentry/sentry-webpack-plugin/releases
|
package/index.d.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { Compiler, WebpackPluginInstance } from 'webpack';
|
|
2
|
-
import {
|
|
3
|
-
SentryCliCommitsOptions,
|
|
4
|
-
SentryCliNewDeployOptions,
|
|
5
|
-
SentryCliOptions,
|
|
6
|
-
SentryCliUploadSourceMapsOptions,
|
|
7
|
-
SourceMapsPathDescriptor,
|
|
8
|
-
} from '@sentry/cli';
|
|
9
|
-
|
|
10
|
-
declare namespace SentryCliPlugin {
|
|
11
|
-
export interface SentryCliPluginOptions
|
|
12
|
-
extends Pick<
|
|
13
|
-
SentryCliOptions,
|
|
14
|
-
| 'url'
|
|
15
|
-
| 'authToken'
|
|
16
|
-
| 'org'
|
|
17
|
-
| 'project'
|
|
18
|
-
| 'vcsRemote'
|
|
19
|
-
| 'dist'
|
|
20
|
-
| 'silent'
|
|
21
|
-
| 'customHeader'
|
|
22
|
-
>,
|
|
23
|
-
Pick<
|
|
24
|
-
SentryCliUploadSourceMapsOptions,
|
|
25
|
-
| 'ignoreFile'
|
|
26
|
-
| 'rewrite'
|
|
27
|
-
| 'sourceMapReference'
|
|
28
|
-
| 'stripPrefix'
|
|
29
|
-
| 'stripCommonPrefix'
|
|
30
|
-
| 'validate'
|
|
31
|
-
| 'urlPrefix'
|
|
32
|
-
| 'urlSuffix'
|
|
33
|
-
| 'ext'
|
|
34
|
-
> {
|
|
35
|
-
/**
|
|
36
|
-
* Filepaths to scan recursively for source and source map files
|
|
37
|
-
*/
|
|
38
|
-
include:
|
|
39
|
-
| string
|
|
40
|
-
| SourceMapsPathDescriptor
|
|
41
|
-
| Array<string | SourceMapsPathDescriptor>;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Filepaths to ignore when scanning for sources and source maps
|
|
45
|
-
*/
|
|
46
|
-
ignore?: string | Array<string>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Unique name of a release, must be a string, should uniquely identify your release,
|
|
50
|
-
* defaults to sentry-cli releases propose-version command which should always return the correct version
|
|
51
|
-
* (requires access to git CLI and root directory to be a valid repository).
|
|
52
|
-
*/
|
|
53
|
-
release?: string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* A filter for entry points that should be processed.
|
|
57
|
-
* By default, the release will be injected into all entry points.
|
|
58
|
-
*/
|
|
59
|
-
entries?: string[] | RegExp | ((key: string) => boolean);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Path to Sentry CLI config properties, as described in https://docs.sentry.io/learn/cli/configuration/#properties-files.
|
|
63
|
-
* By default, the config file is looked for upwards from the current path and defaults from ~/.sentryclirc are always loaded.
|
|
64
|
-
*/
|
|
65
|
-
configFile?: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Determines whether processed release should be automatically finalized after artifacts upload.
|
|
69
|
-
* Defaults to `true`.
|
|
70
|
-
*/
|
|
71
|
-
finalize?: boolean;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Determines whether plugin should be applied not more than once during whole webpack run.
|
|
75
|
-
* Useful when the process is performing multiple builds using the same config.
|
|
76
|
-
* Defaults to `false`.
|
|
77
|
-
*/
|
|
78
|
-
runOnce?: boolean;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Attempts a dry run (useful for dev environments).
|
|
82
|
-
*/
|
|
83
|
-
dryRun?: boolean;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Print some useful debug information.
|
|
87
|
-
*/
|
|
88
|
-
debug?: boolean;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* If true, will remove all previously uploaded artifacts from the configured release.
|
|
92
|
-
*/
|
|
93
|
-
cleanArtifacts?: boolean;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* When a CLI error occurs, the plugin will call this function.
|
|
97
|
-
*
|
|
98
|
-
* By default, it will call `invokeErr()`, thereby stopping Webpack
|
|
99
|
-
* compilation. To allow compilation to continue and log a warning instead,
|
|
100
|
-
* set this to
|
|
101
|
-
* (err, invokeErr, compilation) => {
|
|
102
|
-
* compilation.warnings.push('Sentry CLI Plugin: ' + err.message)
|
|
103
|
-
* }
|
|
104
|
-
*
|
|
105
|
-
* Note: `compilation` is typed as `unknown` in order to preserve
|
|
106
|
-
* compatibility with both Webpack 4 and Webpack 5 types, If you need the
|
|
107
|
-
* correct type, in Webpack 4 use `compilation.Compilation` and in Webpack 5
|
|
108
|
-
* use `Compilation`.
|
|
109
|
-
*/
|
|
110
|
-
errorHandler?: (
|
|
111
|
-
err: Error,
|
|
112
|
-
invokeErr: () => void,
|
|
113
|
-
compilation: unknown
|
|
114
|
-
) => void;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Adds commits to sentry
|
|
118
|
-
*/
|
|
119
|
-
setCommits?: SentryCliCommitsOptions;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Creates a new release deployment
|
|
123
|
-
*/
|
|
124
|
-
deploy?: SentryCliNewDeployOptions;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export { SourceMapsPathDescriptor };
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare class SentryCliPlugin implements WebpackPluginInstance {
|
|
131
|
-
options: SentryCliPlugin.SentryCliPluginOptions;
|
|
132
|
-
constructor(options: SentryCliPlugin.SentryCliPluginOptions);
|
|
133
|
-
static cliBinaryExists(): string;
|
|
134
|
-
apply(compiler: Compiler): void;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// We need to use this older format (over `export default SentryCliPlugin`)
|
|
138
|
-
// because we don't want people using the plugin in their TS projects to be
|
|
139
|
-
// forced to set `esmoduleinterop` to `true`, which the newer syntax requires.
|
|
140
|
-
// See
|
|
141
|
-
// https://github.com/microsoft/TypeScript-Website/blob/6a36b3137182084c76cdf133c812fe3a5626dbf0/packages/documentation/copy/en/declaration-files/templates/module.d.ts.md#L95-L106
|
|
142
|
-
// (linking to the docs in their raw form on GH rather than on the TS docs site
|
|
143
|
-
// in case the docs site ever moves things around).
|
|
144
|
-
//
|
|
145
|
-
// Note that with this older format, no other top-level exports can exist, which
|
|
146
|
-
// is why the exported interface above is wrapped in a namespace. See the
|
|
147
|
-
// example in the above link and
|
|
148
|
-
// https://github.com/microsoft/TypeScript-Website/blob/6a36b3137182084c76cdf133c812fe3a5626dbf0/packages/documentation/copy/en/declaration-files/templates/module.d.ts.md#L195-L214.
|
|
149
|
-
export = SentryCliPlugin;
|
package/jest.config.js
DELETED
package/src/cjs.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = require('./index').default;
|
|
2
|
-
|
|
3
|
-
// The assignment to `default` below saves us from having to use
|
|
4
|
-
// `esModuleInterop` (which then would force our users to set the same option),
|
|
5
|
-
// by manually doing the one part of `esModuleInterop`'s job we actually need.
|
|
6
|
-
//
|
|
7
|
-
// (In order to avoid a breaking change, we need to stick with default-exporting
|
|
8
|
-
// `SentryCliPlugin`. This means that if we want to use ES6 imports (in our own
|
|
9
|
-
// use of the plugin), our options are:
|
|
10
|
-
//
|
|
11
|
-
// `import * as x from y`,
|
|
12
|
-
// `import x from y`, and
|
|
13
|
-
// `import {default as x} from y`.
|
|
14
|
-
//
|
|
15
|
-
// If we use the first option, it correctly pulls in the above `module.exports`
|
|
16
|
-
// value, but it treats it as a namespace, not a class, and therefore refuses to
|
|
17
|
-
// let it be used with `new`. If we use either of the other two, it looks for
|
|
18
|
-
// `module.exports.default`, which will be undefined unless either we do (or
|
|
19
|
-
// `esModuleInterop` does) the below.)
|
|
20
|
-
module.exports.default = module.exports;
|