@enact/cli 6.0.2 → 6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 6.0.4 (December 22, 2023)
2
+
3
+ ### template
4
+
5
+ * Fixed `--help` throws errors.
6
+
7
+ ## 6.0.3 (October 5, 2023)
8
+
9
+ * Updated `prettier` version to `^3.0.1` and `eslint-plugin-prettier` version to `^5.0.0`.
10
+
1
11
  ## 6.0.2 (July 26, 2023)
2
12
 
3
13
  * Updated `chalk` version to `^5.3.0`.
package/commands/info.js CHANGED
@@ -121,10 +121,12 @@ function api({cliInfo = false, dev = false} = {}) {
121
121
  } else {
122
122
  const app = require('@enact/dev-utils').optionParser;
123
123
  const meta = require(path.join(app.context, 'package.json'));
124
- const bl = require(resolveSync('browserslist', {
125
- basedir: path.dirname(require.resolve('@enact/dev-utils/package.json')),
126
- preserveSymlinks: false
127
- }));
124
+ const bl = require(
125
+ resolveSync('browserslist', {
126
+ basedir: path.dirname(require.resolve('@enact/dev-utils/package.json')),
127
+ preserveSymlinks: false
128
+ })
129
+ );
128
130
  app.setEnactTargetsAsDefault();
129
131
  console.log(chalk.yellow.bold('==Project Info=='));
130
132
  console.log(`Name: ${app.name}`);
@@ -290,19 +290,19 @@ function api({action, target, name} = {}) {
290
290
  }
291
291
 
292
292
  function cli(args) {
293
- const opts = minimist(args, {
294
- boolean: ['help'],
295
- alias: {h: 'help'}
296
- });
297
- if (opts.help) displayHelp();
298
-
299
- const action = opts._[0];
300
- const target = opts._[1] || process.cwd();
301
- const name = ['install', 'link'].includes(action) ? opts._[2] : opts._[1];
302
- if (!action) displayHelp();
303
-
304
293
  import('chalk').then(({default: _chalk}) => {
305
294
  chalk = _chalk;
295
+ const opts = minimist(args, {
296
+ boolean: ['help'],
297
+ alias: {h: 'help'}
298
+ });
299
+ if (opts.help) displayHelp();
300
+
301
+ const action = opts._[0];
302
+ const target = opts._[1] || process.cwd();
303
+ const name = ['install', 'link'].includes(action) ? opts._[2] : opts._[1];
304
+ if (!action) displayHelp();
305
+
306
306
  api({action, name, target}).catch(err => {
307
307
  console.error('Template action failed.');
308
308
  console.error();