Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'fs' dependency with static imports for cross compatibility with Deno/Bun #802

Merged
merged 1 commit into from
May 22, 2024

Conversation

alanbixby
Copy link
Member

Currently methods are loaded dynamically through a recursive fs call; this causes compatibility issues with alternative run-times like Deno and Bun, and permission issues in edge server environments like Vercel.

This change converts the dynamic imports to static require statements; the snippet was code-gen'd by modifying the now deprecated search() function to write a formatted string.

Validated using @supercoolspy's test repository; first run is without the change, second run is after the change.

image

@Neztore Neztore merged commit aa07a95 into noblox:master May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants