CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-cjs-module-lexer

High-performance CommonJS module lexer for detecting named exports and reexports from JavaScript source code

93

0.98x

Quality

Pending

Does it follow best practices?

Impact

93%

0.98x

Average score across 10 eval scenarios

Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This evaluation assesses how effectively the engineer uses the cjs-module-lexer package to detect and analyze transpiler-generated star re-export patterns in CommonJS modules. The focus is on correct usage of the package's parsing capabilities and proper interpretation of the reexports data.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses parse function",
      "description": "Correctly imports and calls the parse() function from cjs-module-lexer with the source code string as the first parameter",
      "max_score": 20
    },
    {
      "name": "Extracts reexports data",
      "description": "Accesses the reexports array from the parse() function's return value to identify star re-export patterns",
      "max_score": 25
    },
    {
      "name": "Returns module list",
      "description": "Returns the module specifiers from the reexports array as the list of star re-exported modules",
      "max_score": 20
    },
    {
      "name": "Detects presence flag",
      "description": "Correctly determines whether star re-exports are present by checking if the reexports array is non-empty (length > 0) and returns this as a boolean flag",
      "max_score": 20
    },
    {
      "name": "Handles empty case",
      "description": "Correctly handles source code with no star re-exports by returning an empty array and false flag when reexports array is empty",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-cjs-module-lexer

tile.json