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

refactor: drop non-required modules #542

Merged
merged 1 commit into from
Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,23 @@
"gtoken": "^2.3.0",
"https-proxy-agent": "^2.2.1",
"jws": "^3.1.5",
"lodash.isstring": "^4.0.1",
"lru-cache": "^4.1.3",
"semver": "^5.5.0"
},
"devDependencies": {
"typedoc": "^0.13.0",
"@types/jws": "^3.1.0",
"@types/lodash.isstring": "^4.0.3",
"@types/lru-cache": "^4.1.0",
"@types/mocha": "^5.2.1",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.1",
"@types/nock": "^9.1.3",
"@types/node": "^10.5.1",
"@types/pify": "^3.0.2",
"@types/semver": "^5.5.0",
"@types/sinon": "5.0.5",
"@types/tmp": "^0.0.33",
"assert-rejects": "^1.0.0",
"codecov": "^3.0.2",
"gh-pages": "^2.0.0",
"gts": "^0.9.0",
"intelli-espower-loader": "^1.0.1",
"js-green-licenses": "^0.5.0",
Expand All @@ -52,7 +48,6 @@
"ncp": "^2.0.0",
"nock": "^10.0.0",
"nyc": "^13.0.0",
"pify": "^4.0.0",
"prettier": "^1.13.4",
"sinon": "^7.0.0",
"source-map-support": "^0.5.6",
Expand Down Expand Up @@ -86,7 +81,6 @@
"posttest": "npm run check && npm run license-check",
"license-check": "jsgl --local .",
"docs": "exit 0; typedoc --excludePrivate --excludeExternals --mode modules --out docs src && touch docs/.nojekyll",
"publish-docs": "gh-pages --dotfiles --dist docs --remote upstream",
"samples-test": "mocha samples/system-test",
"system-test": "mocha build/system-test",
"presystem-test": "npm run compile"
Expand Down
5 changes: 1 addition & 4 deletions src/auth/jwtclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ import {GoogleToken} from 'gtoken';
import * as stream from 'stream';

import * as messages from '../messages';

import {CredentialBody, Credentials, JWTInput} from './credentials';
import {JWTAccess} from './jwtaccess';
import {GetTokenResponse, OAuth2Client, RefreshOptions, RequestMetadataResponse} from './oauth2client';

const isString = require('lodash.isstring');

export interface JWTOptions extends RefreshOptions {
email?: string;
keyFile?: string;
Expand Down Expand Up @@ -286,7 +283,7 @@ export class JWT extends OAuth2Client {
* @param apiKey The API Key in string form.
*/
fromAPIKey(apiKey: string): void {
if (!isString(apiKey)) {
if (typeof apiKey !== 'string') {
throw new Error('Must provide an API Key string.');
}
this.apiKey = apiKey;
Expand Down
6 changes: 3 additions & 3 deletions system-test/test.kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import * as cp from 'child_process';
import * as mv from 'mv';
import {ncp} from 'ncp';
import * as pify from 'pify';
import * as tmp from 'tmp';
import {promisify} from 'util';

const mvp = pify(mv);
const ncpp = pify(ncp);
const mvp = promisify(mv) as {} as (...args: string[]) => Promise<void>;
const ncpp = promisify(ncp);
const keep = !!process.env.GALN_KEEP_TEMPDIRS;
const stagingDir = tmp.dirSync({keep, unsafeCleanup: true});
const stagingPath = stagingDir.name;
Expand Down