oclif 3.11.2 → 3.11.3

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,5 +1,5 @@
1
1
  {
2
- "version": "3.11.2",
2
+ "version": "3.11.3",
3
3
  "commands": {
4
4
  "generate": {
5
5
  "id": "generate",
@@ -23,10 +23,11 @@ class CLI extends Generator {
23
23
  yarn: hasYarn,
24
24
  };
25
25
  }
26
+ // eslint-disable-next-line complexity
26
27
  async prompting() {
27
28
  const msg = 'Time to build an oclif CLI!';
28
29
  this.log(`${msg} Version: ${version}`);
29
- const { moduleType } = await this.prompt([
30
+ const { moduleType } = process.env.OCLIF_ALLOW_ESM ? await this.prompt([
30
31
  {
31
32
  type: 'list',
32
33
  name: 'moduleType',
@@ -37,7 +38,7 @@ class CLI extends Generator {
37
38
  ],
38
39
  default: 'cjs',
39
40
  },
40
- ]);
41
+ ]) : 'cjs';
41
42
  const repo = moduleType === 'esm' ? 'hello-world-esm' : 'hello-world';
42
43
  (0, child_process_1.execSync)(`git clone https://github.com/oclif/${repo}.git "${path.resolve(this.name)}" --depth=1`);
43
44
  fs.rmSync(`${path.resolve(this.name, '.git')}`, { recursive: true });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "3.11.2",
4
+ "version": "3.11.3",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run"