@basthon/kernel-javascript 0.41.12 → 0.50.0
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/lib/kernel.js +4 -5
- package/package.json +3 -3
package/lib/kernel.js
CHANGED
|
@@ -7,10 +7,9 @@ export class KernelJavaScript extends KernelBase {
|
|
|
7
7
|
Jupyter: undefined,
|
|
8
8
|
window: undefined,
|
|
9
9
|
};
|
|
10
|
-
this.
|
|
10
|
+
this._execution_count = 0;
|
|
11
11
|
}
|
|
12
12
|
;
|
|
13
|
-
;
|
|
14
13
|
language() { return "javascript"; }
|
|
15
14
|
;
|
|
16
15
|
languageName() { return "Javascript"; }
|
|
@@ -39,7 +38,7 @@ export class KernelJavaScript extends KernelBase {
|
|
|
39
38
|
const console_error = console.error;
|
|
40
39
|
console.log = outCallback;
|
|
41
40
|
console.error = errCallback;
|
|
42
|
-
this.
|
|
41
|
+
this._execution_count++;
|
|
43
42
|
// evaluation
|
|
44
43
|
let result = undefined;
|
|
45
44
|
try {
|
|
@@ -54,14 +53,14 @@ export class KernelJavaScript extends KernelBase {
|
|
|
54
53
|
// return result
|
|
55
54
|
if (typeof result !== 'undefined')
|
|
56
55
|
result = { 'text/plain': JSON.stringify(result) };
|
|
57
|
-
return [result, this.
|
|
56
|
+
return [result, this._execution_count];
|
|
58
57
|
}
|
|
59
58
|
;
|
|
60
59
|
ps1() { return " js> "; }
|
|
61
60
|
;
|
|
62
61
|
ps2() { return "...> "; }
|
|
63
62
|
;
|
|
64
|
-
restart() { }
|
|
63
|
+
restart() { this._execution_count = 0; }
|
|
65
64
|
;
|
|
66
65
|
more(source) { return false; }
|
|
67
66
|
;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/kernel-javascript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "Basthon - JavaScript Kernel",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"clean": "rm -rf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/kernel-base": "0.
|
|
28
|
+
"@basthon/kernel-base": "0.50.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"gulp": "^4.0.2",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c56536ff3e2be57df447ad94b1c54cd4aeb75e0c"
|
|
39
39
|
}
|