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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true #1172

Merged
merged 2 commits into from Mar 21, 2022
Merged

feat!: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true #1172

merged 2 commits into from Mar 21, 2022

Conversation

mrazauskas
Copy link
Contributor

@mrazauskas mrazauskas commented Mar 21, 2022

Fixes #1012

As it is mentioned in the issue, currently a tag without explicit value defaults to an empty string. For example, @deprecated results in: "deprecated": "".

What if tags without value would default to true instead? On surface this feels like right pattern which reflects actual usage. For instance, this generator has own @nullable tag, which is assumed to be @nullable true. Similarly TypeScript has @deprecated, @internal.

Also I added tests for @readOnly, @writeOnly, which could work in the same way.

Just an idea. Could anything get broken?

Version

Published prerelease version: v0.98.1-next.4

Changelog

馃帀 This release contains work from new contributors! 馃帀

Thanks for all your work!

鉂わ笍 Tom Mrazauskas (@mrazauskas)

鉂わ笍 Jason Dent (@Jason3S)

鉂わ笍 Remi Cattiau (@loopingz)

鉂わ笍 Hadrien Milano (@hmil)

馃殌 Enhancement

馃悰 Bug Fix

  • feat!: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true #1172 (@mrazauskas)

馃敥 Dependency Updates

Authors: 5

Copy link
Member

@domoritz domoritz left a comment

Choose a reason for hiding this comment

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

Looks good but should probable be a feature so we bump the version accordingly.

src/AnnotationsReader/BasicAnnotationsReader.ts Outdated Show resolved Hide resolved
@mrazauskas mrazauskas changed the title fix: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true feat: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true Mar 21, 2022
@mrazauskas mrazauskas changed the title feat: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true feat!: allow JSDoc tags without explicit value (e.g. @deprecated) to default to true Mar 21, 2022
@Jason3S
Copy link
Contributor

Jason3S commented Mar 21, 2022

@mrazauskas,

Thank you!

@domoritz domoritz merged commit d867c80 into vega:next Mar 21, 2022
@domoritz
Copy link
Member

Thank you!

@mrazauskas
Copy link
Contributor Author

Thanks for quick review!

@github-actions
Copy link

馃殌 PR was released in v0.98.1-next.4 馃殌

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

Successfully merging this pull request may close these issues.

@deprecated should be a boolean
3 participants