Skip to content

Include parent folders to parse for package.json in determining isNodeApi #339

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

citkane
Copy link

@citkane citkane commented Dec 4, 2024

The present code logic of cmake-js, in order to determine isNodeApi, assumes that package.json and CMakeList.txt are co-located in a folder. If package.json is not found in the same folder, an error is logged in silly mode, which for most consumers is a silent failure.

This PR redresses the issue by recursively searching parent folders until package.json is found and it's path returned, or the system root file folder is reached, upon which false is returned

@Julusian Julusian added this to the v8.0.0 milestone Apr 20, 2025
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.

2 participants