-
Notifications
You must be signed in to change notification settings - Fork 91
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
chore(4317): Xlsx to exceljs #4325
base: master
Are you sure you want to change the base?
Conversation
It fails a "no error" test because the function rejects the invalid type. Do we need to change the type signature? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4325 +/- ##
===========================================
+ Coverage 39.10% 91.44% +52.34%
===========================================
Files 787 108 -679
Lines 34827 9974 -24853
Branches 5525 0 -5525
===========================================
- Hits 13618 9121 -4497
+ Misses 20666 853 -19813
+ Partials 543 0 -543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR replaces the deprecated 'xlsx' library with 'exceljs' for spreadsheet handling in the Quilt catalog, improving security and maintainability while preserving existing functionality.
- Updated
/catalog/app/utils/spreadsheets/spreadsheets.ts
to use ExcelJS'seachRow
method for parsing spreadsheets - Added new helper functions
readXlsx
andreadCSVString
in/catalog/app/utils/spreadsheets/spreadsheets.spec.ts
for testing - Implemented proper async file reading with error handling in
readSpreadsheet
function - Maintained comprehensive test coverage across multiple file formats (xlsx, xlsm, ods, fods, csv)
- Upgraded to ExcelJS 4.4.0 in
package.json
for enhanced security and stability
3 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
it('parse invalid data with no error', () => { | ||
const sheet = ['123'] | ||
const sheet = ['123'] // rejected by compiler | ||
expect(spreadsheets.parseSpreadsheetAgainstSchema(sheet, schema)).toEqual({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: test case uses invalid input type but relies on TypeScript compilation - should test runtime behavior
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Description
"Fixes issues #4317
Remove xlsx, which has been abandoned and has security issues.
Replace with exceljs.
TODO