Skip to content

Commit 9666433

Browse files
authored
Update all deps, some devDeps (#72)
* Update all deps, some devDeps * Added node v14. * Updated cpy-cli and del-cli * Updated execa * Updated eslint-formatter-pretty
1 parent 861db08 commit 9666433

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- '14'
34
- '12'
45
- '10'
56
- '8'

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
"typedefinitions"
4141
],
4242
"dependencies": {
43-
"eslint-formatter-pretty": "^1.3.0",
44-
"globby": "^9.1.0",
45-
"meow": "^5.0.0",
46-
"path-exists": "^3.0.0",
47-
"read-pkg-up": "^4.0.0",
48-
"update-notifier": "^2.5.0"
43+
"eslint-formatter-pretty": "^4.0.0",
44+
"globby": "^11.0.1",
45+
"meow": "^7.0.1",
46+
"path-exists": "^4.0.0",
47+
"read-pkg-up": "^7.0.0",
48+
"update-notifier": "^4.1.0"
4949
},
5050
"devDependencies": {
51-
"@types/node": "^11.10.4",
51+
"@types/node": "^14.0.0",
5252
"@types/react": "^16.9.2",
53-
"@types/update-notifier": "^2.2.0",
54-
"ava": "^1.4.1",
55-
"cpy-cli": "^2.0.0",
56-
"del-cli": "^1.1.0",
57-
"execa": "^3.3.0",
53+
"@types/update-notifier": "^4.1.0",
54+
"ava": "^3.8.2",
55+
"cpy-cli": "^3.0.0",
56+
"del-cli": "^3.0.0",
57+
"execa": "^4.0.0",
5858
"react": "^16.9.0",
5959
"rxjs": "^6.5.3",
6060
"tslint": "^5.11.0",

source/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const cli = meow(`
1818
`);
1919

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

2323
try {
2424
const options = cli.input.length > 0 ? {cwd: cli.input[0]} : undefined;

source/lib/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as path from 'path';
22
import * as readPkgUp from 'read-pkg-up';
33
import * as pathExists from 'path-exists';
4-
import globby from 'globby';
4+
import * as globby from 'globby';
55
import {getDiagnostics as getTSDiagnostics} from './compiler';
66
import loadConfig from './config';
77
import getCustomDiagnostics from './rules';
@@ -49,13 +49,15 @@ const findTestFiles = async (typingsFile: string, options: Options & {config: Co
4949
* @returns A promise which resolves the diagnostics of the type definition.
5050
*/
5151
export default async (options: Options = {cwd: process.cwd()}) => {
52-
const {pkg} = await readPkgUp({cwd: options.cwd});
52+
const pkgResult = await readPkgUp({cwd: options.cwd});
5353

54-
if (!pkg) {
54+
if (!pkgResult) {
5555
throw new Error('No `package.json` file found. Make sure you are running the command in a Node.js project.');
5656
}
5757

58-
const config = loadConfig(pkg, options.cwd);
58+
const pkg = pkgResult.packageJson;
59+
60+
const config = loadConfig(pkg as any, options.cwd);
5961

6062
// Look for a typings file, otherwise use `index.d.ts` in the root directory. If the file is not found, throw an error.
6163
const typingsFile = await findTypingsFile(pkg, options);

source/test/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {verify} from './fixtures/utils';
44
import tsd from '..';
55

66
test('throw if no type definition was found', async t => {
7-
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.');
7+
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-tsd')}), {message: 'The type definition `index.d.ts` does not exist. Create one and try again.'});
88
});
99

1010
test('throw if no test is found', async t => {
11-
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.');
11+
await t.throwsAsync(tsd({cwd: path.join(__dirname, 'fixtures/no-test')}), {message: 'The test file `index.test-d.ts` or `index.test-d.tsx` does not exist. Create one and try again.'});
1212
});
1313

1414
test('return diagnostics', async t => {

0 commit comments

Comments
 (0)