tunnckoCore / opensource

Delivering delightful digital solutions. Monorepo of monorepos of Open Source packages with combined ~100M/month downloads, semantically versioned following @conventional-commits. Fully powered ES Modules, @Airbnb @ESLint + @Prettier, independent & fixed versioning. Quality with @Actions, CodeQL, & Dependabot.
https://tunnckocore.com/opensource
481 stars 18 forks source link

yaro: many bugs #202

Closed tunnckoCore closed 2 years ago

tunnckoCore commented 2 years ago
tunnckoCore commented 2 years ago

export const fooBar = hela()
    .command('add:community [...qux]', 'foo bar')
    .alias(['ens:add:community'])
    .action(async ({ flags, _, ...qux }) => {
        console.log('zaz', qux);
    });

export const addCommunity = hela()
    .command('add:community [...socials]', 'Add community links to a collection')
    .alias(['add:community', 'add:commumity', 'add:social', 'add:socials'])
    .action(async ({ flags, _, ...socials }) => {
        console.log('socials', socials);
    });

the addCommunity is ignored currently. This should work:

# the fooBar command
hela add:community a b c
# zaz a b c
hela ens:add:community a b c
# zaz a b c

# the addCommand
hela add:social x y z
# socials x y z
tunnckoCore commented 2 years ago
export const createCollection = hela()
    .command('ens:create <collection>', 'Create collection')
    .alias(['create', 'craet'])
    .action(async () => {
        console.log('create!');
    });

export const foo = hela()
    .command('foo <collection>', 'sdfsdfn')
    .alias(['create', 'foobie', 'craet'])
    .action(async () => {
        console.log('foo!');
    });

Prints foo!, instead of create!. That's atleast noticeable and logical, the latter commands override the previous.

tunnckoCore commented 2 years ago

resolved in https://github.com/tunnckoCore/opensource/commit/62d9945f77afea4dfbde858c84e14ec115d23251