docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how effectively the engineer uses the cjs-module-lexer package to detect basic CommonJS export patterns, including the parse() function and proper handling of its return values.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import package",
"description": "The solution correctly imports or requires the cjs-module-lexer package (e.g., const { parse } = require('cjs-module-lexer') or const parser = require('cjs-module-lexer'))",
"max_score": 10
},
{
"name": "Call parse function",
"description": "The solution calls the parse() function from cjs-module-lexer with the source code string as the first argument",
"max_score": 25
},
{
"name": "Handle initialization",
"description": "The solution properly handles cjs-module-lexer initialization if needed (calls init() or initSync() before parse(), or wraps in async function if using init())",
"max_score": 15
},
{
"name": "Extract exports array",
"description": "The solution correctly extracts the exports array from the parse() return value and uses it for the namedExports property",
"max_score": 20
},
{
"name": "Extract reexports array",
"description": "The solution correctly extracts the reexports array from the parse() return value and uses it to determine hasReexport (checking if reexports array length > 0 or similar logic)",
"max_score": 20
},
{
"name": "Return correct format",
"description": "The solution returns an object with the correct structure: { namedExports: array, hasReexport: boolean }",
"max_score": 10
}
]
}