Skip to content

Commit 4c232f5

Browse files
committed
Meta tweaks
1 parent 6192cb2 commit 4c232f5

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

index.d.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface UserInfo {
1+
export type UserInfo = {
22
/**
33
The user's name.
44
*/
@@ -23,7 +23,7 @@ export interface UserInfo {
2323
The user's associated Twitter account.
2424
*/
2525
twitter: string | undefined;
26-
}
26+
};
2727

2828
/**
2929
Get user info of an npm user.
@@ -38,9 +38,7 @@ console.log(await npmUser('sindresorhus'));
3838
// {
3939
// name: 'Sindre Sorhus',
4040
// avatar: 'https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9?size=496',
41-
// email: 'sindresorhus@gmail.com',
42-
// github: 'sindresorhus',
43-
// twitter: 'sindresorhus'
41+
// email: 'sindresorhus@gmail.com'
4442
// }
4543
```
4644
*/

index.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expectType} from 'tsd';
2-
import npmUser, {UserInfo} from './index.js';
2+
import npmUser, {type UserInfo} from './index.js';
33

44
const userInfoPromise = npmUser('sindresorhus');
55
expectType<Promise<UserInfo>>(userInfoPromise);

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"author": {
99
"name": "Sindre Sorhus",
1010
"email": "sindresorhus@gmail.com",
11-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1212
},
1313
"type": "module",
1414
"exports": "./index.js",
@@ -37,12 +37,12 @@
3737
],
3838
"dependencies": {
3939
"cheerio": "^0.22.0",
40-
"got": "^12.0.4",
40+
"got": "^12.5.3",
4141
"npm-email": "^4.0.1"
4242
},
4343
"devDependencies": {
44-
"ava": "^4.2.0",
45-
"tsd": "^0.20.0",
46-
"xo": "^0.48.0"
44+
"ava": "^5.2.0",
45+
"tsd": "^0.25.0",
46+
"xo": "^0.53.1"
4747
}
4848
}

readme.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ console.log(await npmUser('sindresorhus'));
2222
{
2323
name: 'Sindre Sorhus',
2424
avatar: 'https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9?size=496',
25-
email: 'sindresorhus@gmail.com',
26-
github: 'sindresorhus',
27-
twitter: 'sindresorhus'
25+
email: 'sindresorhus@gmail.com'
2826
}
2927
*/
3028
```

test.js

-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ test('user: sindresorhus', async t => {
66
t.is(user.name, 'Sindre Sorhus');
77
t.regex(user.avatar, /npm-avatar/);
88
t.is(user.email, 'sindresorhus@gmail.com');
9-
t.is(user.github, 'sindresorhus');
10-
t.is(user.twitter, 'sindresorhus');
119
});
1210

1311
test('user: npm', async t => {
1412
const user = await npmUser('npm');
1513
t.is(user.name, 'No Problem, Meatbag');
1614
t.regex(user.avatar, /npm-avatar/);
1715
t.is(user.email, 'npm@npmjs.com');
18-
t.is(user.github, 'npm');
19-
t.is(user.twitter, 'npmjs');
2016
});
2117

2218
test('user: tj', async t => {

0 commit comments

Comments
 (0)