sval 0.4.8 → 0.5.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/.github/workflows/coverage.yml +21 -0
- package/README.md +8 -9
- package/dist/sval.es6.js +89 -14
- package/dist/sval.js +132 -42
- package/dist/sval.min.js +1 -1
- package/package.json +5 -7
- package/types/index.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A javascript interpreter written in javascript",
|
|
5
5
|
"main": "dist/sval.js",
|
|
6
6
|
"module": "dist/sval.js",
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"build": "npm test && rollup -c && npm run post",
|
|
11
11
|
"start": "node scripts && rollup -c && npm run post",
|
|
12
12
|
"post": "mv types/src/index.d.ts types && rm -rf types/src",
|
|
13
|
-
"test": "node scripts && umi-test --coverage"
|
|
14
|
-
"cov": "cat ./coverage/lcov.info | coveralls"
|
|
13
|
+
"test": "node scripts && umi-test --coverage"
|
|
15
14
|
},
|
|
16
15
|
"repository": {
|
|
17
16
|
"type": "git",
|
|
@@ -31,11 +30,10 @@
|
|
|
31
30
|
},
|
|
32
31
|
"homepage": "https://github.com/Siubaak/sval#readme",
|
|
33
32
|
"dependencies": {
|
|
34
|
-
"acorn": "^
|
|
33
|
+
"acorn": "^8.11.3"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@types/
|
|
38
|
-
"@types/estree": "0.0.39",
|
|
36
|
+
"@types/estree": "^1.0.5",
|
|
39
37
|
"@types/jest": "^24.9.1",
|
|
40
38
|
"rollup": "^1.32.1",
|
|
41
39
|
"rollup-plugin-json": "^3.1.0",
|
|
@@ -43,6 +41,6 @@
|
|
|
43
41
|
"rollup-plugin-typescript2": "^0.21.2",
|
|
44
42
|
"rollup-plugin-uglify": "^6.0.4",
|
|
45
43
|
"typescript": "^3.8.3",
|
|
46
|
-
"umi-test": "^1.9.
|
|
44
|
+
"umi-test": "^1.9.7"
|
|
47
45
|
}
|
|
48
46
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ecmaVersion } from 'acorn';
|
|
1
2
|
import { Node, Program } from 'estree';
|
|
2
3
|
export interface SvalOptions {
|
|
3
|
-
ecmaVer?:
|
|
4
|
+
ecmaVer?: ecmaVersion;
|
|
4
5
|
sandBox?: boolean;
|
|
5
6
|
}
|
|
6
7
|
declare class Sval {
|
|
@@ -14,7 +15,7 @@ declare class Sval {
|
|
|
14
15
|
import(nameOrModules: string | {
|
|
15
16
|
[name: string]: any;
|
|
16
17
|
}, mod?: any): void;
|
|
17
|
-
parse(code: string, parser?: (code: string, options: SvalOptions) => Node): import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral |
|
|
18
|
+
parse(code: string, parser?: (code: string, options: SvalOptions) => Node): import("estree").Property | import("estree").CatchClause | import("estree").ClassDeclaration | import("estree").ClassExpression | import("estree").ClassBody | import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").BigIntLiteral | import("estree").ArrayExpression | import("estree").ArrowFunctionExpression | import("estree").AssignmentExpression | import("estree").AwaitExpression | import("estree").BinaryExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").ChainExpression | import("estree").ConditionalExpression | import("estree").FunctionExpression | import("estree").ImportExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").MetaProperty | import("estree").ObjectExpression | import("estree").SequenceExpression | import("estree").TaggedTemplateExpression | import("estree").TemplateLiteral | import("estree").ThisExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").YieldExpression | import("estree").FunctionDeclaration | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").PrivateIdentifier | Program | import("estree").PropertyDefinition | import("estree").SpreadElement | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").StaticBlock | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").Super | import("estree").SwitchCase | import("estree").TemplateElement | import("estree").VariableDeclarator | import("acorn").Program;
|
|
18
19
|
run(code: string | Node): void;
|
|
19
20
|
}
|
|
20
21
|
export default Sval;
|