- Fix TS7 nodeFlags: remove Synthesized (shifted in TS7), add GlobalAugmentation=64, correct OptionalChain=32, Namespace=16, shift subsequent flags - Add 33 missing operator/punctuation token kinds to syntaxKinds metadata - Infer NestedNamespace flag for dotted namespace declarations (TS7 binary doesn't set it, but Java extractor needs it) - Fix shebang handling: emit ShebangTrivia (kind 6) instead of SingleLineCommentTrivia - Fix token kinds for regex/template rescans to match TS5 pre-rescan behavior (SlashToken for regexes, CloseBraceToken for template continuations) - Fix augmentPos to correctly skip comments (matching TS5's trivia-skipping regex) - Resolve native tsgo binary from npm wrapper to avoid Node.js dependency - Update project-layout glob for worktree support TRAP test results: 493/495 passing (99.6%) Remaining: badimport.ts (missing diagnostics), externalmodule.ts (structural diff) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JavaScript extractor
This directory contains the source code of the JavaScript extractor. The extractor depends on various libraries that are not currently bundled with the source code, so at present it cannot be built in isolation.
The extractor consists of a parser for the latest version of ECMAScript, including a few proposed and historic extensions (see src/com/semmle/jcorn), classes for representing JavaScript and TypeScript ASTs (src/com/semmle/js/ast and src/com/semmle/ts/ast), and various other bits of functionality. Historically, the main entry point of the JavaScript extractor has been com.semmle.js.extractor.Main. However, this class is slowly being phased out in favour of com.semmle.js.extractor.AutoBuild, which is the entry point used by CodeQL.
License
Like the CodeQL queries, the JavaScript extractor is licensed under the MIT License by GitHub. Some code is derived from other projects, whose licenses are noted in other LICENSE-*.md files in this folder.