Release Notes
This page lists breaking changes and notable new features. Please be sure to read the release notes before upgrading from previous version.
The detailed changelog can be found in TSTyche repository on GitHub .
TSTyche 5.0
TSTyche 5.0 ships with the new // @tstyche fixme
comment directive and checkDeclarationFiles
configuration option.
Keep in mind that TSTyche 5.0 is still in beta. More breaking changes may be introduced before the stable version is released. To install the latest beta version, use the next
distribution tag:
npm
npm add -D tstyche@next
Requirements
Breaking! The minimum supported Node.js version is 20.12
. It is recommended to use the latest LTS release .
expect()
Breaking! The .fail
run mode flag is removed. Use the new // @tstyche fixme
comment directive instead.
Comment Directives
// @tstyche fixme
Marks an expect()
, test()
or describe()
as supposed to fail.
import { , } from "tstyche";
declare function (: () => unknown): void;
declare function (: () => <unknown>): <void>;
((() => {}))..<void>();
// @tstyche fixme -- This should work, see: #265
((() => .()))..<<void>>();
("() => unknown", () => {
((() => {}))..<void>();
});
// @tstyche fixme -- Known bug, see: #345
("() => Promise<unknown>", () => {
((() => .()))..<<void>>();
});
The runner implements the following logic:
- when an
expect()
is marked, make sure it actually fails, - when a
test()
ordescribe()
is marked, check if it has a failing child.
Configuration
Breaking! The checkSourceFiles
configuration option is removed.
checkDeclarationFiles
Check declaration files for type errors.
To maximize performance TSTyche only checks types of test and fixture files. When checkDeclarationFiles
is enabled, type errors are also reported for declaration and ambient. In other words, all .d.ts
files of the projected are checked. The files within the node_modules
directory are not checked.
It is recommended to enable this option when a project has handcrafted or generated type declarations.
checkSuppressedErrors
The checkSuppressedErrors
configuration option is enabled by default.
target
Breaking! The option value now must be a string in semver syntax:
- "target": [">=5.2 <=5.3", "5.4.2", ">5.5"]
+ "target": ">=5.2 <=5.3 || 5.4.2 || >5.5"
The default value is changed to "*"
. When TypeScript is installed, it will use that version; otherwise, the latest
version will be used.
The "current"
value is not supported any more. Use "*"
instead.
Command Line
--target
Breaking! The option value now must be a string in semver syntax:
- --target '>=5.2 <5.3, 5.4.2, >5.5'
+ --target '>=5.2 <=5.3 || 5.4.2 || >5.5'
The default value is changed to "*"
. When TypeScript is installed, it will use that version; otherwise, the latest
version will be used.
The "current"
value is not supported any more. Use "*"
instead.
Compiler Options
Breaking! The allowJs
and checkJs
are removed from default compiler options.
As a reminder, from now TSTyche sets the following default compiler options:
{
"allowImportingTsExtensions": true, // not set for TypeScript 4.x
"exactOptionalPropertyTypes": true,
"jsx": "preserve",
"module": "nodenext",
"moduleResolution": "nodenext",
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"strict": true,
"target": "esnext",
"verbatimModuleSyntax": true // not set for TypeScript 4.x
}