Conversation
- Rewrites build-airport-map.mjs to fetch airports.csv + citycodes.csv from lxndrblz/Airports at build time (no local file or airport-timezone devDependency needed); OurAirports approach preserved in comments - Regenerates airport-map-data.json: 9,803 airports + 27 metro codes + 5 derived city codes = 9,835 total entries - Trims common.js metro overrides to only the 4 not covered by the new data (TCI collision, QDF/QHO/QMI absent) - Updates homepage to document timezone, airport, and metro code inputs
- airport-map.test.js: updated for lxndrblz source (9k+ entries, metro codes, TZ alias normalization, TCI collision); 50 assertions - resolve-zone.test.js: validates overrides table in common.js and confirms airport map + overrides cover timezone abbrevs, airport codes, metro codes, TCI/QDF/QHO/QMI override-only codes, and colloquial aliases; 31 assertions - og.test.js: canvas smoke test — createCanvas, fill, toBuffer, PNG magic bytes; 5 assertions - package.json: adds "test" script wiring all three files - .github/workflows/ci.yml: runs npm ci + npm test + npm audit on every PR and push to main
✅ Deploy Preview for timezone-fyi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
netlify/airport-map.test.js— updated for lxndrblz data source: covers well-known airports, regional airports, all metro area codes (NYC, LON, TYO, PAR, CHI…), TZ alias normalization (Brazil/East→America/Sao_Paulo), and the TCI collisionnetlify/resolve-zone.test.js— validates the overrides table incommon.jswithout importing it at runtime (avoids thetzdataESM incompatibility). Covers: timezone abbreviations, IANA passthrough, airport codes, metro codes, override-only codes (TCI/QDF/QHO/QMI), colloquial aliases, and override-beats-airport-map precedencenetlify/og.test.js— canvas smoke test:createCanvas, fill,toBuffer, PNG magic bytes. Directly verifies the canvas upgrade didn't break OG image generationpackage.json— adds"test"script.github/workflows/ci.yml— runsnpm ci+npm test+npm audit --audit-level=highon every PR and push to mainTest plan
npm testruns all 86 assertions and exits 0npm auditstep in CI catches any future high-severity vulnerabilities