I'm having trouble figuring out how to add a new type to DefinitelyTyped when it has external dependencies. I cannot get the tests to pass because modules are not able to be found unless I add a package.json to the folder, but the linter does not pass because the packages are not whitelisted.
Here is the pull request:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21581
// index.d.ts
import {
ApolloClient,
ObservableQuery,
WatchQueryOptions,
ApolloError
} from 'apollo-client';
Also in my tests there are some other dependencies I need so that I can actually use it, but devDependencies is not allowed by the linter.
So without a package.json, I get an error during the tests that say "module not found 'mob-apollo' -- which makes sense.
So I added a package.json:
{
"private": true,
"dependencies": {
"apollo-client": "^2.0.0",
"graphql-tag": "^2.0.0",
"mobx": "^3.0.0"
}
}
Now I get an error during the linter:
Error: In /home/travis/build/DefinitelyTyped/DefinitelyTyped/types/mobx-apollo/package.json: Dependency apollo-client not in whitelist; please make a pull request to types-publisher adding it.
However, if you look at the whitelist, it is very small, so this can't be the proper way to address this... is it? I'd imagine if you had to whitelist for every package that had a dependency then this list would be huge.
https://github.com/Microsoft/types-publisher/blob/master/dependenciesWhitelist.txt
So what should I do here?