anthropics / anthropic-sdk-typescript
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
mjs
prettierignore
snap
  • 12 extensions are included in analyses: ts, json, md, cjs, yaml, txt, sh, gitignore, mjs, svg, prettierignore, snap
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main32953 LOC (52%) 331 files
test22530 LOC (36%) 94 files
generated0 LOC (0%) 0 files
build and deployment102 LOC (<1%) 6 files
other6865 LOC (10%) 107 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 331 files match defined criteria (32,953 LOC, 100.0% vs. main code):
    • 320 *.ts files (32,701 LOC)
    • 9 *.cjs files (196 LOC)
    • 2 *.mjs files (56 LOC)
  • " *.ts" is biggest, containing 99.24% of LOC.
  • " *.mjs" is smallest, containing 0.17% of LOC.


*.ts32701 LOC (99%) 320 files
*.cjs196 LOC (<1%) 9 files
*.mjs56 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
  • 94 files match defined criteria (22,530 LOC, 68.4% vs. main code):
    • 93 *.ts files (22,491 LOC)
    • 1 *.snap files (39 LOC)
  • " *.ts" is biggest, containing 99.83% of LOC.
  • " *.snap" is smallest, containing 0.17% of LOC.


*.ts22491 LOC (99%) 93 files
*.snap39 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
prettierignore
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like "(.*/)?[.]prettierignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like "(.*/)?[.]prettierrc([.].*)?".
    • files with paths like ".*[.]sh".
  • 6 files match defined criteria (102 LOC, 0.3% vs. main code):
    • 3 *.sh files (65 LOC)
    • 2 *.gitignore files (30 LOC)
    • 1 *.prettierignore files (7 LOC)
  • " *.sh" is biggest, containing 63.73% of LOC.
  • " *.prettierignore" is smallest, containing 6.86% of LOC.


*.sh65 LOC (63%) 3 files
*.gitignore30 LOC (29%) 2 files
*.prettierignore7 LOC (6%) 1 file
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
  • 107 files match defined criteria (6,865 LOC, 20.8% vs. main code):
    • 34 *.md files (4,305 LOC)
    • 37 *.ts files (1,524 LOC)
    • 33 *.json files (956 LOC)
    • 3 *.txt files (80 LOC)
  • " *.md" is biggest, containing 62.71% of LOC.
  • " *.txt" is smallest, containing 1.17% of LOC.


*.md4305 LOC (62%) 34 files
*.ts1524 LOC (22%) 37 files
*.json956 LOC (13%) 33 files
*.txt80 LOC (1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.cjs files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.mjs files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2026-06-24 10:43