Skip to content

Conversation

@mahtaran
Copy link
Contributor

With the release of Deno 2, I figured I'd have a look if the amazing shortcut and wildcard features of this tool supported it. Sadly, they didn't. Luckily, adding it wasn't too difficult. One thing to note is that Deno uses its own deno.json file with what it calls 'tasks', but can also fall back on Node's scripts directive in the package.json.

For a cleaner reviewing process, I recommend looking at the individual commits, as it doesn't quite seem to understand I renamed some files.

Signed-off-by: Luka Leer <luka.leer@gmail.com>
Signed-off-by: Luka Leer <luka.leer@gmail.com>
@coveralls
Copy link

coveralls commented Oct 11, 2024

Coverage Status

coverage: 98.156% (-0.1%) from 98.263%
when pulling 9f7dad2 on mahtaran:feature/deno-wildcards-shortcuts
into 79b3290 on open-cli-tools:main.

@gustavohenke gustavohenke self-requested a review October 12, 2024 01:24
import { CommandInfo } from '../command';
import { CommandParser } from './command-parser';

const OMISSION = /\(!([^)]+)\)/;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a comment explaining what this Regexp does?
It isn't clear its intent unless you read the rest of the code and, even then, it's a bit confused.

Thanks in advance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was confused when I read it at first as well. Good catch, just added a comment. Do you think that clarifies it enough?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

I was just wondering why we'd need to look for ) in the script command?!

I guess most of the people (myself included) don't know we could use something like this deno task lint:*(!fix) as a valid command.

Perhaps, adding an example in the comment would help as well.

Copy link
Contributor Author

@mahtaran mahtaran Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour is currently already documented, though I do see how it could be difficult to find for someone less familiar with the tool. I do think this is a bit out of scope for this pull request, though, so perhaps it would be better to tackle this separately?

Signed-off-by: Luka Leer <luka.leer@gmail.com>
Copy link
Member

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thank you!

@gustavohenke gustavohenke merged commit 64b7e2a into open-cli-tools:main Nov 4, 2024
@mahtaran mahtaran deleted the feature/deno-wildcards-shortcuts branch November 8, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants