@xylabs/ts-scripts-yarn3 3.12.4 → 3.13.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/clean-docs.js +1 -1
- package/dist/actions/clean-docs.js.map +1 -1
- package/dist/actions/clean-docs.mjs +1 -1
- package/dist/actions/clean-docs.mjs.map +1 -1
- package/dist/actions/compile.js +2 -2
- package/dist/actions/compile.js.map +1 -1
- package/dist/actions/compile.mjs +2 -2
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/lint.js +2 -4
- package/dist/actions/lint.js.map +1 -1
- package/dist/actions/lint.mjs +2 -4
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.js +2 -1
- package/dist/bin/package/clean-outputs.js.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +2 -1
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.js +2 -1
- package/dist/bin/package/clean-typescript.js.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +2 -1
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.js +2 -1
- package/dist/bin/package/clean.js.map +1 -1
- package/dist/bin/package/clean.mjs +2 -1
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.js.map +1 -1
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.js.map +1 -1
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.js.map +1 -1
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.js.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.js.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/deps.js.map +1 -1
- package/dist/bin/package/deps.mjs.map +1 -1
- package/dist/bin/package/gen-docs.js +2 -1
- package/dist/bin/package/gen-docs.js.map +1 -1
- package/dist/bin/package/gen-docs.mjs +2 -1
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/publint.js.map +1 -1
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.js.map +1 -1
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy-ts.js +2 -1
- package/dist/bin/xy-ts.js.map +1 -1
- package/dist/bin/xy-ts.mjs +2 -1
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.js +2 -1
- package/dist/bin/xy.js.map +1 -1
- package/dist/bin/xy.mjs +2 -1
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/lib/createBuildConfig.js.map +1 -1
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.js +2 -1
- package/dist/lib/dependencies/DuplicateDetector.js.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.mjs +2 -1
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.js +0 -2
- package/dist/lib/dependencies/detectDuplicateDependencies.js.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +0 -2
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
- package/dist/lib/loadConfig.js.map +1 -1
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/processEx.js.map +1 -1
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/runXyWithWarning.js +4 -2
- package/dist/lib/runXyWithWarning.js.map +1 -1
- package/dist/lib/runXyWithWarning.mjs +4 -2
- package/dist/lib/runXyWithWarning.mjs.map +1 -1
- package/dist/lib/withErrnoException.js.map +1 -1
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/withError.js.map +1 -1
- package/dist/lib/withError.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.js +1 -2
- package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +1 -2
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
- package/dist/xy/param.js +33 -0
- package/dist/xy/param.js.map +1 -0
- package/dist/xy/param.mjs +9 -0
- package/dist/xy/param.mjs.map +1 -0
- package/dist/xy/xy.js +2 -2
- package/dist/xy/xy.js.map +1 -1
- package/dist/xy/xy.mjs +2 -2
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.js +5 -12
- package/dist/xy/xyCommonCommands.js.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +5 -12
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.js +7 -16
- package/dist/xy/xyLintCommands.js.map +1 -1
- package/dist/xy/xyLintCommands.mjs +7 -16
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/xyParseOptions.js.map +1 -1
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +6 -5
- package/src/actions/clean-docs.ts +1 -1
- package/src/actions/compile.ts +2 -4
- package/src/actions/lint.ts +2 -6
- package/src/bin/package/clean-outputs.ts +3 -1
- package/src/bin/package/clean-typescript.ts +3 -1
- package/src/bin/package/clean.ts +3 -1
- package/src/bin/package/compile-only.ts +1 -0
- package/src/bin/package/compile-tsup.ts +1 -0
- package/src/bin/package/compile.ts +1 -0
- package/src/bin/package/copy-assets-cjs.ts +1 -0
- package/src/bin/package/copy-assets-esm.ts +1 -0
- package/src/bin/package/deps.ts +1 -0
- package/src/bin/package/gen-docs.ts +3 -1
- package/src/bin/package/publint.ts +1 -0
- package/src/bin/package/recompile.ts +1 -0
- package/src/bin/xy-ts.ts +3 -1
- package/src/bin/xy.ts +3 -1
- package/src/lib/createBuildConfig.ts +1 -1
- package/src/lib/dependencies/DuplicateDetector.ts +2 -2
- package/src/lib/dependencies/detectDuplicateDependencies.ts +0 -2
- package/src/lib/loadConfig.ts +1 -2
- package/src/lib/processEx.ts +1 -1
- package/src/lib/runXyWithWarning.ts +4 -2
- package/src/lib/withErrnoException.ts +2 -2
- package/src/lib/withError.ts +1 -0
- package/src/lib/yarn/workspace/yarnWorkspaces.ts +11 -10
- package/src/xy/param.ts +7 -0
- package/src/xy/xy.ts +2 -2
- package/src/xy/xyCommonCommands.ts +5 -12
- package/src/xy/xyLintCommands.ts +7 -16
- package/src/xy/xyParseOptions.ts +0 -1
|
@@ -7,14 +7,15 @@ export const yarnWorkspaces = (): Workspace[] => {
|
|
|
7
7
|
if (result.error) {
|
|
8
8
|
throw result.error
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
return (
|
|
11
|
+
result.stdout
|
|
12
|
+
.toString()
|
|
13
|
+
// NOTE: This probably doesn't work on Windows
|
|
14
|
+
// TODO: Replace /r/n with /n first
|
|
15
|
+
.split('\n')
|
|
16
|
+
.slice(0, -1)
|
|
17
|
+
.map((item) => {
|
|
18
|
+
return JSON.parse(item)
|
|
19
|
+
})
|
|
20
|
+
)
|
|
20
21
|
}
|
package/src/xy/param.ts
ADDED
package/src/xy/xy.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { xyInstallCommands } from './xyInstallCommands'
|
|
|
7
7
|
import { xyLintCommands } from './xyLintCommands'
|
|
8
8
|
import { xyParseOptions } from './xyParseOptions'
|
|
9
9
|
|
|
10
|
-
export const xy = () => {
|
|
10
|
+
export const xy = async () => {
|
|
11
11
|
const options = xyParseOptions()
|
|
12
|
-
return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))
|
|
12
|
+
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))
|
|
13
13
|
.demandCommand(1)
|
|
14
14
|
.command('*', '', () => {
|
|
15
15
|
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
updateYarnVersion,
|
|
17
17
|
yarn3Only,
|
|
18
18
|
} from '../actions'
|
|
19
|
+
import { packagePositionalParam } from './param'
|
|
19
20
|
|
|
20
21
|
export const xyCommonCommands = (args: Argv) => {
|
|
21
22
|
return args
|
|
@@ -24,9 +25,7 @@ export const xyCommonCommands = (args: Argv) => {
|
|
|
24
25
|
'license [package]',
|
|
25
26
|
'License - Check licenses of dependencies',
|
|
26
27
|
(yargs) => {
|
|
27
|
-
return yargs
|
|
28
|
-
describe: 'Specific package to check',
|
|
29
|
-
})
|
|
28
|
+
return packagePositionalParam(yargs)
|
|
30
29
|
},
|
|
31
30
|
async (argv) => {
|
|
32
31
|
if (argv.verbose) console.log(`License: ${argv.package ?? 'all'}`)
|
|
@@ -37,9 +36,7 @@ export const xyCommonCommands = (args: Argv) => {
|
|
|
37
36
|
'dead [package]',
|
|
38
37
|
'Dead - Check for dead code',
|
|
39
38
|
(yargs) => {
|
|
40
|
-
return yargs
|
|
41
|
-
describe: 'Specific package to check',
|
|
42
|
-
})
|
|
39
|
+
return packagePositionalParam(yargs)
|
|
43
40
|
},
|
|
44
41
|
(argv) => {
|
|
45
42
|
if (argv.verbose) console.log('Dead')
|
|
@@ -50,9 +47,7 @@ export const xyCommonCommands = (args: Argv) => {
|
|
|
50
47
|
'deps [package]',
|
|
51
48
|
'Deps - Check for unused or missing dependencies',
|
|
52
49
|
(yargs) => {
|
|
53
|
-
return yargs
|
|
54
|
-
describe: 'Specific package to check',
|
|
55
|
-
})
|
|
50
|
+
return packagePositionalParam(yargs)
|
|
56
51
|
},
|
|
57
52
|
(argv) => {
|
|
58
53
|
if (argv.verbose) console.log(`Checking Dependencies: ${argv.package ?? 'all'}`)
|
|
@@ -63,9 +58,7 @@ export const xyCommonCommands = (args: Argv) => {
|
|
|
63
58
|
'gen-docs [package]',
|
|
64
59
|
'GenDocs - Generate TypeDocs',
|
|
65
60
|
(yargs) => {
|
|
66
|
-
return yargs
|
|
67
|
-
describe: 'Specific package to generate docs for',
|
|
68
|
-
})
|
|
61
|
+
return packagePositionalParam(yargs)
|
|
69
62
|
},
|
|
70
63
|
(argv) => {
|
|
71
64
|
if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? 'all'}`)
|
package/src/xy/xyLintCommands.ts
CHANGED
|
@@ -2,6 +2,7 @@ import chalk from 'chalk'
|
|
|
2
2
|
import { Argv } from 'yargs'
|
|
3
3
|
|
|
4
4
|
import { cycle, fix, lint, lintProfile, publint, relint, sonar } from '../actions'
|
|
5
|
+
import { packagePositionalParam } from './param'
|
|
5
6
|
|
|
6
7
|
export const xyLintCommands = (args: Argv) => {
|
|
7
8
|
return args
|
|
@@ -9,9 +10,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
9
10
|
'cycle [package]',
|
|
10
11
|
'Cycle - Check for dependency cycles',
|
|
11
12
|
(yargs) => {
|
|
12
|
-
return yargs
|
|
13
|
-
describe: 'Specific package to check',
|
|
14
|
-
})
|
|
13
|
+
return packagePositionalParam(yargs)
|
|
15
14
|
},
|
|
16
15
|
(argv) => {
|
|
17
16
|
const start = Date.now()
|
|
@@ -24,9 +23,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
24
23
|
'lint [package]',
|
|
25
24
|
'Lint - Run Eslint',
|
|
26
25
|
(yargs) => {
|
|
27
|
-
return yargs
|
|
28
|
-
describe: 'Specific package to check',
|
|
29
|
-
})
|
|
26
|
+
return packagePositionalParam(yargs)
|
|
30
27
|
},
|
|
31
28
|
async (argv) => {
|
|
32
29
|
if (argv.verbose) console.log('Lint')
|
|
@@ -42,9 +39,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
42
39
|
'fix [package]',
|
|
43
40
|
'Fix - Run Eslint w/fix',
|
|
44
41
|
(yargs) => {
|
|
45
|
-
return yargs
|
|
46
|
-
describe: 'Specific package to check',
|
|
47
|
-
})
|
|
42
|
+
return packagePositionalParam(yargs)
|
|
48
43
|
},
|
|
49
44
|
(argv) => {
|
|
50
45
|
const start = Date.now()
|
|
@@ -57,9 +52,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
57
52
|
'relint [package]',
|
|
58
53
|
'Relint - Clean & Lint',
|
|
59
54
|
(yargs) => {
|
|
60
|
-
return yargs
|
|
61
|
-
describe: 'Specific package to relint',
|
|
62
|
-
})
|
|
55
|
+
return packagePositionalParam(yargs)
|
|
63
56
|
},
|
|
64
57
|
(argv) => {
|
|
65
58
|
if (argv.verbose) console.log('Relinting')
|
|
@@ -72,9 +65,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
72
65
|
'publint [package]',
|
|
73
66
|
'Publint - Run Publint',
|
|
74
67
|
(yargs) => {
|
|
75
|
-
return yargs
|
|
76
|
-
describe: 'Specific package to publint',
|
|
77
|
-
})
|
|
68
|
+
return packagePositionalParam(yargs)
|
|
78
69
|
},
|
|
79
70
|
async (argv) => {
|
|
80
71
|
if (argv.verbose) console.log('Publint')
|
|
@@ -87,7 +78,7 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
87
78
|
'sonar',
|
|
88
79
|
'Sonar - Run Sonar Check',
|
|
89
80
|
(yargs) => {
|
|
90
|
-
return yargs
|
|
81
|
+
return packagePositionalParam(yargs)
|
|
91
82
|
},
|
|
92
83
|
(argv) => {
|
|
93
84
|
const start = Date.now()
|