Skip to content
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

fix: use wildcard values as names #165

Conversation

mastilver
Copy link

fix #148

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.

Thanks for the PR -- there are a few small things to fix though!

command: `npm run ${script}${args}`,
name: script
name: (commandInfo.names || '') + script.match(wildcardRegex)[1]
Copy link
Member

Choose a reason for hiding this comment

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

The right property is name

{ name: 'w:foo', command: 'npm run watch-foo' },
{ name: 'w:bar', command: 'npm run watch-bar' },
]);
})
Copy link
Member

Choose a reason for hiding this comment

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

missing semicolon

}
});

expect(parser.parse({ names: 'w:', command: 'npm run watch-*' })).toEqual([
Copy link
Member

Choose a reason for hiding this comment

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

will have to fix the property here too to name (see above)

@coveralls
Copy link

coveralls commented Sep 22, 2018

Pull Request Test Coverage Report for Build 318

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.8%) to 99.183%

Totals Coverage Status
Change from base Build 314: 0.8%
Covered Lines: 239
Relevant Lines: 239

💛 - Coveralls

@mastilver
Copy link
Author

My bad, should be all fixed now :)

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.

Thanks for the PR, it looks good.

Now I'm unsure about it, though. #148 doesn't state what the problem actually is.
What you are doing here is reverting the prefixing strategy back to what v3 had -- I'm not sure which style is the preferred one by the users, and might even be a breaking change.

@@ -28,7 +28,7 @@ module.exports = class ExpandNpmWildcard {
.filter(script => wildcardRegex.test(script))
.map(script => Object.assign({}, commandInfo, {
Copy link
Member

Choose a reason for hiding this comment

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

I rolled this line back to what it is on master, as some other information will exist on commandInfo

@gustavohenke
Copy link
Member

Closing as it's fixed by #211.

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.

Run template commands
3 participants