Compare commits

..

2 Commits

5 changed files with 16 additions and 7 deletions

View File

@@ -1,5 +1,11 @@
# Changelog # Changelog
## 2025-11-17 - 2.8.2 - fix(logging)
Include runtime identifier in per-test logfile name and sanitize runtime string
- Append a sanitized runtime identifier to the per-test log filename (format: <safeFilename>__<safeRuntime>.log) so runs for different runtimes don't clash
- Sanitize runtime names by lowercasing and removing non-alphanumeric characters to produce filesystem-safe filenames
## 2025-11-17 - 2.8.1 - fix(config) ## 2025-11-17 - 2.8.1 - fix(config)
Remove Bun config file and set deno.json useDefineForClassFields to false for compatibility Remove Bun config file and set deno.json useDefineForClassFields to false for compatibility

View File

@@ -9,5 +9,5 @@
"target": "ES2022" "target": "ES2022"
}, },
"nodeModulesDir": true, "nodeModulesDir": true,
"version": "2.8.1" "version": "2.8.2"
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@git.zone/tstest", "name": "@git.zone/tstest",
"version": "2.8.1", "version": "2.8.2",
"private": false, "private": false,
"description": "a test utility to run tests that match test/**/*.ts", "description": "a test utility to run tests that match test/**/*.ts",
"exports": { "exports": {

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/tstest', name: '@git.zone/tstest',
version: '2.8.1', version: '2.8.2',
description: 'a test utility to run tests that match test/**/*.ts' description: 'a test utility to run tests that match test/**/*.ts'
} }

View File

@@ -201,7 +201,10 @@ export class TsTestLogger {
.replace(/\.ts$/, '') // Remove .ts extension .replace(/\.ts$/, '') // Remove .ts extension
.replace(/^\.\.__|^\.__|^__/, ''); // Clean up leading separators from relative paths .replace(/^\.\.__|^\.__|^__/, ''); // Clean up leading separators from relative paths
this.currentTestLogFile = path.join('.nogit', 'testlogs', `${safeFilename}.log`); // Sanitize runtime name for use in filename (lowercase, no spaces/dots/special chars)
const safeRuntime = runtime.toLowerCase().replace(/[^a-z0-9]/g, '');
this.currentTestLogFile = path.join('.nogit', 'testlogs', `${safeFilename}__${safeRuntime}.log`);
// Ensure the directory exists // Ensure the directory exists
const logDir = path.dirname(this.currentTestLogFile); const logDir = path.dirname(this.currentTestLogFile);