This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 2323 "@naturalcycles/js-lib" : " ^14" ,
2424 "@types/js-yaml" : " ^4" ,
2525 "@types/jsonwebtoken" : " ^9" ,
26+ "@types/yargs" : " ^16" ,
2627 "ajv" : " ^8" ,
2728 "ajv-formats" : " ^3" ,
2829 "ajv-keywords" : " ^5" ,
4142 "@naturalcycles/dev-lib" : " ^16" ,
4243 "@types/node" : " ^22" ,
4344 "@types/through2-concurrent" : " ^2" ,
44- "@types/yargs" : " ^16" ,
4545 "@vitest/coverage-v8" : " ^3" ,
4646 "tsx" : " ^4" ,
4747 "vitest" : " ^3"
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ export * from './validation/joi/joi.shared.schemas'
8282export * from './validation/joi/joi.validation.error'
8383export * from './validation/joi/joi.validation.util'
8484export type { StringSchema } from './validation/joi/string.extensions'
85+ export * from './yargs.util'
8586
8687export type {
8788 AlternativesSchema ,
Original file line number Diff line number Diff line change 1+ import { expect , test } from 'vitest'
2+ import { _yargs } from './yargs.util'
3+
4+ test ( '_yargs' , ( ) => {
5+ expect ( typeof _yargs ( ) . options ) . toBe ( 'function' )
6+ } )
Original file line number Diff line number Diff line change 1+ import yargs from 'yargs'
2+ import { hideBin } from 'yargs/helpers'
3+
4+ /**
5+ * Quick yargs helper to make it work in esm.
6+ * It also allows to not have yargs and `@types/yargs` to be declared as dependencies.
7+ */
8+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/explicit-module-boundary-types
9+ export function _yargs ( ) {
10+ return yargs ( hideBin ( process . argv ) )
11+ }
You can’t perform that action at this time.
0 commit comments