yeoman / yeoman-api

MIT License
1 stars 2 forks source link

The Namespace parser does not allow local paths #5

Closed strmer15 closed 8 months ago

strmer15 commented 8 months ago

Now that yo is updated to use yeoman-generator v4, the @yeoman/namespace dependency is causing issues with local generators being run. See https://github.com/yeoman/yo/issues/797 and https://github.com/yeoman/environment/issues/497.

When I debugged locally, this appears to be due to the NAMESPACE_REGEX not supporting local paths which start with a ./ - the regex looks like it expects there to be an alphanumeric character, or dash, or tilde followed by a series of those same characters. Even if the regex were updated, I'm not sure the code to parse the namespace would work still, since it's expecting specific groups from the regex and this style of getting a generator namespace doesn't seem to make sense there.

mshima commented 8 months ago

@yeoman/namespace only deals with valid namespaces. Paths should be converted to namespaces at yeoman-environment. Closing in favor of https://github.com/yeoman/environment/issues/497#issuecomment-1875763491.