theprogrammablemind 7.11.0 → 7.11.1-beta.1

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.
Files changed (2) hide show
  1. package/client.js +8 -3
  2. package/package.json +2 -2
package/client.js CHANGED
@@ -1843,8 +1843,9 @@ const knowledgeModuleImpl = async ({
1843
1843
  if (results.length > 0) {
1844
1844
  let headerShown = false
1845
1845
 
1846
- let hasError = false
1846
+ let errorCount = 0
1847
1847
  for (const result of results) {
1848
+ let hasError = false
1848
1849
  if (JSON.stringify(result.expected.paraphrases) !== JSON.stringify(result.actual.paraphrases)) {
1849
1850
  hasError = true
1850
1851
  }
@@ -1865,8 +1866,11 @@ const knowledgeModuleImpl = async ({
1865
1866
  if (!sameJSON(result.expected.checkedContexts, result.actual.checkedContexts)) {
1866
1867
  hasError = true
1867
1868
  }
1869
+ if (hasError) {
1870
+ errorCount += 1
1871
+ }
1868
1872
  }
1869
-
1873
+ const hasError = errorCount > 0
1870
1874
  if (hasError) {
1871
1875
  console.log('**************************** ERRORS ************************')
1872
1876
  for (const result of results) {
@@ -1883,6 +1887,7 @@ const knowledgeModuleImpl = async ({
1883
1887
  if (args.vimdiff) {
1884
1888
  vimdiff(result.actual.paraphrasesParenthesized, result.expected.paraphrasesParenthesized)
1885
1889
  }
1890
+ errorCount += 1
1886
1891
  }
1887
1892
  }
1888
1893
  show('paraphrases', result.expected.paraphrases, result.actual.paraphrases)
@@ -1967,7 +1972,7 @@ const knowledgeModuleImpl = async ({
1967
1972
  if (!(useTestConfig.check && useTestConfig.check.length > 0)) {
1968
1973
  console.log('use -v arg to write files expected.json and actual.json in the current directory for detailed comparison. Or do -s and then git diff the changes.')
1969
1974
  // console.log(JSON.stringify(contexts))
1970
- console.log('**************************** THERE WERE ERRORS ************************')
1975
+ console.log(`**************************** THERE WERE ${errorCount} ERRORS ************************`)
1971
1976
  }
1972
1977
  }
1973
1978
  }
package/package.json CHANGED
@@ -65,6 +65,6 @@
65
65
  "json-stable-stringify": "^1.0.1",
66
66
  "node-fetch": "^2.6.1"
67
67
  },
68
- "version": "7.11.0",
69
- "license": "ISC"
68
+ "version": "7.11.1-beta.1",
69
+ "license": "UNLICENSED"
70
70
  }