@d1g1tal/tsbuild 1.3.0 → 1.3.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/README.md +16 -14
- package/dist/{3HKDLNVH.js → KY7JTF4C.js} +8 -4
- package/dist/index.js +1 -1
- package/dist/tsbuild.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# tsbuild
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@d1g1tal/tsbuild)
|
|
4
|
+
[](https://www.npmjs.com/package/@d1g1tal/tsbuild)
|
|
5
5
|
[](https://github.com/D1g1talEntr0py/tsbuild/actions/workflows/ci.yml)
|
|
6
6
|
[](https://codecov.io/gh/D1g1talEntr0py/tsbuild)
|
|
7
7
|
[](https://github.com/D1g1talEntr0py/tsbuild/blob/main/LICENSE)
|
|
8
|
-
[](https://nodejs.org)
|
|
9
9
|
[](https://www.typescriptlang.org/)
|
|
10
10
|
|
|
11
11
|
A TypeScript build tool that combines three tools into one workflow: **TypeScript's type system** for correctness, **esbuild** for speed, and **SWC** for legacy decorator metadata (optional, not installed by default). Built for modern ESM-only projects on Node.js 20.16.0+.
|
|
@@ -478,17 +478,19 @@ The TypeScript declaration bundling system was originally inspired by rollup-plu
|
|
|
478
478
|
|
|
479
479
|
## Comparison with Other Tools
|
|
480
480
|
|
|
481
|
-
| Feature | tsbuild | tsup | tsc |
|
|
482
|
-
|
|
483
|
-
| Type Checking | ✅ Full | ✅ Full | ✅ Full |
|
|
484
|
-
| Bundling | ✅ esbuild | ✅ esbuild | ❌ N/A |
|
|
485
|
-
| Declaration Bundling | ✅ Custom Bundler | ✅ rollup-plugin-dts | ❌ N/A |
|
|
486
|
-
| TC39 Decorators | ✅ Native | ✅ Native | ✅ Native |
|
|
487
|
-
| Legacy Decorator Metadata | ✅ SWC (manual install) | ✅ SWC | ✅ Native |
|
|
488
|
-
| CommonJS Support | ❌ None | ✅ Yes | ✅ Yes |
|
|
489
|
-
| Watch Mode | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
490
|
-
| Incremental Builds | ✅ Yes | ⚠️ Limited | ✅ Yes |
|
|
491
|
-
| Production Ready | ⚠️ Experimental | ✅ Yes | ✅ Yes |
|
|
481
|
+
| Feature | tsbuild | tsup | tsdown | tsc |
|
|
482
|
+
|---------|---------|------|--------|-----|
|
|
483
|
+
| Type Checking | ✅ Full | ✅ Full | ⚠️ Via DTS only | ✅ Full |
|
|
484
|
+
| Bundling | ✅ esbuild | ✅ esbuild | ✅ Rolldown | ❌ N/A |
|
|
485
|
+
| Declaration Bundling | ✅ Custom Bundler | ✅ rollup-plugin-dts¹ | ✅ rolldown-plugin-dts | ❌ N/A |
|
|
486
|
+
| TC39 Decorators | ✅ Native | ✅ Native | ✅ Native | ✅ Native |
|
|
487
|
+
| Legacy Decorator Metadata | ✅ SWC (manual install) | ✅ SWC | ✅ SWC | ✅ Native |
|
|
488
|
+
| CommonJS Support | ❌ None | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
489
|
+
| Watch Mode | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
490
|
+
| Incremental Builds | ✅ Yes | ⚠️ Limited | ⚠️ Limited | ✅ Yes |
|
|
491
|
+
| Production Ready | ⚠️ Experimental | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
492
|
+
|
|
493
|
+
> ¹ tsup uses **esbuild** for JS bundling and **rollup-plugin-dts** (a Rollup plugin) for declaration bundling. `--experimental-dts` uses `@microsoft/api-extractor` instead. An optional `--treeshake` flag also delegates tree-shaking to Rollup.
|
|
492
494
|
|
|
493
495
|
## Development
|
|
494
496
|
|
|
@@ -1943,7 +1943,7 @@ var IncrementalBuildCache = class {
|
|
|
1943
1943
|
};
|
|
1944
1944
|
|
|
1945
1945
|
// src/entry-points.ts
|
|
1946
|
-
var importConditions = ["import", "default"];
|
|
1946
|
+
var importConditions = ["import", "node", "module", "default"];
|
|
1947
1947
|
function stemOf(filePath) {
|
|
1948
1948
|
const base = filePath.split("/").at(-1) ?? "";
|
|
1949
1949
|
const dot = base.indexOf(".");
|
|
@@ -1979,8 +1979,12 @@ function resolveConditionalExport(exportValue) {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
for (const condition of importConditions) {
|
|
1981
1981
|
const value = exportValue[condition];
|
|
1982
|
-
if (
|
|
1983
|
-
|
|
1982
|
+
if (value === void 0) {
|
|
1983
|
+
continue;
|
|
1984
|
+
}
|
|
1985
|
+
const resolved = resolveConditionalExport(value);
|
|
1986
|
+
if (resolved !== void 0) {
|
|
1987
|
+
return resolved;
|
|
1984
1988
|
}
|
|
1985
1989
|
}
|
|
1986
1990
|
return void 0;
|
|
@@ -2087,7 +2091,7 @@ var _TypeScriptProject = class _TypeScriptProject {
|
|
|
2087
2091
|
return Files.empty(this.buildConfiguration.outDir);
|
|
2088
2092
|
}
|
|
2089
2093
|
async build() {
|
|
2090
|
-
Logger.header(`\u{1F680} tsbuild v${"1.3.
|
|
2094
|
+
Logger.header(`\u{1F680} tsbuild v${"1.3.1"}${this.configuration.compilerOptions.incremental ? " [incremental]" : ""}`);
|
|
2091
2095
|
try {
|
|
2092
2096
|
const processes = [];
|
|
2093
2097
|
const filesWereEmitted = await this.typeCheck();
|
package/dist/index.js
CHANGED
package/dist/tsbuild.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BuildError,
|
|
4
4
|
TypeScriptProject
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./KY7JTF4C.js";
|
|
6
6
|
import "./7FPDHUPW.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.3.
|
|
33
|
+
console.log("1.3.1");
|
|
34
34
|
process.exit(0);
|
|
35
35
|
}
|
|
36
36
|
var typeScriptOptions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d1g1tal/tsbuild",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"packageManager": "pnpm@10.30.3",
|
|
5
5
|
"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.",
|
|
6
6
|
"type": "module",
|