@whook/create 20.1.2 → 21.0.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.
@@ -8,7 +8,7 @@ exports[`initProject should fail with access problems 1`] = `
8
8
  ],
9
9
  ],
10
10
  "errorCode": "E_PROJECT_DIR",
11
- "errorParams": [
11
+ "errorDebugValues": [
12
12
  "/home/whoiam/projects/yolo",
13
13
  ],
14
14
  "inquirerPromptCalls": [
@@ -23,8 +23,14 @@ describe('initAuthor', () => {
23
23
  });
24
24
 
25
25
  test('should work', async () => {
26
- exec.mockImplementationOnce((_, cb) => cb(null, 'Wayne Campbell'));
27
- exec.mockImplementationOnce((_, cb) => cb(null, 'wayne@warner.com'));
26
+ exec.mockImplementationOnce(
27
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
28
+ cb(null, 'Wayne Campbell'),
29
+ );
30
+ exec.mockImplementationOnce(
31
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
32
+ cb(null, 'wayne@warner.com'),
33
+ );
28
34
  lock.take.mockResolvedValueOnce(undefined);
29
35
  inquirer.prompt.mockResolvedValueOnce({
30
36
  authorName: 'Wayne Campbell',
@@ -50,8 +56,14 @@ describe('initAuthor', () => {
50
56
  });
51
57
 
52
58
  test('should handle git failures', async () => {
53
- exec.mockImplementationOnce((_, cb) => cb(new Error('E_GIT_ERROR')));
54
- exec.mockImplementationOnce((_, cb) => cb(new Error('E_GIT_ERROR')));
59
+ exec.mockImplementationOnce(
60
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
61
+ cb(new Error('E_GIT_ERROR')),
62
+ );
63
+ exec.mockImplementationOnce(
64
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
65
+ cb(new Error('E_GIT_ERROR')),
66
+ );
55
67
  lock.take.mockResolvedValueOnce(undefined);
56
68
  inquirer.prompt.mockResolvedValueOnce({
57
69
  authorName: 'Wayne Campbell',
@@ -77,8 +89,14 @@ describe('initAuthor', () => {
77
89
  });
78
90
 
79
91
  test('should release the lock on failure', async () => {
80
- exec.mockImplementationOnce((_, cb) => cb(null, 'Wayne Campbell'));
81
- exec.mockImplementationOnce((_, cb) => cb(null, 'wayne@warner.com'));
92
+ exec.mockImplementationOnce(
93
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
94
+ cb(null, 'Wayne Campbell'),
95
+ );
96
+ exec.mockImplementationOnce(
97
+ (_: unknown, cb: (err: Error | null, data?: string) => undefined) =>
98
+ cb(null, 'wayne@warner.com'),
99
+ );
82
100
  lock.take.mockResolvedValueOnce(undefined);
83
101
  inquirer.prompt.mockRejectedValueOnce(new Error('E_PROMPT_ERROR'));
84
102
  lock.release.mockResolvedValueOnce(undefined);
@@ -93,7 +111,7 @@ describe('initAuthor', () => {
93
111
  } catch (err) {
94
112
  expect({
95
113
  errorCode: (err as YError).code,
96
- errorParams: (err as YError).params,
114
+ errorDebugValues: (err as YError).debugValues,
97
115
  inquirerPromptCalls: inquirer.prompt.mock.calls,
98
116
  lockTakeCalls: lock.take.mock.calls,
99
117
  lockReleaseCalls: lock.release.mock.calls,