runtime-pin-check 0.0.0-stage → 0.1.1
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/LICENSE +24 -0
- package/README.md +418 -2
- package/dist/chunk-TRO76P2I.js +577 -0
- package/dist/chunk-TRO76P2I.js.map +1 -0
- package/dist/cli.d.ts +103 -0
- package/dist/cli.js +2779 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/types-Dgq4vv3C.d.ts +124 -0
- package/package.json +59 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mammost
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
The address data used by this package comes from @geothai/core and is licensed
|
|
24
|
+
separately under CC BY 4.0 (see the README, section Attribution).
|
package/README.md
CHANGED
|
@@ -1,3 +1,419 @@
|
|
|
1
|
-
#
|
|
1
|
+
# runtime-pin-check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**ไทย** · [English](#english)
|
|
4
|
+
|
|
5
|
+
หาเวอร์ชัน **Node, Python และ Go** ที่ถูกปักไว้ไม่ตรงกันในไฟล์ต่าง ๆ ของ repository เดียว (`.nvmrc`, `package.json`,
|
|
6
|
+
`Dockerfile`, `.python-version`, `pyproject.toml`, `go.mod`, workflow ของ GitHub Actions, `.gitlab-ci.yml`, `mise.toml`,
|
|
7
|
+
`.tool-versions`) บอกทุกจุดพร้อม **ไฟล์:บรรทัด** เทียบด้วย semver จริง แยกผลต่อโปรเจกต์ใน monorepo และมี `--fix` ที่แก้เฉพาะ
|
|
8
|
+
ตัวเลขเวอร์ชัน ไม่แตะไบต์อื่น ไม่ใช้ AI ไม่ต้องใช้เครือข่าย และไม่ต้องมี API key ตอนรัน
|
|
9
|
+
|
|
10
|
+
> ติดตั้ง: `npm install -D runtime-pin-check` หรือรันทันที `npx runtime-pin-check`
|
|
11
|
+
|
|
12
|
+
## ผลลัพธ์จริง
|
|
13
|
+
|
|
14
|
+
`examples/conflict-demo/` มีไฟล์หกไฟล์ที่ปักเวอร์ชันขัดกัน (`.nvmrc` 20, `Dockerfile` `node:18-alpine`, workflow ใช้ 22,
|
|
15
|
+
`package.json` ต้องการ `>=22 <23`, `.python-version` 3.11 แต่ `pyproject.toml` ต้องการ `>=3.12`)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm ci && npm run build
|
|
19
|
+
node dist/cli.js examples/conflict-demo --date 2026-11-25
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
runtime-pin-check: 6 pins in 1 project root, checked on 2026-11-25 (end-of-life data from 2026-11-25)
|
|
24
|
+
|
|
25
|
+
. (repo root)
|
|
26
|
+
error VERSION_CONFLICT node
|
|
27
|
+
node: 3 different versions across 3 files: 22 (.github/workflows/ci.yml:10), 20 (.nvmrc:1), 18 (Dockerfile:1); no version satisfies all of them.
|
|
28
|
+
.github/workflows/ci.yml:10 22
|
|
29
|
+
.nvmrc:1 20
|
|
30
|
+
Dockerfile:1 18-alpine
|
|
31
|
+
error OUTSIDE_RANGE node
|
|
32
|
+
.nvmrc:1 pins node 20, outside the range >=22.0.0 <23.0.0-0 required by package.json:1.
|
|
33
|
+
.nvmrc:1 20
|
|
34
|
+
package.json:1 >=22 <23
|
|
35
|
+
error OUTSIDE_RANGE python
|
|
36
|
+
.python-version:1 pins python 3.11, outside the range >=3.12.0 required by pyproject.toml:4.
|
|
37
|
+
.python-version:1 3.11
|
|
38
|
+
pyproject.toml:4 >=3.12
|
|
39
|
+
error OUTSIDE_RANGE node
|
|
40
|
+
Dockerfile:1 pins node 18, outside the range >=22.0.0 <23.0.0-0 required by package.json:1.
|
|
41
|
+
Dockerfile:1 18-alpine
|
|
42
|
+
package.json:1 >=22 <23
|
|
43
|
+
warning EOL_RUNTIME node
|
|
44
|
+
.nvmrc:1 pins node 20 ("20"): node 20 reached end-of-life on 2026-04-30 (check date 2026-11-25).
|
|
45
|
+
.nvmrc:1 20
|
|
46
|
+
warning EOL_RUNTIME node
|
|
47
|
+
Dockerfile:1 pins node 18 ("18-alpine"): node 18 reached end-of-life on 2025-04-30 (check date 2026-11-25).
|
|
48
|
+
Dockerfile:1 18-alpine
|
|
49
|
+
|
|
50
|
+
4 errors, 2 warnings, 0 info
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
ผลข้างบนคือผลจริงทั้งหมดจากคำสั่งนั้น (วางจากการรันจริง) รหัสออกเป็น `1`
|
|
54
|
+
เพราะมี finding ระดับ error ส่วน `examples/clean-demo/` ปักเวอร์ชันตรงกันทุกไฟล์ ได้ "No problems found." และรหัสออก `0`
|
|
55
|
+
|
|
56
|
+
## ต่างจากเครื่องมืออื่นอย่างไร
|
|
57
|
+
|
|
58
|
+
EOL **ไม่ใช่จุดเด่นของเรา** เครื่องมืออื่นทำให้ Node อยู่แล้ว (ดูตารางด้านล่าง) สิ่งที่เรามีและเครื่องมือที่เรารันเทียบไม่มี:
|
|
59
|
+
|
|
60
|
+
1. **เทียบข้ามไฟล์ทั้งสามภาษา** (Node, Python, Go) ด้วย semver พร้อม `ไฟล์:บรรทัด` ของทุก source
|
|
61
|
+
2. **`--fix` ที่ปลอดภัยกับ range และคงไบต์เดิม** เขียนทับเฉพาะ pin ที่เป็นเลขเวอร์ชันตรง ๆ (`22`, `22.11.0`, `node:22-alpine`) ส่วน range
|
|
62
|
+
(`>=22 <23`) ไม่แตะเว้นแต่สั่ง `--fix-ranges` และไม่แตะ lockfile
|
|
63
|
+
3. **แยกผลต่อโปรเจกต์ (project root) ใน monorepo** ไม่เอาเวอร์ชันของ `packages/a` มาเทียบกับ `packages/b`
|
|
64
|
+
|
|
65
|
+
เทียบกับ **engines-gauge 1.1.0** และ **conflic 1.1.6** ข้อมูลในตารางมาจากการรันจริงบน fixture ของ recon (`docs/recon.md`) และบน repo 40
|
|
66
|
+
ตัวของ corpus (`bench/corpus.md`, ตาราง head-to-head) เท่านั้น เรื่องที่ไม่ได้ตรวจ เขียนว่า "ไม่ได้ตรวจ"
|
|
67
|
+
|
|
68
|
+
| | runtime-pin-check | engines-gauge 1.1.0 | conflic 1.1.6 |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| ภาษาที่เทียบ | Node, Python, Go | Node เท่านั้น | Node, Python, Go |
|
|
71
|
+
| แยกผลต่อโปรเจกต์ใน monorepo | มี | ไม่มี | ไม่มี |
|
|
72
|
+
| `ไฟล์:บรรทัด` ของทุก source | มี | มี | มี |
|
|
73
|
+
| `mise.toml`, `.gitlab-ci.yml` | อ่าน | ไม่อ่านทั้งสอง | ไม่อ่านทั้งสอง |
|
|
74
|
+
| `volta`, `go.mod toolchain`, matrix ของ CI | อ่าน | volta และ matrix อ่าน | ไม่อ่านทั้งสามอย่าง |
|
|
75
|
+
| `ARG NODE_VERSION=24` ใน `FROM` | อ่านค่า | พลาด (เห็นแค่ 22.11.0) | อ่านเป็นข้อความดิบ `node:${NODE_VERSION}-alpine` |
|
|
76
|
+
| `--fix` | แก้ pin ตรง ๆ คงไบต์เดิม | `--save` แก้ช่องเดียว (`engines`) | ในการรันของ recon เสนอแก้ `engines ">=22 <23"` เป็น `"20"` |
|
|
77
|
+
| EOL | มี (offline, Node/Python/Go) | มีสำหรับ Node | ไม่มี |
|
|
78
|
+
| GitHub Action | ไม่มี (รัน CLI ใน workflow ได้) | มี | ไม่ได้ตรวจ |
|
|
79
|
+
| 40 repo จริง: จำนวน finding | 139 | 29 | 1,397 |
|
|
80
|
+
| ใน 26 จุดขัดกันจริงของเรา เครื่องมือนั้นอ้างไฟล์:บรรทัดเดียวกันกี่จุด | — | 5 | 24 |
|
|
81
|
+
|
|
82
|
+
อ่านตารางนี้อย่างระวัง: (1) "อ้างไฟล์:บรรทัดเดียวกัน" เป็นเกณฑ์หลวม ไม่ได้ตรวจว่า finding ถูกความหมาย (2) **ไม่ได้ติดป้ายความถูกต้องของ finding ของคู่แข่ง**
|
|
83
|
+
จึงไม่มี precision ของเขามาเทียบ (3) conflic จับจุดขัดกันจริงได้มากกว่าเราในเกณฑ์นี้ (24 ต่อ 26) แต่รายงานมากกว่าเราราว 10 เท่า และ 220 จาก 1,397
|
|
84
|
+
อยู่ใต้โฟลเดอร์ test/fixtures/testdata (4) ตลาดนี้แน่นเร็ว: recon พบเครื่องมือใหม่ 7 ตัวใน 6 เดือน ทุกตัวมีดาวไม่เกิน 3 และดาวน์โหลดไม่เกิน 28 ต่อสัปดาห์
|
|
85
|
+
|
|
86
|
+
## ใช้งาน
|
|
87
|
+
|
|
88
|
+
ต้องใช้ Node 22 ขึ้นไป:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx runtime-pin-check [dir] [options]
|
|
92
|
+
# หรือติดตั้งในโปรเจกต์: npm install -D runtime-pin-check แล้วรัน npx runtime-pin-check
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
จากซอร์ส (สำหรับพัฒนาโปรเจกต์นี้): `npm ci && npm run build` แล้วรัน `node dist/cli.js [dir] [options]`
|
|
96
|
+
|
|
97
|
+
| ตัวเลือก | ความหมาย |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `[dir]` | โฟลเดอร์ที่สแกน (ค่าเริ่มต้น `.`) |
|
|
100
|
+
| `--json` | พิมพ์ผลเป็น JSON (มี `findings`, `summary`, `diagnostics`) |
|
|
101
|
+
| `--runtime node,python,go` | ตรวจเฉพาะบางภาษา |
|
|
102
|
+
| `--fail-on error\|warning\|info` | รหัสออก `1` เมื่อมี finding ระดับนี้ขึ้นไป (ค่าเริ่มต้น `error`) |
|
|
103
|
+
| `--date YYYY-MM-DD` | ตรวจ EOL และ alias `lts/*` ณ วันนั้น (ค่าเริ่มต้น วันนี้ตาม UTC) ใช้ทำผลซ้ำได้ |
|
|
104
|
+
| `--include-fixtures` | สแกนโฟลเดอร์ fixture ด้วย (ปกติข้ามโฟลเดอร์ชื่อ `fixtures`, `fixture`, `__fixtures__`, `test_fixtures`, `test-fixtures`, `testdata`, `test_data`, `_testdata` ทุกระดับ แต่ไม่ข้าม `test/` หรือ `tests/`) |
|
|
105
|
+
| `--version` | พิมพ์เวอร์ชัน |
|
|
106
|
+
| `--exclude <glob>` | ข้ามพาธที่ตรง (ใส่ซ้ำได้ เช่น `examples`, `docs/**`) |
|
|
107
|
+
| `--fix --to <version>` | แก้ pin เป็นเวอร์ชันนี้ (ใช้ร่วมกับ `--runtime <หนึ่งภาษา>`, `--dry-run`, `--fix-ranges`) |
|
|
108
|
+
|
|
109
|
+
รหัสออก: `0` ไม่มี finding ระดับที่สั่ง · `1` มี finding · `2` ใช้คำสั่งผิดหรืออ่านไฟล์ไม่ได้ ใน GitHub Actions (`GITHUB_ACTIONS=true`) จะพิมพ์
|
|
110
|
+
annotation `::error file=…,line=…::` ให้ด้วย
|
|
111
|
+
|
|
112
|
+
สแกน repository ตัวเองต้องตัด `examples/` ออก เพราะมีความขัดแย้งที่ตั้งใจใส่ไว้: `node dist/cli.js . --exclude examples`
|
|
113
|
+
|
|
114
|
+
### `--fix`
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
node dist/cli.js examples/conflict-demo --fix --to 22 --runtime node --dry-run
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
--- a/.nvmrc
|
|
122
|
+
+++ b/.nvmrc
|
|
123
|
+
@@ -1 +1 @@
|
|
124
|
+
-20
|
|
125
|
+
+22
|
|
126
|
+
--- a/Dockerfile
|
|
127
|
+
+++ b/Dockerfile
|
|
128
|
+
@@ -1,2 +1,2 @@
|
|
129
|
+
-FROM node:18-alpine
|
|
130
|
+
+FROM node:22-alpine
|
|
131
|
+
RUN node -v
|
|
132
|
+
runtime-pin-check --fix --to 22 (dry run: nothing written)
|
|
133
|
+
would change 2 pins in 2 files:
|
|
134
|
+
.nvmrc:1 20 -> 22
|
|
135
|
+
Dockerfile:1 18-alpine -> 22-alpine
|
|
136
|
+
already at 22: 1 pin
|
|
137
|
+
left alone (1); nothing is guessed:
|
|
138
|
+
package.json:1 ">=22 <23" (range): ">=22 <23" is a range; pass --fix-ranges to rewrite it
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`--dry-run` พิมพ์ diff แล้วไม่เขียนไฟล์ ถ้าไม่ใส่ จะเขียนจริง เฉพาะบรรทัดที่เปลี่ยน ไบต์อื่นของไฟล์คงเดิม (รวม BOM ถ้ามี) pin ที่โปรแกรมไม่เข้าใจ
|
|
142
|
+
ถูกข้าม พร้อมบอกเหตุผล ไม่เดา
|
|
143
|
+
|
|
144
|
+
### ใช้ใน CI
|
|
145
|
+
|
|
146
|
+
ไม่มี GitHub Action แยก ให้รัน CLI เป็น step ธรรมดา (ต้องใช้ Node 22 ขึ้นไป):
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
- uses: actions/checkout@v4
|
|
150
|
+
- uses: actions/setup-node@v4
|
|
151
|
+
with:
|
|
152
|
+
node-version: 22
|
|
153
|
+
- run: npx runtime-pin-check .
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
ใน GitHub Actions (`GITHUB_ACTIONS=true`) จะพิมพ์ annotation ให้ด้วย และ step จะล้มตามรหัสออกด้านบน
|
|
157
|
+
|
|
158
|
+
## รหัส finding
|
|
159
|
+
|
|
160
|
+
| รหัส | ระดับ | เมื่อไหร่ |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `VERSION_CONFLICT` | error | source ของภาษาเดียวกันในโปรเจกต์เดียวกันไม่มีเวอร์ชันที่ซ้อนทับกัน (รายงานหนึ่งรายการต่อภาษาต่อโปรเจกต์ แสดงทุก source จัดกลุ่มตามค่า) |
|
|
163
|
+
| `OUTSIDE_RANGE` | error | pin ตรง ๆ อยู่นอก range ของอีก source (เช่น `.nvmrc` 18 เทียบ `engines >=20`) |
|
|
164
|
+
| `PRECISION_MISMATCH` | info | เห็นตรงกันแต่เขียนละเอียดไม่เท่ากัน (`22` กับ `22.11.0`) |
|
|
165
|
+
| `EOL_RUNTIME` | warning | ทุกเวอร์ชันที่ source อนุญาตหมดอายุแล้ว ณ วันที่ตรวจ |
|
|
166
|
+
| `EOL_SOON` | info | หมดอายุภายใน 90 วัน |
|
|
167
|
+
| `FLOATING_ALIAS` | info | `latest`, `node`, `stable` ที่เปลี่ยนไปเรื่อย ๆ (ไม่นำไปเทียบ) |
|
|
168
|
+
| `UNPARSEABLE` | info | เจอช่องนั้นแต่ตีความไม่ได้ (เช่น `${VAR}`) พร้อมไฟล์:บรรทัด ไม่ข้ามเงียบและไม่ล้ม |
|
|
169
|
+
|
|
170
|
+
ไฟล์ที่เป็น YAML, TOML หรือ JSON ที่พังจริงจะถูกรายงานเป็น diagnostic ระดับไฟล์ (ใน `--json` และใน report) ไม่ทำให้โปรแกรมล้ม
|
|
171
|
+
|
|
172
|
+
## อ่านไฟล์อะไร
|
|
173
|
+
|
|
174
|
+
- **Node:** `.nvmrc`, `.node-version`, `package.json` (`engines.node`, `volta.node`, `devEngines.runtime`), `.tool-versions`, `mise.toml`,
|
|
175
|
+
`Dockerfile*` (`FROM node:` รวม multi-stage และ `ARG` ที่ใช้ใน `FROM`), `.github/workflows/*.yml` (`actions/setup-node`, ค่าใน matrix เป็น source แยก),
|
|
176
|
+
`.gitlab-ci.yml` (`image: node:` ระดับบนสุด, `default:` และของแต่ละ job)
|
|
177
|
+
- **Python:** `.python-version`, `pyproject.toml` (`project.requires-python`, `tool.poetry.dependencies.python`), `.tool-versions`, `mise.toml`,
|
|
178
|
+
`Dockerfile*`, `.gitlab-ci.yml` (`image: python:`), `actions/setup-python`, `runtime.txt` ยังไม่อ่าน `Pipfile`, `setup.py`/`setup.cfg`, `tox.ini` และ action อื่นเช่น `astral-sh/setup-uv`
|
|
179
|
+
- **Go:** `go.mod` (`go` และ `toolchain`), `.tool-versions`, `mise.toml`, `Dockerfile*` (`FROM golang:`), `.gitlab-ci.yml` (`image: golang:`), `actions/setup-go` ยังไม่อ่าน `go.work` และ `GOTOOLCHAIN`
|
|
180
|
+
- Docker image: ตีความเป็นภาษาก็ต่อเมื่อเป็น image ทางการและ mirror ที่รู้จัก ถ้าเป็น image อื่นจะไม่เดา
|
|
181
|
+
|
|
182
|
+
## ผูกไฟล์กับโปรเจกต์อย่างไร (สำคัญใน monorepo)
|
|
183
|
+
|
|
184
|
+
โปรเจกต์ (project root) คือ root ของ repository บวกทุกโฟลเดอร์ที่มี `package.json`, `pyproject.toml` หรือ `go.mod` (ไม่นับ `node_modules`, `.git`, `dist`,
|
|
185
|
+
`build`, `vendor`, `.venv`) กติกาหลัก:
|
|
186
|
+
|
|
187
|
+
- ไฟล์ในโปรเจกต์ผูกกับโปรเจกต์ที่ใกล้ที่สุดที่ครอบมัน
|
|
188
|
+
- ไฟล์ pin ระดับ root (`.nvmrc`, `.node-version`, `.python-version`, `.tool-versions`, `mise.toml`) ใช้กับ root และกับทุกโปรเจกต์ย่อยที่ไม่มีไฟล์ชนิดเดียวกัน
|
|
189
|
+
(ค้นขึ้นไปเหมือนที่ nvm, pyenv, asdf, mise ทำ)
|
|
190
|
+
- step ของ CI ระดับ root และ `Dockerfile` ที่ root: ถ้ามี `working-directory` (ของ step หรือ `defaults.run` ของ job) ผูกกับโปรเจกต์นั้น มิฉะนั้นถ้า root มี manifest ของ
|
|
191
|
+
ภาษานั้นผูกกับ root อย่างเดียว มิฉะนั้นผูกกับโปรเจกต์ที่ step/job ระบุพาธไว้ (`cache-dependency-path`, `node-version-file` ฯลฯ) และถ้าไม่มีเลย
|
|
192
|
+
จะเป็น **UNBOUND** (ไม่ผูกกับโปรเจกต์ใด)
|
|
193
|
+
- source ที่ UNBOUND ยังได้ `EOL_*`, `FLOATING_ALIAS`, `UNPARSEABLE` และถูกนับในสรุปว่า "not tied to a project" แต่ **ไม่เข้า** `VERSION_CONFLICT`,
|
|
194
|
+
`OUTSIDE_RANGE`, `PRECISION_MISMATCH` นี่คือการเลือก "precision ก่อน recall": พลาดความขัดแย้งข้ามโปรเจกต์ยอมรับได้ รายงานความขัดแย้งปลอมไม่ได้
|
|
195
|
+
|
|
196
|
+
## ความแม่นยำที่วัดได้
|
|
197
|
+
|
|
198
|
+
วัดบน **repository สาธารณะ 40 ตัว** (SHA ตายตัวใน `bench/repos.txt`) ด้วย CLI commit `483d4fb` และ `--date 2026-11-25` ติดป้ายทุก finding ด้วยมือเป็น T (ถูกต้อง),
|
|
199
|
+
TI (ถูกตามข้อเท็จจริงแต่ผู้ดูแลของ repository นั้นน่าจะตั้งใจ เช่น matrix ที่ทดสอบเวอร์ชันต่ำสุด) หรือ F (เท็จ) โดยผู้ติดป้ายคนแรก แล้วผู้ติดป้ายอีกคนติดซ้ำแบบ blind ครบทั้ง 139 รายการ (เห็นตรงกัน 98.6%, kappa 0.954; ผลคือเปลี่ยน 1 รายการจาก T เป็น TI)
|
|
200
|
+
|
|
201
|
+
**strict** นับเฉพาะ T ส่วน **factual** นับ T และ TI รวมกัน (TI เป็นเรื่องจริงที่ไฟล์ขัดกันจริง เพียงแต่ผู้ดูแลของ repository นั้นน่าจะตั้งใจ) เกณฑ์ปล่อยของโปรเจกต์ใช้ factual: ไม่มี F ที่เกิดจากผูกไฟล์ผิดโปรเจกต์ (F-scope)
|
|
202
|
+
หรืออ่านไฟล์ fixture (F-fixture) เลย, factual ≥ 95%, และ F ที่เหลือทุกรายการต้องบอกเป็นข้อจำกัด ตัวเลขทั้งสองแบบแสดงไว้ด้านล่างโดยไม่ปัดขึ้น
|
|
203
|
+
|
|
204
|
+
| | ผล |
|
|
205
|
+
|---|---|
|
|
206
|
+
| finding ทั้งหมด | 139 (T 111 · TI 27 · F 1) |
|
|
207
|
+
| precision แบบเข้ม (strict, นับเฉพาะ T) | **79.9%** (111/139) |
|
|
208
|
+
| precision ตามข้อเท็จจริง (factual, T+TI) | **99.3%** (138/139) |
|
|
209
|
+
| F-scope / F-fixture | 0 / 0 |
|
|
210
|
+
| `OUTSIDE_RANGE` | 4 รายการ: T 2, TI 2, F 0 (strict 50.0%, factual 100%, n = 4) |
|
|
211
|
+
| F ที่เหลือ | 1 (`cypress-io/cypress-docker-images`: Dockerfile แยกตามเวอร์ชันของ Node แต่ละรุ่นยังถูกเทียบกับ pin ที่ root) |
|
|
212
|
+
|
|
213
|
+
ตัวเลขทั้งหมดมาจาก `bench/corpus.md` ส่วน "Rerun @ 483d4fb" ทำซ้ำได้ด้วยคำสั่งในส่วน "Repro" ของไฟล์นั้น (`node bench/corpus.mjs clone|run|report`)
|
|
214
|
+
|
|
215
|
+
ข้อจำกัดที่ต้องรู้ ไม่ปิดบัง:
|
|
216
|
+
|
|
217
|
+
- **strict ต่ำกว่าเป้าเดิม 80% อยู่ 1 รายการ** (79.9%; ต้องมี T อย่างน้อย 112 จาก 139) เกณฑ์ปล่อยถูกปรับให้ใช้ factual precision เพราะ TI เป็นความขัดแย้งจริง
|
|
218
|
+
และการปรับกฎต่อบน 40 repo ชุดเดิมจะทำให้ตัวเลขเข้ากับชุดนี้เกินจริง การอ้าง precision ครั้งต่อไปต้องใช้ชุด repo ใหม่ที่ไม่เคยเห็น
|
|
219
|
+
- **`OUTSIDE_RANGE` มีตัวอย่างน้อย (n = 4)** strict 50.0% เพราะ 2 ใน 4 เป็น TI (เช่น การทดสอบ "ปฏิเสธ runtime ที่ไม่รองรับ" โดยตั้งใจ) ไม่มี finding เท็จ แต่ตัวอย่างน้อยเกินกว่าจะสรุปอะไร
|
|
220
|
+
- **recall ลดลงโดยเจตนา:** เมื่อเทียบกับรอบก่อนใช้กติกาผูกโปรเจกต์ มี finding ที่เคยเป็นของจริง 24 รายการ (T 14 + TI 10 ที่หายเพราะกติกา) ไม่ถูกรายงานอีก source 77 ตัวใน 18 จาก 40 repo เป็น UNBOUND
|
|
221
|
+
ส่วนใหญ่เป็นขั้นตอน CI ที่ root ซึ่งไม่มี manifest และไม่มีพาธบอกว่าเป็นของโปรเจกต์ไหน ตัวอย่างความขัดแย้งจริงที่เราพลาดเพราะเรื่องนี้ เช่น node 18 เทียบ 20 ใน workflow สองไฟล์ที่ root ที่ไม่มี manifest ของ Node
|
|
222
|
+
- **ขีดจำกัดที่ยังมี:** repository ที่มี Dockerfile หนึ่งไฟล์ต่อ runtime หนึ่งรุ่น (เช่น cypress-docker-images) ยังเทียบกับ pin ที่ root และให้ finding เท็จ
|
|
223
|
+
- **job ที่ประกาศ `defaults.run.working-directory` แต่ override บาง step กลับไปที่ root** ถูกผูกกับโฟลเดอร์ default ทั้ง job (ตั้งใจ: นี่คือวิธีที่ monorepo ประกาศว่า job รับใช้โปรเจกต์ไหน)
|
|
224
|
+
- **pin ที่ root ซึ่งโปรเจกต์ลูกทุกตัวรับต่อ อาจถูกรายงานซ้ำหนึ่งครั้งต่อโปรเจกต์** เช่น `.nvmrc` ที่ root เทียบกับ Dockerfile ใน `examples/*` แต่ละตัว
|
|
225
|
+
แต่ละรายการถูกต้องตามกติกา แต่ใน monorepo ที่มีโปรเจกต์ตัวอย่างหลายสิบตัวจะยาว ใช้ `--exclude examples` ถ้าไม่ต้องการตรวจโฟลเดอร์ตัวอย่าง
|
|
226
|
+
- **Dockerfile หลาย stage ที่ใช้ Node คนละรุ่นโดยตั้งใจ** (เช่น build ด้วย 24 แล้วรันด้วย 22) ถูกรายงานเป็น `VERSION_CONFLICT` "across 1 file" ตามกติกา
|
|
227
|
+
- **`mise.toml` และ `.tool-versions` ที่ระบุหลายเวอร์ชัน** (`python = ["3.12", "3.11"]`) อ่านเฉพาะตัวแรก ซึ่งเป็นตัวที่ใช้จริง ตัวที่เหลือไม่ถูกเทียบ
|
|
228
|
+
- แถว source ในรายงานแสดงค่าตามที่เขียนในไฟล์ เช่น `${{ env.PYTHON_VERSION }}` แม้ข้อความหัวเรื่องจะแสดงค่าที่แปลงแล้ว
|
|
229
|
+
- PyPy และ GraalPy (`pypy-3.11` ใน `actions/setup-python`) ไม่ถูกเทียบกับ pin ของ CPython ระบบรายงานเป็น `UNPARSEABLE` พร้อมเหตุผล
|
|
230
|
+
- ไม่มี precision ของเครื่องมืออื่นให้เทียบ เพราะไม่ได้ติดป้าย finding ของเขา
|
|
231
|
+
- diagnostic ที่เป็นเท็จ 2 รายการใน 1 จาก 40 repo (YAML หลายเอกสารใต้ `.github/workflows/resources/` ที่ไม่ใช่ workflow) ถูกแก้ใน `f80ed6e` วัดซ้ำบน 40 repo เดิมแล้ว: finding เหมือน `483d4fb` ทุก repo และ diagnostic เหลือ 0
|
|
232
|
+
แต่ยังไม่มี diagnostic จริง (ไฟล์พังจริง) ใน 40 repo นี้ จึงยังไม่มีหลักฐานจาก repo จริงว่า diagnostic จับไฟล์พังได้ (มีเฉพาะ unit test)
|
|
233
|
+
- ไม่มีตัวเลขเวลา (ms) ใน README นี้ เพราะขึ้นกับเครื่อง ทุกตัวเลขในส่วนนี้ซ้ำได้ด้วยคำสั่งที่ระบุ
|
|
234
|
+
|
|
235
|
+
## ข้อมูล EOL
|
|
236
|
+
|
|
237
|
+
`data/eol.json` เป็น snapshot ของ endoflife.date (MIT) สร้างด้วย `node scripts/update-eol.mjs` ซึ่งเป็นที่เดียว (นอกจากการสำรวจ) ที่ใช้เครือข่าย ตัว CLI และไลบรารีไม่ใช้เครือข่ายเลย
|
|
238
|
+
snapshot เก็บเฉพาะสายรุ่น วันหมดอายุ วัน LTS และรุ่นล่าสุด ไม่เก็บคำอธิบายสินค้า ส่วนชื่อ codename ของ Node LTS (เช่น `lts/iron`) ได้มาจากดัชนีรุ่นของ nodejs.org เฉพาะคู่ "เมเจอร์ → ชื่อ" และถ้าอ่านดัชนีนี้
|
|
239
|
+
ไม่ได้ตอนอัปเดต สคริปต์จะเก็บคู่เดิมไว้และแจ้งเตือน ไม่ล้างทิ้ง
|
|
240
|
+
|
|
241
|
+
workflow `.github/workflows/update-eol.yml` รันทุกวันจันทร์: ดึงข้อมูลใหม่ ถ้าสิ่งที่เกี่ยวกับ EOL เปลี่ยน (สายรุ่น วันหมดอายุ วัน LTS หรือ codename; การเปลี่ยนเฉพาะเลขรุ่นย่อยล่าสุดไม่นับ)
|
|
242
|
+
จะรัน typecheck, test, build แล้วเปิด pull request ให้ตรวจ ต้องเปิดการตั้งค่า "Allow GitHub Actions to create and approve pull requests" ของ repository
|
|
243
|
+
|
|
244
|
+
## เครดิตและสัญญาอนุญาต
|
|
245
|
+
|
|
246
|
+
โค้ดใช้สัญญาอนุญาต MIT (`LICENSE`) ข้อมูล EOL จาก endoflife.date (MIT, © endoflife.date contributors) และ codename จากดัชนีรุ่นของ Node.js รายละเอียดและข้อความสัญญาอนุญาตอยู่ใน [`NOTICE`](NOTICE)
|
|
247
|
+
|
|
248
|
+
## พัฒนา
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
npm run typecheck && npm test && npm run build
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## English
|
|
257
|
+
|
|
258
|
+
Finds **Node, Python and Go** versions that are pinned inconsistently across one repository's files (`.nvmrc`, `package.json`, `Dockerfile`,
|
|
259
|
+
`.python-version`, `pyproject.toml`, `go.mod`, GitHub Actions workflows, `.gitlab-ci.yml`, `mise.toml`, `.tool-versions`), with **file and line** for every
|
|
260
|
+
pin, real semver comparison, results per project in a monorepo, and a `--fix` that changes only the version digits and no other byte. No AI, no network, no API key at run time.
|
|
261
|
+
|
|
262
|
+
> Install: `npm install -D runtime-pin-check`, or run `npx runtime-pin-check`.
|
|
263
|
+
|
|
264
|
+
### What it looks like
|
|
265
|
+
|
|
266
|
+
`examples/conflict-demo/` has files that pin conflicting versions. The Thai section above shows the full output of
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm ci && npm run build
|
|
270
|
+
node dist/cli.js examples/conflict-demo --date 2026-11-25
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
(4 errors, 2 warnings, exit code 1: `VERSION_CONFLICT` across `.github/workflows/ci.yml:10` (22), `.nvmrc:1` (20) and `Dockerfile:1` (18-alpine); `OUTSIDE_RANGE` for `.nvmrc`
|
|
274
|
+
and `Dockerfile` against `package.json` `>=22 <23`, and for `.python-version` 3.11 against `pyproject.toml` `>=3.12`; `EOL_RUNTIME` for node 20 and 18.)
|
|
275
|
+
`examples/clean-demo/` is consistent: "No problems found.", exit code 0.
|
|
276
|
+
|
|
277
|
+
### How it differs
|
|
278
|
+
|
|
279
|
+
End-of-life checks are **not** what sets this apart: other tools already provide them for Node. What this adds, and the tools we ran against lack:
|
|
280
|
+
|
|
281
|
+
1. **Cross-file comparison for all three runtimes** with semver and `file:line` for every source.
|
|
282
|
+
2. **A `--fix` that is safe with ranges and byte-preserving**: it rewrites only plain version pins (`22`, `22.11.0`, `node:22-alpine`); ranges (`>=22 <23`) are
|
|
283
|
+
left alone unless you pass `--fix-ranges`; lockfiles are never touched.
|
|
284
|
+
3. **Per-project-root results in a monorepo**: `packages/a` is never compared with `packages/b`.
|
|
285
|
+
|
|
286
|
+
Compared with **engines-gauge 1.1.0** and **conflic 1.1.6**. Every cell comes from our runs on the recon fixture (`docs/recon.md`) and on the 40-repository corpus
|
|
287
|
+
(`bench/corpus.md`, head-to-head table); what we did not check says "not checked".
|
|
288
|
+
|
|
289
|
+
| | runtime-pin-check | engines-gauge 1.1.0 | conflic 1.1.6 |
|
|
290
|
+
|---|---|---|---|
|
|
291
|
+
| Runtimes compared | Node, Python, Go | Node only | Node, Python, Go |
|
|
292
|
+
| Per-project results in a monorepo | yes | no | no |
|
|
293
|
+
| `file:line` for every source | yes | yes | yes |
|
|
294
|
+
| `mise.toml`, `.gitlab-ci.yml` | read | neither read | neither read |
|
|
295
|
+
| `volta`, `go.mod toolchain`, CI matrix | read | volta and matrix read | none of the three read |
|
|
296
|
+
| `ARG NODE_VERSION=24` used in `FROM` | value resolved | missed (saw only 22.11.0) | raw text `node:${NODE_VERSION}-alpine` |
|
|
297
|
+
| `--fix` | rewrites plain pins, bytes preserved | `--save` edits one field (`engines`) | in the recon run it proposed `engines ">=22 <23"` -> `"20"` |
|
|
298
|
+
| End-of-life | yes (offline; Node, Python, Go) | yes, for Node | no |
|
|
299
|
+
| GitHub Action | no (run the CLI in a workflow) | yes | not checked |
|
|
300
|
+
| 40 real repos: findings | 139 | 29 | 1,397 |
|
|
301
|
+
| Of our 26 true drift findings, how many the tool reports at the same file:line | — | 5 | 24 |
|
|
302
|
+
|
|
303
|
+
Read this table with care: (1) "same file:line" is a loose measure, not a check that the finding is right; (2) **we did not label the competitors' findings**, so there is
|
|
304
|
+
no precision for them to compare; (3) conflic reaches more of our true drift on this measure (24 of 26) but reports about ten times as many findings, and 220 of its 1,397 sit under
|
|
305
|
+
test/fixtures/testdata folders; (4) the space is crowded and moving fast: recon found 7 new tools in 6 months, each with at most 3 stars and 28 downloads a week.
|
|
306
|
+
|
|
307
|
+
### Use
|
|
308
|
+
|
|
309
|
+
Node 22 or newer:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
npx runtime-pin-check [dir] [options]
|
|
313
|
+
# or install it in a project: npm install -D runtime-pin-check, then npx runtime-pin-check
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
From source (to work on this project): `npm ci && npm run build`, then `node dist/cli.js [dir] [options]`.
|
|
317
|
+
|
|
318
|
+
Options are listed in the Thai table above and in `--help`: `--json`, `--runtime node,python,go`, `--fail-on error|warning|info` (default `error`), `--date YYYY-MM-DD`,
|
|
319
|
+
`--include-fixtures` (fixture folders such as `fixtures`, `__fixtures__`, `test_fixtures`, `testdata`, `test_data` are skipped by default; `test/` and `tests/` are not), `--exclude <glob>` (repeatable), `--version`, and `--fix --to <version>` with `--runtime <one>`, `--dry-run`, `--fix-ranges`. Exit codes: `0` nothing at or above `--fail-on`,
|
|
320
|
+
`1` findings, `2` usage or I/O error. With `GITHUB_ACTIONS=true` it also prints `::error file=…,line=…::` annotations. To scan this repository itself leave out the deliberate
|
|
321
|
+
conflicts: `node dist/cli.js . --exclude examples`.
|
|
322
|
+
|
|
323
|
+
`--fix` demo (`--dry-run` prints the diff and writes nothing): the Thai section shows `node dist/cli.js examples/conflict-demo --fix --to 22 --runtime node --dry-run` changing
|
|
324
|
+
`.nvmrc` 20 -> 22 and `Dockerfile` `node:18-alpine` -> `node:22-alpine`, and leaving `package.json`'s `">=22 <23"` alone because it is a range.
|
|
325
|
+
|
|
326
|
+
#### In CI
|
|
327
|
+
|
|
328
|
+
There is no separate GitHub Action; run the CLI as a plain step (Node 22 or newer):
|
|
329
|
+
|
|
330
|
+
```yaml
|
|
331
|
+
- uses: actions/checkout@v4
|
|
332
|
+
- uses: actions/setup-node@v4
|
|
333
|
+
with:
|
|
334
|
+
node-version: 22
|
|
335
|
+
- run: npx runtime-pin-check .
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Under GitHub Actions (`GITHUB_ACTIONS=true`) it also prints annotations, and the step fails by the exit codes above.
|
|
339
|
+
|
|
340
|
+
### Finding codes
|
|
341
|
+
|
|
342
|
+
`VERSION_CONFLICT` (error: sources of one runtime in one project have no common version; one finding per runtime per project listing every source), `OUTSIDE_RANGE` (error: a plain pin outside another source's range),
|
|
343
|
+
`PRECISION_MISMATCH` (info: agree at different precision), `EOL_RUNTIME` (warning: every version a source allows is past end-of-life on the check date), `EOL_SOON` (info: end-of-life within 90 days),
|
|
344
|
+
`FLOATING_ALIAS` (info: `latest`, `node`, `stable`; not compared), `UNPARSEABLE` (info: the field was found but cannot be read, with file and line; never skipped silently, never a crash).
|
|
345
|
+
Broken YAML, TOML or JSON is reported as a file-level diagnostic (in `--json` and in the report), not as a crash.
|
|
346
|
+
|
|
347
|
+
### What it reads
|
|
348
|
+
|
|
349
|
+
- **Node:** `.nvmrc`, `.node-version`, `package.json` (`engines.node`, `volta.node`, `devEngines.runtime`), `.tool-versions`, `mise.toml`, `Dockerfile*` (`FROM node:`, multi-stage, `ARG` used in `FROM`),
|
|
350
|
+
`.github/workflows/*.yml` (`actions/setup-node`; each matrix value is its own source), `.gitlab-ci.yml` (`image: node:` at the top level, under `default:` and in each job).
|
|
351
|
+
- **Python:** `.python-version`, `pyproject.toml` (`project.requires-python`, `tool.poetry.dependencies.python`), `.tool-versions`, `mise.toml`, `Dockerfile*`, `.gitlab-ci.yml` (`image: python:`), `actions/setup-python`, `runtime.txt`.
|
|
352
|
+
Not read: `Pipfile`, `setup.py`/`setup.cfg`, `tox.ini`, other actions such as `astral-sh/setup-uv`.
|
|
353
|
+
- **Go:** `go.mod` (`go` and `toolchain`), `.tool-versions`, `mise.toml`, `Dockerfile*` (`FROM golang:`), `.gitlab-ci.yml` (`image: golang:`), `actions/setup-go`. Not read: `go.work`, `GOTOOLCHAIN`.
|
|
354
|
+
- Docker images count as a runtime only when they are official images or well-known mirrors; other images are ignored, not guessed.
|
|
355
|
+
|
|
356
|
+
### How files are tied to projects
|
|
357
|
+
|
|
358
|
+
A project root is the repository root plus every folder with a `package.json`, `pyproject.toml` or `go.mod` (not under `node_modules`, `.git`, `dist`, `build`, `vendor`, `.venv`).
|
|
359
|
+
A file inside a project binds to the nearest enclosing project. Root-level tool pin files (`.nvmrc`, `.node-version`, `.python-version`, `.tool-versions`, `mise.toml`) apply to the root and to every
|
|
360
|
+
sub-project without a file of the same kind (looked up the way nvm, pyenv, asdf and mise do). A root-level CI setup step or root `Dockerfile` binds to the project named by its `working-directory` (the step's or
|
|
361
|
+
the job's `defaults.run`); otherwise to the root if the root has a manifest for that runtime; otherwise to the sub-projects named by a path in the same step or job (`cache-dependency-path`, `node-version-file`, ...);
|
|
362
|
+
and if none of that applies it is **UNBOUND**. UNBOUND sources still get `EOL_*`, `FLOATING_ALIAS` and `UNPARSEABLE` and are listed in the summary as "not tied to a project", but never take part in
|
|
363
|
+
`VERSION_CONFLICT`, `OUTSIDE_RANGE` or `PRECISION_MISMATCH`: precision over recall. Missing a cross-project drift is acceptable; reporting a false one is not.
|
|
364
|
+
|
|
365
|
+
### Measured precision
|
|
366
|
+
|
|
367
|
+
Measured on **40 public repositories** (pinned SHAs in `bench/repos.txt`) with CLI commit `483d4fb` and `--date 2026-11-25`. Every finding was labelled by hand as T (true), TI (true but probably intentional, e.g. a matrix that tests the lowest version) or
|
|
368
|
+
F (false), by a first labeller; a second labeller then re-labelled all 139 findings blind (98.6% agreement, kappa 0.954; one finding changed from T to TI).
|
|
369
|
+
|
|
370
|
+
**Strict** counts T only; **factual** counts T and TI together (a TI is a real disagreement between files that the repository's maintainers probably intended). The release gate is factual: zero false findings caused by binding a file to the
|
|
371
|
+
wrong project (F-scope) or reading a fixture (F-fixture), factual precision of at least 95%, and every remaining F listed as a known limit. Both figures are shown below, not rounded up.
|
|
372
|
+
|
|
373
|
+
| | Result |
|
|
374
|
+
|---|---|
|
|
375
|
+
| All findings | 139 (T 111 · TI 27 · F 1) |
|
|
376
|
+
| Strict precision (T only) | **79.9%** (111/139) |
|
|
377
|
+
| Factual precision (T + TI) | **99.3%** (138/139) |
|
|
378
|
+
| F-scope / F-fixture | 0 / 0 |
|
|
379
|
+
| `OUTSIDE_RANGE` | 4 findings: T 2, TI 2, F 0 (strict 50.0%, factual 100%, n = 4) |
|
|
380
|
+
| Remaining F | 1 (`cypress-io/cypress-docker-images`: one Dockerfile per Node release line is still compared with the root pin) |
|
|
381
|
+
|
|
382
|
+
All figures come from the "Rerun @ 483d4fb" part of `bench/corpus.md` and can be reproduced with the commands in its "Repro" section (`node bench/corpus.mjs clone|run|report`).
|
|
383
|
+
|
|
384
|
+
Known limits, stated plainly:
|
|
385
|
+
|
|
386
|
+
- **Strict precision is one finding short of the original 80% target** (79.9%; 112 of 139 would be needed). The release gate was revised to factual precision, because a TI is a real conflict and another tuning round on the same 40 repositories
|
|
387
|
+
would overfit the metric to this corpus. A future precision claim needs a fresh corpus of repositories nobody has looked at.
|
|
388
|
+
- **`OUTSIDE_RANGE` has few samples (n = 4).** Strict 50.0% because 2 of the 4 are TI (for example a deliberate "reject an unsupported runtime" test); there is no false finding, but four is too few to conclude anything.
|
|
389
|
+
- **Recall was traded away on purpose.** Compared with the run before the project-binding rules, 24 findings that had been real (14 T and 10 TI lost to the rules) are no longer reported, and 77 sources in 18 of the 40 repositories are UNBOUND,
|
|
390
|
+
mostly root-level CI steps in repositories whose root has no manifest and where nothing names the project. A real conflict we miss because of this: node 18 against 20 in two workflows at the root of a repository with no Node manifest.
|
|
391
|
+
- **A Dockerfile per runtime release** (for example cypress-docker-images) still compares with the root pin and produces a false finding.
|
|
392
|
+
- **A job that declares `defaults.run.working-directory` but overrides one step back to the root** is bound to the default folder for the whole job. This is deliberate: it is how a monorepo says which project a job serves.
|
|
393
|
+
- **A root pin that every child project inherits can be reported once per project.** For example a root `.nvmrc` against the Dockerfile of each `examples/*` project:
|
|
394
|
+
each finding is correct under the rules, but a monorepo with dozens of example projects gets a long list. Use `--exclude examples` to leave example folders out.
|
|
395
|
+
- **A multi-stage Dockerfile that uses different Node versions on purpose** (build on 24, run on 22) is reported as a `VERSION_CONFLICT` "across 1 file", as the rules say.
|
|
396
|
+
- **`mise.toml` and `.tool-versions` entries that list several versions** (`python = ["3.12", "3.11"]`) are read for the first one only, the one that is used; the others are not compared.
|
|
397
|
+
- A source row shows the value as written in the file, for example `${{ env.PYTHON_VERSION }}`, even where the headline shows the resolved value.
|
|
398
|
+
- PyPy and GraalPy (`pypy-3.11` in `actions/setup-python`) are not compared with CPython pins; they are reported as `UNPARSEABLE` with that reason.
|
|
399
|
+
- No precision for other tools: we did not label their findings.
|
|
400
|
+
- Two false diagnostics in 1 of the 40 repositories (multi-document YAML under `.github/workflows/resources/` that is not a workflow) were fixed in `f80ed6e` and re-measured on the same 40 repositories: the findings are identical to `483d4fb` in every repository and the diagnostics dropped to 0. There is still no real diagnostic (a genuinely broken file) among the 40, so no evidence from real repositories that diagnostics catch broken files (unit tests only).
|
|
401
|
+
- This README quotes no timings (milliseconds); they depend on the machine. Every figure here can be reproduced with the stated command.
|
|
402
|
+
|
|
403
|
+
### End-of-life data
|
|
404
|
+
|
|
405
|
+
`data/eol.json` is a snapshot of endoflife.date (MIT), built by `node scripts/update-eol.mjs`, the only place (besides research) that uses the network; the CLI and the library never do. It keeps release lines, end-of-life dates, LTS dates and
|
|
406
|
+
latest releases, and no product descriptions. Node LTS codenames (`lts/iron`) come from the nodejs.org release index, as major-version-to-name pairs only; if that index cannot be read during an update, the script keeps the previous pairs and warns.
|
|
407
|
+
|
|
408
|
+
`.github/workflows/update-eol.yml` runs every Monday: it fetches new data and, when something relevant to end-of-life changed (a release line, an end-of-life date, an LTS date or a codename; a new latest patch release alone does not count),
|
|
409
|
+
it runs typecheck, tests and build and opens a pull request. The repository setting "Allow GitHub Actions to create and approve pull requests" must be on.
|
|
410
|
+
|
|
411
|
+
### Credits and license
|
|
412
|
+
|
|
413
|
+
Code: MIT (`LICENSE`). End-of-life data from endoflife.date (MIT, © endoflife.date contributors) and Node.js LTS codenames from the Node.js release index; details and license text in [`NOTICE`](NOTICE).
|
|
414
|
+
|
|
415
|
+
### Development
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
npm run typecheck && npm test && npm run build
|
|
419
|
+
```
|