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: migration of the codebase to TypeScript (#56) #66

Merged
merged 5 commits into from
Oct 10, 2022

Conversation

aeworxet
Copy link
Collaborator

@aeworxet aeworxet commented Sep 26, 2022

This PR performs migration of the codebase from JavaScript to TypeScript.

  • added npm packages required for TypeScript support
  • added types' declaration file from https://github.com/asyncapi/parser-js/blob/next-major/src/spec-types/v2.ts
  • added TypeScript's types for functions' parameters and variables
  • refactored source code to meet and/or to align better with TypeScript and common AsyncAPI Initiative coding style requirements
  • implemented linting
  • fixed linting errors
  • fixed security warnings
  • fixed typos
  • improved readability of the documentation

Fixes #56

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

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

Left some comments

src/parser.ts Outdated Show resolved Hide resolved
src/parser.ts Outdated Show resolved Hide resolved
src/parser.ts Outdated Show resolved Hide resolved
@aeworxet
Copy link
Collaborator Author

@magicmatatjahu, can you please comment on this?

@magicmatatjahu
Copy link
Member

magicmatatjahu commented Sep 26, 2022

@aeworxet Copied from private discussion:

On the branch for new major version of parser-js we have already prepared types for the AsyncAPI specification - https://github.com/asyncapi/parser-js/blob/next-major/src/spec-types/v2.ts and we should use that type, not JSONSchema7, sorry for that! We shouldn't wait for merging mentioned branch to the main branch, so I opt that you should copy this file and start using AsyncAPIObject type, wdyt? Of course, when we will merge branch in ParserJS, I will fix typings in the bundler, don't worry :)

@aeworxet aeworxet force-pushed the migration-ts branch 3 times, most recently from 09c6e35 to 5bfd398 Compare October 4, 2022 09:00
@aeworxet aeworxet marked this pull request as ready for review October 4, 2022 09:03
@aeworxet aeworxet requested a review from Souvikns October 4, 2022 09:04
Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

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

Last fixes :)

src/document.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@magicmatatjahu
Copy link
Member

@Souvikns Could you also look? :)

@aeworxet aeworxet requested review from magicmatatjahu and Souvikns and removed request for Souvikns and magicmatatjahu October 4, 2022 12:14
magicmatatjahu
magicmatatjahu previously approved these changes Oct 4, 2022
Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

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

Last suggestion, but rest is good :) We need to wait for @Souvikns review :)

Awesome! 🚀

README.md Outdated Show resolved Hide resolved
Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

@derberg
Copy link
Member

derberg commented Oct 10, 2022

/rtm

@derberg
Copy link
Member

derberg commented Oct 10, 2022

another project moving to the dark side of force 😞

@asyncapi-bot asyncapi-bot merged commit caccb2d into asyncapi:master Oct 10, 2022
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@aeworxet aeworxet deleted the migration-ts branch October 10, 2022 09:53
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.

Migrate bundler's codebase to TypeScript
5 participants