tstyche 1.0.0-rc → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.0-rc.1] - 2024-02-10
4
+
5
+ ### Changed
6
+
7
+ - **Breaking!** Remove the `disableTestFileLookup` option in favor of `testFileMatch: []` ([#121](https://github.com/tstyche/tstyche/pull/121))
8
+
9
+ ### Added
10
+
11
+ - **New!** Set `module: "preserve"` in the default compiler options for inferred project that are using TypeScript 5.4 and up ([#111](https://github.com/tstyche/tstyche/pull/111))
12
+
13
+ ### Fixed
14
+
15
+ - Do not select test files, if `testFileMatch` is an empty list ([#120](https://github.com/tstyche/tstyche/pull/120))
16
+
3
17
  ## [1.0.0-rc] - 2024-01-28
4
18
 
5
19
  ### Changed
@@ -116,6 +130,7 @@
116
130
 
117
131
  _First pre-release._
118
132
 
133
+ [1.0.0-rc.1]: https://github.com/tstyche/tstyche/releases/tag/v1.0.0-rc.1
119
134
  [1.0.0-rc]: https://github.com/tstyche/tstyche/releases/tag/v1.0.0-rc
120
135
  [1.0.0-beta.9]: https://github.com/tstyche/tstyche/releases/tag/v1.0.0-beta.9
121
136
  [1.0.0-beta.8]: https://github.com/tstyche/tstyche/releases/tag/v1.0.0-beta.8
package/README.md CHANGED
@@ -85,5 +85,5 @@ Visit [https://tstyche.org](https://tstyche.org) to view the full documentation.
85
85
  [license-url]: https://github.com/tstyche/tstyche/blob/main/LICENSE.md
86
86
  [packagephobia-badge]: https://badgen.net/packagephobia/install/tstyche
87
87
  [packagephobia-url]: https://packagephobia.com/result?p=tstyche
88
- [coverage-badge]: https://badgen.net/codecov/c/github/tstyche/tstyche
89
- [coverage-url]: https://app.codecov.io/gh/tstyche/tstyche
88
+ [coverage-badge]: https://badgen.net/codacy/coverage/a581ca5c323a455886b7bdd9623c4ec8
89
+ [coverage-url]: https://app.codacy.com/gh/tstyche/tstyche/coverage/dashboard
@@ -139,10 +139,6 @@ interface CommandLineOptions {
139
139
  * Options loaded from the configuration file.
140
140
  */
141
141
  interface ConfigFileOptions {
142
- /**
143
- * Do not search for the test files.
144
- */
145
- disableTestFileLookup?: boolean;
146
142
  /**
147
143
  * Stop running tests after the first failed assertion.
148
144
  */
package/build/tstyche.js CHANGED
@@ -2254,7 +2254,10 @@ class ProjectService {
2254
2254
  strictNullChecks: true,
2255
2255
  target: "esnext",
2256
2256
  };
2257
- if (Version.isSatisfiedWith(this.compiler.version, "5")) {
2257
+ if (Version.isSatisfiedWith(this.compiler.version, "5.4")) {
2258
+ defaultCompilerOptions.module = "preserve";
2259
+ }
2260
+ if (Version.isSatisfiedWith(this.compiler.version, "5.0")) {
2258
2261
  defaultCompilerOptions["allowImportingTsExtensions"] = true;
2259
2262
  defaultCompilerOptions.moduleResolution = "bundler";
2260
2263
  }
@@ -2577,7 +2580,7 @@ class TSTyche {
2577
2580
  #abortController = new AbortController();
2578
2581
  #storeService;
2579
2582
  #taskRunner;
2580
- static version = "1.0.0-rc";
2583
+ static version = "1.0.0-rc.1";
2581
2584
  constructor(resolvedConfig, storeService) {
2582
2585
  this.resolvedConfig = resolvedConfig;
2583
2586
  this.#storeService = storeService;
@@ -2628,12 +2631,6 @@ class OptionDefinitionsMap {
2628
2631
  group: 2,
2629
2632
  name: "config",
2630
2633
  },
2631
- {
2632
- brand: "boolean",
2633
- description: "Do not search for the test files.",
2634
- group: 4,
2635
- name: "disableTestFileLookup",
2636
- },
2637
2634
  {
2638
2635
  brand: "boolean",
2639
2636
  description: "Stop running tests after the first failed assertion.",
@@ -3114,7 +3111,6 @@ class ConfigService {
3114
3111
  #commandLineOptions = {};
3115
3112
  #configFileOptions = {};
3116
3113
  static #defaultOptions = {
3117
- disableTestFileLookup: false,
3118
3114
  failFast: false,
3119
3115
  rootPath: Path.resolve("./"),
3120
3116
  target: [Environment.typescriptPath == null ? "latest" : "current"],
@@ -3595,7 +3591,6 @@ class StoreService {
3595
3591
  }
3596
3592
 
3597
3593
  class Cli {
3598
- #abortController = new AbortController();
3599
3594
  #logger;
3600
3595
  #storeService;
3601
3596
  constructor() {
@@ -3612,7 +3607,6 @@ class Cli {
3612
3607
  for (const diagnostic of payload.diagnostics) {
3613
3608
  switch (diagnostic.category) {
3614
3609
  case "error":
3615
- this.#abortController.abort();
3616
3610
  process.exitCode = 1;
3617
3611
  this.#logger.writeError(diagnosticText(diagnostic));
3618
3612
  break;
@@ -3640,10 +3634,10 @@ class Cli {
3640
3634
  return;
3641
3635
  }
3642
3636
  if (commandLineArguments.includes("--update")) {
3643
- await this.#storeService.update(this.#abortController.signal);
3637
+ await this.#storeService.update();
3644
3638
  return;
3645
3639
  }
3646
- const compiler = await this.#storeService.load(Environment.typescriptPath == null ? "latest" : "current", this.#abortController.signal);
3640
+ const compiler = await this.#storeService.load(Environment.typescriptPath == null ? "latest" : "current");
3647
3641
  if (!compiler) {
3648
3642
  return;
3649
3643
  }
@@ -3670,12 +3664,12 @@ class Cli {
3670
3664
  }
3671
3665
  if (configService.commandLineOptions.install === true) {
3672
3666
  for (const tag of resolvedConfig.target) {
3673
- await this.#storeService.install(tag, this.#abortController.signal);
3667
+ await this.#storeService.install(tag);
3674
3668
  }
3675
3669
  return;
3676
3670
  }
3677
3671
  let testFiles = [];
3678
- if (!resolvedConfig.disableTestFileLookup) {
3672
+ if (resolvedConfig.testFileMatch.length !== 0) {
3679
3673
  testFiles = configService.selectTestFiles();
3680
3674
  if (testFiles.length === 0) {
3681
3675
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tstyche",
3
- "version": "1.0.0-rc",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "The Essential Type Testing Tool.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -59,9 +59,9 @@
59
59
  "devDependencies": {
60
60
  "@jest/globals": "29.7.0",
61
61
  "@rollup/plugin-typescript": "11.1.6",
62
- "@types/node": "20.11.8",
63
- "@typescript-eslint/eslint-plugin": "6.19.1",
64
- "@typescript-eslint/parser": "6.19.1",
62
+ "@types/node": "20.11.17",
63
+ "@typescript-eslint/eslint-plugin": "6.21.0",
64
+ "@typescript-eslint/parser": "6.21.0",
65
65
  "ajv": "8.12.0",
66
66
  "c8": "9.1.0",
67
67
  "cspell": "8.3.2",
@@ -71,10 +71,10 @@
71
71
  "eslint-plugin-import": "2.29.1",
72
72
  "eslint-plugin-jest": "27.6.3",
73
73
  "eslint-plugin-jest-formatting": "3.1.0",
74
- "eslint-plugin-simple-import-sort": "10.0.0",
74
+ "eslint-plugin-simple-import-sort": "11.0.0",
75
75
  "jest": "29.7.0",
76
76
  "jest-serializer-ansi-escapes": "2.0.1",
77
- "magic-string": "0.30.5",
77
+ "magic-string": "0.30.7",
78
78
  "rollup": "4.9.6",
79
79
  "rollup-plugin-dts": "6.1.0",
80
80
  "ts-node": "10.9.2",
@@ -89,7 +89,7 @@
89
89
  "optional": true
90
90
  }
91
91
  },
92
- "packageManager": "yarn@3.7.0",
92
+ "packageManager": "yarn@3.8.0",
93
93
  "engines": {
94
94
  "node": "^16.14 || 18.x || >=20.x"
95
95
  }