Skip to content

fix: add special case for geoip-lite#446

Merged
styfle merged 3 commits intovercel:mainfrom
kongmoumou:fix-geoip-lite-integration
Oct 22, 2024
Merged

fix: add special case for geoip-lite#446
styfle merged 3 commits intovercel:mainfrom
kongmoumou:fix-geoip-lite-integration

Conversation

@kongmoumou
Copy link
Contributor

Currently, nft can not handle data assets of geoip-lite package properly. Error message like below ⬇️

image

Test Code

const geoip = require('geoip-lite');

const ip = "207.97.227.239";
const geo = geoip.lookup(ip);

This PR adds essential data files as assets for geoip-lite in special-case to solve it.

@kongmoumou kongmoumou requested review from a team, ijjk and styfle as code owners October 22, 2024 13:27
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/geoip-lite@1.4.10 environment, filesystem, network +18 166 MB bluesmoon

View full report↗︎

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

We can merge this one but I think a better solution would be fixing the static analysis for the fallback here:

https://github.com/geoip-lite/node-geoip/blob/c788342dfce6d97244842622da6e4fa259f79742/lib/geoip.js#L13-L16

@styfle styfle changed the title fix: geoip lite integration fix: add special case for geoip-lite Oct 22, 2024
@styfle styfle merged commit b3d2da0 into vercel:main Oct 22, 2024
@github-actions
Copy link

🎉 This PR is included in version 0.27.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants