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

Fix yargs-parser vulnerability #68

Closed
wants to merge 3 commits into from
Closed
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
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"scripts": {
"prepublishOnly": "npm run build",
"pretest": "npm run build && cpy \"./**/**\" \"../../../dist/test/fixtures/\" --parents --cwd=source/test/fixtures",
"test": "npm run lint && ava dist/test/test.js",
"test": "npm run lint && ava dist/test/test.js -T 60s",
"build": "npm run clean && tsc && chmod +x dist/cli.js",
"clean": "del-cli dist",
"lint": "tslint -p . --format stylish"
Expand All @@ -42,17 +42,17 @@
"dependencies": {
"eslint-formatter-pretty": "^1.3.0",
"globby": "^9.1.0",
"meow": "^5.0.0",
"meow": "^6.1.1",
"path-exists": "^3.0.0",
"read-pkg-up": "^4.0.0",
"update-notifier": "^2.5.0"
"update-notifier": "^4.1.0"
},
"devDependencies": {
"@types/node": "^11.10.4",
"@types/react": "^16.9.2",
"@types/update-notifier": "^2.2.0",
"ava": "^1.4.1",
"cpy-cli": "^2.0.0",
"@types/update-notifier": "^4.1.0",
"ava": "^3.8.1",
"cpy-cli": "^3.1.1",
"del-cli": "^1.1.0",
"execa": "^3.3.0",
"react": "^16.9.0",
Expand Down
2 changes: 1 addition & 1 deletion source/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const cli = meow(`
`);

(async () => { // tslint:disable-line:no-floating-promises
updateNotifier({pkg: cli.pkg}).notify();
updateNotifier({pkg: (cli.pkg as updateNotifier.Package)}).notify();

try {
const options = cli.input.length > 0 ? {cwd: cli.input[0]} : undefined;
Expand Down
4 changes: 2 additions & 2 deletions source/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {verify} from './fixtures/utils';
import tsd from '..';

test('throw if no type definition was found', async t => {
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-tsd')}), 'The type definition `index.d.ts` does not exist. Create one and try again.');
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-tsd')}), {instanceOf: Error, message: 'The type definition `index.d.ts` does not exist. Create one and try again.'});
});

test('throw if no test is found', async t => {
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-test')}), 'The test file `index.test-d.ts` or `index.test-d.tsx` does not exist. Create one and try again.');
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-test')}), {instanceOf: Error, message: 'The test file `index.test-d.ts` or `index.test-d.tsx` does not exist. Create one and try again.'});
});

test('return diagnostics', async t => {
Expand Down