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

feat: expose all options to packaging and publishing APIs #759

Merged
merged 9 commits into from Aug 29, 2022
Merged

feat: expose all options to packaging and publishing APIs #759

merged 9 commits into from Aug 29, 2022

Conversation

nhedger
Copy link
Contributor

@nhedger nhedger commented Jul 23, 2022

This PR introduces modifications to allow the API methods to use all options currently supported by the CLI.

The following modifications have been made:

Packaging

  1. The createVSIX function now accepts an IPackageOptions instead of ICreateVSIXOptions
  2. The existing ICreateVSIXOptions has been kept in the file and refactored to stay backward compatible.
  3. The ICreateVSIXOptions has been marked as deprecated to encourage using IPackageOptions instead.

Publishing

  1. The publishVSIX function still accepts an IPublishOptions but it's currently an alias to the IPublishOptions type declared in publish.ts
  2. The IPublishVSIXOptions has been refactored to extend from IPublishOptions and also includes the needed target property.

This should in theory be backward compatible because all existing types can still be imported and they were subsets of the types declared for the CLI.

Todo

  • Move documentation comments to their respective interfaces

Closes #754

@nhedger nhedger marked this pull request as ready for review July 23, 2022 18:39
@nhedger nhedger marked this pull request as draft July 24, 2022 08:16
@joaomoreno
Copy link
Member

@nhedger Still draft?

@nhedger
Copy link
Contributor Author

nhedger commented Aug 19, 2022

I'll have a look this weekend. I don't remember from the top of my head if I had anything more to do.

@nhedger
Copy link
Contributor Author

nhedger commented Aug 26, 2022

Alright, seems good to review.

The IListFilesOptions could probably use some similar refactoring too, but I may do that in a future PR.

@nhedger nhedger marked this pull request as ready for review August 26, 2022 16:59
@joaomoreno joaomoreno self-assigned this Aug 29, 2022
@joaomoreno joaomoreno enabled auto-merge (squash) August 29, 2022 07:31
@joaomoreno joaomoreno merged commit 8e193c9 into microsoft:main Aug 29, 2022
@github-actions
Copy link

🎉 This PR is included in version 2.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Differences between the CLI and the API
3 participants