@d1g1tal/tsbuild 1.8.8 → 1.8.9

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,3 +1,22 @@
1
+ ## [1.8.9](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.8.8...v1.8.9) (2026-05-18)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **diagnostics:** deduplicate type-checking errors (0732f6be4b4cf260d500602411781297b348fb29)
6
+ - Changes diagnostic array type to allow mutability
7
+ - Implements Map-based deduplication for semantic diagnostics
8
+ - Deduplicates errors based on file name, start position, and error code
9
+ - Adds comprehensive unit tests to verify deduplication behavior under various compiler configurations
10
+
11
+
12
+ ### Build System
13
+
14
+ * **config:** enable stricter typescript compiler options (9c51544b3d21df253beb5a31cd5e1559c9982044)
15
+ - Enables noUnusedLocals, noUnusedParameters, and noPropertyAccessFromIndexSignature in tsconfig
16
+ - Changes property access to index signatures for process.env and module default exports
17
+ - Removes unused TypeScript Node import from type definitions
18
+ - Removes unused elapsed performance measurement method from TypeScriptProject
19
+
1
20
  ## [1.8.8](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.8.7...v1.8.8) (2026-05-17)
2
21
 
3
22
  ### Bug Fixes
@@ -169,8 +169,8 @@ var Files = class {
169
169
  // src/text-formatter.ts
170
170
  import { isatty } from "node:tty";
171
171
  var { env = {}, platform = "" } = process;
172
- var isDumbTerminal = env.TERM === "dumb";
173
- var isCompatibleTerminal = isatty(1) && env.TERM && !isDumbTerminal;
172
+ var isDumbTerminal = env["TERM"] === "dumb";
173
+ var isCompatibleTerminal = isatty(1) && env["TERM"] && !isDumbTerminal;
174
174
  var isColorSupported = !("NO_COLOR" in env) && ("FORCE_COLOR" in env || platform === "win32" && !isDumbTerminal || isCompatibleTerminal);
175
175
  var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => {
176
176
  return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
@@ -1622,7 +1622,7 @@ async function resolveReference(reference, projectDir) {
1622
1622
  } catch (error) {
1623
1623
  throw new ConfigurationError(`Failed to load plugin "${specifier}": ${error instanceof Error ? error.message : String(error)}`);
1624
1624
  }
1625
- const defaultExport = module.default;
1625
+ const defaultExport = module["default"];
1626
1626
  if (defaultExport === void 0) {
1627
1627
  throw new ConfigurationError(`Plugin "${specifier}" has no default export. The module must export a plugin factory function or Plugin object as its default export.`);
1628
1628
  }
@@ -2650,7 +2650,7 @@ var _TypeScriptProject = class _TypeScriptProject {
2650
2650
  await this.pendingStaleOutputsCleanup;
2651
2651
  }
2652
2652
  async build() {
2653
- Logger.header(`${tsLogo} tsbuild v${"1.8.8"}${this.configuration.compilerOptions.incremental && this.configuration.buildCache?.isValid() ? " [incremental]" : ""}`);
2653
+ Logger.header(`${tsLogo} tsbuild v${"1.8.9"}${this.configuration.compilerOptions.incremental && this.configuration.buildCache?.isValid() ? " [incremental]" : ""}`);
2654
2654
  try {
2655
2655
  const processes = [];
2656
2656
  const buildCache = this.configuration.buildCache;
@@ -2735,7 +2735,14 @@ var _TypeScriptProject = class _TypeScriptProject {
2735
2735
  allDiagnostics = [...this.builderProgram.getSemanticDiagnostics(), ...diagnostics];
2736
2736
  }
2737
2737
  if (allDiagnostics.length > 0) {
2738
- _TypeScriptProject.handleTypeErrors("Type-checking failed", allDiagnostics, this.directory);
2738
+ const unique = /* @__PURE__ */ new Map();
2739
+ for (const diagnostic of allDiagnostics) {
2740
+ const key = `${diagnostic.file?.fileName ?? ""}:${diagnostic.start ?? -1}:${diagnostic.code}`;
2741
+ if (!unique.has(key)) {
2742
+ unique.set(key, diagnostic);
2743
+ }
2744
+ }
2745
+ _TypeScriptProject.handleTypeErrors("Type-checking failed", Array.from(unique.values()), this.directory);
2739
2746
  }
2740
2747
  return this.fileManager.finalize() || !this.configuration.compilerOptions.declaration;
2741
2748
  }
@@ -3087,18 +3094,6 @@ var _TypeScriptProject = class _TypeScriptProject {
3087
3094
  }
3088
3095
  throw new TypeCheckError(message, formatDiagnostics(diagnostics, diagnosticsHost));
3089
3096
  }
3090
- /**
3091
- * Calculates elapsed time since a performance mark and clears the mark.
3092
- * @param markName - The name of the performance mark to measure from
3093
- * @returns Elapsed time in milliseconds
3094
- */
3095
- static elapsed(markName) {
3096
- const { name, startTime } = performance2.mark(`${markName}:end`);
3097
- const ms = ~~(startTime - performance2.getEntriesByName(markName, "mark")[0].startTime);
3098
- performance2.clearMarks(markName);
3099
- performance2.clearMarks(name);
3100
- return ms;
3101
- }
3102
3097
  };
3103
3098
  _init3 = __decoratorStart(null);
3104
3099
  __decorateElement(_init3, 1, "build", _build_dec, _TypeScriptProject);
package/dist/tsbuild.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BuildError,
4
4
  TypeScriptProject
5
- } from "./RJIPAUMH.js";
5
+ } from "./QXXMXCRU.js";
6
6
  import "./QL4XMDMJ.js";
7
7
 
8
8
  // src/tsbuild.ts
@@ -30,7 +30,7 @@ if (help) {
30
30
  process.exit(0);
31
31
  }
32
32
  if (version) {
33
- console.log("1.8.8");
33
+ console.log("1.8.9");
34
34
  process.exit(0);
35
35
  }
36
36
  var typeScriptOptions = {
@@ -389,12 +389,6 @@ declare class TypeScriptProject implements Closable {
389
389
  * @param projectDirectory - The project directory.
390
390
  */
391
391
  private static handleTypeErrors;
392
- /**
393
- * Calculates elapsed time since a performance mark and clears the mark.
394
- * @param markName - The name of the performance mark to measure from
395
- * @returns Elapsed time in milliseconds
396
- */
397
- private static elapsed;
398
392
  }
399
393
 
400
394
  export { Plugin, TypeScriptProject };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TypeScriptProject
3
- } from "./RJIPAUMH.js";
3
+ } from "./QXXMXCRU.js";
4
4
  import "./QL4XMDMJ.js";
5
5
  export {
6
6
  TypeScriptProject
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d1g1tal/tsbuild",
3
3
  "author": "D1g1talEntr0py",
4
- "version": "1.8.8",
4
+ "version": "1.8.9",
5
5
  "license": "MIT",
6
6
  "description": "A fast, ESM-only TypeScript build tool combining the TypeScript API for type checking and declaration generation, esbuild for bundling, and SWC for decorator metadata.",
7
7
  "homepage": "https://github.com/D1g1talEntr0py/tsbuild#readme",