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

[BUG] fails with @asyncapi/parser-js 3.0.14 #30

Closed
2 tasks done
KhudaDad414 opened this issue Apr 24, 2024 · 2 comments
Closed
2 tasks done

[BUG] fails with @asyncapi/parser-js 3.0.14 #30

KhudaDad414 opened this issue Apr 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@KhudaDad414
Copy link

Describe the bug.

After updating @asyncapi/parser-js to 3.0.14 I am getting the following error:

> @asyncapi/[email protected] pretest
> npm run build


> @asyncapi/[email protected] build
> rimraf lib && node scripts/fetch-asyncapi-example.js && tsc && oclif manifest && echo "Build Completed"

Fetched ZIP file
Unzipped all examples from zip
src/base.ts:46:43 - error TS2345: Argument of type 'AsyncAPIDocumentInterface' is not assignable to parameter of type 'AsyncAPIDocument'.
  Type 'import("upgrade-optimizer/node_modules/@asyncapi/parser/esm/models/asyncapi").AsyncAPIDocumentInterface' is not assignable to type 'import("upgrade-optimizer/node_modules/parserapiv3/esm/models/asyncapi").AsyncAPIDocumentInterface'.
    The types returned by 'info().contact()' are incompatible between these types.
      Type 'import("upgrade-optimizer/node_modules/@asyncapi/parser/esm/models/contact").ContactInterface | undefined' is not assignable to type 'import("upgrade-optimizer/node_modules/parserapiv3/esm/models/contact").ContactInterface | undefined'.
        Type 'import("upgrade-optimizer/node_modules/@asyncapi/parser/esm/models/contact").ContactInterface' is not assignable to type 'import("upgrade-optimizer/node_modules/parserapiv3/esm/models/contact").ContactInterface'.
          Property '_json' is protected but type 'BaseModel<J, M>' is not a class derived from 'BaseModel<J, M>'.

46           metadata = MetadataFromDocument(document, metadata);
                                             ~~~~~~~~

Expected behavior

It should run without any errors.

Screenshots

...

How to Reproduce

  1. update @asyncapi/parser-js in @asyncapi/cli to 3.0.14
  2. run npm install
  3. run npm run test

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

@KhudaDad414 KhudaDad414 added the bug Something isn't working label Apr 24, 2024
@smoya
Copy link
Owner

smoya commented Apr 24, 2024

The issue comes with an outdate parser version in the @smoya/multi-parser repo. Update comes here smoya/multi-parser-js#15

More details about why this is not an automated process plus the work that is being done to fix it available in asyncapi/parser-js#963

@smoya
Copy link
Owner

smoya commented Apr 24, 2024

@KhudaDad414 Here is the PR updating to the recently released version of the @smoya/multi-parser package: #31

Merged ATM.

@smoya smoya closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants