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

Add external option to allow whitelisting external dependencies #60

Merged
merged 7 commits into from
May 6, 2015

Conversation

anandthakker
Copy link
Contributor

This adds the external: 'globpattern' option, which can be used to whitelist external dependencies. Glob matching is relative to the node_modules folders adjacent to each index, so the glob pattern external should match node_modules/external, and external/node_modules/deep should match node_modules/external/node_modules/deep.

@anandthakker
Copy link
Contributor Author

Issue: #56

@anandthakker
Copy link
Contributor Author

@tmcw I think this is pretty much ready.

@tmcw
Copy link
Member

tmcw commented Apr 30, 2015

@anandthakker are tests passing on your side? Getting a test failure with

> documentation@1.0.6 test /Users/tmcw/src/documentation
> eslint index.js test/*.js test/streams/*.js && prova test/*.js test/streams/*.js


/Users/tmcw/src/documentation/lib/module-filters.js:36
          if (pkg.main) {
                 ^
TypeError: Cannot read property 'main' of undefined
    at matchGlob (/Users/tmcw/src/documentation/lib/module-filters.js:36:18)
    at /Users/tmcw/src/documentation/lib/module-filters.js:53:18
    at Array.map (native)
    at Object.postFilter (/Users/tmcw/src/documentation/lib/module-filters.js:52:10)
    at /Users/tmcw/src/documentation/node_modules/module-deps/index.js:320:38
    at onresolve (/Users/tmcw/src/documentation/node_modules/module-deps/index.js:159:25)
    at /Users/tmcw/src/documentation/node_modules/module-deps/node_modules/browser-resolve/index.js:250:24
    at /Users/tmcw/src/documentation/node_modules/module-deps/node_modules/resolve/lib/async.js:46:14
    at process (/Users/tmcw/src/documentation/node_modules/module-deps/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/tmcw/src/documentation/node_modules/module-deps/node_modules/resolve/lib/async.js:188:17)

@anandthakker
Copy link
Contributor Author

@tmcw hmm, strange -- they're passing on my end...

@anandthakker
Copy link
Contributor Author

@tmcw note: just rebased.

Still can't reproduce the test failure, and I'm puzzled at the one you're getting. Can you update module-deps to 3.7.8 and try again?

@tmcw
Copy link
Member

tmcw commented May 6, 2015

Yep, I think all my deps are up to date, but somehow still getting this issue https://gist.github.com/tmcw/91093bf851f52dc540ae digging into it now...

@tmcw
Copy link
Member

tmcw commented May 6, 2015

@anandthakker do you have an uncommitted test/fixture/node_modules/external2 directory possibly?

@anandthakker
Copy link
Contributor Author

Aw, crap. Yeah, that was it -- got tripped up by my own global .gitignore rule. Sorry about that!

@tmcw
Copy link
Member

tmcw commented May 6, 2015

👍 great - I'll merge and then add a test to make sure that missing modules aren't crashers

tmcw added a commit that referenced this pull request May 6, 2015
Add `external` option to allow whitelisting external dependencies
@tmcw tmcw merged commit d5a8a03 into documentationjs:master May 6, 2015
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.

None yet

2 participants