Skip to content

Commit d82db89

Browse files
authored
New interpreter (#1)
1 parent 61ee878 commit d82db89

36 files changed

+7240
-2494
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ node_modules
66
.env.*
77
dist
88
debug-*.ts
9-
test-*.ts
9+
test-*.ts
10+
profile-*.mjs
11+
*.cpuprofile
12+
bench-*.mjs

AGENTS.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Agent instructions
22

3+
- use `pnpm dev:exec` for evaluating scripts using BashEnv during development
4+
5+
```text
6+
Usage: pnpm dev:exec '<bash script>'
7+
echo '<script>' | pnpm dev:exec
8+
cat script.sh | pnpm dev:exec
9+
```
10+
311
- Install packages via pnpm rather than editing package.json directly
412
- Bias towards making new test files that are roughly logically grouped rather than letting test files gets too large. Try to stay below 300 lines. Prefer making a new file when you want to add a `describe()`
513
- Prefer asserting the full STDOUT/STDERR output rather than using to.contain or to.not.contain
@@ -11,6 +19,7 @@
1119
- Use `pnpm lint:fix`
1220
- Strongly prefer running a temporary comparison test or unit test over an ad-hoc script to figure out the behavior of some bash script or API.
1321
- The implementation should align with the real behavior of bash, not what is convenient for TS or TE tests.
14-
- Don't use `cat > test-direct.ts << 'SCRIPT'` style test scripts because they constantly require 1-off approval. Instead make comparison-tests and see what they output. event console.log is there is you remove later.
15-
- using `npx tsx -e '…` is another good option for adhoc testing.
22+
- Don't use `cat > test-direct.ts << 'SCRIPT'` style test scripts because they constantly require 1-off approval.
23+
- Instead use `pnpm dev:exec ""`
1624
- Always make sure to build before using dist
25+
- Biome rules often have the same name as eslint rules (if you are lookinf for one)

biome.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@
77
"recommended": true,
88
"correctness": {
99
"noUnusedImports": "error",
10-
"noUnusedVariables": "error"
10+
"noUnusedVariables": "error",
11+
"noUnusedPrivateClassMembers": "error"
1112
},
1213
"suspicious": {
1314
"noTemplateCurlyInString": "off",
1415
"noControlCharactersInRegex": "off",
1516
"noImplicitAnyLet": "error",
16-
"noAssignInExpressions": "error"
17+
"noAssignInExpressions": "error",
18+
"noExplicitAny": "error"
1719
},
1820
"style": {
19-
"noNonNullAssertion": "error"
21+
"noNonNullAssertion": "error",
22+
"useTemplate": "error"
2023
}
2124
}
2225
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"test:run": "vitest run",
2828
"test:unit": "vitest run --config vitest.unit.config.ts",
2929
"test:comparison": "vitest run --config vitest.comparison.config.ts",
30-
"shell": "npx tsx src/cli/shell.ts"
30+
"shell": "npx tsx src/cli/shell.ts",
31+
"dev:exec": "npx tsx src/cli/exec.ts"
3132
},
3233
"keywords": [],
3334
"author": "",

0 commit comments

Comments
 (0)