@xylabs/ts-scripts-yarn3 7.0.0-rc.9 → 7.0.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/dist/actions/build.mjs +87 -39
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/clean-docs.mjs +22 -8
- package/dist/actions/clean-docs.mjs.map +1 -1
- package/dist/actions/clean-eslint.mjs +11 -5
- package/dist/actions/clean-eslint.mjs.map +1 -1
- package/dist/actions/clean-jest.mjs +29 -16
- package/dist/actions/clean-jest.mjs.map +1 -1
- package/dist/actions/clean.mjs +63 -32
- package/dist/actions/clean.mjs.map +1 -1
- package/dist/actions/compile.mjs +76 -50
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/copy-assets.mjs +38 -23
- package/dist/actions/copy-assets.mjs.map +1 -1
- package/dist/actions/cycle.mjs +57 -28
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/dead.mjs +31 -16
- package/dist/actions/dead.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/checkPackage.mjs +84 -50
- package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +7 -7
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +6 -10
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +5 -5
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +4 -0
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/index.mjs +84 -50
- package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
- package/dist/actions/deplint/deplint.mjs +120 -81
- package/dist/actions/deplint/deplint.mjs.map +1 -1
- package/dist/actions/deplint/findFiles.mjs +20 -4
- package/dist/actions/deplint/findFiles.mjs.map +1 -1
- package/dist/actions/deplint/findFilesByGlob.mjs +8 -1
- package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -1
- package/dist/actions/deplint/getBasePackageName.mjs +4 -0
- package/dist/actions/deplint/getBasePackageName.mjs.map +1 -1
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +4 -0
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -1
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs +24 -12
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -1
- package/dist/actions/deplint/getImportsFromFile.mjs +16 -9
- package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -1
- package/dist/actions/deplint/index.mjs +120 -81
- package/dist/actions/deplint/index.mjs.map +1 -1
- package/dist/actions/deploy-major.mjs +57 -26
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs +57 -26
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs +57 -26
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs +57 -26
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/dupdeps.mjs +37 -26
- package/dist/actions/dupdeps.mjs.map +1 -1
- package/dist/actions/fix.mjs +54 -36
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/gen-docs.mjs +65 -25
- package/dist/actions/gen-docs.mjs.map +1 -1
- package/dist/actions/gitignore-gen.mjs +44 -28
- package/dist/actions/gitignore-gen.mjs.map +1 -1
- package/dist/actions/gitlint-fix.mjs +14 -5
- package/dist/actions/gitlint-fix.mjs.map +1 -1
- package/dist/actions/gitlint.mjs +7 -4
- package/dist/actions/gitlint.mjs.map +1 -1
- package/dist/actions/index.mjs +1555 -966
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/knip.mjs +31 -16
- package/dist/actions/knip.mjs.map +1 -1
- package/dist/actions/license.mjs +51 -37
- package/dist/actions/license.mjs.map +1 -1
- package/dist/actions/lint.mjs +48 -33
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/npmignore-gen.mjs +44 -28
- package/dist/actions/npmignore-gen.mjs.map +1 -1
- package/dist/actions/package/clean-outputs.mjs +16 -6
- package/dist/actions/package/clean-outputs.mjs.map +1 -1
- package/dist/actions/package/clean-typescript.mjs +16 -6
- package/dist/actions/package/clean-typescript.mjs.map +1 -1
- package/dist/actions/package/clean.mjs +29 -12
- package/dist/actions/package/clean.mjs.map +1 -1
- package/dist/actions/package/compile/buildEntries.mjs +36 -8
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +341 -185
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/copyTypeFiles.mjs +23 -20
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
- package/dist/actions/package/compile/deepMerge.mjs +5 -0
- package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
- package/dist/actions/package/compile/getCompilerOptions.mjs +9 -23
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +341 -267
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/inputs.mjs +26 -3
- package/dist/actions/package/compile/inputs.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +57 -96
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +94 -25
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +321 -123
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/copy-assets.mjs +21 -12
- package/dist/actions/package/copy-assets.mjs.map +1 -1
- package/dist/actions/package/cycle.mjs +16 -9
- package/dist/actions/package/cycle.mjs.map +1 -1
- package/dist/actions/package/gen-docs.mjs +13 -12
- package/dist/actions/package/gen-docs.mjs.map +1 -1
- package/dist/actions/package/index.mjs +507 -347
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +39 -16
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/publint.mjs +9 -6
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +371 -201
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/publint.mjs +71 -37
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/rebuild.mjs +29 -17
- package/dist/actions/rebuild.mjs.map +1 -1
- package/dist/actions/recompile.mjs +67 -50
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/actions/reinstall.mjs +43 -25
- package/dist/actions/reinstall.mjs.map +1 -1
- package/dist/actions/relint.mjs +63 -40
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/actions/retest.mjs +35 -17
- package/dist/actions/retest.mjs.map +1 -1
- package/dist/actions/sonar.mjs +32 -16
- package/dist/actions/sonar.mjs.map +1 -1
- package/dist/actions/statics.mjs +46 -27
- package/dist/actions/statics.mjs.map +1 -1
- package/dist/actions/test.mjs +30 -16
- package/dist/actions/test.mjs.map +1 -1
- package/dist/actions/up.mjs +27 -16
- package/dist/actions/up.mjs.map +1 -1
- package/dist/actions/updo.mjs +33 -18
- package/dist/actions/updo.mjs.map +1 -1
- package/dist/actions/upplug.mjs +53 -19
- package/dist/actions/upplug.mjs.map +1 -1
- package/dist/actions/upyarn.mjs +31 -16
- package/dist/actions/upyarn.mjs.map +1 -1
- package/dist/actions/yarn3only.mjs +23 -12
- package/dist/actions/yarn3only.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +346 -191
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +348 -191
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +15 -6
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +15 -6
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +28 -12
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +345 -190
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +323 -126
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +346 -191
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs +23 -13
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs +23 -13
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/cycle.mjs +17 -11
- package/dist/bin/package/cycle.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +38 -16
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/gen-docs.mjs +12 -12
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +38 -16
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +8 -6
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +372 -203
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +38 -16
- package/dist/bin/package/relint.mjs.map +1 -1
- package/dist/bin/xy.mjs +1351 -1075
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +133 -121
- package/dist/index.mjs +1908 -1460
- package/dist/index.mjs.map +1 -1
- package/dist/lib/checkResult.mjs +5 -2
- package/dist/lib/checkResult.mjs.map +1 -1
- package/dist/lib/createBuildConfig.mjs +24 -9
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/defaultBuildConfig.mjs +6 -2
- package/dist/lib/defaultBuildConfig.mjs.map +1 -1
- package/dist/lib/deleteGlob.mjs +9 -3
- package/dist/lib/deleteGlob.mjs.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.mjs +23 -12
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +33 -22
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
- package/dist/lib/dependencies/index.mjs +33 -22
- package/dist/lib/dependencies/index.mjs.map +1 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs +3 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
- package/dist/lib/file/constants.mjs.map +1 -1
- package/dist/lib/file/fileLines.mjs +13 -12
- package/dist/lib/file/fileLines.mjs.map +1 -1
- package/dist/lib/file/index.mjs +15 -14
- package/dist/lib/file/index.mjs.map +1 -1
- package/dist/lib/file/tryReadFileSync.mjs +8 -3
- package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
- package/dist/lib/generateIgnoreFiles.mjs +43 -27
- package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
- package/dist/lib/index.mjs +166 -106
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/jsonFormatters.mjs +5 -2
- package/dist/lib/jsonFormatters.mjs.map +1 -1
- package/dist/lib/loadConfig.mjs +20 -10
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/parsedPackageJSON.mjs +5 -2
- package/dist/lib/parsedPackageJSON.mjs.map +1 -1
- package/dist/lib/processEx.mjs +9 -6
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/runSteps.mjs +19 -13
- package/dist/lib/runSteps.mjs.map +1 -1
- package/dist/lib/runStepsAsync.mjs +22 -22
- package/dist/lib/runStepsAsync.mjs.map +1 -1
- package/dist/lib/runXy.mjs +31 -19
- package/dist/lib/runXy.mjs.map +1 -1
- package/dist/lib/runXyWithWarning.mjs +5 -2
- package/dist/lib/runXyWithWarning.mjs.map +1 -1
- package/dist/lib/safeExit.mjs +13 -10
- package/dist/lib/safeExit.mjs.map +1 -1
- package/dist/lib/string/empty.mjs +5 -2
- package/dist/lib/string/empty.mjs.map +1 -1
- package/dist/lib/string/index.mjs +9 -3
- package/dist/lib/string/index.mjs.map +1 -1
- package/dist/lib/string/union.mjs +7 -1
- package/dist/lib/string/union.mjs.map +1 -1
- package/dist/lib/withErrnoException.mjs +7 -4
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/withError.mjs +5 -2
- package/dist/lib/withError.mjs.map +1 -1
- package/dist/lib/yarn/index.mjs +30 -11
- package/dist/lib/yarn/index.mjs.map +1 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs +15 -4
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
- package/dist/lib/yarn/workspace/index.mjs +16 -5
- package/dist/lib/yarn/workspace/index.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs +16 -5
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +14 -3
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
- package/dist/lib/yarn/yarnInitCwd.mjs +5 -2
- package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
- package/dist/loadPackageConfig.mjs +8 -3
- package/dist/loadPackageConfig.mjs.map +1 -1
- package/dist/xy/index.mjs +1351 -1074
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/param.mjs +9 -3
- package/dist/xy/param.mjs.map +1 -1
- package/dist/xy/xy.mjs +1351 -1074
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +324 -305
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +336 -251
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.mjs +161 -99
- package/dist/xy/xyDeployCommands.mjs.map +1 -1
- package/dist/xy/xyInstallCommands.mjs +193 -145
- package/dist/xy/xyInstallCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +437 -321
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/xyParseOptions.mjs +5 -2
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +13 -12
- package/dist/actions/compile-types.mjs +0 -153
- package/dist/actions/compile-types.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Options } from 'tsup';
|
|
2
2
|
import { CompilerOptions } from 'typescript';
|
|
3
|
+
import { Options as Options$1 } from 'rollup-plugin-dts';
|
|
3
4
|
import { PathLike, WriteFileOptions } from 'node:fs';
|
|
4
5
|
import { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process';
|
|
5
6
|
import { PackageJson } from 'types-package-json';
|
|
@@ -46,21 +47,6 @@ declare const compile: ({ verbose, target, pkg, incremental, publint, jobs, }: C
|
|
|
46
47
|
declare const compilePackage: ({ target, pkg }: CompilePackageParams) => number;
|
|
47
48
|
declare const compileAll: ({ jobs, verbose, target, incremental, }: CompileParams) => number;
|
|
48
49
|
|
|
49
|
-
interface CompileTypesParams {
|
|
50
|
-
incremental?: boolean;
|
|
51
|
-
jobs?: number;
|
|
52
|
-
pkg?: string;
|
|
53
|
-
verbose?: boolean;
|
|
54
|
-
}
|
|
55
|
-
interface CompileTypesPackageParams {
|
|
56
|
-
pkg: string;
|
|
57
|
-
publint?: boolean;
|
|
58
|
-
verbose?: boolean;
|
|
59
|
-
}
|
|
60
|
-
declare const compileTypes: ({ verbose, pkg, incremental, jobs, }: CompileTypesParams) => number;
|
|
61
|
-
declare const compileTypesPackage: ({ verbose, pkg }: CompileTypesPackageParams) => number;
|
|
62
|
-
declare const compileTypesAll: ({ jobs, verbose, incremental, }: CompileTypesParams) => number;
|
|
63
|
-
|
|
64
50
|
interface CopyAssetsParams {
|
|
65
51
|
pkg?: string;
|
|
66
52
|
target?: 'esm' | 'cjs';
|
|
@@ -85,12 +71,104 @@ declare const cycleAll: ({ verbose }: {
|
|
|
85
71
|
|
|
86
72
|
declare const dead: () => number;
|
|
87
73
|
|
|
88
|
-
declare const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
|
|
75
|
+
|
|
76
|
+
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
|
|
77
|
+
|
|
78
|
+
declare const defaultBuildConfig: {
|
|
79
|
+
compilerOptions: {
|
|
80
|
+
rootDir: string;
|
|
81
|
+
rootDirs: string[];
|
|
82
|
+
};
|
|
83
|
+
exclude: string[];
|
|
84
|
+
include: string[];
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
declare const deleteGlob: (globPath: string) => void;
|
|
88
|
+
|
|
89
|
+
declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
|
|
90
|
+
|
|
91
|
+
declare class DuplicateDetector {
|
|
92
|
+
private dependency;
|
|
93
|
+
private dependencyEntries;
|
|
94
|
+
constructor(output: string, dependency: string);
|
|
95
|
+
detect(): 1 | 0;
|
|
96
|
+
private detectReducer;
|
|
97
|
+
private resultsFactory;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare const WINDOWS_NEWLINE_REGEX: RegExp;
|
|
101
|
+
declare const CROSS_PLATFORM_NEWLINE = "\n";
|
|
102
|
+
|
|
103
|
+
type ReadFileSyncOptions = BufferEncoding | {
|
|
104
|
+
encoding: BufferEncoding;
|
|
105
|
+
flags?: string;
|
|
106
|
+
};
|
|
107
|
+
declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
|
|
108
|
+
|
|
109
|
+
declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
|
|
110
|
+
declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
|
|
111
|
+
declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
|
|
112
|
+
|
|
113
|
+
declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
|
|
114
|
+
|
|
115
|
+
declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
|
|
116
|
+
|
|
117
|
+
declare const multiLineToJSONArray: (output: string) => any;
|
|
118
|
+
|
|
119
|
+
declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
|
|
120
|
+
|
|
121
|
+
declare const parsedPackageJSON: (path?: string) => any;
|
|
122
|
+
|
|
123
|
+
declare const processEx: (ex: unknown) => never;
|
|
124
|
+
|
|
125
|
+
type ScriptStep = [/* command */ /* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ /* arg */ string | string[]] | [/* command */ string, /* arg */ /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding];
|
|
126
|
+
declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
|
|
127
|
+
|
|
128
|
+
declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
|
|
129
|
+
declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
|
|
130
|
+
|
|
131
|
+
declare const runXy: (command: string) => number;
|
|
132
|
+
|
|
133
|
+
declare const runXyWithWarning: (command: string) => number;
|
|
134
|
+
|
|
135
|
+
/** Catch child process a crash and returns the code */
|
|
136
|
+
declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
|
|
137
|
+
declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
|
|
138
|
+
|
|
139
|
+
declare const empty: (value?: string | undefined) => boolean;
|
|
140
|
+
declare const notEmpty: (value?: string | undefined) => boolean;
|
|
141
|
+
|
|
142
|
+
declare const union: (a: string[], b: string[]) => Set<string>;
|
|
143
|
+
|
|
144
|
+
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
|
|
145
|
+
|
|
146
|
+
declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
|
|
147
|
+
|
|
148
|
+
declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
|
|
149
|
+
|
|
150
|
+
interface Workspace {
|
|
151
|
+
location: string;
|
|
152
|
+
name: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare const yarnWorkspace: (pkg: string) => Workspace;
|
|
156
|
+
|
|
157
|
+
declare const yarnWorkspaces: () => Workspace[];
|
|
158
|
+
|
|
159
|
+
declare const INIT_CWD: () => string | undefined;
|
|
160
|
+
|
|
161
|
+
interface CheckPackageOptions {
|
|
162
|
+
deps?: boolean;
|
|
163
|
+
devDeps?: boolean;
|
|
164
|
+
peerDeps?: boolean;
|
|
165
|
+
verbose?: boolean;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface DepLintOptions extends CheckPackageOptions {
|
|
169
|
+
pkg?: string;
|
|
170
|
+
}
|
|
171
|
+
declare const deplint: ({ pkg, deps, devDeps, peerDeps, verbose, }: DepLintOptions) => number;
|
|
94
172
|
|
|
95
173
|
declare const deploy: () => number;
|
|
96
174
|
|
|
@@ -173,11 +251,11 @@ interface DynamicShareConfig extends PathConfig {
|
|
|
173
251
|
interface LiveShareConfig extends PathConfig {
|
|
174
252
|
}
|
|
175
253
|
interface CompileConfig {
|
|
176
|
-
|
|
177
|
-
/** @param entryMode all, single, platform, or auto */
|
|
254
|
+
bundleTypes?: boolean;
|
|
255
|
+
/** @param entryMode all, single, custom, platform, or auto */
|
|
178
256
|
entryMode?: EntryMode;
|
|
179
|
-
/** @param
|
|
180
|
-
|
|
257
|
+
/** @param when building types with tsc, should it use the outDir to write to? */
|
|
258
|
+
outDirAsBuildDir?: boolean;
|
|
181
259
|
}
|
|
182
260
|
type PackageCompileTsupConfig = CompileConfig & {
|
|
183
261
|
browser?: Record<string, Options | boolean>;
|
|
@@ -186,6 +264,7 @@ type PackageCompileTsupConfig = CompileConfig & {
|
|
|
186
264
|
tsup?: {
|
|
187
265
|
options?: Options;
|
|
188
266
|
};
|
|
267
|
+
verbose?: boolean;
|
|
189
268
|
};
|
|
190
269
|
type PackageCompileTscConfig = CompileConfig & {
|
|
191
270
|
mode: 'tsc';
|
|
@@ -194,6 +273,7 @@ interface XyConfigBase {
|
|
|
194
273
|
compile?: CompileConfig;
|
|
195
274
|
dynamicShare?: DynamicShareConfig;
|
|
196
275
|
liveShare?: LiveShareConfig;
|
|
276
|
+
/** @deprecated */
|
|
197
277
|
publint?: boolean;
|
|
198
278
|
verbose?: boolean;
|
|
199
279
|
}
|
|
@@ -203,14 +283,34 @@ interface XyTsupConfig extends XyConfigBase {
|
|
|
203
283
|
interface XyTscConfig extends XyConfigBase {
|
|
204
284
|
compile?: PackageCompileTscConfig;
|
|
205
285
|
}
|
|
206
|
-
type
|
|
286
|
+
type XyConfigLegacy = XyTsupConfig | XyTscConfig;
|
|
287
|
+
type XyConfig = XyConfigLegacy & {
|
|
288
|
+
dev?: {
|
|
289
|
+
build?: {
|
|
290
|
+
clean?: boolean;
|
|
291
|
+
compile?: boolean;
|
|
292
|
+
deplint?: boolean;
|
|
293
|
+
gendocs?: boolean;
|
|
294
|
+
gitlint?: boolean;
|
|
295
|
+
knip?: boolean;
|
|
296
|
+
license?: boolean;
|
|
297
|
+
lint?: boolean;
|
|
298
|
+
publint?: boolean;
|
|
299
|
+
statics?: boolean;
|
|
300
|
+
verbose?: boolean;
|
|
301
|
+
};
|
|
302
|
+
compile?: PackageCompileTsupConfig;
|
|
303
|
+
verbose?: boolean;
|
|
304
|
+
};
|
|
305
|
+
verbose?: boolean;
|
|
306
|
+
};
|
|
207
307
|
|
|
208
308
|
declare const packageCompile: (inConfig?: XyConfig) => Promise<number>;
|
|
209
309
|
|
|
210
|
-
declare const packageCompileTsc: (
|
|
310
|
+
declare const packageCompileTsc: (platform: "browser" | "neutral" | "node", entries: string[], srcDir?: string, outDir?: string, compilerOptionsParam?: CompilerOptions, verbose?: boolean) => number;
|
|
211
311
|
|
|
212
|
-
declare function bundleDts(inputPath: string, outputPath: string, platform: 'node' | 'browser' | 'neutral'): Promise<void>;
|
|
213
|
-
declare const packageCompileTscTypes: (entries: string[], outDir: string, platform: "node" | "browser" | "neutral",
|
|
312
|
+
declare function bundleDts(inputPath: string, outputPath: string, platform: 'node' | 'browser' | 'neutral', options?: Options$1, verbose?: boolean): Promise<void>;
|
|
313
|
+
declare const packageCompileTscTypes: (entries: string[], outDir: string, platform: "node" | "browser" | "neutral", srcDir?: string, verbose?: boolean) => Promise<number>;
|
|
214
314
|
|
|
215
315
|
declare const tsupOptions: (options?: Options[]) => Options;
|
|
216
316
|
declare const packageCompileTsup: (config?: XyTsupConfig) => Promise<number>;
|
|
@@ -220,18 +320,17 @@ interface PackageCopyAssetsParams {
|
|
|
220
320
|
}
|
|
221
321
|
declare const packageCopyAssets: ({ target }: PackageCopyAssetsParams) => Promise<1 | 0>;
|
|
222
322
|
|
|
223
|
-
declare const packageCycle: (
|
|
224
|
-
verbose: boolean;
|
|
225
|
-
}) => Promise<number>;
|
|
323
|
+
declare const packageCycle: () => Promise<number>;
|
|
226
324
|
|
|
227
325
|
declare const packageGenDocs: () => Promise<number | undefined>;
|
|
228
326
|
|
|
229
327
|
declare const packageLint: (fix?: boolean, verbose?: boolean, cache?: boolean) => Promise<number>;
|
|
230
328
|
|
|
231
329
|
interface PackagePublintParams {
|
|
330
|
+
strict?: boolean;
|
|
232
331
|
verbose?: boolean;
|
|
233
332
|
}
|
|
234
|
-
declare const packagePublint: (
|
|
333
|
+
declare const packagePublint: ({ strict, verbose }?: PackagePublintParams) => Promise<number>;
|
|
235
334
|
|
|
236
335
|
declare const packageRecompile: () => Promise<number>;
|
|
237
336
|
|
|
@@ -302,93 +401,6 @@ declare const updateYarnVersion: () => number;
|
|
|
302
401
|
|
|
303
402
|
declare const yarn3Only: () => number;
|
|
304
403
|
|
|
305
|
-
declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
|
|
306
|
-
|
|
307
|
-
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
|
|
308
|
-
|
|
309
|
-
declare const defaultBuildConfig: {
|
|
310
|
-
compilerOptions: {
|
|
311
|
-
rootDir: string;
|
|
312
|
-
rootDirs: string[];
|
|
313
|
-
};
|
|
314
|
-
exclude: string[];
|
|
315
|
-
include: string[];
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
declare const deleteGlob: (globPath: string) => void;
|
|
319
|
-
|
|
320
|
-
declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
|
|
321
|
-
|
|
322
|
-
declare class DuplicateDetector {
|
|
323
|
-
private dependency;
|
|
324
|
-
private dependencyEntries;
|
|
325
|
-
constructor(output: string, dependency: string);
|
|
326
|
-
detect(): 1 | 0;
|
|
327
|
-
private detectReducer;
|
|
328
|
-
private resultsFactory;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
declare const WINDOWS_NEWLINE_REGEX: RegExp;
|
|
332
|
-
declare const CROSS_PLATFORM_NEWLINE = "\n";
|
|
333
|
-
|
|
334
|
-
type ReadFileSyncOptions = BufferEncoding | {
|
|
335
|
-
encoding: BufferEncoding;
|
|
336
|
-
flags?: string;
|
|
337
|
-
};
|
|
338
|
-
declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
|
|
339
|
-
|
|
340
|
-
declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
|
|
341
|
-
declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
|
|
342
|
-
declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
|
|
343
|
-
|
|
344
|
-
declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
|
|
345
|
-
|
|
346
|
-
declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
|
|
347
|
-
|
|
348
|
-
declare const multiLineToJSONArray: (output: string) => any;
|
|
349
|
-
|
|
350
|
-
declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
|
|
351
|
-
|
|
352
|
-
declare const parsedPackageJSON: (path?: string) => any;
|
|
353
|
-
|
|
354
|
-
declare const processEx: (ex: unknown) => never;
|
|
355
|
-
|
|
356
|
-
type ScriptStep = [/* command */ /* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ /* arg */ string | string[]] | [/* command */ string, /* arg */ /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding];
|
|
357
|
-
declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
|
|
358
|
-
|
|
359
|
-
declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
|
|
360
|
-
declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
|
|
361
|
-
|
|
362
|
-
declare const runXy: (command: string) => number;
|
|
363
|
-
|
|
364
|
-
declare const runXyWithWarning: (command: string) => number;
|
|
365
|
-
|
|
366
|
-
/** Catch child process a crash and returns the code */
|
|
367
|
-
declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
|
|
368
|
-
declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
|
|
369
|
-
|
|
370
|
-
declare const empty: (value?: string | undefined) => boolean;
|
|
371
|
-
declare const notEmpty: (value?: string | undefined) => boolean;
|
|
372
|
-
|
|
373
|
-
declare const union: (a: string[], b: string[]) => Set<string>;
|
|
374
|
-
|
|
375
|
-
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
|
|
376
|
-
|
|
377
|
-
declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
|
|
378
|
-
|
|
379
|
-
declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
|
|
380
|
-
|
|
381
|
-
interface Workspace {
|
|
382
|
-
location: string;
|
|
383
|
-
name: string;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
declare const yarnWorkspace: (pkg: string) => Workspace;
|
|
387
|
-
|
|
388
|
-
declare const yarnWorkspaces: () => Workspace[];
|
|
389
|
-
|
|
390
|
-
declare const INIT_CWD: () => string | undefined;
|
|
391
|
-
|
|
392
404
|
type PackageJsonEx = PackageJson & {
|
|
393
405
|
type: 'module' | 'commonjs';
|
|
394
406
|
};
|
|
@@ -416,4 +428,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
|
|
|
416
428
|
|
|
417
429
|
declare const xyParseOptions: () => Argv;
|
|
418
430
|
|
|
419
|
-
export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type
|
|
431
|
+
export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileParams, type CopyAssetsParams, type CycleParams, type DepLintOptions, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, type LintPackageParams, type LintParams, type LiveShareConfig, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackagePublintParams, type PathConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type RebuildParams, type RecompilePackageParams, type RecompileParams, type RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, build, bundleDts, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, cycleAll, cyclePackage, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deplint, deploy, deployMajor, deployMinor, deployNext, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, knip, license, lint, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCopyAssets, packageCycle, packageGenDocs, packageLint, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, relintAllPackages, relintPackage, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsupOptions, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
|