diff --git a/docs/config.md b/docs/config.md index 1d036f253..26743b7fc 100644 --- a/docs/config.md +++ b/docs/config.md @@ -265,7 +265,9 @@ The **interpreters** option specifies additional interpreted languages for data ```js run=false { + ".cjs": ["node", "--no-warnings=ExperimentalWarning"], ".js": ["node", "--no-warnings=ExperimentalWarning"], + ".mjs": ["node", "--no-warnings=ExperimentalWarning"], ".ts": ["tsx"], ".py": ["python3"], ".r": ["Rscript"], diff --git a/src/loader.ts b/src/loader.ts index 8e28ace79..38a5dad6b 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -24,7 +24,9 @@ import {cyan, faint, green, red, yellow} from "./tty.js"; const runningCommands = new Map>(); export const defaultInterpreters: Record = { + ".cjs": ["node", "--no-warnings=ExperimentalWarning"], ".js": ["node", "--no-warnings=ExperimentalWarning"], + ".mjs": ["node", "--no-warnings=ExperimentalWarning"], ".ts": ["tsx"], ".py": ["python3"], ".r": ["Rscript"],