{"version":"2.1.334","anchor":"repl-stricter-and-better-supported-script-handling","canonical_anchor":"repl-stricter-and-better-supported-script-handling","heading":"REPL scripts are checked more strictly and support more JavaScript","tier":"notice","area":"REPL","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/repl-stricter-and-better-supported-script-handling","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### REPL scripts are checked more strictly and support more JavaScript\n\nThe REPL now rejects some JavaScript forms with clear errors, lifts functions declared in blocks, and explains a late `.cwd()` or `.env()`\n\n**Unclear.** It is not settled whether the REPL is available to every user.\n\n**What**\n\nThe REPL, where Claude runs scripts, prepares each script before running it. That step now behaves differently:\n\n- Writing to a property of `super` (the parent class an object inherits from) is rejected.\n\n- A function declaration placed directly after a label (a name followed by a colon) is rejected.\n\n- Functions declared inside a block of code are now hoisted, meaning they can be used earlier in that block than where they are written.\n\n- When a `$` shell call does not run, the note now also covers a modifier such as `.cwd()` or `.env()` that arrived too late.\n\n- The matching that decides which Bash commands are exempt has been reworked.\n\n**Why**\n\nREPL scripts that used to run may now stop with an explicit error. The error says what to change.\n\n- Area: REPL\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}