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

git decorateVersion: specific logic only for AngularJS causes doc generation to fail #289

Open
christophercr opened this issue Apr 29, 2020 · 1 comment

Comments

@christophercr
Copy link

christophercr commented Apr 29, 2020

The decorateVersion service of the git package contains very specific logic related to very old versions of AngularJS.

This means that in case you use dgeni-packages to generate your project documentation and your current version is by the chance the same version that the decorateVersion targets... then the doc generation process fails because the decorated version does not align with semver anymore: v1.0.0-alpha.0 is converted to v1.0.0alpha0.

TypeError: Invalid Version: v1.0.0alpha0

I understand the reason why this custom logic is needed for AngularJS (although I think this custom logic should not be included as part of this package if it is meant to be a generic library for doc generation) but I think this should be at least mentioned somewhere in the docs of dgeni-packages and explain how to override/workaround this, cause it was not that easy to find the cause of this issue.

Moreover, I think this issue has never pop up in the Angular AIO project since there the Angular version started in v2 😛

@petebacondarwin
Copy link
Member

I'm sorry about this @christophercr. I am pleased to hear that people are still using dgeni!
The workaround is fairly straightforward: since decorateVersion is a dgeni service, you can just provide your own version of it in your own dgeni-package. This will override the one provided by the git package, as long as you provide your service in a package that depends upon the git package.

We should clean up this git package and move the customizations to the angular.js repo.

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

No branches or pull requests

2 participants