@sentry/gatsby 8.0.0-alpha.2 → 8.0.0-alpha.5

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/README.md CHANGED
@@ -13,17 +13,19 @@ module.exports = {
13
13
  // ...
14
14
  plugins: [
15
15
  {
16
- resolve: "@sentry/gatsby",
16
+ resolve: '@sentry/gatsby',
17
17
  options: {
18
- dsn: process.env.SENTRY_DSN, // this is the default
19
- }
18
+ dsn: process.env.SENTRY_DSN, // this is the default
19
+ },
20
20
  },
21
21
  // ...
22
- ]
23
- }
22
+ ],
23
+ };
24
24
  ```
25
25
 
26
- Options will be passed directly to `Sentry.init`. See all available options in [our docs](https://docs.sentry.io/error-reporting/configuration/?platform=javascript). The `environment` value defaults to `NODE_ENV` (or `'development'` if `NODE_ENV` is not set).
26
+ Options will be passed directly to `Sentry.init`. See all available options in
27
+ [our docs](https://docs.sentry.io/error-reporting/configuration/?platform=javascript). The `environment` value defaults
28
+ to `NODE_ENV` (or `'development'` if `NODE_ENV` is not set).
27
29
 
28
30
  ## GitHub Actions
29
31
 
@@ -35,18 +37,21 @@ The `release` value is inferred from `COMMIT_REF`.
35
37
 
36
38
  ## Vercel
37
39
 
38
- To automatically capture the `release` value on Vercel you will need to register appropriate [system environment variable](https://vercel.com/docs/v2/build-step#system-environment-variables) (e.g. `VERCEL_GITHUB_COMMIT_SHA`) in your project.
40
+ To automatically capture the `release` value on Vercel you will need to register appropriate
41
+ [system environment variable](https://vercel.com/docs/v2/build-step#system-environment-variables) (e.g.
42
+ `VERCEL_GITHUB_COMMIT_SHA`) in your project.
39
43
 
40
44
  ## Sentry Performance
41
45
 
42
- To enable tracing, supply either `tracesSampleRate` or `tracesSampler` to the options. This will turn on the `BrowserTracing` integration for automatic instrumentation of pageloads and navigations.
46
+ To enable tracing, supply either `tracesSampleRate` or `tracesSampler` to the options. This will turn on the
47
+ `BrowserTracing` integration for automatic instrumentation of pageloads and navigations.
43
48
 
44
49
  ```javascript
45
50
  module.exports = {
46
51
  // ...
47
52
  plugins: [
48
53
  {
49
- resolve: "@sentry/gatsby",
54
+ resolve: '@sentry/gatsby',
50
55
  options: {
51
56
  dsn: process.env.SENTRY_DSN, // this is the default
52
57
 
@@ -60,24 +65,21 @@ module.exports = {
60
65
  // for this transaction.
61
66
  // Can return 0 to drop the transaction entirely.
62
67
 
63
- if ("...") {
64
- return 0.5 // These are important - take a big sample
65
- }
66
- else if ("...") {
67
- return 0.01 // These are less important or happen much more frequently - only take 1% of them
68
- }
69
- else if ("...") {
70
- return 0 // These aren't something worth tracking - drop all transactions like this
68
+ if ('...') {
69
+ return 0.5; // These are important - take a big sample
70
+ } else if ('...') {
71
+ return 0.01; // These are less important or happen much more frequently - only take 1% of them
72
+ } else if ('...') {
73
+ return 0; // These aren't something worth tracking - drop all transactions like this
74
+ } else {
75
+ return 0.1; // Default sample rate
71
76
  }
72
- else {
73
- return 0.1 // Default sample rate
74
- }
75
- }
76
- }
77
+ },
78
+ },
77
79
  },
78
80
  // ...
79
- ]
80
- }
81
+ ],
82
+ };
81
83
  ```
82
84
 
83
85
  If you want to supply options to the `BrowserTracing` integration, use the `browserTracingOptions` parameter.
@@ -87,19 +89,19 @@ module.exports = {
87
89
  // ...
88
90
  plugins: [
89
91
  {
90
- resolve: "@sentry/gatsby",
92
+ resolve: '@sentry/gatsby',
91
93
  options: {
92
- dsn: process.env.SENTRY_DSN, // this is the default
93
- tracesSampleRate: 1, // or tracesSampler (see above)
94
- browserTracingOptions: {
95
- // disable creating spans for XHR requests
96
- traceXHR: false,
97
- }
98
- }
94
+ dsn: process.env.SENTRY_DSN, // this is the default
95
+ tracesSampleRate: 1, // or tracesSampler (see above)
96
+ browserTracingOptions: {
97
+ // disable creating spans for XHR requests
98
+ traceXHR: false,
99
+ },
100
+ },
99
101
  },
100
102
  // ...
101
- ]
102
- }
103
+ ],
104
+ };
103
105
  ```
104
106
 
105
107
  ## Links
package/cjs/index.js CHANGED
@@ -6,7 +6,14 @@ const sdk = require('./sdk.js');
6
6
 
7
7
 
8
8
  exports.init = sdk.init;
9
- for (const k in react) {
10
- if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = react[k];
11
- }
9
+ Object.prototype.hasOwnProperty.call(react, '__proto__') &&
10
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
11
+ Object.defineProperty(exports, '__proto__', {
12
+ enumerable: true,
13
+ value: react['__proto__']
14
+ });
15
+
16
+ Object.keys(react).forEach(k => {
17
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = react[k];
18
+ });
12
19
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ {"type":"module","sideEffects":false}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/gatsby",
3
- "version": "8.0.0-alpha.2",
3
+ "version": "8.0.0-alpha.5",
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.8"
14
+ "node": ">=14.18"
15
15
  },
16
16
  "files": [
17
17
  "cjs",
@@ -26,6 +26,19 @@
26
26
  "main": "cjs/index.js",
27
27
  "module": "esm/index.js",
28
28
  "types": "types/index.d.ts",
29
+ "exports": {
30
+ "./package.json": "./package.json",
31
+ ".": {
32
+ "import": {
33
+ "types": "./types/index.d.ts",
34
+ "default": "./esm/index.js"
35
+ },
36
+ "require": {
37
+ "types": "./types/index.d.ts",
38
+ "default": "./cjs/index.js"
39
+ }
40
+ }
41
+ },
29
42
  "typesVersions": {
30
43
  "<4.9": {
31
44
  "types/index.d.ts": [
@@ -37,10 +50,10 @@
37
50
  "access": "public"
38
51
  },
39
52
  "dependencies": {
40
- "@sentry/core": "8.0.0-alpha.2",
41
- "@sentry/react": "8.0.0-alpha.2",
42
- "@sentry/types": "8.0.0-alpha.2",
43
- "@sentry/utils": "8.0.0-alpha.2",
53
+ "@sentry/core": "8.0.0-alpha.5",
54
+ "@sentry/react": "8.0.0-alpha.5",
55
+ "@sentry/types": "8.0.0-alpha.5",
56
+ "@sentry/utils": "8.0.0-alpha.5",
44
57
  "@sentry/webpack-plugin": "1.19.0"
45
58
  },
46
59
  "peerDependencies": {