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

Swapped adm-zip out for zip.js #6018

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Swapped adm-zip out for zip.js #6018

wants to merge 2 commits into from

Conversation

Amndeep7
Copy link
Contributor

adm-zip was causing issues such as the following

 warning  in ../../node_modules/adm-zip/util/fileSystem.js

Module not found: Error: Can't resolve 'original-fs' in '/Users/amann/work/auto/dependency-track-mapper/heimdall2/node_modules/adm-zip/util'

which was causing heimdall to have runtime errors and not display itself properly. This had been throwing warnings before but had started to actually cause this runtime problem when making other changes so I decided to fix it.

Easiest thing to do was to replace it wholesale. Sidebenefit is that I found zip.js which has built-in types so we have that benefit.

The only problem is that it is not a commonjs dependency so we have to do a dynamic import which is a bit ugly due to the lack of top level await that we're currently suffering from. I'm working on getting us able to use that functionality, but that shouldn't be a blocker for this pr.

Also I cleaned up the files we touched a little bit.

Signed-off-by: Amndeep Singh Mann <[email protected]>
@Amndeep7 Amndeep7 requested a review from georgedias July 23, 2024 06:03
Copy link

sonarcloud bot commented Jul 23, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Code Smells (required ≤ 0)
5 New Bugs (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@Amndeep7
Copy link
Contributor Author

Currently failing the frontend tests due to node not finding the TransformStream object for some reason even though node supports it as of v18. It works fine on my machine but that's cause it's a browser running the frontend code. I need to see if we need a polyfill or if I can muck with stuff to get node to work properly.

@Amndeep7 Amndeep7 marked this pull request as draft July 23, 2024 06:23
@Amndeep7 Amndeep7 linked an issue Jul 31, 2024 that may be closed by this pull request
Signed-off-by: Amndeep Singh Mann <[email protected]>
Copy link

sonarcloud bot commented Sep 17, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
5 New Bugs (required ≤ 0)
2 New Code Smells (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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.

Should look into a replacement lib to handle zip files
1 participant