-
Notifications
You must be signed in to change notification settings - Fork 12k
Add documented public api #12499
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
Add documented public api #12499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right direction, yes. Added some small requests. Tests are also failing because of the changed API though.
The CLI will ship with type information, yes. You should get full typings when you import it.
packages/angular/cli/lib/main.ts
Outdated
@@ -0,0 +1,2 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli/lib/index.ts
can be renamed to main.ts
instead, no need for an extra file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but than it will be exported with a default export. That is OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default export is ok, yes.
/** | ||
* The cli arguments to provide to the command (without the `ng`) | ||
*/ | ||
cliArgs: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change cliArgs
to just args
? Being a public api the name is now more important.
I've implemented your review comments. The api change is back (default export), should be green now. |
I'm seeing red CI, I think it's because of this error:
Likely due to the filename change. We also validade commit messages (https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-commit-message-guidelines). A think a good single commit name would be In regards to when you can expect it, it would be 7.1 at the earliest. We are in a RC period already which means no no features are merged. But 7.1 would be shortly after 7.0. |
850277d
to
8ac1ec3
Compare
Both issues should be fixed now.
That's fine. The API was already there in hindsight. I didn't realize that. This PR is really only documenting the hidden feature. |
@filipesilva any idea what's going wrong with the build? Sorry for the mess. 🗑 |
I think one of our build error reporting functions isn't reporting the error correctly. But it is in https://circleci.com/gh/angular/angular-cli/21583:
So somewhere the |
This seems to be better. Build is green 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a change request to block it for 7.1, and to make sure the change is brought up in a meeting.
Great, thanks. This makes for a stable Stryker integration 👍 |
Thinking about the whole WDYT of changing it back to That better reflects the work that ended up being done in this PR, and doesn't require a minor. We could get it in in 7.0. |
Hmm good point. Didn't think of that, this will break Stryker as well... However I do agree that However, changing it back to |
That's a ways to go about it. I'll bring it up with the team and see what they prefer as well. |
If you're worried about backward compatibility, we could also leave the name |
That part doesn't bother me much, as it's not part of the public API per se. Importing |
@nicojs we discussed this within the team and decided to not document this API right now. Documenting it implies stability, and we can't commit to this API being stable yet. One of the changes we're planning is to separate local and global CLI and that will most likely affect his API. I think not having this PR merged won't affect your usecase because you are already using the existing API and it hasn't changed. But let me know if it does affect you. |
Well.. strictly speaking it would force you to not change the API with a patch/minor release, which helps Stryker and other tools (intellij plugin, etc). We are indeed not effected right now. However, could you try to do the following:
That would be great. |
If/when we change it, I expect it to be well documented. I can't 100% guarantee it will be in a major, but can say that we avoid changing that sort of things in patch/minor especially now that we're all aware there are at least a couple of tools that are using it. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #8744
@filipesilva here it is. I tried to follow the guidance in your latest remark in #8744. Could you take a look.
Is type information shipped with the angular cli? Would that be possible? Having type information for the programmatic use case would be nice.