npm / tstyche
tstyche
What changed in tstyche 3 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
73 breaking2 deprecations37 new APIs and options1 performance13 behavior and defaults21 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittstyche 730 changes
Breaking changes 12
The experimental when() helper was removed.
The
addsText()component is renamed.TSTyche checks errors suppressed by @ts-expect-error directives in multi-line comments.
Cli#run()now returns an exit code.Removes the
rootPathconfiguration option.Passing type arguments to the
.toAcceptProps()matcher is disallowed.Renames the
tsconfigconfiguration optionignoretobaseline.Incompatible TSConfig options are now reported.
Renames the
tstyche/tstycheentry point totstyche/api.The default configuration file location changes to
./tstyche.json.The
usesText()component is renamed.Removes
verbatimModuleSyntaxfrom the default compiler options.
Deprecations 1
The
.toRaiseError()matcher is deprecated.
New APIs and options 5
Adds an environment variable to configure fetch retries.
Adds an environment variable to configure fetch timeouts.
Publishes a configuration schema enabling local reference.
Adds the
.toBeInstantiableWith()matcher.Adds the --root command line option.
Behavior and default changes 5
Adds retry logic for fetch requests.
Test files are always sorted by name in watch mode.
Type-structure checking now ignores the order of index signatures.
Checking now includes
@ts-expect-errordirectives in multi-line comments.The
tsconfigconfiguration accepts a JSON string.
Fixes and other changes 7
Unused type parameters are ignored when comparing type references.
Prevents infinite recursion when comparing self-referential generic types.
Handles reduced types when comparing type structures, improving type comparison behavior.
Uses TypeScript v6 when v7 is installed.
Improves validation of arguments passed to the matcher.
Validates the JSX setup for the matcher.
Fixes argument length detection for this matcher.
tstyche 614 changes
Breaking changes 5
The minimum supported Node.js version is now 22.12, so projects must use Node.js 22.12 or later.
Node.js 20 is no longer supported, so developers must use a supported Node.js version.
The matcher now uses structure comparison, changing how
.toBe()compares values.Support for TSTyche plugins has been removed, affecting projects that rely on plugins.
TypeScript versions 5.3 and earlier are no longer supported.
New APIs and options 5
Adds the dot reporter.
Adds the verbose configuration option.
Adds the --verbose command line option.
Adds the --quiet command line option.
Adds the tstyche/tag entry point.
Behavior and default changes 1
Type structure checking now ignores unused type parameters in call signatures.
Fixes and other changes 3
Type structure checking now takes predicate parameter position into account.
Deduplicates complex unions and intersections when checking type structure.
Type structure checking now compares the target type of type references.
tstyche 529 changes
Breaking changes 16
The default compiler options now enable allowJs.
The default compiler options now enable checkJs.
Removes allowJs from the default compiler options.
Removes checkJs from the default compiler options.
Removes the checkSourceFiles configuration option.
Enables the checkSuppressedErrors option by default.
Removes the .fail run mode flag.
Drops support for some older Node.js 20 versions.
Removes the diagnostics property from *Result.
ResultCounts is exported as a type only.
Removes getters from ResultCounts.
ResultTiming is exported as a type only.
Removes getters from ResultTiming.
The target option now accepts only a semver string value.
Renames
.toBeAssignableWith()to.toBeAssignableFrom().Support for TypeScript 4.x is dropped.
New APIs and options 6
Adds the checkDeclarationFiles configuration option.
Reports counts of checked suppressed errors.
Adds the It member to TestTreeNodeBrand.
Adds a matcher for testing whether provided types are callable with given arguments.
Adds a matcher for testing whether provided types are constructable with given arguments.
Adds a directive for marking fixme cases.
Behavior and default changes 2
Suppressed error messages can be truncated with
....Changes the default target value to
"*".
Fixes and other changes 5
Broken symlinks are handled during test file lookup.
Maps ability diagnostics more precisely.
Adds validation for assertion and action chains.
Handles leading tabs when collecting directives.
Passes testTree to SuppressedService#match().
tstyche 432 changes
Breaking changes 18
AssertionNodeis renamed.The option is enabled by default.
Constructors always take
compileras their first argument.Default compiler options become strict.
Default compiler options are always used when a file is not included.
The
ExpectServiceconstructor now requiresresolvedConfig.Renames
--install; use--fetchinstead.The
--fetchcommand-line option is renamed.Support for Node.js 18 is dropped.
The minimum supported Node.js version is 20.9.
Primitive type matchers such as
.toBeString()and.toBeNumber()are removed; use.toBe()instead.The option is enabled by default.
The
Store.getSupportedTags()method is removed.Config details are removed from the summary and
Result.TestTreeNodeis renamed.The deprecated matcher is removed.
Support for TypeScript 4.6 and below is dropped; TypeScript 4.7 or above is required for testing.
The
Version.isVersionTag()method is removed.
New APIs and options 9
Adds
collect:*events.Allows notes to be added to directive comments.
Adds the
.isCalledWith()action.Adds the
minorVersionsproperty to the store manifest.Allows target type errors to be skipped.
Adds a matcher that checks whether a decorator function can be applied to a class or class member; it must be used as a decorator.
Adds a comment directive for conditionally skipping an
expect(),test()ordescribe(); placing it at the top of a file applies the condition to the whole file.Adds a directive that marks a test file as a template, interpreting its default export as type test text.
Adds the
when()utility.
Behavior and default changes 2
Whitespace is excluded when diagnostic messages are compared.
Already seen test files are no longer typechecked.
Fixes and other changes 3
Diagnostics of the ability layer are no longer reversed.
Test tree validation logic moves to the
Collectclass.Handles unexpected trailing tokens in JSON.
tstyche 342 changes
Breaking changes 22
The Config class can no longer be instantiated.
ConfigService constructor arguments were removed; callers must no longer pass them.
The EventHandler.on() method was renamed, requiring callers to update method references.
Type comparisons now take the exactOptionalPropertyTypes option into account.
InputService constructor options were removed; callers must no longer pass them.
The ListReporter class was renamed, so code referring to the class must use its new name.
Support for Node.js 16 was dropped.
The minimum required Node.js version is now 18.19.
A test file that does not exist is marked as failed.
The Options class was renamed, so code referring to the class must use its new name.
The OutputService class can no longer be instantiated.
OutputService constructor options were removed; callers must no longer pass them.
The project:uses event was renamed, requiring event consumers to update their references.
The Select class can no longer be instantiated.
The Store class can no longer be instantiated.
The store:adds event was renamed, requiring event consumers to update their references.
The TargetResult.target property was renamed, requiring callers to update references to it.
Task, TaskResult, Runner, and task:* events were renamed, requiring callers to update references.
The deprecated matcher has been removed.
The TSTyche class was removed.
Replaces TSTYCHE_TYPESCRIPT_PATH; its value is now resolved using import.meta.resolve().
The environment variable has been removed; use TSTYCHE_TYPESCRIPT_MODULE instead.
Deprecations 1
The matcher is deprecated; use the Omit and Pick utility types or the new omit() and pick() utilities for subtype testing.
New APIs and options 12
The Fetcher class was added.
The JsonScanner class was added.
The LockService class was added.
Adds a type utility that reshapes an object type by removing specified keys; at runtime it returns the same object passed as an argument.
Adds a type utility that reshapes an object type by keeping only specified keys; at runtime it returns the same object passed as an argument.
Adds plugins that can change TSTyche behavior through one or more hooks, including config and select.
Refines the programmatic API, with Config.resolve() and Runner.run() shown for resolving configuration and running selected test files.
Adds custom reporters implemented as classes with an on() method to control test-result formatting.
A prune() method was added to StoreService.
The matcher now accepts regular expressions as well as exact error messages.
Configures how TSTyche finds a TSConfig file: findup discovers the nearest file by default, ignore skips lookup, and a path selects a specific file.
Sets the base URL of the npm registry to use.
Performance 1
The release includes performance improvements.
Behavior and default changes 3
The implementation now uses import.meta.resolve().
The matcher can now check index signatures.
TypeScript package tarballs are now fetched and extracted directly.
Fixes and other changes 3
Fetch errors are always suppressed when requested.
The relative path normalization logic is fixed.
Test file paths are always resolved.