@xylabs/ts-scripts-yarn3 6.1.5 → 6.1.7
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 +67 -75
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/buildEntries.mjs +8 -8
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +67 -19
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +10 -15
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +67 -75
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/inputs.mjs +6 -6
- package/dist/actions/package/compile/inputs.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/packageCompileTscTypes.mjs +10 -11
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +65 -17
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +67 -75
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +67 -19
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +69 -21
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +69 -21
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +69 -21
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +67 -19
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +10 -15
- package/dist/bin/package/compile-types.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +69 -21
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +69 -21
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +67 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- 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";
|
|
@@ -1375,19 +1375,19 @@ import { build as build2, defineConfig } from "tsup";
|
|
|
1375
1375
|
|
|
1376
1376
|
// src/actions/package/compile/inputs.ts
|
|
1377
1377
|
import { glob as glob2 } from "glob";
|
|
1378
|
-
var getAllInputs = /* @__PURE__ */ __name((folder
|
|
1378
|
+
var getAllInputs = /* @__PURE__ */ __name((folder, ignore = [
|
|
1379
|
+
"**/*.spec.*",
|
|
1380
|
+
"**/*.stories.*",
|
|
1381
|
+
"**/spec/**/*"
|
|
1382
|
+
]) => {
|
|
1379
1383
|
return glob2.sync(`${folder}/**/*.*`, {
|
|
1380
|
-
ignore
|
|
1381
|
-
"**/*.spec.*",
|
|
1382
|
-
"**/*.stories.*",
|
|
1383
|
-
"**/spec/**/*"
|
|
1384
|
-
],
|
|
1384
|
+
ignore,
|
|
1385
1385
|
posix: true
|
|
1386
1386
|
});
|
|
1387
1387
|
}, "getAllInputs");
|
|
1388
1388
|
|
|
1389
1389
|
// src/actions/package/compile/buildEntries.ts
|
|
1390
|
-
var buildEntries = /* @__PURE__ */ __name((folder, entryMode = "single", verbose = false) => {
|
|
1390
|
+
var buildEntries = /* @__PURE__ */ __name((folder, entryMode = "single", excludeSpecAndStory = true, verbose = false) => {
|
|
1391
1391
|
let entries = [];
|
|
1392
1392
|
switch (entryMode) {
|
|
1393
1393
|
case "platform": {
|
|
@@ -1398,7 +1398,7 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode = "single", verbose
|
|
|
1398
1398
|
break;
|
|
1399
1399
|
}
|
|
1400
1400
|
case "all": {
|
|
1401
|
-
entries = getAllInputs(folder).filter((entry) => !entry.includes(".spec.") && !entry.includes(".
|
|
1401
|
+
entries = excludeSpecAndStory ? getAllInputs(folder).filter((entry) => !entry.includes(".spec.") && !entry.includes(".stories.")) : getAllInputs(folder, []);
|
|
1402
1402
|
break;
|
|
1403
1403
|
}
|
|
1404
1404
|
default: {
|
|
@@ -1412,11 +1412,9 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode = "single", verbose
|
|
|
1412
1412
|
return entries;
|
|
1413
1413
|
}, "buildEntries");
|
|
1414
1414
|
|
|
1415
|
-
// src/actions/package/compile/compileTypes.ts
|
|
1416
|
-
import chalk22 from "chalk";
|
|
1417
|
-
|
|
1418
1415
|
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
1419
1416
|
import { cwd } from "node:process";
|
|
1417
|
+
import chalk22 from "chalk";
|
|
1420
1418
|
import { createProgramFromConfig } from "tsc-prog";
|
|
1421
1419
|
import { DiagnosticCategory, formatDiagnosticsWithColorAndContext, getPreEmitDiagnostics, sys as sys2 } from "typescript";
|
|
1422
1420
|
|
|
@@ -1446,9 +1444,6 @@ var getCompilerOptions = /* @__PURE__ */ __name((options = {}, tsconfig = "tscon
|
|
|
1446
1444
|
var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", config2 = {}, compilerOptionsParam) => {
|
|
1447
1445
|
const pkg = process.env.INIT_CWD ?? cwd();
|
|
1448
1446
|
const verbose = config2?.verbose ?? false;
|
|
1449
|
-
if (verbose) {
|
|
1450
|
-
console.log(`Compiling types [${pkg}]`);
|
|
1451
|
-
}
|
|
1452
1447
|
const compilerOptions = {
|
|
1453
1448
|
...getCompilerOptions({
|
|
1454
1449
|
emitDeclarationOnly: true,
|
|
@@ -1472,6 +1467,7 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", config2 = {
|
|
|
1472
1467
|
".d.mts"
|
|
1473
1468
|
];
|
|
1474
1469
|
const files = buildEntries(folder, "all", verbose).filter((file) => validTsExt.find((ext) => file.endsWith(ext)));
|
|
1470
|
+
console.log(chalk22.green(`Compiling Types ${pkg}: ${files.length}`));
|
|
1475
1471
|
const program = createProgramFromConfig({
|
|
1476
1472
|
basePath: pkg ?? cwd(),
|
|
1477
1473
|
compilerOptions,
|
|
@@ -1500,7 +1496,6 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", config2 = {
|
|
|
1500
1496
|
// src/actions/package/compile/compileTypes.ts
|
|
1501
1497
|
var packageCompileTypes = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
1502
1498
|
const pkg = process.env.INIT_CWD;
|
|
1503
|
-
console.log(chalk22.green(`Compiling Types ${pkg}`));
|
|
1504
1499
|
const config2 = await loadConfig(inConfig);
|
|
1505
1500
|
return packageCompileTscTypes(void 0, config2);
|
|
1506
1501
|
}, "packageCompileTypes");
|
|
@@ -1530,6 +1525,59 @@ function deepMergeObjects(objects) {
|
|
|
1530
1525
|
}
|
|
1531
1526
|
__name(deepMergeObjects, "deepMergeObjects");
|
|
1532
1527
|
|
|
1528
|
+
// src/actions/package/compile/packageCompileTsc.ts
|
|
1529
|
+
import { cwd as cwd2 } from "node:process";
|
|
1530
|
+
import chalk23 from "chalk";
|
|
1531
|
+
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1532
|
+
import { DiagnosticCategory as DiagnosticCategory2, formatDiagnosticsWithColorAndContext as formatDiagnosticsWithColorAndContext2, getPreEmitDiagnostics as getPreEmitDiagnostics2, sys as sys3 } from "typescript";
|
|
1533
|
+
var packageCompileTsc = /* @__PURE__ */ __name((folder = "src", config2 = {}, compilerOptionsParam) => {
|
|
1534
|
+
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1535
|
+
const verbose = config2?.verbose ?? false;
|
|
1536
|
+
const compilerOptions = {
|
|
1537
|
+
...getCompilerOptions({
|
|
1538
|
+
outDir: "dist/types",
|
|
1539
|
+
removeComments: false,
|
|
1540
|
+
skipDefaultLibCheck: true,
|
|
1541
|
+
skipLibCheck: true,
|
|
1542
|
+
sourceMap: false
|
|
1543
|
+
}),
|
|
1544
|
+
...compilerOptionsParam,
|
|
1545
|
+
emitDeclarationOnly: false,
|
|
1546
|
+
noEmit: true
|
|
1547
|
+
};
|
|
1548
|
+
const validTsExt = [
|
|
1549
|
+
".ts",
|
|
1550
|
+
".tsx",
|
|
1551
|
+
".d.ts",
|
|
1552
|
+
".cts",
|
|
1553
|
+
".d.cts",
|
|
1554
|
+
".mts",
|
|
1555
|
+
".d.mts"
|
|
1556
|
+
];
|
|
1557
|
+
const files = buildEntries(folder, "all", verbose).filter((file) => validTsExt.find((ext) => file.endsWith(ext)));
|
|
1558
|
+
console.log(chalk23.green(`Compiling Files ${pkg}: ${files.length}`));
|
|
1559
|
+
const program = createProgramFromConfig2({
|
|
1560
|
+
basePath: pkg ?? cwd2(),
|
|
1561
|
+
compilerOptions,
|
|
1562
|
+
exclude: [
|
|
1563
|
+
"dist",
|
|
1564
|
+
"docs"
|
|
1565
|
+
],
|
|
1566
|
+
files
|
|
1567
|
+
});
|
|
1568
|
+
const diagnostics = getPreEmitDiagnostics2(program);
|
|
1569
|
+
if (diagnostics.length > 0) {
|
|
1570
|
+
const formattedDiagnostics = formatDiagnosticsWithColorAndContext2(diagnostics, {
|
|
1571
|
+
getCanonicalFileName: /* @__PURE__ */ __name((fileName) => fileName, "getCanonicalFileName"),
|
|
1572
|
+
getCurrentDirectory: /* @__PURE__ */ __name(() => folder, "getCurrentDirectory"),
|
|
1573
|
+
getNewLine: /* @__PURE__ */ __name(() => sys3.newLine, "getNewLine")
|
|
1574
|
+
});
|
|
1575
|
+
console.error(formattedDiagnostics);
|
|
1576
|
+
}
|
|
1577
|
+
program.emit();
|
|
1578
|
+
return diagnostics.reduce((acc, diag) => acc + (diag.category === DiagnosticCategory2.Error ? 1 : 0), 0);
|
|
1579
|
+
}, "packageCompileTsc");
|
|
1580
|
+
|
|
1533
1581
|
// src/actions/package/compile/packageCompileTsup.ts
|
|
1534
1582
|
var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single", options, verbose) => {
|
|
1535
1583
|
const outDir = options?.outDir ?? "dist";
|
|
@@ -1603,7 +1651,6 @@ var tsupOptions = /* @__PURE__ */ __name((options = []) => {
|
|
|
1603
1651
|
]);
|
|
1604
1652
|
}, "tsupOptions");
|
|
1605
1653
|
var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
1606
|
-
console.log("packageCompileTsup-types");
|
|
1607
1654
|
const compile2 = config2?.compile;
|
|
1608
1655
|
const verbose = config2?.verbose ?? false;
|
|
1609
1656
|
if (verbose) {
|
|
@@ -1621,7 +1668,8 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
|
1621
1668
|
if (verbose) {
|
|
1622
1669
|
console.log("Calling packageCompileTscTypes");
|
|
1623
1670
|
}
|
|
1624
|
-
|
|
1671
|
+
let errors = await packageCompileTypes(config2);
|
|
1672
|
+
errors = errors + packageCompileTsc(void 0, config2);
|
|
1625
1673
|
if (errors > 0) {
|
|
1626
1674
|
return errors;
|
|
1627
1675
|
}
|
|
@@ -1664,7 +1712,7 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
|
1664
1712
|
// src/actions/package/compile/compile.ts
|
|
1665
1713
|
var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
1666
1714
|
const pkg = process.env.INIT_CWD;
|
|
1667
|
-
console.log(
|
|
1715
|
+
console.log(chalk24.green(`Compiling ${pkg}`));
|
|
1668
1716
|
const config2 = await loadConfig(inConfig);
|
|
1669
1717
|
const publint2 = config2.publint;
|
|
1670
1718
|
const tsupResults = await packageCompileTsup(config2);
|
|
@@ -1674,62 +1722,6 @@ var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
|
1674
1722
|
return publint2 ? await packagePublint(config2) : 0;
|
|
1675
1723
|
}, "packageCompile");
|
|
1676
1724
|
|
|
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
1725
|
// src/actions/package/copy-assets.ts
|
|
1734
1726
|
import path5 from "node:path/posix";
|
|
1735
1727
|
import chalk25 from "chalk";
|