@strapi/plugin-sentry 4.0.0 → 4.0.4

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 +1,4 @@
1
- {}
1
+ {
2
+ "plugin.description.long": "Strapi 에러 이벤트를 Sentry에 보냅니다.",
3
+ "plugin.description.short": "Strapi 에러 이벤트를 Sentry에 보냅니다."
4
+ }
package/jest.config.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ const baseConfig = require('../../../jest.base-config');
4
+ const pkg = require('./package');
5
+
6
+ module.exports = {
7
+ ...baseConfig,
8
+ displayName: (pkg.strapi && pkg.strapi.name) || pkg.name,
9
+ roots: [__dirname],
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-sentry",
3
- "version": "4.0.0",
3
+ "version": "4.0.4",
4
4
  "description": "Send Strapi error events to Sentry",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,11 +20,14 @@
20
20
  "url": "https://strapi.io"
21
21
  }
22
22
  ],
23
+ "scripts": {
24
+ "test:unit": "jest --verbose"
25
+ },
23
26
  "dependencies": {
24
27
  "@sentry/node": "6.7.1"
25
28
  },
26
29
  "engines": {
27
- "node": ">=12.x.x <=16.x.x",
30
+ "node": ">=12.22.0 <=16.x.x",
28
31
  "npm": ">=6.0.0"
29
32
  },
30
33
  "strapi": {
@@ -33,5 +36,5 @@
33
36
  "description": "Send Strapi error events to Sentry.",
34
37
  "kind": "plugin"
35
38
  },
36
- "gitHead": "b181702f0202b2c6d645d42b195a831f25cd0b03"
39
+ "gitHead": "d81919ac2272948b3f5d3b25a4cf8cc7b6994460"
37
40
  }
@@ -2,7 +2,8 @@
2
2
 
3
3
  const INVALID_DSN = 'an_invalid_dsn';
4
4
  const VALID_DSN = 'a_valid_dsn';
5
- const captureException = jest.fn();
5
+ const mockCaptureException = jest.fn();
6
+
6
7
  // FIXME
7
8
  /* eslint-disable import/extensions */
8
9
  jest.mock('@sentry/node', () => {
@@ -12,7 +13,7 @@ jest.mock('@sentry/node', () => {
12
13
  throw Error();
13
14
  }
14
15
  },
15
- captureException,
16
+ captureException: mockCaptureException,
16
17
  withScope(configureScope) {
17
18
  configureScope();
18
19
  },
@@ -83,7 +84,7 @@ describe('Sentry service', () => {
83
84
  const configureScope = jest.fn();
84
85
  sentryService.sendError(error, configureScope);
85
86
  expect(configureScope).toHaveBeenCalled();
86
- expect(captureException).toHaveBeenCalled();
87
+ expect(mockCaptureException).toHaveBeenCalled();
87
88
  });
88
89
 
89
90
  it('does not not send metadata when the option is disabled', () => {