@d1g1tal/tsbuild 1.1.2 โ†’ 1.2.0

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/README.md CHANGED
@@ -24,6 +24,7 @@ A self-hosting TypeScript build tool that combines the best of three worlds: **T
24
24
  - ๐ŸŽฏ **ESM-Only** - Pure ESM project with no CommonJS support by design
25
25
  - ๐Ÿงน **Clean Builds** - Optional output directory cleaning before builds
26
26
  - ๐Ÿ“Š **Performance Metrics** - Built-in performance logging with detailed timing information
27
+ - ๐Ÿ”Ž **Zero-Config Entry Points** - Auto-infers entry points from `package.json` when none are configured
27
28
 
28
29
  ## Why tsbuild?
29
30
 
@@ -177,6 +178,14 @@ tsbuild supports a comprehensive set of options (full schema available in [`sche
177
178
 
178
179
  If a directory is provided, all files within will be used as entry points.
179
180
 
181
+ When `entryPoints` is omitted entirely, tsbuild automatically infers entry points from `package.json` by reverse-mapping output paths back to their source files. Resolution order:
182
+
183
+ 1. **`exports`** - Subpath export map (wildcard patterns are skipped; `import`/`default` conditions are tried in order)
184
+ 2. **`bin`** - Binary entry points
185
+ 3. **`main`** / **`module`** - Legacy fallback (only used when `exports` and `bin` produce no results)
186
+
187
+ > **Note:** Auto-inference requires that your `package.json` output paths fall inside the `outDir` declared in `tsconfig.json` and that the corresponding source files exist under `src/`.
188
+
180
189
  ### Declaration Bundling
181
190
 
182
191
  ```jsonc
@@ -322,6 +331,8 @@ The declaration bundling system (`src/dts/declaration-bundler.ts`) is a custom i
322
331
 
323
332
  This custom bundler works entirely with in-memory declaration files, avoiding the overhead of duplicate TypeScript Program creation with some other bundlers.
324
333
 
334
+ When a circular dependency is detected between declaration files, tsbuild emits a warning with the full cycle path (e.g., `a.d.ts -> b.d.ts -> a.d.ts`) rather than failing silently or crashing.
335
+
325
336
  ## Performance
326
337
 
327
338
  tsbuild is designed for speed:
@@ -332,9 +343,9 @@ tsbuild is designed for speed:
332
343
  - **Smart caching** - Leverages `.tsbuildinfo` for TypeScript incremental compilation
333
344
 
334
345
  Typical build times for the tsbuild project itself:
335
- - Full build: ~400-600ms
336
- - Incremental rebuild: ~100-200ms
337
- - Type-check only: ~50-100ms
346
+ - Full build: ~450-500ms
347
+ - Incremental rebuild (no changes): ~5ms
348
+ - Type-check only: ~10-15ms
338
349
 
339
350
  ## Acknowledgments
340
351
 
@@ -258,7 +258,6 @@ declare class TypeScriptProject implements Closable {
258
258
  private readonly pendingChanges;
259
259
  private readonly buildDependencies;
260
260
  private dependencyPaths?;
261
- private packageJson?;
262
261
  /**
263
262
  * Creates a TypeScript project and prepares it for building/bundling.
264
263
  * @param directory - Project root directory (defaults to current working directory)