Skip to content

Releases: Uanela/tsx-strict

v0.3.0

02 Jan 19:38

Choose a tag to compare

v0.3.0 Release Notes

New Features

Shorter CLI Alias

  • Added tsxs as a shorter alias for tsx-strict command
  • Both commands point to the same executable for convenience

Improved Error Output

  • Beautified TypeScript error messages with color-coded formatting
  • File paths, line numbers, and column numbers now displayed with distinct colors for better readability
  • Error codes (TS####) are now clearly highlighted

Enhanced File Watching (Windows)

  • Improved file watcher implementation to prevent dump stack errors on Windows
  • More targeted file watching: now watches only relevant file extensions (.ts, .tsx, .js, .jsx, .mjs, .cjs)
  • Added restart debouncing to prevent multiple simultaneous restart attempts
  • Better performance by watching specific file patterns instead of entire directory

Bug Fixes

  • Fixed --compiler option to properly accept string values
  • Corrected compilation process flow to use async/await for better process management
  • Resolved issue where file watcher could trigger multiple restarts simultaneously

Improvements

  • Streamlined README documentation for clearer, more concise information
  • Removed unnecessary file pattern matching from watcher
  • Better process management during file change detection

Breaking Changes

None

Installation

npm install -g [email protected]

Or use directly with npx:

npx [email protected] your-file.ts
# or
npx tsxs your-file.ts

Full Changelog: latest...v0.3.0

tsx-strict v0.1.0 - Type-safe TSX with automatic Type-checking

25 Aug 03:23

Choose a tag to compare

tsx-strict v0.1.0

Run TypeScript files with automatic type-checking. Your code only executes when types are valid - no more runtime surprises from type errors.

Features

  • Automatic type checking - TypeScript compiler runs alongside tsx, blocking execution on type errors
  • Watch mode - Auto-restart on file changes with --watch flag
  • Smart process management - Kills previous processes on recompilation, prevents resource conflicts
  • Custom compiler support - Use any TypeScript compiler version with --compiler option
  • Flexible arguments - Pass additional args to both tsc (--tsc-args) and tsx (--tsx-args)
  • Silent mode - Suppress all output with --silent for CI/CD environments
  • Screen control - Control screen clearing behavior with --no-clear
  • Type check bypass - Skip type checking entirely with --no-type-check for quick runs
  • Memory management - Configure Node.js memory limits for large projects
  • Cross-platform - Works on Windows, macOS, and Linux

Installation

# Install globally
npm install -g tsx-strict

# Or use directly
npx tsx-strict your-file.ts

Quick Examples

# Basic usage
tsx-strict app.ts

# Development with watch mode
tsx-strict --watch src/index.ts

# Strict type checking
tsx-strict --tsc-args --strict --exactOptionalPropertyTypes src/app.ts

# Silent execution for scripts
tsx-strict --silent --no-clear worker.ts

# Skip type checking for quick testing
tsx-strict --no-type-check prototype.ts

Why tsx-strict?

Perfect for development workflows where you want both speed and safety. Get immediate feedback on type errors while your code runs only when it's actually type-safe.

Requirements: Node.js >= 20.0.0, tsx ^4.20.5

Issues & Feedback: https://github.com/uanela/tsx-strict/issues