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

Support for scoped adapters? #403

Closed
ryanvanoss opened this issue Dec 16, 2016 · 5 comments
Closed

Support for scoped adapters? #403

ryanvanoss opened this issue Dec 16, 2016 · 5 comments

Comments

@ryanvanoss
Copy link

Currently the resolveAdapterPath uses Node's path.parse method, and examines the dir property to determine if the adapter path is an npm module name, or a path.

adapter.js:129-131

// Check if inboundAdapterPath is a path or node module name
let parsed = path.parse(inboundAdapterPath);
let isPath = parsed.dir.length > 0;

However, this will incorrectly assign scoped packages as paths (e.g. inboundAdapterPath === '@foo/bar').

Is there a plan to support scoped packages?

@jimthedev
Copy link
Member

It hasn't be brought up yet but yes we will need a fix for this.

@jimthedev
Copy link
Member

Patch for this is coming.

jimthedev added a commit that referenced this issue Dec 18, 2016
Add a test for scoped npm modules to confirm that they are not treated incorrectly as paths.

Closes #403
@jimthedev
Copy link
Member

Release will happen as soon as I can get CI to work.

@ryanvanoss
Copy link
Author

Good stuff, thanks!

@jimthedev
Copy link
Member

Released in https://github.com/commitizen/cz-cli/releases/tag/v2.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants