@xylabs/ts-scripts-yarn3 2.14.6 → 2.14.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/.tsconfig.build.cjs.tsbuildinfo +1 -1
- package/dist/.tsconfig.build.esm.tsbuildinfo +1 -1
- package/dist/cjs/actions/build.d.ts +2 -1
- package/dist/cjs/actions/build.d.ts.map +1 -1
- package/dist/cjs/actions/build.js +13 -4
- package/dist/cjs/actions/build.js.map +1 -1
- package/dist/cjs/actions/compile.d.ts +2 -1
- package/dist/cjs/actions/compile.d.ts.map +1 -1
- package/dist/cjs/actions/compile.js +18 -5
- package/dist/cjs/actions/compile.js.map +1 -1
- package/dist/cjs/actions/deps.d.ts +2 -1
- package/dist/cjs/actions/deps.d.ts.map +1 -1
- package/dist/cjs/actions/deps.js +12 -3
- package/dist/cjs/actions/deps.js.map +1 -1
- package/dist/cjs/actions/package/tsconfig-gen-cjs.d.ts +1 -1
- package/dist/cjs/actions/package/tsconfig-gen-esm.d.ts +1 -1
- package/dist/cjs/actions/tsconfig-gen-cjs.d.ts +1 -1
- package/dist/cjs/actions/tsconfig-gen-clean.d.ts +1 -1
- package/dist/cjs/actions/tsconfig-gen-esm.d.ts +1 -1
- package/dist/cjs/actions/tsconfig-gen-test.d.ts +1 -1
- package/dist/cjs/actions/tsconfig-gen.d.ts +1 -1
- package/dist/cjs/lib/xy/xyBuildCommands.d.ts.map +1 -1
- package/dist/cjs/lib/xy/xyBuildCommands.js +7 -1
- package/dist/cjs/lib/xy/xyBuildCommands.js.map +1 -1
- package/dist/cjs/lib/xy/xyCommonCommands.js +1 -1
- package/dist/cjs/lib/xy/xyCommonCommands.js.map +1 -1
- package/dist/cjs/lib/xy/xyParseOptions.d.ts.map +1 -1
- package/dist/cjs/lib/xy/xyParseOptions.js +6 -0
- package/dist/cjs/lib/xy/xyParseOptions.js.map +1 -1
- package/dist/esm/actions/build.d.ts +2 -1
- package/dist/esm/actions/build.d.ts.map +1 -1
- package/dist/esm/actions/build.js +12 -4
- package/dist/esm/actions/build.js.map +1 -1
- package/dist/esm/actions/compile.d.ts +2 -1
- package/dist/esm/actions/compile.d.ts.map +1 -1
- package/dist/esm/actions/compile.js +17 -5
- package/dist/esm/actions/compile.js.map +1 -1
- package/dist/esm/actions/deps.d.ts +2 -1
- package/dist/esm/actions/deps.d.ts.map +1 -1
- package/dist/esm/actions/deps.js +11 -3
- package/dist/esm/actions/deps.js.map +1 -1
- package/dist/esm/actions/package/tsconfig-gen-cjs.d.ts +1 -1
- package/dist/esm/actions/package/tsconfig-gen-esm.d.ts +1 -1
- package/dist/esm/actions/tsconfig-gen-cjs.d.ts +1 -1
- package/dist/esm/actions/tsconfig-gen-clean.d.ts +1 -1
- package/dist/esm/actions/tsconfig-gen-esm.d.ts +1 -1
- package/dist/esm/actions/tsconfig-gen-test.d.ts +1 -1
- package/dist/esm/actions/tsconfig-gen.d.ts +1 -1
- package/dist/esm/lib/xy/xyBuildCommands.d.ts.map +1 -1
- package/dist/esm/lib/xy/xyBuildCommands.js +7 -1
- package/dist/esm/lib/xy/xyBuildCommands.js.map +1 -1
- package/dist/esm/lib/xy/xyCommonCommands.js +1 -1
- package/dist/esm/lib/xy/xyCommonCommands.js.map +1 -1
- package/dist/esm/lib/xy/xyParseOptions.d.ts.map +1 -1
- package/dist/esm/lib/xy/xyParseOptions.js +6 -0
- package/dist/esm/lib/xy/xyParseOptions.js.map +1 -1
- package/dist/tsconfig.build.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.build.esm.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/actions/build.ts +14 -4
- package/src/actions/compile.ts +19 -5
- package/src/actions/deps.ts +13 -3
- package/src/lib/xy/xyBuildCommands.ts +7 -1
- package/src/lib/xy/xyCommonCommands.ts +1 -1
- package/src/lib/xy/xyParseOptions.ts +6 -0
package/src/actions/deps.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import chalk from 'chalk'
|
|
2
|
+
|
|
1
3
|
import { runSteps, ScriptStep } from '../lib'
|
|
2
4
|
|
|
3
5
|
export interface DepsParams {
|
|
4
6
|
incremental?: boolean
|
|
7
|
+
jobs?: number
|
|
5
8
|
pkg?: string
|
|
6
9
|
}
|
|
7
10
|
|
|
@@ -19,9 +22,16 @@ export const depsPackage = ({ pkg }: DepsPackageParams) => {
|
|
|
19
22
|
return runSteps(`Deps [${pkg}]`, [...steps])
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
export const depsAll = ({ incremental }: DepsParams) => {
|
|
25
|
+
export const depsAll = ({ incremental, jobs }: DepsParams) => {
|
|
26
|
+
const start = Date.now()
|
|
27
|
+
const jobsOptions = jobs ? ['-j', `${jobs}`] : []
|
|
28
|
+
if (jobs) {
|
|
29
|
+
console.log(chalk.blue(`Jobs set to [${jobs}]`))
|
|
30
|
+
}
|
|
23
31
|
const incrementalOptions = incremental ? ['--since', '-pA'] : ['-pA']
|
|
24
|
-
const steps: ScriptStep[] = [['yarn', ['workspaces', 'foreach', ...incrementalOptions, 'run', 'package-deps']]]
|
|
32
|
+
const steps: ScriptStep[] = [['yarn', ['workspaces', 'foreach', ...jobsOptions, ...incrementalOptions, 'run', 'package-deps']]]
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
const result = runSteps(`Deps [All${incremental ? '-Incremental' : ''}]`, [...steps])
|
|
35
|
+
console.log(`${chalk.gray('Dep checked in')} [${chalk.magenta(((Date.now() - start) / 1000).toFixed(2))}] ${chalk.gray('seconds')}`)
|
|
36
|
+
return result
|
|
27
37
|
}
|
|
@@ -17,7 +17,12 @@ export const xyBuildCommands = (args: yargs.Argv) => {
|
|
|
17
17
|
console.log(`Building: ${argv.package ?? 'all'}`)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
process.exitCode = build({
|
|
20
|
+
process.exitCode = build({
|
|
21
|
+
jobs: argv.jobs as number,
|
|
22
|
+
pkg: argv.package as string,
|
|
23
|
+
target: argv.target as 'esm' | 'cjs',
|
|
24
|
+
verbose: !!argv.verbose,
|
|
25
|
+
})
|
|
21
26
|
},
|
|
22
27
|
)
|
|
23
28
|
.command(
|
|
@@ -34,6 +39,7 @@ export const xyBuildCommands = (args: yargs.Argv) => {
|
|
|
34
39
|
}
|
|
35
40
|
process.exitCode = compile({
|
|
36
41
|
incremental: !!argv.incremental,
|
|
42
|
+
jobs: argv.jobs as number,
|
|
37
43
|
pkg: argv.package as string,
|
|
38
44
|
target: argv.target as 'esm' | 'cjs',
|
|
39
45
|
verbose: !!argv.verbose,
|
|
@@ -54,7 +54,7 @@ export const xyCommonCommands = (args: yargs.Argv) => {
|
|
|
54
54
|
},
|
|
55
55
|
(argv) => {
|
|
56
56
|
if (argv.verbose) console.log(`Checking Dependencies: ${argv.package ?? 'all'}`)
|
|
57
|
-
process.exitCode = deps({ incremental: !!argv.incremental, pkg: argv.package as string })
|
|
57
|
+
process.exitCode = deps({ incremental: !!argv.incremental, jobs: argv.jobs as number, pkg: argv.package as string })
|
|
58
58
|
},
|
|
59
59
|
)
|
|
60
60
|
.command(
|
|
@@ -4,6 +4,12 @@ import { hideBin } from 'yargs/helpers'
|
|
|
4
4
|
|
|
5
5
|
export const xyParseOptions = (): yargs.Argv => {
|
|
6
6
|
return yargs(hideBin(process.argv))
|
|
7
|
+
.option('jobs', {
|
|
8
|
+
alias: 'j',
|
|
9
|
+
default: undefined,
|
|
10
|
+
description: 'Max parallel jobs',
|
|
11
|
+
type: 'number',
|
|
12
|
+
})
|
|
7
13
|
.option('verbose', {
|
|
8
14
|
alias: 'v',
|
|
9
15
|
default: false,
|