The tmp package with promises support and disposers.
93
{
"context": "This criteria evaluates how well the engineer uses tmp-promise's tmpName functionality to generate unique temporary filenames for atomic file operations. The focus is on proper usage of the tmpName API including options for customization.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses tmpName function",
"description": "The implementation imports and uses the tmpName() function from tmp-promise to generate temporary filenames",
"max_score": 30
},
{
"name": "Passes directory option",
"description": "The implementation uses the 'dir' option when calling tmpName() to specify the target file's directory, ensuring the temporary file is created in the same location as the target file",
"max_score": 25
},
{
"name": "Configures prefix option",
"description": "The implementation passes the 'prefix' option to tmpName() based on the user-provided options.prefix parameter (or uses an appropriate default)",
"max_score": 15
},
{
"name": "Configures postfix option",
"description": "The implementation passes the 'postfix' option to tmpName() based on the user-provided options.postfix parameter (or uses an appropriate default)",
"max_score": 15
},
{
"name": "Handles async operation",
"description": "The implementation correctly awaits the tmpName() promise or uses .then() to handle the asynchronous nature of tmpName()",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-tmp-promisedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10