hainenber commented on code in PR #44459:
URL: https://github.com/apache/superset/pull/44459#discussion_r4072600439


##########
superset-frontend/scripts/build.js:
##########
@@ -26,13 +26,22 @@
 
 import { spawnSync } from 'node:child_process';
 import fastGlob from 'fast-glob';
-import yargs from 'yargs';
-import { hideBin } from 'yargs/helpers';
+import { parseArgs } from 'node:util';
 
 process.env.PATH = `./node_modules/.bin:${process.env.PATH}`;
 
-const { globs } = yargs(hideBin(process.argv)).parse();
-const glob = globs?.length > 1 ? `{${globs.join(',')}}` : globs?.[0] || '*';
+const cliOptions = {
+  globs: {
+    type: 'string',
+    multiple: true,
+    default: ['*'],
+  },
+};
+
+const { values } = parseArgs({ options: cliOptions });

Review Comment:
   I'd like to take the chance to tight up args given to `build.js` in this PR 
as well, considering that there are no other args required by the script's 
logic. If there are in the future then they can modify the script accordingly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to