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

Allowing plugins and presets to be defined with one letter #47

Merged
merged 2 commits into from
Aug 15, 2019

Conversation

DanielSanudo
Copy link
Contributor

@DanielSanudo DanielSanudo commented Aug 13, 2019

Summary

Updated regex @gasket/resolve in order to support plugins defined with one letter name.

Changelog

Test Plan

Copy link
Contributor

@kinetifex kinetifex left a comment

Choose a reason for hiding this comment

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

Small tweak, then 👍

@@ -15,7 +15,7 @@ class PackageIdentifier {
this.suffix = suffix;

this.reShortName = new RegExp(`@gasket\\/([\\w-]+)${suffix}`);
this.reName = /^(.[\w/-]+)@?(.*)/;
this.reName = /^(.?[\w/-]+)@?(.*)/;
Copy link
Contributor

@kinetifex kinetifex Aug 13, 2019

Choose a reason for hiding this comment

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

Suggested change
this.reName = /^(.?[\w/-]+)@?(.*)/;
this.reName = /^(@?[\w/-]+)@?(.*)/;

That . was probably to capture '@' in scoped packaged. Making it optional like you did, but only looking for '@' will be another improvement.

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't figure out what that was doing, this makes sense, thanks for restoring my sanity in the process. 😁 Didn't feel like a major issue though, hence accepted

@kinetifex
Copy link
Contributor

@DanielSanudo Also fill out the PR summary for bookkeeping

@DanielSanudo DanielSanudo merged commit 507ece5 into master Aug 15, 2019
@DanielSanudo DanielSanudo deleted the fix-single-letter-plugin-name branch August 15, 2019 10:50
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.

3 participants