@d1g1tal/tsbuild 1.1.1 → 1.1.2
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/dist/{YGGCSRAC.js → 3F6EMFXF.js} +20 -2
- package/dist/index.js +1 -1
- package/dist/tsbuild.js +2 -2
- package/package.json +1 -1
|
@@ -794,6 +794,8 @@ import {
|
|
|
794
794
|
isModuleDeclaration as isModuleDeclaration2,
|
|
795
795
|
isNamedExports as isNamedExports2,
|
|
796
796
|
isIdentifier as isIdentifier2,
|
|
797
|
+
isNamespaceImport,
|
|
798
|
+
isQualifiedName,
|
|
797
799
|
resolveModuleName,
|
|
798
800
|
isExportAssignment,
|
|
799
801
|
forEachChild as forEachChild2
|
|
@@ -1140,11 +1142,14 @@ var DeclarationBundler = class {
|
|
|
1140
1142
|
moduleRenames.set(name, renamed);
|
|
1141
1143
|
}
|
|
1142
1144
|
}
|
|
1145
|
+
const bundledNamespaceAliases = /* @__PURE__ */ new Set();
|
|
1143
1146
|
for (const statement of sourceFile.statements) {
|
|
1144
1147
|
if (isImportDeclaration2(statement)) {
|
|
1145
1148
|
const moduleSpecifier = statement.moduleSpecifier.text;
|
|
1146
1149
|
if (this.isExternal(moduleSpecifier) || !bundledImportPaths.includes(moduleSpecifier)) {
|
|
1147
1150
|
externalImports.push(code.substring(statement.pos, statement.end).trim());
|
|
1151
|
+
} else if (statement.importClause?.namedBindings && isNamespaceImport(statement.importClause.namedBindings)) {
|
|
1152
|
+
bundledNamespaceAliases.add(statement.importClause.namedBindings.name.text);
|
|
1148
1153
|
}
|
|
1149
1154
|
magic.remove(statement.pos, statement.end);
|
|
1150
1155
|
} else if (isExportDeclaration2(statement)) {
|
|
@@ -1181,7 +1186,20 @@ var DeclarationBundler = class {
|
|
|
1181
1186
|
}
|
|
1182
1187
|
forEachChild2(node, visit);
|
|
1183
1188
|
};
|
|
1184
|
-
|
|
1189
|
+
for (const statement of sourceFile.statements) {
|
|
1190
|
+
if (!isImportDeclaration2(statement) && !isExportDeclaration2(statement) && !isExportAssignment(statement)) {
|
|
1191
|
+
visit(statement);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
if (bundledNamespaceAliases.size > 0) {
|
|
1196
|
+
const visitQualified = (node) => {
|
|
1197
|
+
if (isQualifiedName(node) && isIdentifier2(node.left) && bundledNamespaceAliases.has(node.left.text)) {
|
|
1198
|
+
magic.remove(node.left.getStart(), node.right.getStart());
|
|
1199
|
+
}
|
|
1200
|
+
forEachChild2(node, visitQualified);
|
|
1201
|
+
};
|
|
1202
|
+
forEachChild2(sourceFile, visitQualified);
|
|
1185
1203
|
}
|
|
1186
1204
|
const finalValueExports = [...new Set(valueExports.map(exportsMapper))];
|
|
1187
1205
|
const valueExportsSet = new Set(finalValueExports);
|
|
@@ -1982,7 +2000,7 @@ var _TypeScriptProject = class _TypeScriptProject {
|
|
|
1982
2000
|
return Files.empty(this.buildConfiguration.outDir);
|
|
1983
2001
|
}
|
|
1984
2002
|
async build() {
|
|
1985
|
-
Logger.header(`\u{1F680} tsbuild v${"1.1.
|
|
2003
|
+
Logger.header(`\u{1F680} tsbuild v${"1.1.2"}${this.configuration.compilerOptions.incremental ? " [incremental]" : ""}`);
|
|
1986
2004
|
try {
|
|
1987
2005
|
const processes = [];
|
|
1988
2006
|
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 "./3F6EMFXF.js";
|
|
6
6
|
import "./VMWNQL2J.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.1.
|
|
33
|
+
console.log("1.1.2");
|
|
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.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"packageManager": "pnpm@10.29.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",
|