@sentry/wasm 6.18.0 → 6.18.2

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/rollup.config.js +9 -98
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/wasm",
3
- "version": "6.18.0",
3
+ "version": "6.18.2",
4
4
  "description": "Support for WASM.",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/wasm",
@@ -16,8 +16,8 @@
16
16
  "access": "public"
17
17
  },
18
18
  "dependencies": {
19
- "@sentry/browser": "6.18.0",
20
- "@sentry/types": "6.18.0",
19
+ "@sentry/browser": "6.18.2",
20
+ "@sentry/types": "6.18.2",
21
21
  "tslib": "^1.9.3"
22
22
  },
23
23
  "devDependencies": {
package/rollup.config.js CHANGED
@@ -1,100 +1,11 @@
1
- import { terser } from 'rollup-plugin-terser';
2
- import typescript from 'rollup-plugin-typescript2';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import replace from '@rollup/plugin-replace';
5
-
6
- const terserInstance = terser({
7
- mangle: {
8
- // captureExceptions and captureMessage are public API methods and they don't need to be listed here
9
- // as mangler doesn't touch user-facing thing, however sentryWrapped is not, and it would be mangled into a minified version.
10
- // We need those full names to correctly detect our internal frames for stripping.
11
- // I listed all of them here just for the clarity sake, as they are all used in the frames manipulation process.
12
- reserved: ['captureException', 'captureMessage', 'sentryWrapped'],
13
- properties: {
14
- regex: /^_[^_]/,
15
- },
16
- },
17
- output: {
18
- comments: false,
19
- },
1
+ import { makeBaseBundleConfig, makeMinificationVariants } from '../../rollup.config';
2
+
3
+ const baseBundleConfig = makeBaseBundleConfig({
4
+ input: 'src/index.ts',
5
+ isAddOn: true,
6
+ jsVersion: 'es5',
7
+ licenseTitle: '@sentry/wasm',
8
+ outputFileBase: 'build/wasm',
20
9
  });
21
10
 
22
- const plugins = [
23
- typescript({
24
- tsconfig: 'tsconfig.esm.json',
25
- tsconfigOverride: {
26
- compilerOptions: {
27
- declaration: false,
28
- declarationMap: false,
29
- paths: {
30
- '@sentry/utils': ['../utils/src'],
31
- '@sentry/core': ['../core/src'],
32
- '@sentry/hub': ['../hub/src'],
33
- '@sentry/types': ['../types/src'],
34
- '@sentry/minimal': ['../minimal/src'],
35
- },
36
- baseUrl: '.',
37
- },
38
- },
39
- include: ['*.ts+(|x)', '**/*.ts+(|x)', '../**/*.ts+(|x)'],
40
- }),
41
- replace({
42
- // don't replace `__placeholder__` where it's followed immediately by a single `=` (to prevent ending up
43
- // with something of the form `let "replacementValue" = "some assigned value"`, which would cause a
44
- // syntax error)
45
- preventAssignment: true,
46
- // the replacements to make
47
- values: {
48
- __SENTRY_BROWSER_BUNDLE__: true,
49
- },
50
- }),
51
- resolve({
52
- mainFields: ['module'],
53
- }),
54
- ];
55
-
56
- function mergeIntoSentry() {
57
- return `
58
- __window.Sentry = __window.Sentry || {};
59
- __window.Sentry.Integrations = __window.Sentry.Integrations || {};
60
- for (var key in exports) {
61
- if (Object.prototype.hasOwnProperty.call(exports, key)) {
62
- __window.Sentry.Integrations[key] = exports[key];
63
- }
64
- }
65
- `;
66
- }
67
-
68
- function loadAllIntegrations() {
69
- const builds = [];
70
- [
71
- {
72
- extension: '.js',
73
- plugins,
74
- },
75
- {
76
- extension: '.min.js',
77
- plugins: [...plugins, terserInstance],
78
- },
79
- ].forEach(build => {
80
- builds.push({
81
- input: `src/index.ts`,
82
- output: {
83
- banner: '(function (__window) {',
84
- intro: 'var exports = {};',
85
- outro: mergeIntoSentry(),
86
- footer: '}(window));',
87
- file: `build/wasm${build.extension}`,
88
- format: 'cjs',
89
- sourcemap: true,
90
- strict: false,
91
- esModule: false,
92
- },
93
- plugins: build.plugins,
94
- treeshake: 'smallest',
95
- });
96
- });
97
- return builds;
98
- }
99
-
100
- export default loadAllIntegrations();
11
+ export default makeMinificationVariants(baseBundleConfig);