@sentry/wizard 2.6.1 → 2.7.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/lib/Helper/Package.d.ts +1 -0
  3. package/dist/lib/Helper/Package.js +46 -0
  4. package/dist/lib/Helper/Package.js.map +1 -0
  5. package/dist/lib/Helper/PackageManager.d.ts +22 -0
  6. package/dist/lib/Helper/PackageManager.js +135 -0
  7. package/dist/lib/Helper/PackageManager.js.map +1 -0
  8. package/dist/lib/Helper/Wizard.js +2 -1
  9. package/dist/lib/Helper/Wizard.js.map +1 -1
  10. package/dist/lib/Helper/__tests__/MergeConfig.js +25 -14
  11. package/dist/lib/Helper/__tests__/MergeConfig.js.map +1 -1
  12. package/dist/lib/Steps/Integrations/NextJs.d.ts +0 -5
  13. package/dist/lib/Steps/Integrations/NextJs.js +6 -85
  14. package/dist/lib/Steps/Integrations/NextJs.js.map +1 -1
  15. package/dist/lib/Steps/Integrations/ReactNative.d.ts +7 -0
  16. package/dist/lib/Steps/Integrations/ReactNative.js +119 -50
  17. package/dist/lib/Steps/Integrations/ReactNative.js.map +1 -1
  18. package/dist/lib/Steps/Integrations/__tests__/ReactNative.js +42 -0
  19. package/dist/lib/Steps/Integrations/__tests__/ReactNative.js.map +1 -1
  20. package/dist/lib/__tests__/Setup.js +15 -0
  21. package/dist/lib/__tests__/Setup.js.map +1 -1
  22. package/lib/Helper/Package.ts +61 -0
  23. package/lib/Helper/PackageManager.ts +64 -0
  24. package/lib/Helper/Wizard.ts +1 -1
  25. package/lib/Helper/__tests__/MergeConfig.ts +36 -20
  26. package/lib/Steps/Integrations/NextJs.ts +8 -108
  27. package/lib/Steps/Integrations/ReactNative.ts +107 -36
  28. package/lib/Steps/Integrations/__tests__/ReactNative.ts +34 -0
  29. package/lib/__tests__/Setup.ts +23 -0
  30. package/package.json +1 -1
@@ -1,8 +1,31 @@
1
1
  jest.mock('../Helper/Logging'); // We mock logging to not pollute the output
2
+ jest.mock('child_process');
3
+ import * as child_process from 'child_process';
4
+
2
5
  import { Integration, Platform } from '../Constants';
3
6
  import { run } from '../Setup';
4
7
 
8
+ const originalExec = child_process.exec;
9
+
10
+ const restoreExec = (): void => {
11
+ (child_process as any).exec = originalExec;
12
+ };
13
+
14
+ const mockExec = (): void => {
15
+ ((child_process.exec as unknown) as jest.Mock).mockImplementation(
16
+ (_command, callback) => callback(null, { stdout: '' }),
17
+ );
18
+ };
19
+
5
20
  describe('Wizard', () => {
21
+ beforeEach(() => {
22
+ mockExec();
23
+ });
24
+
25
+ afterEach(() => {
26
+ restoreExec();
27
+ });
28
+
6
29
  describe('React Native', () => {
7
30
  test('run', () => {
8
31
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/wizard",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "homepage": "https://github.com/getsentry/sentry-wizard",
5
5
  "repository": "https://github.com/getsentry/sentry-wizard",
6
6
  "description": "Sentry wizard helping you to configure your project",