@sdeverywhere/compile 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/_shared/helpers.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdeverywhere/compile",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"description": "The core Vensim to C compiler for the SDEverywhere tool suite.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"js-yaml": "^3.13.1",
|
|
15
15
|
"ramda": "^0.27.0",
|
|
16
16
|
"split-string": "^6.0.0",
|
|
17
|
-
"xlsx": "
|
|
17
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
|
|
18
18
|
},
|
|
19
19
|
"author": "Climate Interactive",
|
|
20
20
|
"license": "MIT",
|
package/src/_shared/helpers.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as fs from 'node:fs'
|
|
1
2
|
import util from 'util'
|
|
2
3
|
import B from 'bufx'
|
|
3
4
|
import { parse as parseCsv } from 'csv-parse/sync'
|
|
@@ -23,6 +24,10 @@ let nextAuxVarSeq = 1
|
|
|
23
24
|
// parsed csv data cache
|
|
24
25
|
let csvData = new Map()
|
|
25
26
|
|
|
27
|
+
// Newer versions of the xlsx package require manually setting the `fs` instance
|
|
28
|
+
// before using the `XLSX.readFile` function
|
|
29
|
+
XLSX.set_fs(fs)
|
|
30
|
+
|
|
26
31
|
// XXX: This is needed for tests due to sequence numbers being in module-level storage
|
|
27
32
|
export function resetHelperState() {
|
|
28
33
|
nextTmpVarSeq = 1
|