Skip to content

Commit a5557b9

Browse files
authored
Migration: Remove translator and directly interpret Python AST (Closes #51) (#77)
1 parent f8647d9 commit a5557b9

29 files changed

+1892
-2226
lines changed

package-lock.json

Lines changed: 120 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@rollup/plugin-terser": "^0.4.4",
3030
"@rollup/plugin-typescript": "^12.1.2",
3131
"@types/fast-levenshtein": "^0.0.4",
32-
"@types/jest": "^29.4.0",
32+
"@types/jest": "^29.5.14",
3333
"@types/mathjs": "^9.4.1",
3434
"@types/node": "^18.19.84",
3535
"glob": "^11.1.0",
@@ -39,6 +39,7 @@
3939
"rimraf": "^3.0.2",
4040
"rollup": "^4.38.0",
4141
"rollup-plugin-modify": "^3.0.0",
42+
"rollup-plugin-sourcemaps": "^0.6.3",
4243
"taffydb": "^2.7.3",
4344
"ts-jest": "^29.0.5",
4445
"ts-node": "^10.9.1",
@@ -49,6 +50,6 @@
4950
"@sourceacademy/conductor": "^0.2.3",
5051
"@types/estree": "^1.0.0",
5152
"fast-levenshtein": "^3.0.0",
52-
"mathjs": "^14.4.0"
53+
"mathjs": "^14.9.1"
5354
}
5455
}

rollup.config.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import nodeResolve from "@rollup/plugin-node-resolve";
22
import typescript from '@rollup/plugin-typescript';
33
import json from '@rollup/plugin-json';
44
import commonjs from '@rollup/plugin-commonjs';
5+
import sourcemaps from 'rollup-plugin-sourcemaps';
56

67
/**
78
* @type {import('rollup').RollupOptions}
@@ -14,7 +15,15 @@ const config = [{
1415
name: 'PySlangEvaluator',
1516
sourcemap: true
1617
},
17-
plugins: [commonjs(), json(), typescript(), nodeResolve()]
18+
plugins: [
19+
nodeResolve({ browser: true }),
20+
commonjs({
21+
include: /node_modules/
22+
}),
23+
json(),
24+
typescript(),
25+
sourcemaps()
26+
]
1827
}, {
1928
input: 'src/index.ts',
2029
output: {
@@ -23,7 +32,15 @@ const config = [{
2332
name: 'PySlangWorker',
2433
sourcemap: true
2534
},
26-
plugins: [commonjs(), json(), typescript(), nodeResolve()]
35+
plugins: [
36+
nodeResolve({ browser: true }),
37+
commonjs({
38+
include: /node_modules/
39+
}),
40+
json(),
41+
typescript(),
42+
sourcemaps()
43+
]
2744
}];
2845

2946
export default config;

0 commit comments

Comments
 (0)