New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support for melos command within script steps #683
feat: support for melos command within script steps #683
Conversation
In order to split the step by spaces to separate the command from its flags/arguments
In order to prioritize script names that are identical to melos commands. Additionally, add a test for this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Head branch was pushed to by a user without write access
|
||
Analyzing .... | ||
|
||
info - ${currentPlatform.isWindows ? 'packages\a\main.dart' : 'packages/a/main.dart'}:3:13 - Don't invoke 'print' in production code. Try using a logging framework. - avoid_print |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah the pain of Windows, this has to have two backslashes \\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh I see, hopefully the last commit solves this issue!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason, even though I added the two backslashes, the error seems to be something else @spydon:
'warning - pubspec.yaml:6:11 - The path \'d:\\a\\melos\\melos\\packages\\melos\' isn\'t a POSIX-style path. Try converting the value to a POSIX-style path. - path_not_posix\n'
' info - packages\\a\\main.dart:3:13 - Don\'t invoke \'print\' in production code. Try using a logging framework. - avoid_print\n'
' info - packages\\a\\main.dart:5:10 - Missing a newline at the end of the file. Try adding a newline at the end of the file. - eol_at_end_of_file\n'
'\n'
'3 issues found.\n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spydon I updated the test and use a list
script instead of the analyze
one to avoid all these issues related to windows environments, and still testing the right scenario, which is prioritazing custom scripts instead of Melos commands when scripts with same names as the commands are used. commit e1d2e96
f2acd3a
to
2e79c0d
Compare
Head branch was pushed to by a user without write access
8166908
to
e5c7655
Compare
6f1c9eb
to
efb4a11
Compare
efb4a11
to
e1d2e96
Compare
Description
This pull request introduces support for melos command within script steps, as suggested in issue #653. An example configuration demonstrating this new capability is as follows:
I'll need some help on determining the appropriate range of commands to support. Should we use every command possible?
Currently, the following commands are under consideration:
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore