Documentation
¶
Overview ¶
Package javascript is the JavaScript language pack (SPEC §8.1, §10.15): JavaScript and JavaScript React. The grammars and language configurations are in assets/, copied by scripts/update-assets.sh; the licenses are in third_party/ and NOTICE. The language server of these languages is typescript-language-server, which the TypeScript pack (extensions/typescript) runs for both packs, with the javascript.* settings and the commands of JavaScript (SPEC §10.34 "As built (step 24b.5)").
Since step 25.10 the pack also owns the debugger of JavaScript and TypeScript (SPEC §10.31 "The debuggers"): the debug types node and pwa-node, served by js-debug, VS Code's own debugger, run as a server program by the user's node (debug.go); its configuration providers (debugconfig.go); the setting debug.javascript.adapterPath; and "JavaScript Debugger: Download" (jsdebug.go), which fetches the release pinned in this package, on the user's click only.
Index ¶
Constants ¶
const ( // DebugType is the debug type of the debugger, and DebugTypeOld the name it had before 2022 (pwa-node): a launch.json that says so is // served by the same debugger. DebugType = "node" DebugTypeOld = "pwa-node" // AdapterPathSetting is where js-debug is: its dapDebugServer.js, the folder with src/dapDebugServer.js, or the folder that holds the // folder js-debug of the release. AdapterPathSetting = "debug.javascript.adapterPath" // NodePathSetting is the node program the TypeScript pack runs its server with (typescript.nodePath); the debugger runs js-debug with // the same node. It is read, not registered, here. NodePathSetting = "typescript.nodePath" // DownloadCommand fetches the release of js-debug that is pinned in this package. DownloadCommand = "emetos.javascript.downloadJsDebug" )
The ids of the debugger, its setting and its command.
const ( // JsDebugVersion is the version of the pinned release. JsDebugVersion = "1.140.0" // JsDebugSHA256 is the SHA-256 of the archive, as GitHub publishes it for the release asset. JsDebugSHA256 = "27dab92937ec1ab35821ae955aac867544fe06a1b6307229049f2d789af10968" // JsDebugSize is the size of the archive in bytes. JsDebugSize = 1249709 )
The release of js-debug that "JavaScript Debugger: Download" fetches: the DAP-only bundle of microsoft/vscode-js-debug (MIT), published on 2026-09-23. scripts/tool-versions.txt pins the same archive for the tests; change both together.
const ( RunnerNode = "node-test" RunnerJest = "jest" RunnerVitest = "vitest" )
The ids of the three runners (and of their controllers).
const ID = "emetos.javascript"
ID is the id of the extension.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.