Claude Code v2.1.334 ·
REPL scripts are checked more strictly and support more JavaScript
The REPL now rejects some JavaScript forms with clear errors, lifts functions declared in blocks, and explains a late .cwd() or .env()
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
REPLArea: what it touches
ImprovementsKind: in v2.1.334,
ImprovementsSection of the release
Unclear It is not settled whether the REPL is available to every user.
What
The REPL, where Claude runs scripts, prepares each script before running it. That step now behaves differently:
- Writing to a property of
super (the parent class an object inherits from) is rejected.
- A function declaration placed directly after a label (a name followed by a colon) is rejected.
- Functions declared inside a block of code are now hoisted, meaning they can be used earlier in that block than where they are written.
- When a
$ shell call does not run, the note now also covers a modifier such as .cwd() or .env() that arrived too late.
- The matching that decides which Bash commands are exempt has been reworked.
Why
REPL scripts that used to run may now stop with an explicit error. The error says what to change.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not settled whether the REPL is available to every user.
See this entry in the whole of v2.1.334 →