@naturalcycles/dev-lib 19.25.1 → 19.25.3
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/build.util.js +5 -2
- package/dist/lint.util.js +3 -3
- package/package.json +1 -1
package/dist/build.util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import {
|
|
2
|
+
import { grey } from '@naturalcycles/nodejs-lib/colors';
|
|
3
3
|
import { exec2 } from '@naturalcycles/nodejs-lib/exec2';
|
|
4
4
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
|
|
5
5
|
import { kpySync } from '@naturalcycles/nodejs-lib/kpy';
|
|
@@ -38,7 +38,7 @@ export async function runTSCInFolder(dir, args = []) {
|
|
|
38
38
|
const tscPath = findPackageBinPath('typescript', 'tsc');
|
|
39
39
|
const cacheLocation = `node_modules/.cache/${dir}.tsbuildinfo`;
|
|
40
40
|
const cacheFound = existsSync(cacheLocation);
|
|
41
|
-
console.log(
|
|
41
|
+
console.log(grey(`tsc ${dir} cache found: ${cacheFound}`));
|
|
42
42
|
await exec2.spawnAsync(tscPath, {
|
|
43
43
|
args: ['-P', tsconfigPath, ...args],
|
|
44
44
|
shell: false,
|
|
@@ -47,6 +47,9 @@ export async function runTSCInFolder(dir, args = []) {
|
|
|
47
47
|
export async function runTSCProd(args = []) {
|
|
48
48
|
const tsconfigPath = [`./tsconfig.prod.json`].find(p => fs2.pathExists(p)) || 'tsconfig.json';
|
|
49
49
|
const tscPath = findPackageBinPath('typescript', 'tsc');
|
|
50
|
+
const cacheLocation = `node_modules/.cache/src.tsbuildinfo`;
|
|
51
|
+
const cacheFound = existsSync(cacheLocation);
|
|
52
|
+
console.log(grey(`tsc src cache found: ${cacheFound}`));
|
|
50
53
|
await exec2.spawnAsync(tscPath, {
|
|
51
54
|
args: ['-P', tsconfigPath, '--noEmit', 'false', '--noCheck', ...args],
|
|
52
55
|
shell: false,
|
package/dist/lint.util.js
CHANGED
|
@@ -9,7 +9,7 @@ import { _filterFalsyValues } from '@naturalcycles/js-lib/object/object.util.js'
|
|
|
9
9
|
import { semver2 } from '@naturalcycles/js-lib/semver';
|
|
10
10
|
import { _truncate } from '@naturalcycles/js-lib/string/string.util.js';
|
|
11
11
|
import { git2 } from '@naturalcycles/nodejs-lib';
|
|
12
|
-
import { boldGrey, dimGrey } from '@naturalcycles/nodejs-lib/colors';
|
|
12
|
+
import { boldGrey, dimGrey, grey } from '@naturalcycles/nodejs-lib/colors';
|
|
13
13
|
import { exec2 } from '@naturalcycles/nodejs-lib/exec2';
|
|
14
14
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
|
|
15
15
|
import { _yargs } from '@naturalcycles/nodejs-lib/yargs';
|
|
@@ -123,7 +123,7 @@ async function runESLint(dir, extensions = eslintExtensions.split(','), fix = tr
|
|
|
123
123
|
const eslintPath = findPackageBinPath('eslint', 'eslint');
|
|
124
124
|
const cacheLocation = `node_modules/.cache/eslint_${dir}`;
|
|
125
125
|
const cacheFound = existsSync(cacheLocation);
|
|
126
|
-
console.log(
|
|
126
|
+
console.log(grey(`eslint ${dir} cache found: ${cacheFound}`));
|
|
127
127
|
await exec2.spawnAsync(eslintPath, {
|
|
128
128
|
args: [
|
|
129
129
|
`--config`,
|
|
@@ -159,7 +159,7 @@ export function runPrettier(experimentalCli = true) {
|
|
|
159
159
|
const prettierPath = findPackageBinPath('prettier', 'prettier');
|
|
160
160
|
const cacheLocation = 'node_modules/.cache/prettier';
|
|
161
161
|
const cacheFound = existsSync(cacheLocation);
|
|
162
|
-
console.log(
|
|
162
|
+
console.log(grey(`prettier cache found: ${cacheFound}`));
|
|
163
163
|
// prettier --write 'src/**/*.{js,ts,css,scss,graphql}'
|
|
164
164
|
exec2.spawn(prettierPath, {
|
|
165
165
|
args: [
|