-
-
Notifications
You must be signed in to change notification settings - Fork 31
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: Update @hey-api/openapi-ts
version and re-enable namespacing enums
#136
Merged
7nohe
merged 13 commits into
7nohe:main
from
collink:collink/update-openapi-ts-version-for-namespaces
Aug 12, 2024
Merged
feat: Update @hey-api/openapi-ts
version and re-enable namespacing enums
#136
7nohe
merged 13 commits into
7nohe:main
from
collink:collink/update-openapi-ts-version-for-namespaces
Aug 12, 2024
Conversation
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
Collink/non greedy short type regex
@7nohe @seriouslag I saw that there's a couple-week-old PR open for bumping the |
@collink Sorry for the late reply. I would appreciate it if you could resolve the conflicts. |
7nohe
approved these changes
Aug 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that after updating to 1.4.1, that enums were being spit out next to the types instead of namespaced like previously. After some digging, I found that this was a
@hey-api/openapi-ts
issue which was resolved this week with a PR and the release ofv0.52.0
.This PR does the following:
@hey-api/openapi-ts
fromv0.45.1
=>v0.52.0
ts-morph
fromv22.0.0
=>v23.0.0
typescript
fromv5.3.3
=>v5.5.4
Looks like a huge diff, but it's almost entirely
pnpm-lock.json
, which we can just leave if you like, or you could re-run so that maybe the diff is smaller?Why is this change important? The issue is that if you have enums defined in your OAPI YAML,
@hey-api/openapi-ts
(prior to v0.52.0) is depositing the TS enums directly next to the types, so you end up with enums that look like this:Before this change (and with this PR), that would look more like this:
It's SO much less ambiguous to be able to use
Job.status.DONE
in my code thanstatus6.DONE
. 😅