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 package vulnerabilities #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acrontum-jrodrigues
Copy link

quicktype v15 had some high and moderate vulnerabilities related to old versions of node-fetch and yargs-parser. This PR bumps quicktype to v20 to fix those vulnerabilities

@p-mcgowan
Copy link
Contributor

will need to e2e this on some projects - last i remember, we couldnt update quicktype for some reason (maybe breaking changes)

@j-d-carmichael
Copy link
Contributor

We do have e2e testing on this project @p-mcgowan: IIRC we gen the files with the code and compare the new output to the expected output.

@acrontum-jrodrigues if the unit tests pass it should be all good - might wanna double check the tests compare the interface files too as this is where quicktype is used the most

@j-d-carmichael
Copy link
Contributor

Summary of all failing tests
 FAIL  src/__tests__/openapi_serverClient.ts
  ● Test suite failed to run

    Cannot find module 'quicktype/dist/quicktype-core' from 'src/lib/generate/generateTypeScriptInterfaceText.ts'

    Require stack:
      src/lib/generate/generateTypeScriptInterfaceText.ts
      src/lib/openapi/OpenAPIInjectInterfaceNaming.ts
      src/lib/openapi/OpenAPIBundler.ts
      src/generateIt.ts
      src/__tests__/openapi_serverClient.ts



      at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (src/lib/generate/generateTypeScriptInterfaceText.ts:1013:27)
      at Object.<anonymous> (src/lib/openapi/OpenAPIInjectInterfaceNaming.ts:5129:50)
      at Object.<anonymous> (src/lib/openapi/OpenAPIBundler.ts:3025:51)
      at Object.<anonymous> (src/generateIt.ts:711:51)
      at Object.<anonymous> (src/__tests__/openapi_serverClient.ts:6:46)

I just tried this and got errors as above @acrontum-jrodrigues

@j-d-carmichael
Copy link
Contributor

Look like a few bits have been moved around in the latest version - this would need reflecting in the implementation over in src/lib/generate/generateTypeScriptInterfaceText.ts

https://github.com/glideapps/quicktype?tab=readme-ov-file#calling-quicktype-from-javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants