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

Add api extractor #68

Merged
merged 24 commits into from
Mar 16, 2021
Merged

Add api extractor #68

merged 24 commits into from
Mar 16, 2021

Conversation

JamesBurnside
Copy link
Member

@JamesBurnside JamesBurnside commented Mar 12, 2021

What

Add api-extractor

  • This is run when builds are run
    • (doesn't currently run under the watch command)
  • PRs are gated on this - there should be no missing updates to the API

Why

  • Exported API can be reviewed at PR time
  • Can prevent undesired and accidental breaking changes.
  • Doc-gen will be used for API Surface reviews with Azure SDK team

Future option

Once we hit release we could use the api extractor to block checks in any breaking change was made (doesn't support this natively but should be very implementable)

How Tested

View change failing CI: https://github.com/Azure/communication-ui-sdk/pull/68/checks?check_run_id=2114177689

@JamesBurnside JamesBurnside marked this pull request as ready for review March 15, 2021 16:01
@JamesBurnside JamesBurnside changed the title [draft] Add api extractor Add api extractor Mar 15, 2021
@@ -54,7 +54,7 @@ export const isInCall = (callState: CallState): boolean => !!(callState !== 'Non
/**
* Check if a given string is a GUID.
* Regex expression from: https://stackoverflow.com/a/13653180
* @param s string to check
* @param s - string to check
*/
export const isGUID = (s: string): boolean =>
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is just used for groupId? should we rename s to groupId?

I don't know if calling this "s" is a good idea

Copy link
Member Author

Choose a reason for hiding this comment

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

the function itself is agnostic to whether its a groupId, it just checks if any string is a guid. I could rename to str or stringToCheck?

Copy link
Member

@DominikMe DominikMe left a comment

Choose a reason for hiding this comment

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

Awesome, thanks James!

@JamesBurnside JamesBurnside merged commit 55d164f into main Mar 16, 2021
@JamesBurnside JamesBurnside deleted the jaburnsi/add-api-extractor branch March 16, 2021 17:25
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.

None yet

4 participants