doc-detective-common 3.1.0-dev.1 → 3.1.0-dev.2
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/.github/workflows/auto-dev-release.yml +178 -0
- package/README.md +48 -0
- package/dist/schemas/config_v3.schema.json +32 -32
- package/dist/schemas/report_v3.schema.json +30 -41
- package/dist/schemas/resolvedTests_v3.schema.json +62 -73
- package/dist/schemas/spec_v3.schema.json +30 -41
- package/dist/schemas/step_v3.schema.json +15 -15
- package/dist/schemas/test_v3.schema.json +30 -41
- package/docs/auto-dev-release.md +195 -0
- package/package.json +4 -4
- package/src/schemas/output_schemas/config_v3.schema.json +32 -32
- package/src/schemas/output_schemas/report_v3.schema.json +30 -41
- package/src/schemas/output_schemas/resolvedTests_v3.schema.json +62 -73
- package/src/schemas/output_schemas/spec_v3.schema.json +30 -41
- package/src/schemas/output_schemas/step_v3.schema.json +15 -15
- package/src/schemas/output_schemas/test_v3.schema.json +30 -41
- package/src/schemas/schemas.json +199 -243
- package/src/schemas/src_schemas/config_v3.schema.json +2 -2
- package/src/schemas/src_schemas/step_v3.schema.json +1 -1
- package/src/schemas/src_schemas/test_v3.schema.json +0 -11
- package/src/validate.js +6 -48
|
@@ -16,11 +16,6 @@
|
|
|
16
16
|
"type": "string",
|
|
17
17
|
"description": "Path to the content that the test is associated with."
|
|
18
18
|
},
|
|
19
|
-
"unsafe": {
|
|
20
|
-
"type": "boolean",
|
|
21
|
-
"description": "Whether or not the test or step is may be unsafe. Unsafe tests and steps may perform actions that could modify the system or environment in unexpected ways. Tests that contain unsafe steps are only performed within Docker containers or if unsafe tests are enabled with the `allowUnsafeTests` config property or the `--unsafe` flag.",
|
|
22
|
-
"default": false
|
|
23
|
-
},
|
|
24
19
|
"detectSteps": {
|
|
25
20
|
"type": "boolean",
|
|
26
21
|
"description": "Whether or not to detect steps in input files based on markup regex.",
|
|
@@ -632,7 +627,7 @@
|
|
|
632
627
|
},
|
|
633
628
|
"unsafe": {
|
|
634
629
|
"type": "boolean",
|
|
635
|
-
"description": "Whether or not the
|
|
630
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
636
631
|
"default": false
|
|
637
632
|
},
|
|
638
633
|
"outputs": {
|
|
@@ -679,7 +674,7 @@
|
|
|
679
674
|
},
|
|
680
675
|
"unsafe": {
|
|
681
676
|
"type": "boolean",
|
|
682
|
-
"description": "Whether or not the
|
|
677
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
683
678
|
"default": false
|
|
684
679
|
},
|
|
685
680
|
"outputs": {
|
|
@@ -734,7 +729,7 @@
|
|
|
734
729
|
},
|
|
735
730
|
"unsafe": {
|
|
736
731
|
"type": "boolean",
|
|
737
|
-
"description": "Whether or not the
|
|
732
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
738
733
|
"default": false
|
|
739
734
|
},
|
|
740
735
|
"outputs": {
|
|
@@ -945,7 +940,7 @@
|
|
|
945
940
|
},
|
|
946
941
|
"unsafe": {
|
|
947
942
|
"type": "boolean",
|
|
948
|
-
"description": "Whether or not the
|
|
943
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
949
944
|
"default": false
|
|
950
945
|
},
|
|
951
946
|
"outputs": {
|
|
@@ -1127,7 +1122,7 @@
|
|
|
1127
1122
|
},
|
|
1128
1123
|
"unsafe": {
|
|
1129
1124
|
"type": "boolean",
|
|
1130
|
-
"description": "Whether or not the
|
|
1125
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
1131
1126
|
"default": false
|
|
1132
1127
|
},
|
|
1133
1128
|
"outputs": {
|
|
@@ -1923,7 +1918,7 @@
|
|
|
1923
1918
|
},
|
|
1924
1919
|
"unsafe": {
|
|
1925
1920
|
"type": "boolean",
|
|
1926
|
-
"description": "Whether or not the
|
|
1921
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
1927
1922
|
"default": false
|
|
1928
1923
|
},
|
|
1929
1924
|
"outputs": {
|
|
@@ -2080,7 +2075,7 @@
|
|
|
2080
2075
|
},
|
|
2081
2076
|
"unsafe": {
|
|
2082
2077
|
"type": "boolean",
|
|
2083
|
-
"description": "Whether or not the
|
|
2078
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
2084
2079
|
"default": false
|
|
2085
2080
|
},
|
|
2086
2081
|
"outputs": {
|
|
@@ -3078,7 +3073,7 @@
|
|
|
3078
3073
|
},
|
|
3079
3074
|
"unsafe": {
|
|
3080
3075
|
"type": "boolean",
|
|
3081
|
-
"description": "Whether or not the
|
|
3076
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
3082
3077
|
"default": false
|
|
3083
3078
|
},
|
|
3084
3079
|
"outputs": {
|
|
@@ -3380,7 +3375,7 @@
|
|
|
3380
3375
|
},
|
|
3381
3376
|
"unsafe": {
|
|
3382
3377
|
"type": "boolean",
|
|
3383
|
-
"description": "Whether or not the
|
|
3378
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
3384
3379
|
"default": false
|
|
3385
3380
|
},
|
|
3386
3381
|
"outputs": {
|
|
@@ -3668,7 +3663,7 @@
|
|
|
3668
3663
|
},
|
|
3669
3664
|
"unsafe": {
|
|
3670
3665
|
"type": "boolean",
|
|
3671
|
-
"description": "Whether or not the
|
|
3666
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
3672
3667
|
"default": false
|
|
3673
3668
|
},
|
|
3674
3669
|
"outputs": {
|
|
@@ -3884,7 +3879,7 @@
|
|
|
3884
3879
|
},
|
|
3885
3880
|
"unsafe": {
|
|
3886
3881
|
"type": "boolean",
|
|
3887
|
-
"description": "Whether or not the
|
|
3882
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
3888
3883
|
"default": false
|
|
3889
3884
|
},
|
|
3890
3885
|
"outputs": {
|
|
@@ -4327,7 +4322,7 @@
|
|
|
4327
4322
|
},
|
|
4328
4323
|
"unsafe": {
|
|
4329
4324
|
"type": "boolean",
|
|
4330
|
-
"description": "Whether or not the
|
|
4325
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
4331
4326
|
"default": false
|
|
4332
4327
|
},
|
|
4333
4328
|
"outputs": {
|
|
@@ -4494,7 +4489,7 @@
|
|
|
4494
4489
|
},
|
|
4495
4490
|
"unsafe": {
|
|
4496
4491
|
"type": "boolean",
|
|
4497
|
-
"description": "Whether or not the
|
|
4492
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
4498
4493
|
"default": false
|
|
4499
4494
|
},
|
|
4500
4495
|
"outputs": {
|
|
@@ -4574,7 +4569,7 @@
|
|
|
4574
4569
|
},
|
|
4575
4570
|
"unsafe": {
|
|
4576
4571
|
"type": "boolean",
|
|
4577
|
-
"description": "Whether or not the
|
|
4572
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
4578
4573
|
"default": false
|
|
4579
4574
|
},
|
|
4580
4575
|
"outputs": {
|
|
@@ -4649,7 +4644,7 @@
|
|
|
4649
4644
|
},
|
|
4650
4645
|
"unsafe": {
|
|
4651
4646
|
"type": "boolean",
|
|
4652
|
-
"description": "Whether or not the
|
|
4647
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
4653
4648
|
"default": false
|
|
4654
4649
|
},
|
|
4655
4650
|
"outputs": {
|
|
@@ -5334,11 +5329,6 @@
|
|
|
5334
5329
|
]
|
|
5335
5330
|
}
|
|
5336
5331
|
},
|
|
5337
|
-
"unsafe": {
|
|
5338
|
-
"type": "boolean",
|
|
5339
|
-
"description": "Whether or not the test or step is may be unsafe. Unsafe tests and steps may perform actions that could modify the system or environment in unexpected ways. Tests that contain unsafe steps are only performed within Docker containers or if unsafe tests are enabled with the `allowUnsafeTests` config property or the `--unsafe` flag.",
|
|
5340
|
-
"default": false
|
|
5341
|
-
},
|
|
5342
5332
|
"steps": {
|
|
5343
5333
|
"description": "Steps to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails. By default, if a step fails, the test stops and the remaining steps are not executed.",
|
|
5344
5334
|
"type": "array",
|
|
@@ -5373,7 +5363,7 @@
|
|
|
5373
5363
|
},
|
|
5374
5364
|
"unsafe": {
|
|
5375
5365
|
"type": "boolean",
|
|
5376
|
-
"description": "Whether or not the
|
|
5366
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
5377
5367
|
"default": false
|
|
5378
5368
|
},
|
|
5379
5369
|
"outputs": {
|
|
@@ -5420,7 +5410,7 @@
|
|
|
5420
5410
|
},
|
|
5421
5411
|
"unsafe": {
|
|
5422
5412
|
"type": "boolean",
|
|
5423
|
-
"description": "Whether or not the
|
|
5413
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
5424
5414
|
"default": false
|
|
5425
5415
|
},
|
|
5426
5416
|
"outputs": {
|
|
@@ -5475,7 +5465,7 @@
|
|
|
5475
5465
|
},
|
|
5476
5466
|
"unsafe": {
|
|
5477
5467
|
"type": "boolean",
|
|
5478
|
-
"description": "Whether or not the
|
|
5468
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
5479
5469
|
"default": false
|
|
5480
5470
|
},
|
|
5481
5471
|
"outputs": {
|
|
@@ -5686,7 +5676,7 @@
|
|
|
5686
5676
|
},
|
|
5687
5677
|
"unsafe": {
|
|
5688
5678
|
"type": "boolean",
|
|
5689
|
-
"description": "Whether or not the
|
|
5679
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
5690
5680
|
"default": false
|
|
5691
5681
|
},
|
|
5692
5682
|
"outputs": {
|
|
@@ -5868,7 +5858,7 @@
|
|
|
5868
5858
|
},
|
|
5869
5859
|
"unsafe": {
|
|
5870
5860
|
"type": "boolean",
|
|
5871
|
-
"description": "Whether or not the
|
|
5861
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
5872
5862
|
"default": false
|
|
5873
5863
|
},
|
|
5874
5864
|
"outputs": {
|
|
@@ -6664,7 +6654,7 @@
|
|
|
6664
6654
|
},
|
|
6665
6655
|
"unsafe": {
|
|
6666
6656
|
"type": "boolean",
|
|
6667
|
-
"description": "Whether or not the
|
|
6657
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
6668
6658
|
"default": false
|
|
6669
6659
|
},
|
|
6670
6660
|
"outputs": {
|
|
@@ -6821,7 +6811,7 @@
|
|
|
6821
6811
|
},
|
|
6822
6812
|
"unsafe": {
|
|
6823
6813
|
"type": "boolean",
|
|
6824
|
-
"description": "Whether or not the
|
|
6814
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
6825
6815
|
"default": false
|
|
6826
6816
|
},
|
|
6827
6817
|
"outputs": {
|
|
@@ -7819,7 +7809,7 @@
|
|
|
7819
7809
|
},
|
|
7820
7810
|
"unsafe": {
|
|
7821
7811
|
"type": "boolean",
|
|
7822
|
-
"description": "Whether or not the
|
|
7812
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
7823
7813
|
"default": false
|
|
7824
7814
|
},
|
|
7825
7815
|
"outputs": {
|
|
@@ -8121,7 +8111,7 @@
|
|
|
8121
8111
|
},
|
|
8122
8112
|
"unsafe": {
|
|
8123
8113
|
"type": "boolean",
|
|
8124
|
-
"description": "Whether or not the
|
|
8114
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
8125
8115
|
"default": false
|
|
8126
8116
|
},
|
|
8127
8117
|
"outputs": {
|
|
@@ -8409,7 +8399,7 @@
|
|
|
8409
8399
|
},
|
|
8410
8400
|
"unsafe": {
|
|
8411
8401
|
"type": "boolean",
|
|
8412
|
-
"description": "Whether or not the
|
|
8402
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
8413
8403
|
"default": false
|
|
8414
8404
|
},
|
|
8415
8405
|
"outputs": {
|
|
@@ -8625,7 +8615,7 @@
|
|
|
8625
8615
|
},
|
|
8626
8616
|
"unsafe": {
|
|
8627
8617
|
"type": "boolean",
|
|
8628
|
-
"description": "Whether or not the
|
|
8618
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
8629
8619
|
"default": false
|
|
8630
8620
|
},
|
|
8631
8621
|
"outputs": {
|
|
@@ -9068,7 +9058,7 @@
|
|
|
9068
9058
|
},
|
|
9069
9059
|
"unsafe": {
|
|
9070
9060
|
"type": "boolean",
|
|
9071
|
-
"description": "Whether or not the
|
|
9061
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
9072
9062
|
"default": false
|
|
9073
9063
|
},
|
|
9074
9064
|
"outputs": {
|
|
@@ -9235,7 +9225,7 @@
|
|
|
9235
9225
|
},
|
|
9236
9226
|
"unsafe": {
|
|
9237
9227
|
"type": "boolean",
|
|
9238
|
-
"description": "Whether or not the
|
|
9228
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
9239
9229
|
"default": false
|
|
9240
9230
|
},
|
|
9241
9231
|
"outputs": {
|
|
@@ -9315,7 +9305,7 @@
|
|
|
9315
9305
|
},
|
|
9316
9306
|
"unsafe": {
|
|
9317
9307
|
"type": "boolean",
|
|
9318
|
-
"description": "Whether or not the
|
|
9308
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
9319
9309
|
"default": false
|
|
9320
9310
|
},
|
|
9321
9311
|
"outputs": {
|
|
@@ -9390,7 +9380,7 @@
|
|
|
9390
9380
|
},
|
|
9391
9381
|
"unsafe": {
|
|
9392
9382
|
"type": "boolean",
|
|
9393
|
-
"description": "Whether or not the
|
|
9383
|
+
"description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
|
|
9394
9384
|
"default": false
|
|
9395
9385
|
},
|
|
9396
9386
|
"outputs": {
|
|
@@ -10063,7 +10053,6 @@
|
|
|
10063
10053
|
"description": "This test includes every property across all actions.",
|
|
10064
10054
|
"before": "setup.json",
|
|
10065
10055
|
"after": "cleanup.json",
|
|
10066
|
-
"unsafe": true,
|
|
10067
10056
|
"runOn": [
|
|
10068
10057
|
{
|
|
10069
10058
|
"platforms": [
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Auto Dev Release CI/CD Workflow
|
|
2
|
+
|
|
3
|
+
This repository includes an automated CI/CD workflow that publishes development versions to npm on every commit to the main branch. This enables dependent libraries to consume the latest changes without waiting for formal releases.
|
|
4
|
+
|
|
5
|
+
## 🚀 How It Works
|
|
6
|
+
|
|
7
|
+
The **Auto Dev Release** workflow automatically:
|
|
8
|
+
|
|
9
|
+
1. **Triggers** on every push to the `main` branch
|
|
10
|
+
2. **Runs tests** to ensure code quality
|
|
11
|
+
3. **Bumps the dev version** (e.g., `3.1.0-dev.1` → `3.1.0-dev.2`)
|
|
12
|
+
4. **Publishes to npm** with the `dev` tag
|
|
13
|
+
5. **Creates git tags** for version tracking
|
|
14
|
+
|
|
15
|
+
## 📋 Prerequisites
|
|
16
|
+
|
|
17
|
+
### Required Repository Secrets
|
|
18
|
+
|
|
19
|
+
The workflow requires the following repository secret to be configured:
|
|
20
|
+
|
|
21
|
+
- **`NPM_TOKEN`**: npm automation token for publishing packages
|
|
22
|
+
|
|
23
|
+
### How to Create NPM Token
|
|
24
|
+
|
|
25
|
+
1. Log in to [npmjs.com](https://www.npmjs.com)
|
|
26
|
+
2. Go to **Access Tokens** in your account settings
|
|
27
|
+
3. Click **Generate New Token**
|
|
28
|
+
4. Select **Automation** token type
|
|
29
|
+
5. Copy the generated token
|
|
30
|
+
6. Add it as a repository secret named `NPM_TOKEN`
|
|
31
|
+
|
|
32
|
+
## 🔧 Configuration
|
|
33
|
+
|
|
34
|
+
### Package.json Requirements
|
|
35
|
+
|
|
36
|
+
Your `package.json` must include:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"name": "your-package-name",
|
|
41
|
+
"version": "1.0.0",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "your-test-command",
|
|
44
|
+
"build": "your-build-command"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Workflow Features
|
|
50
|
+
|
|
51
|
+
- **Node.js 18** runtime environment
|
|
52
|
+
- **npm ci** for dependency installation
|
|
53
|
+
- **Automated git configuration** with github-actions bot
|
|
54
|
+
- **Smart skipping** for documentation-only changes
|
|
55
|
+
- **Error handling** and rollback capabilities
|
|
56
|
+
- **10-minute timeout** to prevent hanging processes
|
|
57
|
+
|
|
58
|
+
## 📦 Version Management
|
|
59
|
+
|
|
60
|
+
### Dev Version Pattern
|
|
61
|
+
|
|
62
|
+
The workflow follows semantic versioning with dev suffixes:
|
|
63
|
+
- Base version: `3.1.0`
|
|
64
|
+
- Dev versions: `3.1.0-dev.1`, `3.1.0-dev.2`, `3.1.0-dev.3`, etc.
|
|
65
|
+
|
|
66
|
+
### Version Increment Logic
|
|
67
|
+
|
|
68
|
+
1. Extract base version from current `package.json`
|
|
69
|
+
2. Check latest dev version published to npm
|
|
70
|
+
3. Increment dev number by 1
|
|
71
|
+
4. If no dev version exists, start with `dev.1`
|
|
72
|
+
|
|
73
|
+
## 🎯 Usage for Consumers
|
|
74
|
+
|
|
75
|
+
### Installing Dev Versions
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Install latest dev version
|
|
79
|
+
npm install doc-detective-common@dev
|
|
80
|
+
|
|
81
|
+
# Or in package.json
|
|
82
|
+
{
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"doc-detective-common": "dev"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Checking Available Versions
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# List all versions
|
|
93
|
+
npm view doc-detective-common versions
|
|
94
|
+
|
|
95
|
+
# Check current dev version
|
|
96
|
+
npm view doc-detective-common@dev version
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## 🛡️ Safety Features
|
|
100
|
+
|
|
101
|
+
### Automated Checks
|
|
102
|
+
|
|
103
|
+
- **Test execution**: All tests must pass before publishing
|
|
104
|
+
- **Build validation**: Build process must complete successfully
|
|
105
|
+
- **Package.json validation**: Ensures valid JSON and required fields
|
|
106
|
+
- **Documentation skip**: Skips release for docs-only changes
|
|
107
|
+
- **Infinite loop prevention**: Uses `[skip ci]` in commit messages
|
|
108
|
+
|
|
109
|
+
### Skip Conditions
|
|
110
|
+
|
|
111
|
+
The workflow will skip execution if:
|
|
112
|
+
- Commit message contains `[skip ci]`
|
|
113
|
+
- Commit message contains `Release`
|
|
114
|
+
- Event type is `release`
|
|
115
|
+
- Only documentation files were changed (`.md`, `.txt`, `.yml`, `.yaml`, `.github/`)
|
|
116
|
+
|
|
117
|
+
## 🔍 Troubleshooting
|
|
118
|
+
|
|
119
|
+
### Common Issues
|
|
120
|
+
|
|
121
|
+
**Publication fails with authentication error:**
|
|
122
|
+
- Verify `NPM_TOKEN` secret is correctly configured
|
|
123
|
+
- Ensure token has automation permissions
|
|
124
|
+
- Check token hasn't expired
|
|
125
|
+
|
|
126
|
+
**Version conflicts:**
|
|
127
|
+
- Workflow automatically handles version increments
|
|
128
|
+
- If conflicts occur, manually increment and push
|
|
129
|
+
|
|
130
|
+
**Tests failing:**
|
|
131
|
+
- Fix failing tests before merge
|
|
132
|
+
- Workflow will not publish if tests fail
|
|
133
|
+
|
|
134
|
+
### Manual Trigger
|
|
135
|
+
|
|
136
|
+
You can manually trigger the workflow:
|
|
137
|
+
|
|
138
|
+
1. Go to **Actions** tab in GitHub
|
|
139
|
+
2. Select **Auto Dev Release** workflow
|
|
140
|
+
3. Click **Run workflow**
|
|
141
|
+
4. Choose the `main` branch
|
|
142
|
+
|
|
143
|
+
## 📊 Workflow Output
|
|
144
|
+
|
|
145
|
+
### Successful Execution
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
✅ Tests passed
|
|
149
|
+
✅ Version bumped: 3.1.0-dev.1 → 3.1.0-dev.2
|
|
150
|
+
✅ Published to npm with tag 'dev'
|
|
151
|
+
✅ Git tag 'v3.1.0-dev.2' created and pushed
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Skipped Execution
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
⏭️ Auto dev release skipped
|
|
158
|
+
📝 Only documentation changes detected
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## 🔄 Integration with Main Release Workflow
|
|
162
|
+
|
|
163
|
+
This workflow complements the existing release workflow:
|
|
164
|
+
|
|
165
|
+
- **Auto Dev Release**: Automatic dev versions on main branch commits
|
|
166
|
+
- **Main Release**: Manual stable releases through GitHub releases
|
|
167
|
+
- **No conflicts**: Workflows use different triggers and tags
|
|
168
|
+
|
|
169
|
+
## 📈 Benefits
|
|
170
|
+
|
|
171
|
+
- **Faster iteration**: Immediate availability of code changes
|
|
172
|
+
- **Reduced bottlenecks**: No manual release process required
|
|
173
|
+
- **Better testing**: Dev versions allow thorough testing before stable release
|
|
174
|
+
- **Dependency management**: Dependent repositories can consume latest changes instantly
|
|
175
|
+
|
|
176
|
+
## 🛠️ Extending the Workflow
|
|
177
|
+
|
|
178
|
+
### Adding Notifications
|
|
179
|
+
|
|
180
|
+
Add Slack/Teams notifications by including notification steps:
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
- name: Notify team
|
|
184
|
+
uses: your-notification-action
|
|
185
|
+
with:
|
|
186
|
+
message: "🚀 New dev release: v${{ steps.version.outputs.version }}"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Cross-Repository Updates
|
|
190
|
+
|
|
191
|
+
Extend to automatically update dependent repositories by adding repository dispatch events.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
For more information about the implementation, see the workflow file: `.github/workflows/auto-dev-release.yml`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective-common",
|
|
3
|
-
"version": "3.1.0-dev.
|
|
3
|
+
"version": "3.1.0-dev.2",
|
|
4
4
|
"description": "Shared components for Doc Detective projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"homepage": "https://github.com/doc-detective/doc-detective-common#readme",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"chai": "^5.2.0",
|
|
24
|
-
"mocha": "^11.
|
|
24
|
+
"mocha": "^11.7.0",
|
|
25
25
|
"sinon": "^21.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@apidevtools/json-schema-ref-parser": "^
|
|
28
|
+
"@apidevtools/json-schema-ref-parser": "^14.0.2",
|
|
29
29
|
"ajv": "^8.17.1",
|
|
30
30
|
"ajv-errors": "^3.0.0",
|
|
31
31
|
"ajv-formats": "^3.0.1",
|
|
32
32
|
"ajv-keywords": "^5.1.0",
|
|
33
|
-
"axios": "^1.
|
|
33
|
+
"axios": "^1.10.0",
|
|
34
34
|
"uuid": "^11.1.0",
|
|
35
35
|
"yaml": "^2.8.0"
|
|
36
36
|
}
|