airline-codes 1.1.3 → 1.1.5
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/AGENTS.md +30 -0
- package/airlines.dat +5757 -5659
- package/airlines.json +5860 -5664
- package/normalize.js +2 -0
- package/package.json +1 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# AGENTS.md — guidance for AI coding agents
|
|
2
|
+
|
|
3
|
+
## How data corrections work
|
|
4
|
+
|
|
5
|
+
`airlines.dat` and `airlines.json` are **generated files**. Do not edit them directly.
|
|
6
|
+
|
|
7
|
+
- `airlines.dat` is fetched weekly from [jpatokal/openflights](https://github.com/jpatokal/openflights/blob/master/data/airlines.dat).
|
|
8
|
+
- `airlines.json` is regenerated from `airlines.dat` by running `node convert.js`.
|
|
9
|
+
- `normalize.js` applies local corrections **after** every upstream fetch, before `convert.js` runs.
|
|
10
|
+
|
|
11
|
+
## How to add a correction
|
|
12
|
+
|
|
13
|
+
1. Open `normalize.js`.
|
|
14
|
+
2. For a country name fix, add an entry to `COUNTRY_CORRECTIONS`.
|
|
15
|
+
3. For any other field fix (name, IATA, ICAO, callsign, active status, etc.), add an entry to `ID_CORRECTIONS` keyed by the airline's numeric ID (as a string). Include a comment explaining the reason.
|
|
16
|
+
4. Regenerate both data files:
|
|
17
|
+
```
|
|
18
|
+
node normalize.js # patches airlines.dat in-place
|
|
19
|
+
node convert.js # regenerates airlines.json
|
|
20
|
+
```
|
|
21
|
+
5. Verify the corrected entry appears correctly in `airlines.json`.
|
|
22
|
+
6. Commit `normalize.js`, `airlines.dat`, and `airlines.json` together.
|
|
23
|
+
|
|
24
|
+
## Verifying issues
|
|
25
|
+
|
|
26
|
+
Before implementing a reported data correction, verify the claim against at least one authoritative source (e.g. [airhex.com](https://airhex.com), [IATA code search](https://www.iata.org/en/publications/directories/code-search/), or [avcodes.co.uk](https://www.avcodes.co.uk/airlcodesearch.asp)).
|
|
27
|
+
|
|
28
|
+
## Commit authorship
|
|
29
|
+
|
|
30
|
+
Commits should be authored as the repo owner: `Nissan Pow <nissan.pow@gmail.com>`.
|