@anansi/cli 1.1.56 → 1.1.59

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 (3) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/package.json +3 -3
  3. package/run.js +14 -7
package/CHANGELOG.md CHANGED
@@ -3,6 +3,37 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [1.1.59](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.58...@anansi/cli@1.1.59) (2022-04-16)
7
+
8
+
9
+ ### 💅 Enhancement
10
+
11
+ * Always find yeoman generator package ([f273ce2](https://github.com/ntucker/anansi/commit/f273ce2f54bf07a6665ee149feb76b456ab04f61))
12
+
13
+
14
+ ### 📦 Package
15
+
16
+ * Update all non-major dependencies ([#1471](https://github.com/ntucker/anansi/issues/1471)) ([000d642](https://github.com/ntucker/anansi/commit/000d642055ee042dfb9049dd4cbc07d1fd5f3c9c))
17
+
18
+
19
+
20
+ ### [1.1.58](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.57...@anansi/cli@1.1.58) (2022-04-08)
21
+
22
+ **Note:** Version bump only for package @anansi/cli
23
+
24
+
25
+
26
+
27
+
28
+ ### [1.1.57](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.57) (2022-04-02)
29
+
30
+
31
+ ### 💅 Enhancement
32
+
33
+ * Better handling of Ctrl+C (SIGNINT) ([42e732d](https://github.com/ntucker/anansi/commit/42e732d88045f07363dcc8fe893f5d4266cd65fd))
34
+
35
+
36
+
6
37
  ### [1.1.56](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.56) (2022-03-30)
7
38
 
8
39
  **Note:** Version bump only for package @anansi/cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anansi/cli",
3
- "version": "1.1.56",
3
+ "version": "1.1.59",
4
4
  "description": "Fast React Web Apps",
5
5
  "homepage": "https://github.com/ntucker/anansi/tree/master/packages/cli#readme",
6
6
  "repository": {
@@ -51,10 +51,10 @@
51
51
  "npm": ">= 6.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@anansi/generator-js": "^7.3.10",
54
+ "@anansi/generator-js": "^7.3.13",
55
55
  "bin-version-check": "^4.0.0",
56
56
  "chalk": "^4.1.2",
57
- "commander": "^9.1.0",
57
+ "commander": "^9.2.0",
58
58
  "execa": "^5.1.1",
59
59
  "latest-version": "^5.1.0",
60
60
  "mem-fs": "^2.2.1",
package/run.js CHANGED
@@ -28,17 +28,23 @@ program
28
28
  }
29
29
  try {
30
30
  const cwd = options.dir || `./${projectName}`;
31
- await Promise.all([
32
- verifyAndPrompt(),
33
- execa('npx yo', ['@anansi/js', projectName], {
34
- stdio: 'inherit',
31
+ const yosub = execa(
32
+ 'npx yo',
33
+ [require.resolve('@anansi/generator-js'), projectName],
34
+ {
35
+ stdio: ['pipe', process.stdout, process.stderr],
35
36
  shell: true,
36
37
  cwd,
37
38
  env: {
38
39
  PATH: `${process.env.PATH}:${__dirname}/node_modules/.bin`,
39
40
  },
40
- }),
41
- ]);
41
+ },
42
+ );
43
+ // pipe with raw mode allows us to know when this exits with Ctrl+C (SIGINT)
44
+ process.stdin.setRawMode(true);
45
+ process.stdin.pipe(yosub.stdin, { end: false });
46
+ await Promise.all([verifyAndPrompt(), yosub]);
47
+
42
48
  const readme = path.join(cwd, 'README.md');
43
49
  // if user exits early this is still exit code 0, so we need to validate
44
50
  // whether the setup completed before going on to the next step
@@ -64,7 +70,8 @@ program
64
70
  });
65
71
  }
66
72
  } catch (error) {
67
- console.error(error.message);
73
+ // Don't display error for user-triggered exit (SIGINT)
74
+ if (error.exitCode !== 130) console.error(error.message);
68
75
  process.exit(2);
69
76
  }
70
77
  });