Skip to content

Commit 5ec5b74

Browse files
committed
bun migrarion
1 parent ab097ae commit 5ec5b74

33 files changed

Lines changed: 357 additions & 760 deletions

.devcontainer/Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

.npmignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.devcontainer
22
.github
3-
.pnpm-lock.yaml
3+
bun.lockb
4+
pnpm-lock.yaml
45
.yarn
56
.yarnrc.yml
67
banner.png
@@ -9,8 +10,13 @@ CONTRIBUTING.md
910
data
1011
examples
1112
notebooks
12-
rollup.config.js
1313
src
1414
test
1515
tools
16-
sandworm
16+
sandworm
17+
.nvmrc
18+
.oxfmtrc.json
19+
.vscode/settings.json
20+
AGENTS.md
21+
bun.lock
22+
bun.lockb

.oxfmtrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arrowParens": "avoid",
3+
"trailingComma": "none",
4+
"ignorePatterns": ["dist/*"],
5+
"sortImports": {
6+
"enabled": true
7+
}
8+
}

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
The ES module bundle lives in `src/` with `main.js` assembling provider and location metadata from `data/`. Generated assets resolve to `dist/` (never edit by hand) while validation utilities and scrapers reside in `tools/`. Sample integrations live under `examples/`, and exploratory notebooks plus CSV exports are stored in `notebooks/`. Tests that exercise the published build are in `test/index.test.mjs`.
55

66
## Build, Test, and Development Commands
7-
Run `pnpm install` before contributing. `pnpm run prebuild` formats JSON and JavaScript and should precede any commit touching data. Build the distributable bundle with `pnpm run build`, which executes Rollup using `rollup.config.js`. Execute `pnpm test` to load the compiled bundle and assert key lookups. Data sanity checks are available via `pnpm run validate`, and provider maintenance commands such as `pnpm run provider:show vultr` and `pnpm run provider:update vultr ...` drive inventory refreshes.
7+
Run `bun install` before contributing. `bun run prebuild` formats JSON and JavaScript and should precede any commit touching data. Build the distributable bundle with `bun run build`, which executes `bun build` against `src/main.js`. Execute `bun run test` to load the compiled bundle and assert key lookups. Data sanity checks are available via `bun run validate`, and provider maintenance commands such as `bun run provider:show vultr` and `bun run provider:update vultr ...` drive inventory refreshes.
88

99
## Coding Style & Naming Conventions
10-
Contributors write modern ESM JavaScript with 2-space indentation. Favor immutable helpers and array iteration to keep dataset transformations predictable. Prettier 3 enforces formatting; run it through the `prebuild` script rather than manual touches. Provider keys must stay lowercase and hyphen-free, matching entries in `data/providers/*.json`. IATA location identifiers remain uppercase and align with the `iata` map.
10+
Contributors write modern ESM JavaScript with 2-space indentation. Favor immutable helpers and array iteration to keep dataset transformations predictable. `oxfmt` enforces formatting; run it through the `prebuild` script rather than manual touches. Provider keys must stay lowercase and hyphen-free, matching entries in `data/providers/*.json`. IATA location identifiers remain uppercase and align with the `iata` map.
1111

1212
## Testing Guidelines
13-
Tests rely on Node’s ESM runtime; ensure `dist/bundle.js` exists before running them. When adding new providers or locations, extend `test/index.test.mjs` with representative lookups so regressions surface quickly. Target smoke coverage for every provider touched, and prefer deterministic fixtures over live network calls.
13+
Tests rely on Bun’s ESM runtime; ensure `dist/bundle.js` exists before running them. When adding new providers or locations, extend `test/index.test.mjs` with representative lookups so regressions surface quickly. Target smoke coverage for every provider touched, and prefer deterministic fixtures over live network calls.
1414

1515
## Commit & Pull Request Guidelines
16-
Follow the Conventional Commit style observed in history (`build(deps-dev): bump rollup…`), using scopes like `data`, `build`, or `docs`. Each PR should describe dataset sources, tooling changes, and any scripts executed. Link tracking issues when available and attach screenshots only when UI artifacts (e.g., notebooks) are affected. Confirm that `pnpm run build` and `pnpm test` succeed before requesting review.
16+
Follow the Conventional Commit style observed in history (`build(deps-dev): bump rollup…`), using scopes like `data`, `build`, or `docs`. Each PR should describe dataset sources, tooling changes, and any scripts executed. Link tracking issues when available and attach screenshots only when UI artifacts (e.g., notebooks) are affected. Confirm that `bun run build` and `bun run test` succeed before requesting review.
1717

1818
## Data & Security Notes
1919
Document the provenance of new PoP coordinates in the PR body and avoid introducing personally identifiable information. Spotter scripts should only target public endpoints; capture new credentials via repository secrets rather than committed files.

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
ES Module with geolocation and IATA codes of Content Delivery Networks and hosting companies points of presence. Useful for plotting, planning and network measurements.
88

9-
## 🔨 Install with `yarn` or `npm`
9+
## 🔨 Install
10+
11+
```bash
12+
bun add @adaptivelink/pops
13+
```
1014

1115
```bash
1216
yarn add @adaptivelink/pops
@@ -107,6 +111,14 @@ Spotters are scheduled GitHub Actions that continuously monitor CDNs and Hosting
107111

108112
Feel free to suggest or PR more networks and PoP locations.
109113

114+
Contributor workflow uses Bun:
115+
116+
```bash
117+
bun install
118+
bun run build
119+
bun run test
120+
```
121+
110122
## 💻 Codespaces
111123

112124
This repo is configured for GitHub Codespaces.

bun.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bun.lockb

-64.6 KB
Binary file not shown.

data/iata-filtered.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ const iata = new Map([
55
["ABJ", [5.25, -3.93]],
66
["ABQ", [35.05, -106.62]],
77
["ACC", [5.61, -0.17]],
8+
["ACX", [25.09, 104.96]],
89
["ADB", [38.29, 27.15]],
10+
["ADD", [8.98, 38.8]],
911
["ADL", [-34.94, 138.54]],
12+
["AGR", [27.16, 77.96]],
1013
["AKL", [-37, 174.78]],
14+
["AKX", [50.25, 57.2]],
1115
["ALA", [43.35, 77.01]],
1216
["ALG", [36.7, 3.21]],
1317
["AMD", [23.07, 72.62]],
@@ -27,7 +31,6 @@ const iata = new Map([
2731
["BAH", [26.27, 50.63]],
2832
["BAQ", [10.89, -74.78]],
2933
["BAX", [53.36, 83.55]],
30-
["BBI", [20.25, 85.82]],
3134
["BCN", [41.3, 2.08]],
3235
["BEG", [44.82, 20.31]],
3336
["BEL", [-1.39, -48.48]],
@@ -60,6 +63,7 @@ const iata = new Map([
6063
["CAW", [-21.7, -41.3]],
6164
["CBF", [41.26, -95.76]],
6265
["CBR", [-35.31, 149.19]],
66+
["CCP", [-36.77, -73.06]],
6367
["CCU", [22.65, 88.44]],
6468
["CDG", [49, 2.57]],
6569
["CEB", [10.31, 123.98]],
@@ -75,13 +79,16 @@ const iata = new Map([
7579
["CHC", [-43.49, 172.54]],
7680
["CHI", [41.88, -87.77]],
7781
["CHS", [32.88, -80.04]],
82+
["CJB", [11.03, 77.04]],
7883
["CJR", [38.53, -77.86]],
7984
["CKG", [29.72, 106.63]],
8085
["CLE", [41.41, -81.84]],
86+
["CLO", [3.54, -76.38]],
8187
["CLT", [35.22, -80.94]],
8288
["CMB", [7.17, 79.89]],
8389
["CMH", [40, -82.88]],
8490
["CNF", [-19.63, -43.96]],
91+
["CNI", [39.27, 122.67]],
8592
["CNN", [56.9, 124.88]],
8693
["CNX", [18.77, 98.97]],
8794
["COK", [10.16, 76.39]],
@@ -96,6 +103,7 @@ const iata = new Map([
96103
["CWB", [-25.53, -49.18]],
97104
["CWL", [51.4, -3.34]],
98105
["CYS", [41.16, -104.82]],
106+
["CZL", [36.28, 6.62]],
99107
["CZX", [31.91, 119.78]],
100108
["DAC", [23.85, 90.41]],
101109
["DAD", [16.06, 108.2]],
@@ -121,7 +129,6 @@ const iata = new Map([
121129
["DXB", [25.25, 55.35]],
122130
["EBB", [0.05, 32.44]],
123131
["EBL", [36.24, 43.96]],
124-
["EDI", [55.95, -3.36]],
125132
["ENS", [52.27, 6.88]],
126133
["ESB", [40.11, 32.99]],
127134
["EVN", [40.15, 44.4]],
@@ -164,7 +171,6 @@ const iata = new Map([
164171
["HEL", [60.32, 24.97]],
165172
["HET", [40.85, 111.81]],
166173
["HFA", [32.81, 35.04]],
167-
["HFE", [31.99, 116.98]],
168174
["HGH", [30.24, 120.43]],
169175
["HHN", [49.95, 7.26]],
170176
["HHP", [22.29, 114.15]],
@@ -184,7 +190,6 @@ const iata = new Map([
184190
["ISB", [33.61, 73.11]],
185191
["IST", [40.98, 28.82]],
186192
["ISU", [35.56, 45.31]],
187-
["ITJ", [-26.88, -48.65]],
188193
["ITM", [34.79, 135.44]],
189194
["IXC", [30.67, 76.8]],
190195
["JAX", [30.49, -81.68]],
@@ -197,8 +202,8 @@ const iata = new Map([
197202
["JOG", [-7.79, 110.44]],
198203
["JOI", [-26.23, -48.78]],
199204
["JRS", [31.87, 35.21]],
200-
["JSR", [23.18, 89.16]],
201205
["KBP", [50.34, 30.9]],
206+
["KCH", [1.48, 110.34]],
202207
["KEF", [64, -22.62]],
203208
["KGL", [-1.96, 30.14]],
204209
["KHH", [22.57, 120.35]],
@@ -209,7 +214,6 @@ const iata = new Map([
209214
["KIV", [46.94, 28.93]],
210215
["KIX", [34.44, 135.24]],
211216
["KJA", [56.18, 92.48]],
212-
["KLD", [56.92, 35.92]],
213217
["KMG", [25.1, 102.93]],
214218
["KNU", [26.4, 80.41]],
215219
["KTM", [27.7, 85.36]],
@@ -230,15 +234,16 @@ const iata = new Map([
230234
["LGW", [51.16, -0.16]],
231235
["LHE", [31.52, 74.4]],
232236
["LHR", [51.47, -0.45]],
233-
["LHW", [36.51, 103.62]],
234237
["LIM", [-12.02, -77.11]],
235238
["LIN", [45.46, 9.28]],
236239
["LIS", [38.77, -9.13]],
237240
["LLA", [65.55, 22.12]],
238241
["LLK", [38.75, 48.82]],
242+
["LLW", [-13.79, 33.78]],
239243
["LOS", [6.58, 3.32]],
240244
["LPB", [-16.51, -68.18]],
241245
["LPP", [61.05, 28.16]],
246+
["LUN", [-15.33, 28.45]],
242247
["LUX", [49.63, 6.21]],
243248
["LYS", [45.72, 5.08]],
244249
["MAA", [12.98, 80.16]],
@@ -250,16 +255,16 @@ const iata = new Map([
250255
["MCO", [28.43, -81.31]],
251256
["MCT", [23.59, 58.29]],
252257
["MDE", [6.17, -75.43]],
253-
["MDL", [21.94, 96.09]],
254258
["MEB", [-37.74, 144.9]],
255259
["MEL", [-37.67, 144.85]],
256260
["MEM", [35.04, -89.98]],
257261
["MEX", [19.44, -99.07]],
258262
["MFE", [26.18, -98.24]],
259263
["MFM", [22.16, 113.57]],
260-
["MGM", [32.31, -86.39]],
261264
["MIA", [25.8, -80.28]],
265+
["MLA", [35.85, 14.49]],
262266
["MLE", [4.2, 73.52]],
267+
["MLG", [-7.93, 112.71]],
263268
["MNL", [14.51, 121.01]],
264269
["MPM", [-25.92, 32.57]],
265270
["MRN", [35.82, -81.61]],
@@ -274,7 +279,6 @@ const iata = new Map([
274279
["NAP", [40.89, 14.29]],
275280
["NBO", [-1.32, 36.93]],
276281
["NJF", [31.99, 44.4]],
277-
["NNG", [22.61, 108.17]],
278282
["NOU", [-22.02, 166.22]],
279283
["NQN", [-38.95, -68.15]],
280284
["NQZ", [51.03, 71.46]],
@@ -286,7 +290,6 @@ const iata = new Map([
286290
["OMA", [41.3, -95.9]],
287291
["ORD", [41.98, -87.9]],
288292
["ORF", [36.9, -76.21]],
289-
["ORK", [51.85, -8.49]],
290293
["ORN", [35.62, -0.61]],
291294
["ORY", [48.73, 2.36]],
292295
["OSL", [60.19, 11.1]],
@@ -331,7 +334,6 @@ const iata = new Map([
331334
["RAO", [-21.14, -47.77]],
332335
["RDU", [35.87, -78.79]],
333336
["REC", [-8.13, -34.92]],
334-
["RGN", [16.9, 96.13]],
335337
["RHV", [37.33, -121.82]],
336338
["RIC", [37.51, -77.32]],
337339
["RIX", [56.92, 23.98]],
@@ -341,6 +343,7 @@ const iata = new Map([
341343
["RUH", [24.96, 46.7]],
342344
["RUN", [-20.89, 55.51]],
343345
["SAN", [32.73, -117.2]],
346+
["SAP", [15.45, -87.92]],
344347
["SAT", [29.52, -98.47]],
345348
["SBN", [41.7, -86.31]],
346349
["SCL", [-33.4, -70.79]],
@@ -377,6 +380,7 @@ const iata = new Map([
377380
["TAO", [36.27, 120.38]],
378381
["TAS", [41.26, 69.27]],
379382
["TBS", [41.67, 44.96]],
383+
["TEN", [27.88, 109.31]],
380384
["TGU", [14.06, -87.22]],
381385
["TIA", [41.42, 19.71]],
382386
["TIR", [13.64, 79.54]],
@@ -387,7 +391,6 @@ const iata = new Map([
387391
["TNR", [-18.8, 47.48]],
388392
["TPA", [27.98, -82.54]],
389393
["TPE", [25.08, 121.22]],
390-
["TSN", [39.12, 117.34]],
391394
["TUL", [36.19, -95.89]],
392395
["TUN", [36.85, 10.22]],
393396
["TXL", [52.55, 13.29]],
@@ -408,13 +411,12 @@ const iata = new Map([
408411
["VVO", [43.38, 132.14]],
409412
["WAW", [52.17, 20.97]],
410413
["WDH", [-22.49, 17.46]],
411-
["WHU", [31.37, 118.37]],
412414
["WLG", [-41.33, 174.81]],
415+
["WRO", [51.1, 16.88]],
413416
["XAP", [-27.09, -52.63]],
414417
["XFN", [32.15, 112.29]],
415418
["XIY", [34.44, 108.76]],
416419
["XNH", [30.94, 46.09]],
417-
["XNN", [36.53, 102.04]],
418420
["YHZ", [44.88, -63.51]],
419421
["YOW", [45.32, -75.67]],
420422
["YQB", [46.79, -71.38]],
@@ -426,7 +428,6 @@ const iata = new Map([
426428
["YYZ", [43.68, -79.61]],
427429
["ZAG", [45.73, 16.06]],
428430
["ZDM", [32.27, 35.02]],
429-
["ZGN", [22.52, 113.37]],
430431
["ZHY", [37.57, 105.15]],
431432
["ZPM", [49.01, 12.1]],
432433
["ZQZ", [40.74, 114.93]],

0 commit comments

Comments
 (0)