@xylabs/ts-scripts-yarn3 2.12.7 → 2.12.9

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 (80) hide show
  1. package/dist/.tsconfig.build.cjs.tsbuildinfo +1 -1
  2. package/dist/.tsconfig.build.esm.tsbuildinfo +1 -1
  3. package/dist/cjs/actions/build.js +1 -1
  4. package/dist/cjs/actions/build.js.map +1 -1
  5. package/dist/cjs/actions/deploy-major.js +4 -4
  6. package/dist/cjs/actions/deploy-major.js.map +1 -1
  7. package/dist/cjs/actions/deploy-minor.js +4 -4
  8. package/dist/cjs/actions/deploy-minor.js.map +1 -1
  9. package/dist/cjs/actions/deploy-next.js +4 -4
  10. package/dist/cjs/actions/deploy-next.js.map +1 -1
  11. package/dist/cjs/actions/deploy.js +4 -4
  12. package/dist/cjs/actions/deploy.js.map +1 -1
  13. package/dist/cjs/actions/index.d.ts +1 -2
  14. package/dist/cjs/actions/index.d.ts.map +1 -1
  15. package/dist/cjs/actions/index.js +1 -2
  16. package/dist/cjs/actions/index.js.map +1 -1
  17. package/dist/cjs/actions/lint-clean.d.ts.map +1 -1
  18. package/dist/cjs/actions/lint-clean.js +18 -4
  19. package/dist/cjs/actions/lint-clean.js.map +1 -1
  20. package/dist/cjs/actions/lint.d.ts +2 -0
  21. package/dist/cjs/actions/lint.d.ts.map +1 -0
  22. package/dist/cjs/actions/lint.js +9 -0
  23. package/dist/cjs/actions/lint.js.map +1 -0
  24. package/dist/cjs/actions/package/deps.d.ts.map +1 -1
  25. package/dist/cjs/actions/package/deps.js +1 -0
  26. package/dist/cjs/actions/package/deps.js.map +1 -1
  27. package/dist/cjs/actions/rebuild.js +2 -2
  28. package/dist/cjs/actions/rebuild.js.map +1 -1
  29. package/dist/cjs/actions/relint.d.ts.map +1 -1
  30. package/dist/cjs/actions/relint.js +18 -1
  31. package/dist/cjs/actions/relint.js.map +1 -1
  32. package/dist/cjs/lib/xy/xyLintCommands.js +1 -1
  33. package/dist/cjs/lib/xy/xyLintCommands.js.map +1 -1
  34. package/dist/esm/actions/build.js +1 -1
  35. package/dist/esm/actions/build.js.map +1 -1
  36. package/dist/esm/actions/deploy-major.js +4 -4
  37. package/dist/esm/actions/deploy-major.js.map +1 -1
  38. package/dist/esm/actions/deploy-minor.js +4 -4
  39. package/dist/esm/actions/deploy-minor.js.map +1 -1
  40. package/dist/esm/actions/deploy-next.js +4 -4
  41. package/dist/esm/actions/deploy-next.js.map +1 -1
  42. package/dist/esm/actions/deploy.js +4 -4
  43. package/dist/esm/actions/deploy.js.map +1 -1
  44. package/dist/esm/actions/index.d.ts +1 -2
  45. package/dist/esm/actions/index.d.ts.map +1 -1
  46. package/dist/esm/actions/index.js +1 -2
  47. package/dist/esm/actions/index.js.map +1 -1
  48. package/dist/esm/actions/lint-clean.d.ts.map +1 -1
  49. package/dist/esm/actions/lint-clean.js +19 -5
  50. package/dist/esm/actions/lint-clean.js.map +1 -1
  51. package/dist/esm/actions/lint.d.ts +2 -0
  52. package/dist/esm/actions/lint.d.ts.map +1 -0
  53. package/dist/esm/actions/lint.js +5 -0
  54. package/dist/esm/actions/lint.js.map +1 -0
  55. package/dist/esm/actions/package/deps.d.ts.map +1 -1
  56. package/dist/esm/actions/package/deps.js +1 -0
  57. package/dist/esm/actions/package/deps.js.map +1 -1
  58. package/dist/esm/actions/rebuild.js +2 -2
  59. package/dist/esm/actions/rebuild.js.map +1 -1
  60. package/dist/esm/actions/relint.d.ts.map +1 -1
  61. package/dist/esm/actions/relint.js +19 -2
  62. package/dist/esm/actions/relint.js.map +1 -1
  63. package/dist/esm/lib/xy/xyLintCommands.js +2 -2
  64. package/dist/esm/lib/xy/xyLintCommands.js.map +1 -1
  65. package/dist/tsconfig.build.cjs.tsbuildinfo +1 -1
  66. package/dist/tsconfig.build.esm.tsbuildinfo +1 -1
  67. package/package.json +4 -7
  68. package/src/actions/build.ts +1 -1
  69. package/src/actions/deploy-major.ts +4 -4
  70. package/src/actions/deploy-minor.ts +4 -4
  71. package/src/actions/deploy-next.ts +4 -4
  72. package/src/actions/deploy.ts +4 -4
  73. package/src/actions/index.ts +1 -2
  74. package/src/actions/lint-clean.ts +18 -5
  75. package/src/actions/{lint-slow.ts → lint.ts} +0 -0
  76. package/src/actions/package/deps.ts +2 -0
  77. package/src/actions/rebuild.ts +2 -2
  78. package/src/actions/relint.ts +19 -2
  79. package/src/lib/xy/xyLintCommands.ts +2 -2
  80. package/src/actions/lint-fast.ts +0 -9
@@ -1,9 +1,22 @@
1
- import { rimrafSync } from 'rimraf'
1
+ import { rmSync } from 'fs'
2
2
 
3
- import { runSteps } from '../lib'
3
+ import { runSteps, yarnWorkspaces } from '../lib'
4
4
 
5
5
  export const lintClean = () => {
6
- console.log('Clean [.eslintcache]')
7
- rimrafSync('.eslintcache')
8
- return runSteps('Lint [Clean]', [['yarn', ['eslint', '.', '--cache']]])
6
+ console.log('Lint Clean [.eslintcache]')
7
+ const workspaces = yarnWorkspaces()
8
+ const result = workspaces
9
+ .map(({ location, name }) => {
10
+ const dist = `${location}/.eslintcache`
11
+ try {
12
+ rmSync(dist, { force: true, recursive: true })
13
+ return 0
14
+ } catch (ex) {
15
+ const error = ex as Error
16
+ console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`)
17
+ return 1
18
+ }
19
+ })
20
+ .reduce((prev, result) => prev || result, 0)
21
+ return result || runSteps('Lint [Clean]', [['yarn', ['eslint', '.', '--cache']]])
9
22
  }
File without changes
@@ -18,6 +18,8 @@ export const packageDeps = async () => {
18
18
  console.log(`${pkgName} [${error.message}] Failed to parse .depcheckrc [${rawIgnore}]`)
19
19
  }
20
20
 
21
+ ignoreMatches.push('@xylabs/ts-scripts-yarn3')
22
+
21
23
  const unusedList = await Promise.all([
22
24
  depcheck(`${pkg}/.`, { ignoreMatches, ignorePatterns: ['*.stories.*', '*.spec.*', '*.d.ts', 'dist'] }),
23
25
  depcheck(`${pkg}/.`, {
@@ -7,8 +7,8 @@ export interface RebuildParams {
7
7
 
8
8
  export const rebuild = ({ target }: RebuildParams) => {
9
9
  return runSteps('Rebuild', [
10
- ['yarn', 'clean'],
10
+ ['yarn', 'xy clean'],
11
11
  ['yarn', target ? `xy compile -t ${target}` : 'xy compile'],
12
- ['yarn', 'lint'],
12
+ ['yarn', 'xy lint'],
13
13
  ])
14
14
  }
@@ -1,5 +1,22 @@
1
- import { runSteps } from '../lib'
1
+ import { rmSync } from 'fs'
2
+
3
+ import { runSteps, yarnWorkspaces } from '../lib'
2
4
 
3
5
  export const relint = () => {
4
- return runSteps('Relint [Caching]', [['yarn', ['eslint', '.']]])
6
+ console.log('Relint - Cleaning [.eslintcache]')
7
+ const workspaces = yarnWorkspaces()
8
+ const result = workspaces
9
+ .map(({ location, name }) => {
10
+ const dist = `${location}/.eslintcache`
11
+ try {
12
+ rmSync(dist, { force: true, recursive: true })
13
+ return 0
14
+ } catch (ex) {
15
+ const error = ex as Error
16
+ console.error(`Relint - Cleaning [.eslintcache] Failed [${name}, ${error.message}]`)
17
+ return 1
18
+ }
19
+ })
20
+ .reduce((prev, result) => prev || result, 0)
21
+ return result || runSteps('Relint', [['yarn', ['eslint', '.', '--cache']]])
5
22
  }
@@ -1,6 +1,6 @@
1
1
  import yargs from 'yargs'
2
2
 
3
- import { cycle, fix, lint, lintFast, lintProfile, relint, sonar } from '../../actions'
3
+ import { cycle, fix, lint, lintProfile, relint, sonar } from '../../actions'
4
4
 
5
5
  export const xyLintCommands = (args: yargs.Argv) => {
6
6
  return args
@@ -27,7 +27,7 @@ export const xyLintCommands = (args: yargs.Argv) => {
27
27
  },
28
28
  (argv) => {
29
29
  if (argv.verbose) console.info('Lint')
30
- process.exitCode = argv.fix ? fix() : argv.profile ? lintProfile() : argv.cache ? lintFast() : lint()
30
+ process.exitCode = argv.fix ? fix() : argv.profile ? lintProfile() : lint()
31
31
  },
32
32
  )
33
33
  .command(
@@ -1,9 +0,0 @@
1
- import chalk from 'chalk'
2
-
3
- import { runSteps } from '../lib'
4
-
5
- export const lintFast = () => {
6
- console.log(chalk.magenta("Deprecated. Use 'yarn lint' instead"))
7
-
8
- return runSteps('Lint [Caching]', [['yarn', ['eslint', '.', '--cache']]])
9
- }