-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate Zod to pure TS w/ JSDoc, improve type safety and simpli…
…fy parsing (#217) # Description <!-- Include a summary of the change made and also list the dependencies that are required if any --> This PR migrates the repo off of Zod schemas toward pure TS with JSDoc annotations that can eventually be used to extract metadata for display in docs. Generally the external behavior should be identical, with obvious exceptions where schema entry points are no longer available etc., so this would constitute a breaking change for consumers relying on those entrypoints or whose inputs may no longer be valid with new type safety around video/image options. I've also updated all the tests to `.ts` so we can be sure the types for the API are working as we expect going forward. Although all the tests are passing, the doc generation issue remains unsolved, causing the repo-wide build to fail, so that will need to be updated to use a JSDoc parsing tool. However, it should be quite straightforward to wire that up in place of the previous Zod-embedded metadata. For now, I'm opening this against the `beta` branch so the required JSDoc parsing logic can be added and other changes can be experimented with before broader consumption. ## Issue Ticket Number N/A <!-- Specify above which issue this fixes by referencing the issue number (`#<ISSUE_NUMBER>`) or issue URL. --> <!-- Example: Fixes https://github.com/colbyfayock/cloudinary-util/issues/<ISSUE_NUMBER> --> ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [X] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Fix or improve the documentation - [X] This change requires a documentation update # Checklist (Still a draft, need to figure out how to work around missing schemas in build) <!-- These must all be followed and checked. --> - [ ] I have followed the contributing guidelines of this project as mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md) - [ ] I have created an [issue](https://github.com/colbyfayock/cloudinary-util/issues) ticket for this PR - [ ] I have checked to ensure there aren't other open [Pull Requests](https://github.com/colbyfayock/cloudinary-util/pulls) for the same update/change? - [ ] I have performed a self-review of my own code - [ ] I have run tests locally to ensure they all pass - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes needed to the documentation BREAKING CHANGES: removes zod schemas, refactors type system
- Loading branch information
1 parent
d4a49ee
commit f605f26
Showing
102 changed files
with
5,281 additions
and
5,587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,163 +1,141 @@ | ||
# [@cloudinary-util/types-v1.5.11](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.10...@cloudinary-util/types-v1.5.11) (2024-10-07) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* Add cloudinaryAnalytics to Video Player types [#171](https://github.com/cloudinary-community/cloudinary-util/issues/171) ([#208](https://github.com/cloudinary-community/cloudinary-util/issues/208)) ([60da2de](https://github.com/cloudinary-community/cloudinary-util/commit/60da2de13ae511fd21805b9e1d510be627ce3de7)) | ||
- Add cloudinaryAnalytics to Video Player types [#171](https://github.com/cloudinary-community/cloudinary-util/issues/171) ([#208](https://github.com/cloudinary-community/cloudinary-util/issues/208)) ([60da2de](https://github.com/cloudinary-community/cloudinary-util/commit/60da2de13ae511fd21805b9e1d510be627ce3de7)) | ||
|
||
# [@cloudinary-util/types-v1.5.10](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.9...@cloudinary-util/types-v1.5.10) (2024-10-04) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* Adds videojs dispose method to Video Player type ([2fd75c1](https://github.com/cloudinary-community/cloudinary-util/commit/2fd75c1c6ceac2496f2fa258d466e1e0d2d1f9cd)) | ||
- Adds videojs dispose method to Video Player type ([2fd75c1](https://github.com/cloudinary-community/cloudinary-util/commit/2fd75c1c6ceac2496f2fa258d466e1e0d2d1f9cd)) | ||
|
||
# [@cloudinary-util/types-v1.5.9](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.8...@cloudinary-util/types-v1.5.9) (2024-09-16) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* fixing player text track options ([a03577d](https://github.com/cloudinary-community/cloudinary-util/commit/a03577d60589626d9b1d6eed098e7afb07eaf0d1)) | ||
- fixing player text track options ([a03577d](https://github.com/cloudinary-community/cloudinary-util/commit/a03577d60589626d9b1d6eed098e7afb07eaf0d1)) | ||
|
||
# [@cloudinary-util/types-v1.5.8](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.7...@cloudinary-util/types-v1.5.8) (2024-09-13) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adding textTracks types to video player ([3b766a3](https://github.com/cloudinary-community/cloudinary-util/commit/3b766a37a3ffec17507a79c1bd6e4a7f01fdfa39)) | ||
- adding textTracks types to video player ([3b766a3](https://github.com/cloudinary-community/cloudinary-util/commit/3b766a37a3ffec17507a79c1bd6e4a7f01fdfa39)) | ||
|
||
# [@cloudinary-util/types-v1.5.7](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.6...@cloudinary-util/types-v1.5.7) (2024-09-11) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adding type definition for resource context ([2ef1311](https://github.com/cloudinary-community/cloudinary-util/commit/2ef13118602f1efc39a85a7e05fa958c6e1cd2f1)) | ||
- adding type definition for resource context ([2ef1311](https://github.com/cloudinary-community/cloudinary-util/commit/2ef13118602f1efc39a85a7e05fa958c6e1cd2f1)) | ||
|
||
# [@cloudinary-util/types-v1.5.6](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.5...@cloudinary-util/types-v1.5.6) (2024-09-06) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* making resource types optional that aren't potentially always there ([7d0b6ce](https://github.com/cloudinary-community/cloudinary-util/commit/7d0b6ce397a6e01087d96aef2c399a067ec998ee)) | ||
- making resource types optional that aren't potentially always there ([7d0b6ce](https://github.com/cloudinary-community/cloudinary-util/commit/7d0b6ce397a6e01087d96aef2c399a067ec998ee)) | ||
|
||
# [@cloudinary-util/types-v1.5.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.4...@cloudinary-util/types-v1.5.5) (2024-09-05) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* fixing resource type, adding more fields, reorganizing ([466dd1b](https://github.com/cloudinary-community/cloudinary-util/commit/466dd1b9efe702e8630e21d72e77081a010e96a6)) | ||
- fixing resource type, adding more fields, reorganizing ([466dd1b](https://github.com/cloudinary-community/cloudinary-util/commit/466dd1b9efe702e8630e21d72e77081a010e96a6)) | ||
|
||
# [@cloudinary-util/types-v1.5.4](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.3...@cloudinary-util/types-v1.5.4) (2024-09-05) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* add video player types ([#194](https://github.com/cloudinary-community/cloudinary-util/issues/194)) ([f7f9e6e](https://github.com/cloudinary-community/cloudinary-util/commit/f7f9e6edaaa7963c97ef923653b62af7182c7272)) | ||
- add video player types ([#194](https://github.com/cloudinary-community/cloudinary-util/issues/194)) ([f7f9e6e](https://github.com/cloudinary-community/cloudinary-util/commit/f7f9e6edaaa7963c97ef923653b62af7182c7272)) | ||
|
||
# [@cloudinary-util/types-v1.5.3](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.2...@cloudinary-util/types-v1.5.3) (2024-09-03) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* export the new widget types ([#193](https://github.com/cloudinary-community/cloudinary-util/issues/193)) ([8ec71be](https://github.com/cloudinary-community/cloudinary-util/commit/8ec71be305de51d2d8340ac7346676768aeea57c)), closes [#191](https://github.com/cloudinary-community/cloudinary-util/issues/191) | ||
- export the new widget types ([#193](https://github.com/cloudinary-community/cloudinary-util/issues/193)) ([8ec71be](https://github.com/cloudinary-community/cloudinary-util/commit/8ec71be305de51d2d8340ac7346676768aeea57c)), closes [#191](https://github.com/cloudinary-community/cloudinary-util/issues/191) | ||
|
||
# [@cloudinary-util/types-v1.5.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.1...@cloudinary-util/types-v1.5.2) (2024-09-03) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* add more upload widget types ([#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)) ([b1cb91a](https://github.com/cloudinary-community/cloudinary-util/commit/b1cb91a78bb6c4879ee26b37f1fd89392f2c5090)) | ||
- add more upload widget types ([#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)) ([b1cb91a](https://github.com/cloudinary-community/cloudinary-util/commit/b1cb91a78bb6c4879ee26b37f1fd89392f2c5090)) | ||
|
||
# [@cloudinary-util/types-v1.5.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.0...@cloudinary-util/types-v1.5.1) (2024-08-30) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* moving access mode type from resource to its own definition ([7f449fd](https://github.com/cloudinary-community/cloudinary-util/commit/7f449fd6d4e1b94d2c2bcc2859922555bd6f79f8)) | ||
- moving access mode type from resource to its own definition ([7f449fd](https://github.com/cloudinary-community/cloudinary-util/commit/7f449fd6d4e1b94d2c2bcc2859922555bd6f79f8)) | ||
|
||
# [@cloudinary-util/types-v1.5.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.4.0...@cloudinary-util/types-v1.5.0) (2024-08-30) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* top level type import ([933e124](https://github.com/cloudinary-community/cloudinary-util/commit/933e124d92c8b782933d376d5e7bc4d12274c49e)) | ||
|
||
- top level type import ([933e124](https://github.com/cloudinary-community/cloudinary-util/commit/933e124d92c8b782933d376d5e7bc4d12274c49e)) | ||
|
||
### Features | ||
|
||
* adding Cloudinary Resource type ([e3ad47e](https://github.com/cloudinary-community/cloudinary-util/commit/e3ad47ef1718f560de37b3206f20dde7abdab784)) | ||
- adding Cloudinary Resource type ([e3ad47e](https://github.com/cloudinary-community/cloudinary-util/commit/e3ad47ef1718f560de37b3206f20dde7abdab784)) | ||
|
||
# [@cloudinary-util/types-v1.4.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.2...@cloudinary-util/types-v1.4.0) (2024-08-21) | ||
|
||
|
||
### Features | ||
|
||
* deprecating controlBar in video player as not recommended for use ([429f40a](https://github.com/cloudinary-community/cloudinary-util/commit/429f40a7c546a653181e36e5fc2077fb2e5598e0)) | ||
- deprecating controlBar in video player as not recommended for use ([429f40a](https://github.com/cloudinary-community/cloudinary-util/commit/429f40a7c546a653181e36e5fc2077fb2e5598e0)) | ||
|
||
# [@cloudinary-util/types-v1.3.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.1...@cloudinary-util/types-v1.3.2) (2024-08-21) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* prepublish build ([b2e84d2](https://github.com/cloudinary-community/cloudinary-util/commit/b2e84d20a8cc97dee42e9ce32822322a7166811d)) | ||
* releaserc ([2d11e72](https://github.com/cloudinary-community/cloudinary-util/commit/2d11e727aeb03bec5138a4dc451b620a814f87b6)) | ||
- prepublish build ([b2e84d2](https://github.com/cloudinary-community/cloudinary-util/commit/b2e84d20a8cc97dee42e9ce32822322a7166811d)) | ||
- releaserc ([2d11e72](https://github.com/cloudinary-community/cloudinary-util/commit/2d11e727aeb03bec5138a4dc451b620a814f87b6)) | ||
|
||
# [@cloudinary-util/types-v1.3.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.0...@cloudinary-util/types-v1.3.1) (2024-08-21) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adding dist files to config ([ef9b56e](https://github.com/cloudinary-community/cloudinary-util/commit/ef9b56e64a475e7a479bdac554fa05381cff08a1)) | ||
- adding dist files to config ([ef9b56e](https://github.com/cloudinary-community/cloudinary-util/commit/ef9b56e64a475e7a479bdac554fa05381cff08a1)) | ||
|
||
# [@cloudinary-util/types-v1.3.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.2.0...@cloudinary-util/types-v1.3.0) (2024-08-20) | ||
|
||
|
||
### Features | ||
|
||
* adding configuration types ([4478dd4](https://github.com/cloudinary-community/cloudinary-util/commit/4478dd4619cea25a36cd4436e8b855aca1f27701)) | ||
- adding configuration types ([4478dd4](https://github.com/cloudinary-community/cloudinary-util/commit/4478dd4619cea25a36cd4436e8b855aca1f27701)) | ||
|
||
# [@cloudinary-util/types-v1.2.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0) (2024-08-07) | ||
|
||
|
||
### Features | ||
|
||
* [email protected] ([#166](https://github.com/cloudinary-community/cloudinary-util/issues/166)) ([26736af](https://github.com/cloudinary-community/cloudinary-util/commit/26736afe7c9e32bad971beb273c71a9519c36944)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
- [email protected] ([#166](https://github.com/cloudinary-community/cloudinary-util/issues/166)) ([26736af](https://github.com/cloudinary-community/cloudinary-util/commit/26736afe7c9e32bad971beb273c71a9519c36944)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
|
||
# [@cloudinary-util/types-v1.2.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0-beta.1) (2024-08-02) | ||
|
||
|
||
### Features | ||
|
||
* getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
- getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
|
||
# [@cloudinary-util/types-v1.2.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0-beta.1) (2024-08-02) | ||
|
||
|
||
### Features | ||
|
||
* getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
- getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164) | ||
|
||
# [@cloudinary-util/types-v1.1.0-beta.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0-beta.1...@cloudinary-util/types-v1.1.0-beta.2) (2024-08-01) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39)) | ||
- adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39)) | ||
|
||
# [@cloudinary-util/types-v1.1.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.5...@cloudinary-util/types-v1.1.0-beta.1) (2024-07-09) | ||
|
||
# [@cloudinary-util/types-v1.0.6](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.5...@cloudinary-util/types-v1.0.6) (2024-07-25) | ||
|
||
### Bug Fixes | ||
|
||
* adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39)) | ||
- adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39)) | ||
|
||
# [@cloudinary-util/types-v1.0.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.4...@cloudinary-util/types-v1.0.5) (2024-05-23) | ||
|
||
|
||
### Features | ||
|
||
* Improve plugin types, modernize monorepo structure ([#161](https://github.com/cloudinary-community/cloudinary-util/issues/161)) ([8ad6066](https://github.com/cloudinary-community/cloudinary-util/commit/8ad60661d4b3c78c08e9dd1939171a689eeb7b08)) | ||
- Improve plugin types, modernize monorepo structure ([#161](https://github.com/cloudinary-community/cloudinary-util/issues/161)) ([8ad6066](https://github.com/cloudinary-community/cloudinary-util/commit/8ad60661d4b3c78c08e9dd1939171a689eeb7b08)) | ||
|
||
# [@cloudinary-util/types-v1.0.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.4...@cloudinary-util/types-v1.0.5) (2024-05-23) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.