Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e67b64a6e | |||
| 1ce730d4f2 | |||
| 9357d6e7ef | |||
| 973ce771d2 |
13
bunfig.toml
13
bunfig.toml
@@ -1,13 +0,0 @@
|
||||
# Bun configuration for tstest
|
||||
# This enables TypeScript decorator support in Bun runtime
|
||||
|
||||
[build]
|
||||
target = "bun"
|
||||
|
||||
[test]
|
||||
preload = []
|
||||
|
||||
# Enable decorators for Bun's TypeScript transpiler
|
||||
# This ensures user code with decorators works when executed via Bun
|
||||
[transpiler]
|
||||
experimentalDecorators = true
|
||||
12
changelog.md
12
changelog.md
@@ -1,5 +1,17 @@
|
||||
# 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)
|
||||
Remove Bun config file and set deno.json useDefineForClassFields to false for compatibility
|
||||
|
||||
- Removed bunfig.toml (Bun-specific TypeScript decorator configuration) — stops shipping a project-local Bun transpiler config.
|
||||
- Updated deno.json: set compilerOptions.useDefineForClassFields = false to keep legacy class field semantics and avoid runtime/emit incompatibilities in Deno.
|
||||
|
||||
## 2025-11-17 - 2.8.0 - feat(runtime-adapters)
|
||||
Enable TypeScript decorator support for Deno and Bun runtimes and add decorator tests
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"DOM"
|
||||
@@ -8,5 +9,5 @@
|
||||
"target": "ES2022"
|
||||
},
|
||||
"nodeModulesDir": true,
|
||||
"version": "2.8.0"
|
||||
"version": "2.8.2"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tstest",
|
||||
"version": "2.8.0",
|
||||
"version": "2.8.2",
|
||||
"private": false,
|
||||
"description": "a test utility to run tests that match test/**/*.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tstest',
|
||||
version: '2.8.0',
|
||||
version: '2.8.2',
|
||||
description: 'a test utility to run tests that match test/**/*.ts'
|
||||
}
|
||||
|
||||
@@ -200,15 +200,18 @@ export class TsTestLogger {
|
||||
.replace(/\//g, '__') // Replace path separators with double underscores
|
||||
.replace(/\.ts$/, '') // Remove .ts extension
|
||||
.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
|
||||
const logDir = path.dirname(this.currentTestLogFile);
|
||||
if (!fs.existsSync(logDir)) {
|
||||
fs.mkdirSync(logDir, { recursive: true });
|
||||
}
|
||||
|
||||
|
||||
// Clear the log file for this test
|
||||
fs.writeFileSync(this.currentTestLogFile, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user