@sdeverywhere/cli 0.7.7 → 0.7.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdeverywhere/cli",
3
- "version": "0.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "Contains the `sde` command line interface for the SDEverywhere tool suite.",
5
5
  "type": "module",
6
6
  "files": [
@@ -11,8 +11,8 @@
11
11
  "sde": "src/main.js"
12
12
  },
13
13
  "dependencies": {
14
- "@sdeverywhere/build": "^0.3.0",
15
- "@sdeverywhere/compile": "^0.7.4",
14
+ "@sdeverywhere/build": "^0.3.1",
15
+ "@sdeverywhere/compile": "^0.7.5",
16
16
  "bufx": "^1.0.5",
17
17
  "byline": "^5.0.0",
18
18
  "ramda": "^0.27.0",
@@ -79,6 +79,10 @@ export let compare = async (vensimfile, sdefile, opts) => {
79
79
  }
80
80
  if (noDATDifference) {
81
81
  pr(`Data were the same for ${vensimfile} and ${sdefile}`)
82
+ return true
83
+ } else {
84
+ pr(`Data differences detected for ${vensimfile} and ${sdefile}`)
85
+ return false
82
86
  }
83
87
  }
84
88
  let isZero = value => {
package/src/sde-test.js CHANGED
@@ -53,7 +53,12 @@ export let test = async (model, opts) => {
53
53
  let vensimPathname = path.join(modelDirname, `${modelName}.dat`)
54
54
  let p = path.parse(logPathname)
55
55
  let sdePathname = path.format({ dir: p.dir, name: p.name, ext: '.dat' })
56
- await compare(vensimPathname, sdePathname, opts)
56
+ let noDiffs = await compare(vensimPathname, sdePathname, opts)
57
+ if (!noDiffs) {
58
+ // Exit with a non-zero error code if differences were detected
59
+ console.error()
60
+ process.exit(1)
61
+ }
57
62
  } catch (e) {
58
63
  // Exit with a non-zero error code if any step failed
59
64
  console.error(`ERROR: ${e.message}\n`)