@xylabs/ts-scripts-yarn3 2.19.5 → 2.19.8
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.js +2 -2
- package/dist/actions/build.js.map +1 -1
- package/dist/actions/build.mjs +2 -2
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/compile.js +6 -6
- package/dist/actions/compile.js.map +1 -1
- package/dist/actions/compile.mjs +7 -7
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/package/publint.js +0 -1
- package/dist/actions/package/publint.js.map +1 -1
- package/dist/actions/package/publint.mjs +0 -1
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/publint.js +0 -3
- package/dist/actions/publint.js.map +1 -1
- package/dist/actions/publint.mjs +0 -3
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/recompile.js +1 -1
- package/dist/actions/recompile.js.map +1 -1
- package/dist/actions/recompile.mjs +1 -1
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/cjs/actions/build.js +2 -2
- package/dist/cjs/actions/build.js.map +1 -1
- package/dist/cjs/actions/compile.d.ts +3 -3
- package/dist/cjs/actions/compile.d.ts.map +1 -1
- package/dist/cjs/actions/compile.js +8 -8
- package/dist/cjs/actions/compile.js.map +1 -1
- package/dist/cjs/actions/package/publint.d.ts.map +1 -1
- package/dist/cjs/actions/package/publint.js +0 -1
- package/dist/cjs/actions/package/publint.js.map +1 -1
- package/dist/cjs/actions/publint.d.ts.map +1 -1
- package/dist/cjs/actions/publint.js +0 -3
- package/dist/cjs/actions/publint.js.map +1 -1
- package/dist/cjs/actions/recompile.js +1 -1
- package/dist/esm/actions/build.js +2 -2
- package/dist/esm/actions/build.js.map +1 -1
- package/dist/esm/actions/compile.d.ts +3 -3
- package/dist/esm/actions/compile.d.ts.map +1 -1
- package/dist/esm/actions/compile.js +7 -7
- package/dist/esm/actions/compile.js.map +1 -1
- package/dist/esm/actions/package/publint.d.ts.map +1 -1
- package/dist/esm/actions/package/publint.js +0 -1
- package/dist/esm/actions/package/publint.js.map +1 -1
- package/dist/esm/actions/publint.d.ts.map +1 -1
- package/dist/esm/actions/publint.js +0 -3
- package/dist/esm/actions/publint.js.map +1 -1
- package/dist/esm/actions/recompile.js +1 -1
- package/dist/index.d.mts +319 -0
- package/dist/index.d.ts +319 -0
- package/package.json +14 -14
- package/src/actions/build.ts +2 -2
- package/src/actions/compile.ts +7 -7
- package/src/actions/package/publint.ts +0 -1
- package/src/actions/publint.ts +0 -3
- package/src/actions/recompile.ts +1 -1
- package/tsup.config.ts +4 -2
package/package.json
CHANGED
|
@@ -65,26 +65,26 @@
|
|
|
65
65
|
"url": "https://github.com/xylabs/config/issues"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@babel/core": "^7.22.
|
|
68
|
+
"@babel/core": "^7.22.17",
|
|
69
69
|
"@babel/preset-env": "^7.22.15",
|
|
70
|
-
"@types/node": "^20.
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
72
|
-
"@typescript-eslint/parser": "^6.
|
|
73
|
-
"@xylabs/
|
|
70
|
+
"@types/node": "^20.6.0",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
72
|
+
"@typescript-eslint/parser": "^6.7.0",
|
|
73
|
+
"@xylabs/lodash": "^2.10.11",
|
|
74
|
+
"@xylabs/tsconfig": "~2.19.8",
|
|
74
75
|
"chalk": "^4.1.2",
|
|
75
76
|
"cpy": "^8.1.2",
|
|
76
|
-
"depcheck": "^1.4.
|
|
77
|
-
"eslint": "^8.
|
|
77
|
+
"depcheck": "^1.4.6",
|
|
78
|
+
"eslint": "^8.49.0",
|
|
78
79
|
"eslint-config-prettier": "^9.0.0",
|
|
79
80
|
"eslint-plugin-prettier": "^5.0.0",
|
|
80
|
-
"eslint-plugin-sonarjs": "^0.
|
|
81
|
+
"eslint-plugin-sonarjs": "^0.21.0",
|
|
81
82
|
"jest": "^29.6.4",
|
|
82
83
|
"jest-environment-jsdom": "^29.6.4",
|
|
83
84
|
"jest-extended": "^4.0.1",
|
|
84
85
|
"jest-mock-extended": "^3.0.5",
|
|
85
86
|
"jest-sorted": "^1.0.14",
|
|
86
87
|
"license-checker": "^25.0.1",
|
|
87
|
-
"lodash": "^4.17.21",
|
|
88
88
|
"node-cmd": "^5.0.0",
|
|
89
89
|
"npm-check-updates": "^16.13.3",
|
|
90
90
|
"npm-package-json-lint": "^7.0.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"ts-prune": "^0.10.3",
|
|
101
101
|
"tslib": "^2.6.2",
|
|
102
102
|
"tsup": "^7.2.0",
|
|
103
|
-
"typedoc": "^0.24
|
|
103
|
+
"typedoc": "^0.24",
|
|
104
104
|
"yargs": "^17.7.2"
|
|
105
105
|
},
|
|
106
106
|
"description": "TypeScript project scripts",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"@types/license-checker": "^25.0.4",
|
|
111
111
|
"@types/lodash": "^4.14.198",
|
|
112
112
|
"@types/parse-git-config": "^3.0.1",
|
|
113
|
-
"@xylabs/eslint-config": "^2.19.
|
|
114
|
-
"@xylabs/tsconfig": "^2.19.
|
|
113
|
+
"@xylabs/eslint-config": "^2.19.8",
|
|
114
|
+
"@xylabs/tsconfig": "^2.19.8",
|
|
115
115
|
"tsup": "^7.2.0",
|
|
116
116
|
"typescript": "^5.2.2"
|
|
117
117
|
},
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
"node": ">=14.16"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
|
-
"compile": "tsup"
|
|
167
|
+
"compile": "tsup && publint"
|
|
168
168
|
},
|
|
169
169
|
"sideEffects": false,
|
|
170
|
-
"version": "2.19.
|
|
170
|
+
"version": "2.19.8"
|
|
171
171
|
}
|
package/src/actions/build.ts
CHANGED
|
@@ -22,8 +22,8 @@ export const build = async ({ incremental, jobs, target, verbose, pkg }: BuildPa
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const result = await runStepsAsync(`Build${incremental ? '-Incremental' : ''} [${pkg ?? 'All'}]`, [
|
|
25
|
-
['yarn', ['xy', '
|
|
26
|
-
['yarn', ['xy', '
|
|
25
|
+
['yarn', ['xy', 'compile', ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
26
|
+
['yarn', ['xy', 'lint', ...pkgOptions, ...verboseOptions, ...incrementalOptions]],
|
|
27
27
|
['yarn', ['xy', 'deps', ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
28
28
|
])
|
|
29
29
|
console.log(`${chalk.gray('Built in')} [${chalk.magenta(((Date.now() - start) / 1000).toFixed(2))}] ${chalk.gray('seconds')}`)
|
package/src/actions/compile.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { runSteps } from '../lib'
|
|
4
4
|
|
|
5
5
|
export interface CompileParams {
|
|
6
6
|
incremental?: boolean
|
|
@@ -16,28 +16,28 @@ export interface CompilePackageParams {
|
|
|
16
16
|
verbose?: boolean
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const compile =
|
|
20
|
-
return pkg ?
|
|
19
|
+
export const compile = ({ verbose, target, pkg, incremental }: CompileParams) => {
|
|
20
|
+
return pkg ? compilePackage({ pkg, target, verbose }) : compileAll({ incremental, target, verbose })
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const compilePackage = ({ verbose, target, pkg }: CompilePackageParams) => {
|
|
24
24
|
const verboseOptions = verbose ? ['-v'] : []
|
|
25
25
|
const targetOptions = target ? ['-t', target] : []
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return runSteps(`Compile [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-compile', ...verboseOptions, ...targetOptions]]])
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export const compileAll =
|
|
30
|
+
export const compileAll = ({ jobs, verbose, target, incremental }: CompileParams) => {
|
|
31
31
|
const start = Date.now()
|
|
32
32
|
const verboseOptions = verbose ? ['-v'] : []
|
|
33
33
|
const targetOptions = target ? ['-t', target] : []
|
|
34
|
-
const incrementalOptions = incremental ? ['--since', '-
|
|
34
|
+
const incrementalOptions = incremental ? ['--since', '-ptR'] : ['-ptR']
|
|
35
35
|
const jobsOptions = jobs ? ['-j', `${jobs}`] : []
|
|
36
36
|
if (jobs) {
|
|
37
37
|
console.log(chalk.blue(`Jobs set to [${jobs}]`))
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const result =
|
|
40
|
+
const result = runSteps(`Compile${incremental ? '-Incremental' : ''} [All]`, [
|
|
41
41
|
['yarn', ['workspaces', 'foreach', ...incrementalOptions, ...jobsOptions, 'run', 'package-compile', ...verboseOptions, ...targetOptions]],
|
|
42
42
|
])
|
|
43
43
|
console.log(`${chalk.gray('Compiled in')} [${chalk.magenta(((Date.now() - start) / 1000).toFixed(2))}] ${chalk.gray('seconds')}`)
|
package/src/actions/publint.ts
CHANGED
|
@@ -11,18 +11,15 @@ export interface PublintPackageParams {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const publint = async ({ verbose, pkg }: PublintParams) => {
|
|
14
|
-
console.log(`publint: ${pkg}`)
|
|
15
14
|
return pkg ? await publintPackage({ pkg, verbose }) : publintAll({ verbose })
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export const publintPackage = ({ verbose, pkg }: PublintPackageParams) => {
|
|
19
18
|
const verboseOptions = verbose ? ['-v'] : []
|
|
20
|
-
console.log(`publintPackage: ${pkg}`)
|
|
21
19
|
return runStepsAsync(`Publint [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-publint', ...verboseOptions]]])
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
export const publintAll = ({ verbose }: PublintParams) => {
|
|
25
|
-
console.log(`publintAll: ${verbose}`)
|
|
26
23
|
const verboseOptions = verbose ? ['-v'] : []
|
|
27
24
|
return runSteps('Publint', [['yarn', ['workspaces foreach -pA run package-publint', ...verboseOptions]]])
|
|
28
25
|
}
|
package/src/actions/recompile.ts
CHANGED
|
@@ -31,7 +31,7 @@ export const recompileAll = async ({ jobs, verbose, target, incremental }: Recom
|
|
|
31
31
|
const start = Date.now()
|
|
32
32
|
const verboseOptions = verbose ? ['-v'] : []
|
|
33
33
|
const targetOptions = target ? ['-t', target] : []
|
|
34
|
-
const incrementalOptions = incremental ? ['--since', '-
|
|
34
|
+
const incrementalOptions = incremental ? ['--since', '-ptR'] : ['-ptR']
|
|
35
35
|
const jobsOptions = jobs ? ['-j', `${jobs}`] : []
|
|
36
36
|
if (jobs) {
|
|
37
37
|
console.log(chalk.blue(`Jobs set to [${jobs}]`))
|
package/tsup.config.ts
CHANGED
|
@@ -4,8 +4,10 @@ import { defineConfig } from 'tsup'
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
bundle: false,
|
|
6
6
|
cjsInterop: true,
|
|
7
|
-
clean:
|
|
8
|
-
dts:
|
|
7
|
+
clean: false,
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
9
11
|
entry: ['src'],
|
|
10
12
|
format: ['cjs', 'esm'],
|
|
11
13
|
sourcemap: true,
|