@sentry/gatsby 8.53.0 → 9.0.0-alpha.0

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.
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const react = require('@sentry/react');
4
4
  const sdk = require('./sdk.js');
package/build/cjs/sdk.js CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const core = require('@sentry/core');
4
4
  const react = require('@sentry/react');
@@ -1 +1 @@
1
- {"type":"module","version":"8.53.0","sideEffects":false}
1
+ {"type":"module","version":"9.0.0-alpha.0","sideEffects":false}
package/gatsby-node.js CHANGED
@@ -7,8 +7,24 @@ const SENTRY_USER_CONFIG = ['./sentry.config.js', './sentry.config.ts'];
7
7
  exports.onCreateWebpackConfig = ({ getConfig, actions }, options) => {
8
8
  const enableClientWebpackPlugin = options.enableClientWebpackPlugin !== false;
9
9
  if (process.env.NODE_ENV === 'production' && enableClientWebpackPlugin) {
10
- const deleteSourcemapsAfterUpload = options.deleteSourcemapsAfterUpload === true;
10
+ const prevSourceMapSetting = getConfig() && 'devtool' in getConfig() ? getConfig().devtool : undefined;
11
+ const shouldAutomaticallyEnableSourceMaps =
12
+ prevSourceMapSetting !== 'source-map' && prevSourceMapSetting !== 'hidden-source-map';
13
+
14
+ if (shouldAutomaticallyEnableSourceMaps) {
15
+ // eslint-disable-next-line no-console
16
+ console.log(
17
+ '[Sentry] Automatically enabling source map generation by setting `devtool: "hidden-source-map"`. Those source maps will be deleted after they were uploaded to Sentry',
18
+ );
19
+ }
20
+
21
+ // Delete source maps per default or when this is explicitly set to `true` (`deleteSourceMapsAfterUpload: true` can override the default behavior)
22
+ const deleteSourcemapsAfterUpload =
23
+ options.deleteSourcemapsAfterUpload ||
24
+ (options.deleteSourcemapsAfterUpload !== false && shouldAutomaticallyEnableSourceMaps);
25
+
11
26
  actions.setWebpackConfig({
27
+ devtool: shouldAutomaticallyEnableSourceMaps ? 'hidden-source-map' : prevSourceMapSetting,
12
28
  plugins: [
13
29
  sentryWebpackPlugin({
14
30
  sourcemaps: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/gatsby",
3
- "version": "8.53.0",
3
+ "version": "9.0.0-alpha.0",
4
4
  "description": "Official Sentry SDK for Gatsby.js",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby",
@@ -11,7 +11,7 @@
11
11
  "gatsby-plugin"
12
12
  ],
13
13
  "engines": {
14
- "node": ">=14.18"
14
+ "node": ">=18"
15
15
  },
16
16
  "files": [
17
17
  "/build",
@@ -35,7 +35,7 @@
35
35
  }
36
36
  },
37
37
  "typesVersions": {
38
- "<4.9": {
38
+ "<5.0": {
39
39
  "build/types/index.d.ts": [
40
40
  "build/types-ts3.8/index.d.ts"
41
41
  ]
@@ -45,8 +45,8 @@
45
45
  "access": "public"
46
46
  },
47
47
  "dependencies": {
48
- "@sentry/core": "8.53.0",
49
- "@sentry/react": "8.53.0",
48
+ "@sentry/core": "9.0.0-alpha.0",
49
+ "@sentry/react": "9.0.0-alpha.0",
50
50
  "@sentry/webpack-plugin": "2.22.7"
51
51
  },
52
52
  "peerDependencies": {