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: update parser-js to v2 #523

Merged
merged 33 commits into from
Oct 20, 2023
Merged

Conversation

Souvikns
Copy link
Member

@Souvikns Souvikns commented Sep 20, 2023

Description

This PR aims to upgrade parser-js to v2 to support spec 2.0

Related issue(s)

Fixes #409

@Souvikns Souvikns marked this pull request as ready for review September 21, 2023 11:50
@coveralls
Copy link

coveralls commented Sep 22, 2023

Pull Request Test Coverage Report for Build 6272543340

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 5 (60.0%) changed or added relevant lines in 3 files are covered.
  • 11 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.9%) to 67.455%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/adapter.ts 2 3 66.67%
src/lib/util.ts 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/adapter.ts 11 66.67%
Totals Coverage Status
Change from base Build 6231942503: -0.9%
Covered Lines: 358
Relevant Lines: 470

💛 - Coveralls

Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

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

Did a partial review as I have to leave but I think you have enough stuff to look on right now.

src/adapters/http/client.ts Show resolved Hide resolved
src/adapters/http/server.ts Show resolved Hide resolved
src/adapters/http/server.ts Show resolved Hide resolved
src/adapters/mqtt/index.ts Outdated Show resolved Hide resolved
src/adapters/mqtt/index.ts Outdated Show resolved Hide resolved
src/adapters/ws/client.ts Outdated Show resolved Hide resolved
src/adapters/ws/server.ts Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@@ -34,7 +38,7 @@ const TEST_ASYNCAPI_DOCUMENT = new AsyncAPIDocument({
}
})

const schema = TEST_ASYNCAPI_DOCUMENT.channel('test/channel').publish().message().payload().json()
const schema = TEST_ASYNCAPI_DOCUMENT.channels().get('test/channel')?.json().publish.message.payload
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const schema = TEST_ASYNCAPI_DOCUMENT.channels().get('test/channel')?.json().publish.message.payload
const schema = TEST_ASYNCAPI_DOCUMENT.channels().get('test/channel').operations().filterByReceive()[0].messages().all()[0].payload()

Copy link
Member Author

Choose a reason for hiding this comment

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

I was running into an error in the validate function and now I realize is that in the docs it says that it returns schema here, but in the code it is returning schemeInterface here and tests are failing.

src/adapters/mqtt/index.ts Outdated Show resolved Hide resolved
src/adapters/mqtt/index.ts Outdated Show resolved Hide resolved
@Souvikns Souvikns requested a review from fmvilas October 3, 2023 11:19
Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

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

Just one small change.

package.json Outdated Show resolved Hide resolved
Copy link
Member

@fmvilas fmvilas 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 more comments.

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/lib/adapter.ts Outdated Show resolved Hide resolved
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

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

Added one more suggestion.

src/adapters/http/client.ts Outdated Show resolved Hide resolved
@KhudaDad414
Copy link
Member

/au

KhudaDad414
KhudaDad414 previously approved these changes Oct 16, 2023
fmvilas
fmvilas previously approved these changes Oct 20, 2023
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

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

LGTM

@KhudaDad414
Copy link
Member

/rtm

@KhudaDad414 KhudaDad414 dismissed stale reviews from fmvilas and themself via 22ec915 October 20, 2023 14:42
@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@KhudaDad414
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit a15e431 into asyncapi:master Oct 20, 2023
13 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.27.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade parser to version 3(next-major)
5 participants