@d1g1tal/tsbuild 1.8.4 → 1.8.5
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 +17 -0
- package/dist/{23A5VAYC.js → WCBM4DJB.js} +18 -21
- package/dist/tsbuild.js +2 -2
- package/dist/type-script-project.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [1.8.5](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.8.4...v1.8.5) (2026-04-14)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **iife:** resolve paths absolutely and output to nested directory (7514592a039f02e070b71f4c30c6cd88a99bd17d)
|
|
6
|
+
- Changes IIFE output to resolve paths absolutely instead of relatively
|
|
7
|
+
- Creates a dedicated `iife` output directory under the main `outdir`
|
|
8
|
+
- Fixes virtual loader plugin to handle the new directory structure properly
|
|
9
|
+
- Adds an integration test for IIFE builds
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Build System
|
|
13
|
+
|
|
14
|
+
* **deps-dev:** bump typescript-eslint dependencies (e4abe9fe4083b89953f94f4cd17622387844b844)
|
|
15
|
+
- Updates `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`, and `typescript-eslint` from 8.58.1 to 8.58.2
|
|
16
|
+
- Updates `pnpm-lock.yaml` with the new versions and their sub-dependencies
|
|
17
|
+
|
|
1
18
|
## [1.8.4](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.8.3...v1.8.4) (2026-04-12)
|
|
2
19
|
|
|
3
20
|
### Performance Improvements
|
|
@@ -1626,6 +1626,7 @@ function extractEntryNames(entryPoints) {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
var exportRegex = /export\s*\{([^}]*)\};?/g;
|
|
1628
1628
|
var exportAliasRegex = /^(\w+)\s+as\s+(\w+)$/;
|
|
1629
|
+
var namespace = "iife";
|
|
1629
1630
|
function wrapAsIife(text, globalName) {
|
|
1630
1631
|
const exportIndex = text.lastIndexOf("export");
|
|
1631
1632
|
if (exportIndex === -1) {
|
|
@@ -1661,26 +1662,25 @@ async function buildIife(outputs, entryPointNames, outdir, globalName, sourcemap
|
|
|
1661
1662
|
const fileContents = /* @__PURE__ */ new Map();
|
|
1662
1663
|
for (const outputPath of Object.keys(outputs)) {
|
|
1663
1664
|
if (outputPath.endsWith(jsExtension)) {
|
|
1664
|
-
fileContents.set(outputPath, await readFile2(outputPath, "utf8"));
|
|
1665
|
+
fileContents.set(resolve2(outputPath), await readFile2(outputPath, "utf8"));
|
|
1665
1666
|
}
|
|
1666
1667
|
}
|
|
1667
1668
|
const validEntries = [];
|
|
1668
1669
|
for (const name of entryPointNames) {
|
|
1669
|
-
const
|
|
1670
|
-
if (fileContents.has(
|
|
1671
|
-
validEntries.push({ name,
|
|
1670
|
+
const path = Paths.absolute(outdir, name + jsExtension);
|
|
1671
|
+
if (fileContents.has(path)) {
|
|
1672
|
+
validEntries.push({ name, path });
|
|
1672
1673
|
}
|
|
1673
1674
|
}
|
|
1674
1675
|
if (validEntries.length === 0) {
|
|
1675
1676
|
return [];
|
|
1676
1677
|
}
|
|
1677
1678
|
const hasSourceMap = sourcemap !== void 0 && sourcemap !== false;
|
|
1678
|
-
const
|
|
1679
|
-
const
|
|
1680
|
-
await
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
entryPoints: { [name]: absPath },
|
|
1679
|
+
const plugins = [virtualLoaderPlugin(fileContents)];
|
|
1680
|
+
const iifeOutdir = await mkdir3(join(outdir, namespace), { recursive: true });
|
|
1681
|
+
const results = await Promise.all(validEntries.map(({ name, path }) => {
|
|
1682
|
+
return esbuild({
|
|
1683
|
+
entryPoints: { [name]: path },
|
|
1684
1684
|
bundle: true,
|
|
1685
1685
|
format: "esm",
|
|
1686
1686
|
splitting: false,
|
|
@@ -1688,9 +1688,9 @@ async function buildIife(outputs, entryPointNames, outdir, globalName, sourcemap
|
|
|
1688
1688
|
sourcemap: hasSourceMap ? "external" : false,
|
|
1689
1689
|
write: false,
|
|
1690
1690
|
logLevel: "warning",
|
|
1691
|
-
plugins
|
|
1692
|
-
})
|
|
1693
|
-
));
|
|
1691
|
+
plugins
|
|
1692
|
+
});
|
|
1693
|
+
}));
|
|
1694
1694
|
const written = [];
|
|
1695
1695
|
const writes = [];
|
|
1696
1696
|
const cwd = process.cwd();
|
|
@@ -1719,23 +1719,20 @@ function virtualLoaderPlugin(fileContents) {
|
|
|
1719
1719
|
setup(build) {
|
|
1720
1720
|
build.onResolve({ filter: /.*/ }, (args) => {
|
|
1721
1721
|
if (args.kind === "entry-point") {
|
|
1722
|
-
return { path: args.path, namespace
|
|
1722
|
+
return { path: args.path, namespace };
|
|
1723
1723
|
}
|
|
1724
1724
|
if (!args.path.startsWith(".") && !args.path.startsWith("/")) {
|
|
1725
1725
|
return { external: true };
|
|
1726
1726
|
}
|
|
1727
1727
|
const resolved = resolve2(args.resolveDir, args.path);
|
|
1728
1728
|
if (fileContents.has(resolved)) {
|
|
1729
|
-
return { path: resolved, namespace
|
|
1729
|
+
return { path: resolved, namespace };
|
|
1730
1730
|
}
|
|
1731
1731
|
return { external: true };
|
|
1732
1732
|
});
|
|
1733
|
-
build.onLoad({ filter: /.*/, namespace
|
|
1733
|
+
build.onLoad({ filter: /.*/, namespace }, (args) => {
|
|
1734
1734
|
const contents = fileContents.get(args.path);
|
|
1735
|
-
|
|
1736
|
-
return { contents, loader: "js", resolveDir: dirname2(args.path) };
|
|
1737
|
-
}
|
|
1738
|
-
return null;
|
|
1735
|
+
return contents === void 0 ? null : { contents, loader: "js", resolveDir: dirname2(args.path) };
|
|
1739
1736
|
});
|
|
1740
1737
|
}
|
|
1741
1738
|
};
|
|
@@ -2427,7 +2424,7 @@ var _TypeScriptProject = class _TypeScriptProject {
|
|
|
2427
2424
|
return Files.empty(this.buildConfiguration.outDir);
|
|
2428
2425
|
}
|
|
2429
2426
|
async build() {
|
|
2430
|
-
Logger.header(`${tsLogo} tsbuild v${"1.8.
|
|
2427
|
+
Logger.header(`${tsLogo} tsbuild v${"1.8.5"}${this.configuration.compilerOptions.incremental && this.configuration.buildCache?.isValid() ? " [incremental]" : ""}`);
|
|
2431
2428
|
try {
|
|
2432
2429
|
const processes = [];
|
|
2433
2430
|
const filesWereEmitted = await this.typeCheck();
|
package/dist/tsbuild.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BuildError,
|
|
4
4
|
TypeScriptProject
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./WCBM4DJB.js";
|
|
6
6
|
import "./JKGYA2AW.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.
|
|
33
|
+
console.log("1.8.5");
|
|
34
34
|
process.exit(0);
|
|
35
35
|
}
|
|
36
36
|
var typeScriptOptions = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d1g1tal/tsbuild",
|
|
3
3
|
"author": "D1g1talEntr0py",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.5",
|
|
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",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@eslint/js": "^10.0.1",
|
|
53
53
|
"@types/node": "^25.6.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^8.58.
|
|
55
|
-
"@typescript-eslint/parser": "^8.58.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
|
55
|
+
"@typescript-eslint/parser": "^8.58.2",
|
|
56
56
|
"@vitest/coverage-v8": "^4.1.4",
|
|
57
57
|
"eslint": "^10.2.0",
|
|
58
58
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"memfs": "^4.57.1",
|
|
61
61
|
"tsx": "^4.21.0",
|
|
62
62
|
"typescript": "^6.0.2",
|
|
63
|
-
"typescript-eslint": "^8.58.
|
|
63
|
+
"typescript-eslint": "^8.58.2",
|
|
64
64
|
"vitest": "^4.1.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|