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

Implements skipNodeModules #173

Merged
merged 1 commit into from
Nov 28, 2018
Merged

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Nov 14, 2018

Split out of #170.

This PR adds support for a new skipNodeModules option. This option can be used to prevent resolve from doing lookups for node_modules. It's an advanced option that likely won't be used by direct users, but that's important for the PnP use case (otherwise people could have weird behaviors if they happen to also have a node_modules on top of their .pnp.js file - for example if they ran npm install at some point).

…ceive a thunk for node modules resolution paths

 - this would be a breaking change, but the “paths as function” option has not yet been released.
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thinking about this more; what would you think about making the paths function be passed a thunk, so it can choose for itself what to do with the node_modules resolution?

On the hopes that it'll work for you, I've updated this PR with that change :-)

@arcanis
Copy link
Contributor Author

arcanis commented Nov 27, 2018

@ljharb yep, that's good to me! 😃

@ljharb ljharb merged commit 9ea8b16 into browserify:master Nov 28, 2018
ljharb added a commit that referenced this pull request Dec 17, 2018
 - [New] `async`/`sync`/`node-modules-paths`: Adds support for “paths” being a function (#172, #173)
 - [New] Implements a "normalize-options" pseudo-hook (#174)
 - [Fix] `sync`/`async`: fix `preserveSymlinks` option (#177)
 - [Fix] `sync`/`async`: when package.json `main` is not a string, throw an error (#178)
 - [Deps] update `path-parse`
 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-keys`, `safe-publish-latest`, `tape`
 - [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15`
 - [Tests] better failure messages
@ljharb ljharb mentioned this pull request Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants