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: add optimize command #397

Merged
merged 50 commits into from
Feb 9, 2023

Conversation

KhudaDad414
Copy link
Member

@KhudaDad414 KhudaDad414 commented Nov 21, 2022

Description

  • Integrate asyncapi/optimizer as asyncapi optimize command.

Related issue(s)
Fixes #218 , to be merged after asyncapi/optimizer#129

@derberg derberg changed the title feat: integrate asyncapi/optimizer feat: add optimize command Nov 22, 2022
@KhudaDad414 KhudaDad414 marked this pull request as draft November 22, 2022 10:26
@KhudaDad414 KhudaDad414 marked this pull request as ready for review December 2, 2022 09:51
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

src/commands/optimize.ts:2:21 - error TS2305: Module '"@asyncapi/optimizer"' has no exported member 'Output'.

2 import { Optimizer, Output, Report, ReportElement } from '@asyncapi/optimizer';
                      ~~~~~~

src/commands/optimize.ts:2:29 - error TS2305: Module '"@asyncapi/optimizer"' has no exported member 'Report'.

2 import { Optimizer, Output, Report, ReportElement } from '@asyncapi/optimizer';
                              ~~~~~~

src/commands/optimize.ts:2:37 - error TS2305: Module '"@asyncapi/optimizer"' has no exported member 'ReportElement'.

2 import { Optimizer, Output, Report, ReportElement } from '@asyncapi/optimizer';
                                      ~~~~~~~~~~~~~

src/commands/optimize.ts:50:11 - error TS2532: Object is possibly 'undefined'.

50     if (!(report.moveToComponents.length || report.removeComponents.length || report.reuseComponents.length)) {
             ~~~~~~~~~~~~~~~~~~~~~~~

src/commands/optimize.ts:50:45 - error TS2532: Object is possibly 'undefined'.

50     if (!(report.moveToComponents.length || report.removeComponents.length || report.reuseComponents.length)) {
                                               ~~~~~~~~~~~~~~~~~~~~~~~

src/commands/optimize.ts:50:79 - error TS2532: Object is possibly 'undefined'.

50     if (!(report.moveToComponents.length || report.removeComponents.length || report.reuseComponents.length)) {
                                                                                 ~~~~~~~~~~~~~~~~~~~~~~

src/commands/optimize.ts:116:57 - error TS7006: Parameter 'e' implicitly has an 'any' type.

116       const totalMove = report.moveToComponents.filter((e) => e.action === 'move').length;
                                                            ~


Found 7 errors in the same file, starting at: src/commands/optimize.ts:2

@KhudaDad414 KhudaDad414 requested a review from derberg December 14, 2022 11:42
@KhudaDad414
Copy link
Member Author

@derberg the tests are red all over this repo. As you can see in the commit history, I have bashed my head against the wall tooooo many times over these failing tests and achieved nothing. 😆

@derberg
Copy link
Member

derberg commented Feb 1, 2023

@KhudaDad414 please update to latest master, there are some conflicts

@KhudaDad414
Copy link
Member Author

@derberg I think it is ready.

@derberg
Copy link
Member

derberg commented Feb 6, 2023

@KhudaDad414 relax, zen, and all that stuff..... conflicts again....so changes in docs in readme. You need to pull latest and move info about new command to respective markdown file in docs directory 😄

docs/usage.md Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 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.0% 0.0% Duplication

@KhudaDad414 KhudaDad414 requested review from Souvikns and derberg and removed request for derberg and Souvikns February 9, 2023 10:34
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

awesome work and amazing patience 😆

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.

👍🏼

@KhudaDad414
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit fc39cfc into asyncapi:master Feb 9, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.31.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.

Add asyncapi optimize command
4 participants