resolve-from
Resolve the path of a module like require.resolve() but from a given path
by sindresorhusJavaScript
Commit activity
Last 12 weeks · 1 commit
Community health
4 of 6 standards met
Recent PRs & issues
https://github.com/sindresorhus/resolve-from/blob/main/index.js#L16 unconditionally uses realpathSync which is a problem in contexts where we don't want to give lstat permissisons to every directory in the hierarchy (sandboxes for example). Node's options let you work around this. I'm running into this because this is how eslint loads it's configuration (through import-fresh). Happy to take a stab at this if this something you want to support in this project.
Recent fixes
Summary Adds export to skip calls, allowing module resolution without requiring permissions on every directory in the hierarchy. Changes : Added optional parameter to the internal function; added convenience export Why requires permissions on every directory in the hierarchy, which is a problem in sandboxed environments. When is already enabled at the Node.js level, the extra realpath call is redundant. Closes #18
Repository: sindresorhus/resolve-from. Description: Resolve the path of a module like require.resolve() but from a given path Stars: 145, Forks: 13. Primary language: JavaScript. Languages: JavaScript (92.7%), TypeScript (7.3%). License: MIT. Latest release: v5.0.0 (7y ago). Open PRs: 0, open issues: 2. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, SamVerschueren, coreyfarrell, BendingBender, ranyitz, Richienb, zkochan.