@naturalcycles/dev-lib 19.0.3 → 19.1.0
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/bin/dev-lib.js +23 -3
- package/dist/lint.util.js +3 -3
- package/package.json +3 -2
package/dist/bin/dev-lib.js
CHANGED
|
@@ -8,13 +8,25 @@ import { runTest } from '../test.util.js';
|
|
|
8
8
|
import { up, upnc } from '../yarn.util.js';
|
|
9
9
|
const commands = [
|
|
10
10
|
new Separator(), // build
|
|
11
|
+
{
|
|
12
|
+
name: 'typecheck',
|
|
13
|
+
fn: typecheck,
|
|
14
|
+
desc: 'Run typecheck (tsc) in folders (src, scripts, e2e) if there is tsconfig.json present',
|
|
15
|
+
},
|
|
11
16
|
{
|
|
12
17
|
name: 'tsc',
|
|
13
18
|
fn: tscAll,
|
|
14
19
|
desc: 'Run tsc in folders (src, scripts, e2e) if there is tsconfig.json present',
|
|
20
|
+
deprecated: true,
|
|
21
|
+
},
|
|
22
|
+
{ name: 'bt', fn: bt, desc: 'Build & Test: run "typecheck" (tsc) and then "test".' },
|
|
23
|
+
{ name: 'check', fn: lbt, desc: '"Run all possible checks": lint, typecheck, then test.' },
|
|
24
|
+
{
|
|
25
|
+
name: 'lbt',
|
|
26
|
+
fn: lbtDeprecated,
|
|
27
|
+
desc: 'Lint/Build/Test: run "lint", then "tsc", then "test".',
|
|
28
|
+
deprecated: true,
|
|
15
29
|
},
|
|
16
|
-
{ name: 'bt', fn: bt, desc: 'Build & Test: run "tsc" and then "test".' },
|
|
17
|
-
{ name: 'lbt', fn: lbt, desc: 'Lint/Build/Test: run "lint", then "tsc", then "test".' },
|
|
18
30
|
{
|
|
19
31
|
name: 'build',
|
|
20
32
|
fn: buildProd,
|
|
@@ -133,6 +145,14 @@ async function bt() {
|
|
|
133
145
|
await tscAll();
|
|
134
146
|
runTest();
|
|
135
147
|
}
|
|
136
|
-
async function
|
|
148
|
+
async function typecheck() {
|
|
137
149
|
await runTSCInFolders(['.', 'scripts', 'e2e'], ['--noEmit']);
|
|
138
150
|
}
|
|
151
|
+
async function tscAll() {
|
|
152
|
+
console.log(`"dev-lib tsc" is deprecated, use "dev-lib typecheck" instead`);
|
|
153
|
+
await typecheck();
|
|
154
|
+
}
|
|
155
|
+
async function lbtDeprecated() {
|
|
156
|
+
console.log(`"dev-lib lbt" is deprecated, use "dev-lib check" instead`);
|
|
157
|
+
await lbt();
|
|
158
|
+
}
|
package/dist/lint.util.js
CHANGED
|
@@ -195,9 +195,9 @@ export function runCommitlintCommand() {
|
|
|
195
195
|
async function runKTLint() {
|
|
196
196
|
if (!existsSync(`node_modules/@naturalcycles/ktlint`))
|
|
197
197
|
return;
|
|
198
|
-
// @ts-expect-error ktlint is not installed, but it's ok
|
|
199
|
-
const {
|
|
200
|
-
await
|
|
198
|
+
// @ts-expect-error ktlint is not installed (due to size in node_modules), but it's ok
|
|
199
|
+
const { ktlintAll } = await import('@naturalcycles/ktlint');
|
|
200
|
+
await ktlintAll();
|
|
201
201
|
}
|
|
202
202
|
function runActionLint() {
|
|
203
203
|
// Only run if there is a folder of `.github/workflows`, otherwise actionlint will fail
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "19.0
|
|
4
|
+
"version": "19.1.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@commitlint/cli": "^19",
|
|
7
7
|
"@commitlint/config-conventional": "^19",
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
"tsx-debug": "tsx scripts/testScript.ts",
|
|
79
79
|
"dev-lib": "tsx ./src/bin/dev-lib.ts",
|
|
80
80
|
"bt": "tsx ./src/bin/dev-lib.ts bt && tsx scripts/eslintPrintConfig.script.ts",
|
|
81
|
-
"
|
|
81
|
+
"check": "tsx ./src/bin/dev-lib.ts check && tsx scripts/eslintPrintConfig.script.ts",
|
|
82
|
+
"typecheck": "tsx ./src/bin/dev-lib.ts typecheck",
|
|
82
83
|
"build": "tsx ./src/bin/dev-lib.ts build",
|
|
83
84
|
"test": "tsx ./src/bin/dev-lib.ts test",
|
|
84
85
|
"test-leaks": "tsx ./src/bin/dev-lib.ts test-leaks",
|