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

fix: update parser-js to v2 #615

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Conversation

smoya
Copy link
Member

@smoya smoya commented May 2, 2023

Replaces #572

Description

This PR updates @asyncapi/parser to v2 and uses the recently released custom schema parsers.

Note: this PR does not change Studio to start using the new Parser-API but keeps using the old wrapper const oldDocument = convertToOldAPI(document);.

Related issue(s)
asyncapi/parser-js#585

@netlify
Copy link

netlify bot commented May 2, 2023

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 7182f5b
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/64930430e9c873000831c607
😎 Deploy Preview https://deploy-preview-615--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 31 to 32
await this.subscribeToSettings();
await this.parseSavedDocuments();
Copy link
Member

Choose a reason for hiding this comment

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

It won't wait because subscription is a procedure, not function :) So I don't think so that this is needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

SonarCloud complains about this being missing.

src/index.tsx Outdated
@@ -32,7 +32,7 @@ function configureMonacoEnvironment() {
};
}

async function bootstrap() {
(async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change bootstrap function to something like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

SonarCloud complains (marks as a bug) with something like this iirc: "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler"

Copy link
Member

Choose a reason for hiding this comment

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

As we see, Sonarcloud was written by Java people 😆 Ok.

@magicmatatjahu
Copy link
Member

magicmatatjahu commented May 4, 2023

Something doesn't work. When I remove info.title from the spec then I see errors, but when I update the config to hide the warnings they aren't filtered (still with errors). Rest are good for me. Please only check that described bug, because it works as I described in current studio https://studio.asyncapi.com/

@smoya
Copy link
Member Author

smoya commented May 30, 2023

Something doesn't work. When I remove info.title from the spec then I see errors, but when I update the config to hide the warnings they aren't filtered (still with errors). Rest are good for me. Please only check that described bug, because it works as I described in current studio https://studio.asyncapi.com/

Being honest, I don't understand why changing the following lines back to what it was previously fixes the issue: 768b01c

@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit 7182f5b
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/6493043015b046000885dc38
😎 Deploy Preview https://deploy-preview-615--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarcloud
Copy link

sonarcloud bot commented Jun 21, 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.3% 0.3% Duplication

@smoya
Copy link
Member Author

smoya commented Jun 22, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit 7658834 into asyncapi:master Jun 22, 2023
Amzani pushed a commit to Amzani/studio that referenced this pull request Jun 22, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version @asyncapi/studio-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version @asyncapi/studio-v1.0.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.

4 participants