@hublo/sentinel 1.7.0-alpha.21 → 1.7.0-alpha.23
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/README.md +0 -1
- package/dist/bin/sentinel.js +15 -16
- package/dist/{chunk-RI7R3S3T.js → chunk-426EFSK7.js} +7068 -6911
- package/dist/{chunk-J2RMARWP.js → chunk-4YQXLPJ5.js} +2 -2
- package/dist/{chunk-UVXXEAHU.js → chunk-7JTCUK77.js} +3 -3
- package/dist/{chunk-BBNABWZ6.js → chunk-CSZW7OMC.js} +8 -6
- package/dist/chunk-CSZW7OMC.js.map +1 -0
- package/dist/chunk-F5WISUN3.js +17 -0
- package/dist/chunk-F5WISUN3.js.map +1 -0
- package/dist/chunk-FY3P5QPH.js +15 -0
- package/dist/chunk-FY3P5QPH.js.map +1 -0
- package/dist/chunk-NE3IEJBN.js +59 -0
- package/dist/chunk-NE3IEJBN.js.map +1 -0
- package/dist/chunk-VWASE6NN.js +34 -0
- package/dist/chunk-VWASE6NN.js.map +1 -0
- package/dist/{chunk-XTBHIKFG.js → chunk-ZNANJEMK.js} +16 -30
- package/dist/chunk-ZNANJEMK.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/roles/runtime-analysis/config.d.ts +92 -0
- package/dist/roles/runtime-analysis/config.js +10 -0
- package/dist/roles/runtime-analysis/gateway.d.ts +2 -0
- package/dist/roles/runtime-analysis/gateway.js +82 -0
- package/dist/roles/runtime-analysis/gateway.js.map +1 -0
- package/dist/roles/runtime-analysis/mock-api.d.ts +2 -0
- package/dist/roles/runtime-analysis/mock-api.js +43 -0
- package/dist/roles/runtime-analysis/mock-api.js.map +1 -0
- package/dist/roles/static-analysis/config.js +1 -2
- package/dist/roles/test/setup/jest-parity.js +2 -2
- package/dist/roles/test/setup/workspace-entry.js +2 -2
- package/dist/{validate-YCTNTNFT.js → validate-GD63SP6M.js} +2 -2
- package/docs/static-analysis-study.md +10 -49
- package/docs/typescript-traces.md +2 -216
- package/package.json +9 -5
- package/runtime-analysis-deps/load.mjs +6 -0
- package/runtime-analysis-deps/package-lock.json +1766 -0
- package/runtime-analysis-deps/package.json +11 -0
- package/dist/chunk-BBNABWZ6.js.map +0 -1
- package/dist/chunk-PXTU5MPW.js +0 -9
- package/dist/chunk-PXTU5MPW.js.map +0 -1
- package/dist/chunk-XTBHIKFG.js.map +0 -1
- package/dist/chunk-XYOIXC6A.js +0 -126
- package/dist/chunk-XYOIXC6A.js.map +0 -1
- package/dist/roles/code-churn/config.d.ts +0 -92
- package/dist/roles/code-churn/config.js +0 -10
- package/docs/code-churn-adoption.md +0 -237
- /package/dist/{chunk-J2RMARWP.js.map → chunk-4YQXLPJ5.js.map} +0 -0
- /package/dist/roles/{code-churn → runtime-analysis}/config.js.map +0 -0
|
@@ -236,11 +236,9 @@ $ sentinel --report --json 2>/dev/null
|
|
|
236
236
|
"typescript",
|
|
237
237
|
"build",
|
|
238
238
|
"test",
|
|
239
|
-
"static-analysis"
|
|
240
|
-
"code-churn"
|
|
239
|
+
"static-analysis"
|
|
241
240
|
],
|
|
242
241
|
"skipped": [
|
|
243
|
-
"runtime-analysis",
|
|
244
242
|
"arch"
|
|
245
243
|
],
|
|
246
244
|
"results": [
|
|
@@ -320,18 +318,6 @@ $ sentinel --report --json 2>/dev/null
|
|
|
320
318
|
"preset": null,
|
|
321
319
|
"conformant": false
|
|
322
320
|
},
|
|
323
|
-
{
|
|
324
|
-
"project": "svelte-app",
|
|
325
|
-
"target": "code-churn",
|
|
326
|
-
"flavour": "svelte",
|
|
327
|
-
"ok": true,
|
|
328
|
-
"status": "ok",
|
|
329
|
-
"files": 1,
|
|
330
|
-
"historyRead": false,
|
|
331
|
-
"adopted": false,
|
|
332
|
-
"preset": null,
|
|
333
|
-
"conformant": false
|
|
334
|
-
},
|
|
335
321
|
{
|
|
336
322
|
"project": "bff-admin",
|
|
337
323
|
"target": "lint",
|
|
@@ -408,18 +394,6 @@ $ sentinel --report --json 2>/dev/null
|
|
|
408
394
|
"preset": null,
|
|
409
395
|
"conformant": false
|
|
410
396
|
},
|
|
411
|
-
{
|
|
412
|
-
"project": "bff-admin",
|
|
413
|
-
"target": "code-churn",
|
|
414
|
-
"flavour": "nest",
|
|
415
|
-
"ok": true,
|
|
416
|
-
"status": "ok",
|
|
417
|
-
"files": 1,
|
|
418
|
-
"historyRead": false,
|
|
419
|
-
"adopted": false,
|
|
420
|
-
"preset": null,
|
|
421
|
-
"conformant": false
|
|
422
|
-
},
|
|
423
397
|
{
|
|
424
398
|
"project": "react-app",
|
|
425
399
|
"target": "lint",
|
|
@@ -496,18 +470,6 @@ $ sentinel --report --json 2>/dev/null
|
|
|
496
470
|
"preset": null,
|
|
497
471
|
"conformant": false
|
|
498
472
|
},
|
|
499
|
-
{
|
|
500
|
-
"project": "react-app",
|
|
501
|
-
"target": "code-churn",
|
|
502
|
-
"flavour": "react",
|
|
503
|
-
"ok": true,
|
|
504
|
-
"status": "ok",
|
|
505
|
-
"files": 1,
|
|
506
|
-
"historyRead": false,
|
|
507
|
-
"adopted": false,
|
|
508
|
-
"preset": null,
|
|
509
|
-
"conformant": false
|
|
510
|
-
},
|
|
511
473
|
{
|
|
512
474
|
"project": "utils",
|
|
513
475
|
"target": "lint",
|
|
@@ -571,18 +533,6 @@ $ sentinel --report --json 2>/dev/null
|
|
|
571
533
|
"adopted": false,
|
|
572
534
|
"preset": null,
|
|
573
535
|
"conformant": false
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
"project": "utils",
|
|
577
|
-
"target": "code-churn",
|
|
578
|
-
"flavour": "node",
|
|
579
|
-
"ok": true,
|
|
580
|
-
"status": "ok",
|
|
581
|
-
"files": 1,
|
|
582
|
-
"historyRead": false,
|
|
583
|
-
"adopted": false,
|
|
584
|
-
"preset": null,
|
|
585
|
-
"conformant": false
|
|
586
536
|
}
|
|
587
537
|
]
|
|
588
538
|
}
|
|
@@ -615,11 +565,9 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
615
565
|
"typescript",
|
|
616
566
|
"build",
|
|
617
567
|
"test",
|
|
618
|
-
"static-analysis"
|
|
619
|
-
"code-churn"
|
|
568
|
+
"static-analysis"
|
|
620
569
|
],
|
|
621
570
|
"skipped": [
|
|
622
|
-
"runtime-analysis",
|
|
623
571
|
"arch"
|
|
624
572
|
],
|
|
625
573
|
"results": [
|
|
@@ -699,18 +647,6 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
699
647
|
"preset": null,
|
|
700
648
|
"conformant": false
|
|
701
649
|
},
|
|
702
|
-
{
|
|
703
|
-
"project": "svelte-app",
|
|
704
|
-
"target": "code-churn",
|
|
705
|
-
"flavour": "svelte",
|
|
706
|
-
"ok": true,
|
|
707
|
-
"status": "ok",
|
|
708
|
-
"files": 1,
|
|
709
|
-
"historyRead": false,
|
|
710
|
-
"adopted": false,
|
|
711
|
-
"preset": null,
|
|
712
|
-
"conformant": false
|
|
713
|
-
},
|
|
714
650
|
{
|
|
715
651
|
"project": "bff-admin",
|
|
716
652
|
"target": "lint",
|
|
@@ -787,18 +723,6 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
787
723
|
"preset": null,
|
|
788
724
|
"conformant": false
|
|
789
725
|
},
|
|
790
|
-
{
|
|
791
|
-
"project": "bff-admin",
|
|
792
|
-
"target": "code-churn",
|
|
793
|
-
"flavour": "nest",
|
|
794
|
-
"ok": true,
|
|
795
|
-
"status": "ok",
|
|
796
|
-
"files": 1,
|
|
797
|
-
"historyRead": false,
|
|
798
|
-
"adopted": false,
|
|
799
|
-
"preset": null,
|
|
800
|
-
"conformant": false
|
|
801
|
-
},
|
|
802
726
|
{
|
|
803
727
|
"project": "react-app",
|
|
804
728
|
"target": "lint",
|
|
@@ -875,18 +799,6 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
875
799
|
"preset": null,
|
|
876
800
|
"conformant": false
|
|
877
801
|
},
|
|
878
|
-
{
|
|
879
|
-
"project": "react-app",
|
|
880
|
-
"target": "code-churn",
|
|
881
|
-
"flavour": "react",
|
|
882
|
-
"ok": true,
|
|
883
|
-
"status": "ok",
|
|
884
|
-
"files": 1,
|
|
885
|
-
"historyRead": false,
|
|
886
|
-
"adopted": false,
|
|
887
|
-
"preset": null,
|
|
888
|
-
"conformant": false
|
|
889
|
-
},
|
|
890
802
|
{
|
|
891
803
|
"project": "utils",
|
|
892
804
|
"target": "lint",
|
|
@@ -950,18 +862,6 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
950
862
|
"adopted": false,
|
|
951
863
|
"preset": null,
|
|
952
864
|
"conformant": false
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
"project": "utils",
|
|
956
|
-
"target": "code-churn",
|
|
957
|
-
"flavour": "node",
|
|
958
|
-
"ok": true,
|
|
959
|
-
"status": "ok",
|
|
960
|
-
"files": 1,
|
|
961
|
-
"historyRead": false,
|
|
962
|
-
"adopted": false,
|
|
963
|
-
"preset": null,
|
|
964
|
-
"conformant": false
|
|
965
865
|
}
|
|
966
866
|
]
|
|
967
867
|
}
|
|
@@ -1322,62 +1222,6 @@ $ sentinel --init --dry-run
|
|
|
1322
1222
|
+ }
|
|
1323
1223
|
+ }
|
|
1324
1224
|
dry run: no files written
|
|
1325
|
-
added code-churn.config.mjs; added the 3 `code-churn` scripts; the role reports and never fails a run
|
|
1326
|
-
|
|
1327
|
-
create code-churn.config.mjs
|
|
1328
|
-
+ import { defineCodeChurn } from '@hublo/sentinel/code-churn'
|
|
1329
|
-
+
|
|
1330
|
-
+ export default defineCodeChurn({
|
|
1331
|
-
+ root: import.meta.dirname,
|
|
1332
|
-
+
|
|
1333
|
-
+ // ---------------------------------------------------------------------------------------------
|
|
1334
|
-
+ // What this module can move, with the role's value today. A setting you leave out keeps that
|
|
1335
|
-
+ // value; a setting you write REPLACES it, including inside a list. Anything you set is printed in
|
|
1336
|
-
+ // the report and marked `(module)`, because two modules measured differently no longer compare.
|
|
1337
|
-
+ //
|
|
1338
|
-
+ // window.reworkDays 21
|
|
1339
|
-
+ // window.periodDays 90
|
|
1340
|
-
+ // maxFilesPerCommit 100
|
|
1341
|
-
+ // levels {"minimumAdded":500,"low":3,"above":11,"watch":16}
|
|
1342
|
-
+ // include ["**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,svelte,vue}"]
|
|
1343
|
-
+ // includeTests false
|
|
1344
|
-
+ // tests ["**/{test,tests,__tests__,e2e,fixtures,mocks,__mocks__,test-utils}/**","**/*.{spec,test,integration-spec,e2e-spec,steps,test-util,mock}.{ts,tsx,mts,cts,js,jsx}"]
|
|
1345
|
-
+ // ignore ["**/node_modules/**","**/dist/**","**/build/**","**/coverage/**","**/*.d.{ts,mts,cts}","**/*.generated.*","**/*.gen.*","**/generated/**"]
|
|
1346
|
-
+ // listed 10
|
|
1347
|
-
+ //
|
|
1348
|
-
+ // Read the values in full with:
|
|
1349
|
-
+ //
|
|
1350
|
-
+ // pnpm exec sentinel --inspect --code-churn --json
|
|
1351
|
-
+ //
|
|
1352
|
-
+ // overrides: {
|
|
1353
|
-
+ // window: { periodDays: 180 },
|
|
1354
|
-
+ // },
|
|
1355
|
-
+ })
|
|
1356
|
-
|
|
1357
|
-
update package.json
|
|
1358
|
-
- { "name": "bff-admin", "dependencies": { "@nestjs/core": "^10" } }
|
|
1359
|
-
+ {
|
|
1360
|
-
+ "name": "bff-admin",
|
|
1361
|
-
+ "dependencies": {
|
|
1362
|
-
+ "@nestjs/core": "^10"
|
|
1363
|
-
+ },
|
|
1364
|
-
+ "scripts": {
|
|
1365
|
-
+ "code-churn": "sentinel --run --code-churn",
|
|
1366
|
-
+ "code-churn:json": "sentinel --run --code-churn --output json",
|
|
1367
|
-
+ "code-churn:html": "sentinel --run --code-churn --output html"
|
|
1368
|
-
+ },
|
|
1369
|
-
+ "devDependencies": {
|
|
1370
|
-
+ "@hublo/sentinel": "<version>"
|
|
1371
|
-
+ },
|
|
1372
|
-
+ "nx": {
|
|
1373
|
-
+ "targets": {
|
|
1374
|
-
+ "code-churn": {
|
|
1375
|
-
+ "cache": false
|
|
1376
|
-
+ }
|
|
1377
|
-
+ }
|
|
1378
|
-
+ }
|
|
1379
|
-
+ }
|
|
1380
|
-
dry run: no files written
|
|
1381
1225
|
materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
|
|
1382
1226
|
|
|
1383
1227
|
create .oxfmtrc.json
|
|
@@ -1455,7 +1299,6 @@ $ sentinel --init --dry-run
|
|
|
1455
1299
|
dry run: the lint autofix runs on adoption and can rewrite source, as moving to another linter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
|
|
1456
1300
|
dry run: the format autofix runs on adoption and can rewrite source, as moving to another formatter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
|
|
1457
1301
|
dry run: would ignore static-analysis-report/ in the root .gitignore
|
|
1458
|
-
dry run: would ignore code-churn-report/ in the root .gitignore
|
|
1459
1302
|
# exit: 0
|
|
1460
1303
|
```
|
|
1461
1304
|
|
|
@@ -1617,62 +1460,6 @@ $ sentinel --init --dry-run --rehearse
|
|
|
1617
1460
|
+ }
|
|
1618
1461
|
+ }
|
|
1619
1462
|
dry run: no files written
|
|
1620
|
-
added code-churn.config.mjs; added the 3 `code-churn` scripts; the role reports and never fails a run
|
|
1621
|
-
|
|
1622
|
-
create code-churn.config.mjs
|
|
1623
|
-
+ import { defineCodeChurn } from '@hublo/sentinel/code-churn'
|
|
1624
|
-
+
|
|
1625
|
-
+ export default defineCodeChurn({
|
|
1626
|
-
+ root: import.meta.dirname,
|
|
1627
|
-
+
|
|
1628
|
-
+ // ---------------------------------------------------------------------------------------------
|
|
1629
|
-
+ // What this module can move, with the role's value today. A setting you leave out keeps that
|
|
1630
|
-
+ // value; a setting you write REPLACES it, including inside a list. Anything you set is printed in
|
|
1631
|
-
+ // the report and marked `(module)`, because two modules measured differently no longer compare.
|
|
1632
|
-
+ //
|
|
1633
|
-
+ // window.reworkDays 21
|
|
1634
|
-
+ // window.periodDays 90
|
|
1635
|
-
+ // maxFilesPerCommit 100
|
|
1636
|
-
+ // levels {"minimumAdded":500,"low":3,"above":11,"watch":16}
|
|
1637
|
-
+ // include ["**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,svelte,vue}"]
|
|
1638
|
-
+ // includeTests false
|
|
1639
|
-
+ // tests ["**/{test,tests,__tests__,e2e,fixtures,mocks,__mocks__,test-utils}/**","**/*.{spec,test,integration-spec,e2e-spec,steps,test-util,mock}.{ts,tsx,mts,cts,js,jsx}"]
|
|
1640
|
-
+ // ignore ["**/node_modules/**","**/dist/**","**/build/**","**/coverage/**","**/*.d.{ts,mts,cts}","**/*.generated.*","**/*.gen.*","**/generated/**"]
|
|
1641
|
-
+ // listed 10
|
|
1642
|
-
+ //
|
|
1643
|
-
+ // Read the values in full with:
|
|
1644
|
-
+ //
|
|
1645
|
-
+ // pnpm exec sentinel --inspect --code-churn --json
|
|
1646
|
-
+ //
|
|
1647
|
-
+ // overrides: {
|
|
1648
|
-
+ // window: { periodDays: 180 },
|
|
1649
|
-
+ // },
|
|
1650
|
-
+ })
|
|
1651
|
-
|
|
1652
|
-
update package.json
|
|
1653
|
-
- { "name": "bff-admin", "dependencies": { "@nestjs/core": "^10" } }
|
|
1654
|
-
+ {
|
|
1655
|
-
+ "name": "bff-admin",
|
|
1656
|
-
+ "dependencies": {
|
|
1657
|
-
+ "@nestjs/core": "^10"
|
|
1658
|
-
+ },
|
|
1659
|
-
+ "scripts": {
|
|
1660
|
-
+ "code-churn": "sentinel --run --code-churn",
|
|
1661
|
-
+ "code-churn:json": "sentinel --run --code-churn --output json",
|
|
1662
|
-
+ "code-churn:html": "sentinel --run --code-churn --output html"
|
|
1663
|
-
+ },
|
|
1664
|
-
+ "devDependencies": {
|
|
1665
|
-
+ "@hublo/sentinel": "<version>"
|
|
1666
|
-
+ },
|
|
1667
|
-
+ "nx": {
|
|
1668
|
-
+ "targets": {
|
|
1669
|
-
+ "code-churn": {
|
|
1670
|
-
+ "cache": false
|
|
1671
|
-
+ }
|
|
1672
|
-
+ }
|
|
1673
|
-
+ }
|
|
1674
|
-
+ }
|
|
1675
|
-
dry run: no files written
|
|
1676
1463
|
materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
|
|
1677
1464
|
|
|
1678
1465
|
create .oxfmtrc.json
|
|
@@ -1750,7 +1537,6 @@ $ sentinel --init --dry-run --rehearse
|
|
|
1750
1537
|
dry run: the lint autofix cannot be rehearsed yet: its preset is not installed in this module, which is expected before the first `pnpm install`. After it, this dry-run names what it rewrites
|
|
1751
1538
|
dry run: the format autofix would rewrite 1 file beyond the ones above: project.json
|
|
1752
1539
|
dry run: would ignore static-analysis-report/ in the root .gitignore
|
|
1753
|
-
dry run: would ignore code-churn-report/ in the root .gitignore
|
|
1754
1540
|
# exit: 0
|
|
1755
1541
|
```
|
|
1756
1542
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.7.0-alpha.
|
|
3
|
+
"version": "1.7.0-alpha.23",
|
|
4
4
|
"description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"types": "./dist/roles/static-analysis/config.d.ts",
|
|
52
52
|
"import": "./dist/roles/static-analysis/config.js"
|
|
53
53
|
},
|
|
54
|
-
"./
|
|
55
|
-
"types": "./dist/roles/
|
|
56
|
-
"import": "./dist/roles/
|
|
54
|
+
"./runtime-analysis": {
|
|
55
|
+
"types": "./dist/roles/runtime-analysis/config.d.ts",
|
|
56
|
+
"import": "./dist/roles/runtime-analysis/config.js"
|
|
57
57
|
},
|
|
58
58
|
"./env": {
|
|
59
59
|
"types": "./dist/roles/env/config.d.ts",
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
"docs",
|
|
115
115
|
"lint",
|
|
116
116
|
"oxlint",
|
|
117
|
-
"plugins"
|
|
117
|
+
"plugins",
|
|
118
|
+
"runtime-analysis-deps"
|
|
118
119
|
],
|
|
119
120
|
"scripts": {
|
|
120
121
|
"build": "tsup && tsx scripts/build-presets.ts",
|
|
@@ -182,7 +183,10 @@
|
|
|
182
183
|
"devDependencies": {
|
|
183
184
|
"@hublo/sentinel": "link:.",
|
|
184
185
|
"@types/node": "^24.19.2",
|
|
186
|
+
"lighthouse": "13.6.0",
|
|
185
187
|
"nx": "^23.1.0",
|
|
188
|
+
"playwright-core": "1.64.1",
|
|
189
|
+
"puppeteer-core": "25.16.0",
|
|
186
190
|
"tsup": "^8.3.0",
|
|
187
191
|
"tsx": "^4.19.0"
|
|
188
192
|
},
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Imported by file path from sentinel's cache: the bare names below resolve to the node_modules
|
|
2
|
+
// installed next to this file, never to the workspace's.
|
|
3
|
+
export { startFlow } from 'lighthouse'
|
|
4
|
+
export { default as desktopConfig } from 'lighthouse/core/config/desktop-config.js'
|
|
5
|
+
export { chromium } from 'playwright-core'
|
|
6
|
+
export { default as puppeteer } from 'puppeteer-core'
|