pyret-npm 0.0.55 → 0.0.58
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 +1 -1
- package/pyret-lang/build/phaseA/base.jarr +12 -5
- package/pyret-lang/build/phaseA/compiled/filelib-89efe8c4c8a6830282c0c61031dbd0dc06b12e35a820c4155c5b85350186cf3b.js +1 -1
- package/pyret-lang/build/phaseA/lib-compiled/csv-lib-4a16651db8fd7dc965e17744502a92b0e69b51449c8af99f5bbad654757985f8-module.js +11 -4
- package/pyret-lang/build/phaseA/lib-compiled/csv-lib-4a16651db8fd7dc965e17744502a92b0e69b51449c8af99f5bbad654757985f8-static.js +11 -4
- package/pyret-lang/build/phaseA/lib-compiled/filelib-89efe8c4c8a6830282c0c61031dbd0dc06b12e35a820c4155c5b85350186cf3b-module.js +1 -1
- package/pyret-lang/build/phaseA/lib-compiled/filelib-89efe8c4c8a6830282c0c61031dbd0dc06b12e35a820c4155c5b85350186cf3b-static.js +1 -1
- package/pyret-lang/build/phaseA/pyret.jarr +1 -1
package/package.json
CHANGED
|
@@ -199397,7 +199397,7 @@ return {"staticModules":{"builtin://global":({
|
|
|
199397
199397
|
return RUNTIME.pauseStack(async restarter => {
|
|
199398
199398
|
fs.readFile(path, 'utf8', (err, data) => {
|
|
199399
199399
|
if (err) {
|
|
199400
|
-
restarter.error(RUNTIME.ffi.
|
|
199400
|
+
restarter.error(RUNTIME.ffi.makeMessageException(String(err)));
|
|
199401
199401
|
} else {
|
|
199402
199402
|
restarter.resume(data);
|
|
199403
199403
|
}
|
|
@@ -199908,10 +199908,17 @@ return {"staticModules":{"builtin://global":({
|
|
|
199908
199908
|
runtime.checkArgsInternal2("csv-lib", "parse-string", str, runtime.String, opts, runtime.Object);
|
|
199909
199909
|
return runtime.pauseStack((restarter) => {
|
|
199910
199910
|
const results = [];
|
|
199911
|
-
|
|
199912
|
-
|
|
199913
|
-
|
|
199914
|
-
|
|
199911
|
+
try {
|
|
199912
|
+
const asStream = csv.parseString(str, opts.dict);
|
|
199913
|
+
let errored = false;
|
|
199914
|
+
asStream
|
|
199915
|
+
.on('error', (error) => { restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error))); })
|
|
199916
|
+
.on('data', (data) => { results.push(data); })
|
|
199917
|
+
.on('end', () => { restarter.resume(results); })
|
|
199918
|
+
}
|
|
199919
|
+
catch(e) {
|
|
199920
|
+
restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error)));
|
|
199921
|
+
}
|
|
199915
199922
|
})
|
|
199916
199923
|
}
|
|
199917
199924
|
return runtime.makeModuleReturn({
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
return RUNTIME.pauseStack(async restarter => {
|
|
82
82
|
fs.readFile(path, 'utf8', (err, data) => {
|
|
83
83
|
if (err) {
|
|
84
|
-
restarter.error(RUNTIME.ffi.
|
|
84
|
+
restarter.error(RUNTIME.ffi.makeMessageException(String(err)));
|
|
85
85
|
} else {
|
|
86
86
|
restarter.resume(data);
|
|
87
87
|
}
|
|
@@ -13,10 +13,17 @@
|
|
|
13
13
|
runtime.checkArgsInternal2("csv-lib", "parse-string", str, runtime.String, opts, runtime.Object);
|
|
14
14
|
return runtime.pauseStack((restarter) => {
|
|
15
15
|
const results = [];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
try {
|
|
17
|
+
const asStream = csv.parseString(str, opts.dict);
|
|
18
|
+
let errored = false;
|
|
19
|
+
asStream
|
|
20
|
+
.on('error', (error) => { restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error))); })
|
|
21
|
+
.on('data', (data) => { results.push(data); })
|
|
22
|
+
.on('end', () => { restarter.resume(results); })
|
|
23
|
+
}
|
|
24
|
+
catch(e) {
|
|
25
|
+
restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error)));
|
|
26
|
+
}
|
|
20
27
|
})
|
|
21
28
|
}
|
|
22
29
|
return runtime.makeModuleReturn({
|
|
@@ -13,10 +13,17 @@
|
|
|
13
13
|
runtime.checkArgsInternal2("csv-lib", "parse-string", str, runtime.String, opts, runtime.Object);
|
|
14
14
|
return runtime.pauseStack((restarter) => {
|
|
15
15
|
const results = [];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
try {
|
|
17
|
+
const asStream = csv.parseString(str, opts.dict);
|
|
18
|
+
let errored = false;
|
|
19
|
+
asStream
|
|
20
|
+
.on('error', (error) => { restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error))); })
|
|
21
|
+
.on('data', (data) => { results.push(data); })
|
|
22
|
+
.on('end', () => { restarter.resume(results); })
|
|
23
|
+
}
|
|
24
|
+
catch(e) {
|
|
25
|
+
restarter.error(runtime.ffi.makeMessageException("Error reading CSV: " + String(error)));
|
|
26
|
+
}
|
|
20
27
|
})
|
|
21
28
|
}
|
|
22
29
|
return runtime.makeModuleReturn({
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
return RUNTIME.pauseStack(async restarter => {
|
|
82
82
|
fs.readFile(path, 'utf8', (err, data) => {
|
|
83
83
|
if (err) {
|
|
84
|
-
restarter.error(RUNTIME.ffi.
|
|
84
|
+
restarter.error(RUNTIME.ffi.makeMessageException(String(err)));
|
|
85
85
|
} else {
|
|
86
86
|
restarter.resume(data);
|
|
87
87
|
}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
return RUNTIME.pauseStack(async restarter => {
|
|
82
82
|
fs.readFile(path, 'utf8', (err, data) => {
|
|
83
83
|
if (err) {
|
|
84
|
-
restarter.error(RUNTIME.ffi.
|
|
84
|
+
restarter.error(RUNTIME.ffi.makeMessageException(String(err)));
|
|
85
85
|
} else {
|
|
86
86
|
restarter.resume(data);
|
|
87
87
|
}
|
|
@@ -178664,7 +178664,7 @@ return {"staticModules":{"builtin://global":({
|
|
|
178664
178664
|
return RUNTIME.pauseStack(async restarter => {
|
|
178665
178665
|
fs.readFile(path, 'utf8', (err, data) => {
|
|
178666
178666
|
if (err) {
|
|
178667
|
-
restarter.error(RUNTIME.ffi.
|
|
178667
|
+
restarter.error(RUNTIME.ffi.makeMessageException(String(err)));
|
|
178668
178668
|
} else {
|
|
178669
178669
|
restarter.resume(data);
|
|
178670
178670
|
}
|