@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.
Files changed (55) hide show
  1. package/dist/actions/build.js +2 -2
  2. package/dist/actions/build.js.map +1 -1
  3. package/dist/actions/build.mjs +2 -2
  4. package/dist/actions/build.mjs.map +1 -1
  5. package/dist/actions/compile.js +6 -6
  6. package/dist/actions/compile.js.map +1 -1
  7. package/dist/actions/compile.mjs +7 -7
  8. package/dist/actions/compile.mjs.map +1 -1
  9. package/dist/actions/package/publint.js +0 -1
  10. package/dist/actions/package/publint.js.map +1 -1
  11. package/dist/actions/package/publint.mjs +0 -1
  12. package/dist/actions/package/publint.mjs.map +1 -1
  13. package/dist/actions/publint.js +0 -3
  14. package/dist/actions/publint.js.map +1 -1
  15. package/dist/actions/publint.mjs +0 -3
  16. package/dist/actions/publint.mjs.map +1 -1
  17. package/dist/actions/recompile.js +1 -1
  18. package/dist/actions/recompile.js.map +1 -1
  19. package/dist/actions/recompile.mjs +1 -1
  20. package/dist/actions/recompile.mjs.map +1 -1
  21. package/dist/cjs/actions/build.js +2 -2
  22. package/dist/cjs/actions/build.js.map +1 -1
  23. package/dist/cjs/actions/compile.d.ts +3 -3
  24. package/dist/cjs/actions/compile.d.ts.map +1 -1
  25. package/dist/cjs/actions/compile.js +8 -8
  26. package/dist/cjs/actions/compile.js.map +1 -1
  27. package/dist/cjs/actions/package/publint.d.ts.map +1 -1
  28. package/dist/cjs/actions/package/publint.js +0 -1
  29. package/dist/cjs/actions/package/publint.js.map +1 -1
  30. package/dist/cjs/actions/publint.d.ts.map +1 -1
  31. package/dist/cjs/actions/publint.js +0 -3
  32. package/dist/cjs/actions/publint.js.map +1 -1
  33. package/dist/cjs/actions/recompile.js +1 -1
  34. package/dist/esm/actions/build.js +2 -2
  35. package/dist/esm/actions/build.js.map +1 -1
  36. package/dist/esm/actions/compile.d.ts +3 -3
  37. package/dist/esm/actions/compile.d.ts.map +1 -1
  38. package/dist/esm/actions/compile.js +7 -7
  39. package/dist/esm/actions/compile.js.map +1 -1
  40. package/dist/esm/actions/package/publint.d.ts.map +1 -1
  41. package/dist/esm/actions/package/publint.js +0 -1
  42. package/dist/esm/actions/package/publint.js.map +1 -1
  43. package/dist/esm/actions/publint.d.ts.map +1 -1
  44. package/dist/esm/actions/publint.js +0 -3
  45. package/dist/esm/actions/publint.js.map +1 -1
  46. package/dist/esm/actions/recompile.js +1 -1
  47. package/dist/index.d.mts +319 -0
  48. package/dist/index.d.ts +319 -0
  49. package/package.json +14 -14
  50. package/src/actions/build.ts +2 -2
  51. package/src/actions/compile.ts +7 -7
  52. package/src/actions/package/publint.ts +0 -1
  53. package/src/actions/publint.ts +0 -3
  54. package/src/actions/recompile.ts +1 -1
  55. 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.15",
68
+ "@babel/core": "^7.22.17",
69
69
  "@babel/preset-env": "^7.22.15",
70
- "@types/node": "^20.5.9",
71
- "@typescript-eslint/eslint-plugin": "^6.6.0",
72
- "@typescript-eslint/parser": "^6.6.0",
73
- "@xylabs/tsconfig": "~2.19.5",
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.5",
77
- "eslint": "^8.48.0",
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.20.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.8",
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.5",
114
- "@xylabs/tsconfig": "^2.19.5",
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.5"
170
+ "version": "2.19.8"
171
171
  }
@@ -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', 'recompile', ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
26
- ['yarn', ['xy', 'relint', ...pkgOptions, ...verboseOptions, ...incrementalOptions]],
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')}`)
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk'
2
2
 
3
- import { runStepsAsync } from '../lib'
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 = async ({ verbose, target, pkg, incremental }: CompileParams) => {
20
- return pkg ? await compilePackage({ pkg, target, verbose }) : await compileAll({ incremental, target, verbose })
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 runStepsAsync(`Compile [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-compile', ...verboseOptions, ...targetOptions]]])
27
+ return runSteps(`Compile [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-compile', ...verboseOptions, ...targetOptions]]])
28
28
  }
29
29
 
30
- export const compileAll = async ({ jobs, verbose, target, incremental }: CompileParams) => {
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', '-ptA'] : ['-ptA']
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 = await runStepsAsync(`Compile${incremental ? '-Incremental' : ''} [All]`, [
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')}`)
@@ -2,7 +2,6 @@ import { promises as fs } from 'fs'
2
2
 
3
3
  export const packagePublint = async () => {
4
4
  const pkgDir = process.env.INIT_CWD
5
- console.log(`packagePublint: ${pkgDir}`)
6
5
 
7
6
  const pkg = JSON.parse(await fs.readFile(`${pkgDir}/package.json`, 'utf8'))
8
7
 
@@ -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
  }
@@ -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', '-ptA'] : ['-ptA']
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: true,
8
- dts: false,
7
+ clean: false,
8
+ dts: {
9
+ entry: ['src/index.ts'],
10
+ },
9
11
  entry: ['src'],
10
12
  format: ['cjs', 'esm'],
11
13
  sourcemap: true,