@xylabs/ts-scripts-yarn3 2.8.0-rc.11 → 2.8.0-rc.13
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/cjs/actions/compile.d.ts +3 -2
- package/dist/cjs/actions/compile.d.ts.map +1 -1
- package/dist/cjs/actions/compile.js +8 -6
- package/dist/cjs/actions/compile.js.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-cjs.d.ts.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-cjs.js +7 -1
- package/dist/cjs/actions/tsconfig-gen-cjs.js.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-esm.d.ts.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-esm.js +7 -1
- package/dist/cjs/actions/tsconfig-gen-esm.js.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-test.d.ts.map +1 -1
- package/dist/cjs/actions/tsconfig-gen-test.js +7 -1
- package/dist/cjs/actions/tsconfig-gen-test.js.map +1 -1
- package/dist/cjs/lib/xy.d.ts +6 -2
- package/dist/cjs/lib/xy.d.ts.map +1 -1
- package/dist/cjs/lib/xy.js +7 -1
- package/dist/cjs/lib/xy.js.map +1 -1
- package/dist/esm/actions/compile.d.ts +3 -2
- package/dist/esm/actions/compile.d.ts.map +1 -1
- package/dist/esm/actions/compile.js +8 -6
- package/dist/esm/actions/compile.js.map +1 -1
- package/dist/esm/actions/tsconfig-gen-cjs.d.ts.map +1 -1
- package/dist/esm/actions/tsconfig-gen-cjs.js +7 -1
- package/dist/esm/actions/tsconfig-gen-cjs.js.map +1 -1
- package/dist/esm/actions/tsconfig-gen-esm.d.ts.map +1 -1
- package/dist/esm/actions/tsconfig-gen-esm.js +7 -1
- package/dist/esm/actions/tsconfig-gen-esm.js.map +1 -1
- package/dist/esm/actions/tsconfig-gen-test.d.ts.map +1 -1
- package/dist/esm/actions/tsconfig-gen-test.js +7 -1
- package/dist/esm/actions/tsconfig-gen-test.js.map +1 -1
- package/dist/esm/lib/xy.d.ts +6 -2
- package/dist/esm/lib/xy.d.ts.map +1 -1
- package/dist/esm/lib/xy.js +7 -1
- package/dist/esm/lib/xy.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/compile.ts +11 -6
- package/src/actions/tsconfig-gen-cjs.ts +6 -1
- package/src/actions/tsconfig-gen-esm.ts +6 -1
- package/src/actions/tsconfig-gen-test.ts +6 -1
- package/src/lib/xy.ts +7 -1
|
@@ -29,7 +29,12 @@ export const tsconfigGenEsm = (pkg?: string) => {
|
|
|
29
29
|
return workspaceList
|
|
30
30
|
.map(({ location, name }) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
let currentConfig: string | undefined
|
|
33
|
+
try {
|
|
34
|
+
currentConfig = readFileSync(`${location}/.tsconfig.build.esm.json`, { encoding: 'utf8' })
|
|
35
|
+
} catch (ex) {
|
|
36
|
+
currentConfig = undefined
|
|
37
|
+
}
|
|
33
38
|
if (currentConfig !== config) {
|
|
34
39
|
console.log(chalk.gray(`Updating ESM tsconfig [${name}]`))
|
|
35
40
|
writeFileSync(`${location}/.tsconfig.build.esm.json`, config, { encoding: 'utf8' })
|
|
@@ -23,7 +23,12 @@ export const tsconfigGenTest = (pkg?: string) => {
|
|
|
23
23
|
return workspaceList
|
|
24
24
|
.map(({ location, name }) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
let currentConfig: string | undefined
|
|
27
|
+
try {
|
|
28
|
+
currentConfig = readFileSync(`${location}/.tsconfig.build.test.json`, { encoding: 'utf8' })
|
|
29
|
+
} catch (ex) {
|
|
30
|
+
currentConfig = undefined
|
|
31
|
+
}
|
|
27
32
|
if (currentConfig !== config) {
|
|
28
33
|
console.log(chalk.gray(`Updating TEST tsconfig [${name}]`))
|
|
29
34
|
writeFileSync(`${location}/.tsconfig.build.test.json`, config, { encoding: 'utf8' })
|
package/src/lib/xy.ts
CHANGED
|
@@ -49,6 +49,12 @@ export const parseOptions = () => {
|
|
|
49
49
|
description: 'Limit output to specific target',
|
|
50
50
|
type: 'string',
|
|
51
51
|
})
|
|
52
|
+
.option('incremental', {
|
|
53
|
+
alias: 'i',
|
|
54
|
+
default: false,
|
|
55
|
+
description: 'Attempt to perform the action only on changed packages',
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
})
|
|
52
58
|
.option('fix', {
|
|
53
59
|
alias: 'f',
|
|
54
60
|
default: false,
|
|
@@ -94,7 +100,7 @@ export const xy = () => {
|
|
|
94
100
|
},
|
|
95
101
|
(argv) => {
|
|
96
102
|
if (argv.verbose) console.info(`Compiling: ${argv.package ?? 'all'}`)
|
|
97
|
-
process.exitCode = compile({ pkg: argv.package as string, target: argv.target as 'esm' | 'cjs' })
|
|
103
|
+
process.exitCode = compile({ incremental: !!argv.incremental, pkg: argv.package as string, target: argv.target as 'esm' | 'cjs' })
|
|
98
104
|
},
|
|
99
105
|
)
|
|
100
106
|
.command(
|