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: upgrade to more recent version of xlsx package #465

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/compile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"js-yaml": "^3.13.1",
"ramda": "^0.27.0",
"split-string": "^6.0.0",
"xlsx": "^0.17.0"
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
},
"author": "Climate Interactive",
"license": "MIT",
Expand Down
5 changes: 5 additions & 0 deletions packages/compile/src/_shared/helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as fs from 'node:fs'
import util from 'util'
import B from 'bufx'
import { parse as parseCsv } from 'csv-parse/sync'
Expand All @@ -23,6 +24,10 @@ let nextAuxVarSeq = 1
// parsed csv data cache
let csvData = new Map()

// Newer versions of the xlsx package require manually setting the `fs` instance
// before using the `XLSX.readFile` function
XLSX.set_fs(fs)

// XXX: This is needed for tests due to sequence numbers being in module-level storage
export function resetHelperState() {
nextTmpVarSeq = 1
Expand Down
92 changes: 10 additions & 82 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.