@xylabs/ts-scripts-yarn3 6.1.4 → 6.1.6
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/actions/index.mjs +57 -60
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +57 -4
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +57 -60
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +68 -76
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +55 -2
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +57 -60
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +57 -4
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +59 -6
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +59 -6
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +59 -6
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +57 -4
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +59 -6
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +59 -6
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +57 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/dist/types/actions/build.d.ts +0 -9
- package/dist/types/actions/build.d.ts.map +0 -1
- package/dist/types/actions/clean-docs.d.ts +0 -2
- package/dist/types/actions/clean-docs.d.ts.map +0 -1
- package/dist/types/actions/clean-eslint.d.ts +0 -2
- package/dist/types/actions/clean-eslint.d.ts.map +0 -1
- package/dist/types/actions/clean-jest.d.ts +0 -2
- package/dist/types/actions/clean-jest.d.ts.map +0 -1
- package/dist/types/actions/clean.d.ts +0 -12
- package/dist/types/actions/clean.d.ts.map +0 -1
- package/dist/types/actions/compile-types.d.ts +0 -16
- package/dist/types/actions/compile-types.d.ts.map +0 -1
- package/dist/types/actions/compile.d.ts +0 -19
- package/dist/types/actions/compile.d.ts.map +0 -1
- package/dist/types/actions/copy-assets.d.ts +0 -6
- package/dist/types/actions/copy-assets.d.ts.map +0 -1
- package/dist/types/actions/cycle.d.ts +0 -2
- package/dist/types/actions/cycle.d.ts.map +0 -1
- package/dist/types/actions/dead.d.ts +0 -2
- package/dist/types/actions/dead.d.ts.map +0 -1
- package/dist/types/actions/deploy-major.d.ts +0 -2
- package/dist/types/actions/deploy-major.d.ts.map +0 -1
- package/dist/types/actions/deploy-minor.d.ts +0 -2
- package/dist/types/actions/deploy-minor.d.ts.map +0 -1
- package/dist/types/actions/deploy-next.d.ts +0 -2
- package/dist/types/actions/deploy-next.d.ts.map +0 -1
- package/dist/types/actions/deploy.d.ts +0 -2
- package/dist/types/actions/deploy.d.ts.map +0 -1
- package/dist/types/actions/deps.d.ts +0 -13
- package/dist/types/actions/deps.d.ts.map +0 -1
- package/dist/types/actions/dupdeps.d.ts +0 -2
- package/dist/types/actions/dupdeps.d.ts.map +0 -1
- package/dist/types/actions/fix.d.ts +0 -3
- package/dist/types/actions/fix.d.ts.map +0 -1
- package/dist/types/actions/gen-docs.d.ts +0 -11
- package/dist/types/actions/gen-docs.d.ts.map +0 -1
- package/dist/types/actions/gitignore-gen.d.ts +0 -2
- package/dist/types/actions/gitignore-gen.d.ts.map +0 -1
- package/dist/types/actions/gitlint-fix.d.ts +0 -2
- package/dist/types/actions/gitlint-fix.d.ts.map +0 -1
- package/dist/types/actions/gitlint.d.ts +0 -2
- package/dist/types/actions/gitlint.d.ts.map +0 -1
- package/dist/types/actions/index.d.ts +0 -39
- package/dist/types/actions/index.d.ts.map +0 -1
- package/dist/types/actions/knip.d.ts +0 -2
- package/dist/types/actions/knip.d.ts.map +0 -1
- package/dist/types/actions/license.d.ts +0 -2
- package/dist/types/actions/license.d.ts.map +0 -1
- package/dist/types/actions/lint.d.ts +0 -14
- package/dist/types/actions/lint.d.ts.map +0 -1
- package/dist/types/actions/npmignore-gen.d.ts +0 -2
- package/dist/types/actions/npmignore-gen.d.ts.map +0 -1
- package/dist/types/actions/package/clean-outputs.d.ts +0 -2
- package/dist/types/actions/package/clean-outputs.d.ts.map +0 -1
- package/dist/types/actions/package/clean-typescript.d.ts +0 -2
- package/dist/types/actions/package/clean-typescript.d.ts.map +0 -1
- package/dist/types/actions/package/clean.d.ts +0 -2
- package/dist/types/actions/package/clean.d.ts.map +0 -1
- package/dist/types/actions/package/compile/XyConfig.d.ts +0 -58
- package/dist/types/actions/package/compile/XyConfig.d.ts.map +0 -1
- package/dist/types/actions/package/compile/buildEntries.d.ts +0 -3
- package/dist/types/actions/package/compile/buildEntries.d.ts.map +0 -1
- package/dist/types/actions/package/compile/compile.d.ts +0 -3
- package/dist/types/actions/package/compile/compile.d.ts.map +0 -1
- package/dist/types/actions/package/compile/compileTypes.d.ts +0 -3
- package/dist/types/actions/package/compile/compileTypes.d.ts.map +0 -1
- package/dist/types/actions/package/compile/copyTypeFiles.d.ts +0 -3
- package/dist/types/actions/package/compile/copyTypeFiles.d.ts.map +0 -1
- package/dist/types/actions/package/compile/deepMerge.d.ts +0 -4
- package/dist/types/actions/package/compile/deepMerge.d.ts.map +0 -1
- package/dist/types/actions/package/compile/getCompilerOptions.d.ts +0 -3
- package/dist/types/actions/package/compile/getCompilerOptions.d.ts.map +0 -1
- package/dist/types/actions/package/compile/index.d.ts +0 -7
- package/dist/types/actions/package/compile/index.d.ts.map +0 -1
- package/dist/types/actions/package/compile/inputs.d.ts +0 -2
- package/dist/types/actions/package/compile/inputs.d.ts.map +0 -1
- package/dist/types/actions/package/compile/packageCompileTsc.d.ts +0 -4
- package/dist/types/actions/package/compile/packageCompileTsc.d.ts.map +0 -1
- package/dist/types/actions/package/compile/packageCompileTscTypes.d.ts +0 -4
- package/dist/types/actions/package/compile/packageCompileTscTypes.d.ts.map +0 -1
- package/dist/types/actions/package/compile/packageCompileTsup.d.ts +0 -5
- package/dist/types/actions/package/compile/packageCompileTsup.d.ts.map +0 -1
- package/dist/types/actions/package/copy-assets.d.ts +0 -5
- package/dist/types/actions/package/copy-assets.d.ts.map +0 -1
- package/dist/types/actions/package/deps.d.ts +0 -2
- package/dist/types/actions/package/deps.d.ts.map +0 -1
- package/dist/types/actions/package/gen-docs.d.ts +0 -2
- package/dist/types/actions/package/gen-docs.d.ts.map +0 -1
- package/dist/types/actions/package/index.d.ts +0 -11
- package/dist/types/actions/package/index.d.ts.map +0 -1
- package/dist/types/actions/package/lint.d.ts +0 -2
- package/dist/types/actions/package/lint.d.ts.map +0 -1
- package/dist/types/actions/package/publint.d.ts +0 -5
- package/dist/types/actions/package/publint.d.ts.map +0 -1
- package/dist/types/actions/package/recompile.d.ts +0 -2
- package/dist/types/actions/package/recompile.d.ts.map +0 -1
- package/dist/types/actions/publint.d.ts +0 -12
- package/dist/types/actions/publint.d.ts.map +0 -1
- package/dist/types/actions/rebuild.d.ts +0 -6
- package/dist/types/actions/rebuild.d.ts.map +0 -1
- package/dist/types/actions/recompile.d.ts +0 -16
- package/dist/types/actions/recompile.d.ts.map +0 -1
- package/dist/types/actions/reinstall.d.ts +0 -2
- package/dist/types/actions/reinstall.d.ts.map +0 -1
- package/dist/types/actions/relint.d.ts +0 -13
- package/dist/types/actions/relint.d.ts.map +0 -1
- package/dist/types/actions/retest.d.ts +0 -2
- package/dist/types/actions/retest.d.ts.map +0 -1
- package/dist/types/actions/sonar.d.ts +0 -2
- package/dist/types/actions/sonar.d.ts.map +0 -1
- package/dist/types/actions/statics.d.ts +0 -2
- package/dist/types/actions/statics.d.ts.map +0 -1
- package/dist/types/actions/test.d.ts +0 -2
- package/dist/types/actions/test.d.ts.map +0 -1
- package/dist/types/actions/up.d.ts +0 -2
- package/dist/types/actions/up.d.ts.map +0 -1
- package/dist/types/actions/updo.d.ts +0 -2
- package/dist/types/actions/updo.d.ts.map +0 -1
- package/dist/types/actions/upplug.d.ts +0 -2
- package/dist/types/actions/upplug.d.ts.map +0 -1
- package/dist/types/actions/upyarn.d.ts +0 -2
- package/dist/types/actions/upyarn.d.ts.map +0 -1
- package/dist/types/actions/yarn3only.d.ts +0 -2
- package/dist/types/actions/yarn3only.d.ts.map +0 -1
- package/dist/types/bin/package/build-only.d.ts +0 -3
- package/dist/types/bin/package/build-only.d.ts.map +0 -1
- package/dist/types/bin/package/build.d.ts +0 -3
- package/dist/types/bin/package/build.d.ts.map +0 -1
- package/dist/types/bin/package/clean-outputs.d.ts +0 -3
- package/dist/types/bin/package/clean-outputs.d.ts.map +0 -1
- package/dist/types/bin/package/clean-typescript.d.ts +0 -3
- package/dist/types/bin/package/clean-typescript.d.ts.map +0 -1
- package/dist/types/bin/package/clean.d.ts +0 -3
- package/dist/types/bin/package/clean.d.ts.map +0 -1
- package/dist/types/bin/package/compile-only.d.ts +0 -3
- package/dist/types/bin/package/compile-only.d.ts.map +0 -1
- package/dist/types/bin/package/compile-tsup.d.ts +0 -3
- package/dist/types/bin/package/compile-tsup.d.ts.map +0 -1
- package/dist/types/bin/package/compile-types.d.ts +0 -3
- package/dist/types/bin/package/compile-types.d.ts.map +0 -1
- package/dist/types/bin/package/compile.d.ts +0 -3
- package/dist/types/bin/package/compile.d.ts.map +0 -1
- package/dist/types/bin/package/copy-assets-cjs.d.ts +0 -3
- package/dist/types/bin/package/copy-assets-cjs.d.ts.map +0 -1
- package/dist/types/bin/package/copy-assets-esm.d.ts +0 -3
- package/dist/types/bin/package/copy-assets-esm.d.ts.map +0 -1
- package/dist/types/bin/package/deps.d.ts +0 -3
- package/dist/types/bin/package/deps.d.ts.map +0 -1
- package/dist/types/bin/package/fix.d.ts +0 -3
- package/dist/types/bin/package/fix.d.ts.map +0 -1
- package/dist/types/bin/package/gen-docs.d.ts +0 -3
- package/dist/types/bin/package/gen-docs.d.ts.map +0 -1
- package/dist/types/bin/package/lint.d.ts +0 -3
- package/dist/types/bin/package/lint.d.ts.map +0 -1
- package/dist/types/bin/package/publint.d.ts +0 -3
- package/dist/types/bin/package/publint.d.ts.map +0 -1
- package/dist/types/bin/package/recompile.d.ts +0 -3
- package/dist/types/bin/package/recompile.d.ts.map +0 -1
- package/dist/types/bin/package/relint.d.ts +0 -3
- package/dist/types/bin/package/relint.d.ts.map +0 -1
- package/dist/types/bin/xy.d.ts +0 -3
- package/dist/types/bin/xy.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/checkResult.d.ts +0 -2
- package/dist/types/lib/checkResult.d.ts.map +0 -1
- package/dist/types/lib/createBuildConfig.d.ts +0 -2
- package/dist/types/lib/createBuildConfig.d.ts.map +0 -1
- package/dist/types/lib/defaultBuildConfig.d.ts +0 -9
- package/dist/types/lib/defaultBuildConfig.d.ts.map +0 -1
- package/dist/types/lib/deleteGlob.d.ts +0 -2
- package/dist/types/lib/deleteGlob.d.ts.map +0 -1
- package/dist/types/lib/dependencies/DuplicateDetector.d.ts +0 -9
- package/dist/types/lib/dependencies/DuplicateDetector.d.ts.map +0 -1
- package/dist/types/lib/dependencies/detectDuplicateDependencies.d.ts +0 -2
- package/dist/types/lib/dependencies/detectDuplicateDependencies.d.ts.map +0 -1
- package/dist/types/lib/dependencies/index.d.ts +0 -3
- package/dist/types/lib/dependencies/index.d.ts.map +0 -1
- package/dist/types/lib/file/ReadFileSyncOptions.d.ts +0 -6
- package/dist/types/lib/file/ReadFileSyncOptions.d.ts.map +0 -1
- package/dist/types/lib/file/constants.d.ts +0 -3
- package/dist/types/lib/file/constants.d.ts.map +0 -1
- package/dist/types/lib/file/fileLines.d.ts +0 -6
- package/dist/types/lib/file/fileLines.d.ts.map +0 -1
- package/dist/types/lib/file/index.d.ts +0 -5
- package/dist/types/lib/file/index.d.ts.map +0 -1
- package/dist/types/lib/file/tryReadFileSync.d.ts +0 -4
- package/dist/types/lib/file/tryReadFileSync.d.ts.map +0 -1
- package/dist/types/lib/generateIgnoreFiles.d.ts +0 -2
- package/dist/types/lib/generateIgnoreFiles.d.ts.map +0 -1
- package/dist/types/lib/index.d.ts +0 -21
- package/dist/types/lib/index.d.ts.map +0 -1
- package/dist/types/lib/jsonFormatters.d.ts +0 -2
- package/dist/types/lib/jsonFormatters.d.ts.map +0 -1
- package/dist/types/lib/loadConfig.d.ts +0 -2
- package/dist/types/lib/loadConfig.d.ts.map +0 -1
- package/dist/types/lib/parsedPackageJSON.d.ts +0 -2
- package/dist/types/lib/parsedPackageJSON.d.ts.map +0 -1
- package/dist/types/lib/processEx.d.ts +0 -2
- package/dist/types/lib/processEx.d.ts.map +0 -1
- package/dist/types/lib/runSteps.d.ts +0 -4
- package/dist/types/lib/runSteps.d.ts.map +0 -1
- package/dist/types/lib/runStepsAsync.d.ts +0 -4
- package/dist/types/lib/runStepsAsync.d.ts.map +0 -1
- package/dist/types/lib/runXy.d.ts +0 -2
- package/dist/types/lib/runXy.d.ts.map +0 -1
- package/dist/types/lib/runXyWithWarning.d.ts +0 -2
- package/dist/types/lib/runXyWithWarning.d.ts.map +0 -1
- package/dist/types/lib/safeExit.d.ts +0 -5
- package/dist/types/lib/safeExit.d.ts.map +0 -1
- package/dist/types/lib/string/empty.d.ts +0 -3
- package/dist/types/lib/string/empty.d.ts.map +0 -1
- package/dist/types/lib/string/index.d.ts +0 -3
- package/dist/types/lib/string/index.d.ts.map +0 -1
- package/dist/types/lib/string/union.d.ts +0 -2
- package/dist/types/lib/string/union.d.ts.map +0 -1
- package/dist/types/lib/withErrnoException.d.ts +0 -2
- package/dist/types/lib/withErrnoException.d.ts.map +0 -1
- package/dist/types/lib/withError.d.ts +0 -2
- package/dist/types/lib/withError.d.ts.map +0 -1
- package/dist/types/lib/yarn/index.d.ts +0 -4
- package/dist/types/lib/yarn/index.d.ts.map +0 -1
- package/dist/types/lib/yarn/isYarnVersionOrGreater.d.ts +0 -2
- package/dist/types/lib/yarn/isYarnVersionOrGreater.d.ts.map +0 -1
- package/dist/types/lib/yarn/workspace/Workspace.d.ts +0 -5
- package/dist/types/lib/yarn/workspace/Workspace.d.ts.map +0 -1
- package/dist/types/lib/yarn/workspace/index.d.ts +0 -4
- package/dist/types/lib/yarn/workspace/index.d.ts.map +0 -1
- package/dist/types/lib/yarn/workspace/yarnWorkspace.d.ts +0 -3
- package/dist/types/lib/yarn/workspace/yarnWorkspace.d.ts.map +0 -1
- package/dist/types/lib/yarn/workspace/yarnWorkspaces.d.ts +0 -3
- package/dist/types/lib/yarn/workspace/yarnWorkspaces.d.ts.map +0 -1
- package/dist/types/lib/yarn/yarnInitCwd.d.ts +0 -2
- package/dist/types/lib/yarn/yarnInitCwd.d.ts.map +0 -1
- package/dist/types/loadPackageConfig.d.ts +0 -6
- package/dist/types/loadPackageConfig.d.ts.map +0 -1
- package/dist/types/xy/index.d.ts +0 -8
- package/dist/types/xy/index.d.ts.map +0 -1
- package/dist/types/xy/param.d.ts +0 -5
- package/dist/types/xy/param.d.ts.map +0 -1
- package/dist/types/xy/xy.d.ts +0 -10
- package/dist/types/xy/xy.d.ts.map +0 -1
- package/dist/types/xy/xyBuildCommands.d.ts +0 -3
- package/dist/types/xy/xyBuildCommands.d.ts.map +0 -1
- package/dist/types/xy/xyCommonCommands.d.ts +0 -3
- package/dist/types/xy/xyCommonCommands.d.ts.map +0 -1
- package/dist/types/xy/xyDeployCommands.d.ts +0 -3
- package/dist/types/xy/xyDeployCommands.d.ts.map +0 -1
- package/dist/types/xy/xyInstallCommands.d.ts +0 -3
- package/dist/types/xy/xyInstallCommands.d.ts.map +0 -1
- package/dist/types/xy/xyLintCommands.d.ts +0 -3
- package/dist/types/xy/xyLintCommands.d.ts.map +0 -1
- package/dist/types/xy/xyParseOptions.d.ts +0 -3
- package/dist/types/xy/xyParseOptions.d.ts.map +0 -1
package/dist/actions/index.mjs
CHANGED
|
@@ -1324,7 +1324,7 @@ var packageClean = /* @__PURE__ */ __name(async () => {
|
|
|
1324
1324
|
}, "packageClean");
|
|
1325
1325
|
|
|
1326
1326
|
// src/actions/package/compile/compile.ts
|
|
1327
|
-
import
|
|
1327
|
+
import chalk24 from "chalk";
|
|
1328
1328
|
|
|
1329
1329
|
// src/actions/package/publint.ts
|
|
1330
1330
|
import { promises as fs2 } from "node:fs";
|
|
@@ -1530,6 +1530,59 @@ function deepMergeObjects(objects) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
__name(deepMergeObjects, "deepMergeObjects");
|
|
1532
1532
|
|
|
1533
|
+
// src/actions/package/compile/packageCompileTsc.ts
|
|
1534
|
+
import { cwd as cwd2 } from "node:process";
|
|
1535
|
+
import chalk23 from "chalk";
|
|
1536
|
+
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1537
|
+
import { DiagnosticCategory as DiagnosticCategory2, formatDiagnosticsWithColorAndContext as formatDiagnosticsWithColorAndContext2, getPreEmitDiagnostics as getPreEmitDiagnostics2, sys as sys3 } from "typescript";
|
|
1538
|
+
var packageCompileTsc = /* @__PURE__ */ __name((folder = "src", config2 = {}, compilerOptionsParam) => {
|
|
1539
|
+
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1540
|
+
const verbose = config2?.verbose ?? false;
|
|
1541
|
+
console.log(chalk23.green(`Compiling Files ${pkg}`));
|
|
1542
|
+
const compilerOptions = {
|
|
1543
|
+
...getCompilerOptions({
|
|
1544
|
+
outDir: "dist/types",
|
|
1545
|
+
removeComments: false,
|
|
1546
|
+
skipDefaultLibCheck: true,
|
|
1547
|
+
skipLibCheck: true,
|
|
1548
|
+
sourceMap: false
|
|
1549
|
+
}),
|
|
1550
|
+
...compilerOptionsParam,
|
|
1551
|
+
emitDeclarationOnly: false,
|
|
1552
|
+
noEmit: true
|
|
1553
|
+
};
|
|
1554
|
+
const validTsExt = [
|
|
1555
|
+
".ts",
|
|
1556
|
+
".tsx",
|
|
1557
|
+
".d.ts",
|
|
1558
|
+
".cts",
|
|
1559
|
+
".d.cts",
|
|
1560
|
+
".mts",
|
|
1561
|
+
".d.mts"
|
|
1562
|
+
];
|
|
1563
|
+
const files = buildEntries(folder, "all", verbose).filter((file) => validTsExt.find((ext) => file.endsWith(ext)));
|
|
1564
|
+
const program = createProgramFromConfig2({
|
|
1565
|
+
basePath: pkg ?? cwd2(),
|
|
1566
|
+
compilerOptions,
|
|
1567
|
+
exclude: [
|
|
1568
|
+
"dist",
|
|
1569
|
+
"docs"
|
|
1570
|
+
],
|
|
1571
|
+
files
|
|
1572
|
+
});
|
|
1573
|
+
const diagnostics = getPreEmitDiagnostics2(program);
|
|
1574
|
+
if (diagnostics.length > 0) {
|
|
1575
|
+
const formattedDiagnostics = formatDiagnosticsWithColorAndContext2(diagnostics, {
|
|
1576
|
+
getCanonicalFileName: /* @__PURE__ */ __name((fileName) => fileName, "getCanonicalFileName"),
|
|
1577
|
+
getCurrentDirectory: /* @__PURE__ */ __name(() => folder, "getCurrentDirectory"),
|
|
1578
|
+
getNewLine: /* @__PURE__ */ __name(() => sys3.newLine, "getNewLine")
|
|
1579
|
+
});
|
|
1580
|
+
console.error(formattedDiagnostics);
|
|
1581
|
+
}
|
|
1582
|
+
program.emit();
|
|
1583
|
+
return diagnostics.reduce((acc, diag) => acc + (diag.category === DiagnosticCategory2.Error ? 1 : 0), 0);
|
|
1584
|
+
}, "packageCompileTsc");
|
|
1585
|
+
|
|
1533
1586
|
// src/actions/package/compile/packageCompileTsup.ts
|
|
1534
1587
|
var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single", options, verbose) => {
|
|
1535
1588
|
const outDir = options?.outDir ?? "dist";
|
|
@@ -1603,7 +1656,6 @@ var tsupOptions = /* @__PURE__ */ __name((options = []) => {
|
|
|
1603
1656
|
]);
|
|
1604
1657
|
}, "tsupOptions");
|
|
1605
1658
|
var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
1606
|
-
console.log("packageCompileTsup-types");
|
|
1607
1659
|
const compile2 = config2?.compile;
|
|
1608
1660
|
const verbose = config2?.verbose ?? false;
|
|
1609
1661
|
if (verbose) {
|
|
@@ -1621,7 +1673,8 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
|
1621
1673
|
if (verbose) {
|
|
1622
1674
|
console.log("Calling packageCompileTscTypes");
|
|
1623
1675
|
}
|
|
1624
|
-
|
|
1676
|
+
let errors = await packageCompileTypes(config2);
|
|
1677
|
+
errors = errors + packageCompileTsc(void 0, config2);
|
|
1625
1678
|
if (errors > 0) {
|
|
1626
1679
|
return errors;
|
|
1627
1680
|
}
|
|
@@ -1664,7 +1717,7 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
|
1664
1717
|
// src/actions/package/compile/compile.ts
|
|
1665
1718
|
var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
1666
1719
|
const pkg = process.env.INIT_CWD;
|
|
1667
|
-
console.log(
|
|
1720
|
+
console.log(chalk24.green(`Compiling ${pkg}`));
|
|
1668
1721
|
const config2 = await loadConfig(inConfig);
|
|
1669
1722
|
const publint2 = config2.publint;
|
|
1670
1723
|
const tsupResults = await packageCompileTsup(config2);
|
|
@@ -1674,62 +1727,6 @@ var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
|
1674
1727
|
return publint2 ? await packagePublint(config2) : 0;
|
|
1675
1728
|
}, "packageCompile");
|
|
1676
1729
|
|
|
1677
|
-
// src/actions/package/compile/packageCompileTsc.ts
|
|
1678
|
-
import { cwd as cwd2 } from "node:process";
|
|
1679
|
-
import chalk24 from "chalk";
|
|
1680
|
-
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1681
|
-
import { DiagnosticCategory as DiagnosticCategory2, formatDiagnosticsWithColorAndContext as formatDiagnosticsWithColorAndContext2, getLineAndCharacterOfPosition, getPreEmitDiagnostics as getPreEmitDiagnostics2 } from "typescript";
|
|
1682
|
-
var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerOptionsParam) => {
|
|
1683
|
-
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1684
|
-
const publint2 = config2?.publint ?? true;
|
|
1685
|
-
const verbose = config2?.verbose ?? false;
|
|
1686
|
-
const formatHost = {
|
|
1687
|
-
getCanonicalFileName: /* @__PURE__ */ __name((fileName) => fileName, "getCanonicalFileName"),
|
|
1688
|
-
getCurrentDirectory: /* @__PURE__ */ __name(() => pkg, "getCurrentDirectory"),
|
|
1689
|
-
getNewLine: /* @__PURE__ */ __name(() => "\n", "getNewLine")
|
|
1690
|
-
};
|
|
1691
|
-
if (verbose) {
|
|
1692
|
-
console.log(`Compiling with NoEmit TSC [${pkg}]`);
|
|
1693
|
-
}
|
|
1694
|
-
const compilerOptions = {
|
|
1695
|
-
...getCompilerOptions({
|
|
1696
|
-
outDir: "dist",
|
|
1697
|
-
removeComments: true,
|
|
1698
|
-
rootDir: "src"
|
|
1699
|
-
}),
|
|
1700
|
-
...compilerOptionsParam,
|
|
1701
|
-
...noEmit === void 0 ? {} : {
|
|
1702
|
-
noEmit
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
const program = createProgramFromConfig2({
|
|
1706
|
-
basePath: pkg ?? cwd2(),
|
|
1707
|
-
compilerOptions,
|
|
1708
|
-
exclude: [
|
|
1709
|
-
"dist",
|
|
1710
|
-
"docs",
|
|
1711
|
-
"**/*.spec.*",
|
|
1712
|
-
"**/*.stories.*",
|
|
1713
|
-
"src/**/spec/**/*"
|
|
1714
|
-
],
|
|
1715
|
-
include: [
|
|
1716
|
-
"src"
|
|
1717
|
-
]
|
|
1718
|
-
});
|
|
1719
|
-
const results = getPreEmitDiagnostics2(program);
|
|
1720
|
-
for (const diag of results) {
|
|
1721
|
-
const lineAndChar = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : {
|
|
1722
|
-
character: 0,
|
|
1723
|
-
line: 0
|
|
1724
|
-
};
|
|
1725
|
-
console.log(chalk24.cyan(`${diag.file?.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`));
|
|
1726
|
-
console.log(formatDiagnosticsWithColorAndContext2([
|
|
1727
|
-
diag
|
|
1728
|
-
], formatHost));
|
|
1729
|
-
}
|
|
1730
|
-
return results.reduce((prev, diag) => prev + diag.category === DiagnosticCategory2.Error ? 1 : 0, 0) || (publint2 ? await packagePublint() : 0);
|
|
1731
|
-
}, "packageCompileTsc");
|
|
1732
|
-
|
|
1733
1730
|
// src/actions/package/copy-assets.ts
|
|
1734
1731
|
import path5 from "node:path/posix";
|
|
1735
1732
|
import chalk25 from "chalk";
|