Skip to content

Commit 1c1a48c

Browse files
committed
Require Node.js 10
1 parent 9e95e07 commit 1c1a48c

File tree

7 files changed

+38
-26
lines changed

7 files changed

+38
-26
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Node.js ${{ matrix.node-version }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
node-version:
13+
- 14
14+
- 12
15+
- 10
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm install
22+
- run: npm test

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
Get a GitHub username from an email address.
2+
Get the GitHub username from an email address if the email can be found in any commits on GitHub.
33
44
@param email - Email address for the user of whom you want the username.
55
@param token - GitHub [personal access token](https://github.com/settings/tokens/new).
6-
@returns The username for the `email`.
6+
@returns The username for the `email` or `undefined` if it cannot be found.
77
88
@example
99
```
@@ -15,6 +15,6 @@ import githubUsername = require('github-username');
1515
})();
1616
```
1717
*/
18-
declare function githubUsername(email: string, token?: string): Promise<string>;
18+
declare function githubUsername(email: string, token?: string): Promise<string | undefined>;
1919

2020
export = githubUsername;

index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {expectType} from 'tsd';
22
import githubUsername = require('.');
33

4-
expectType<Promise<string>>(
4+
expectType<Promise<string | undefined>>(
55
githubUsername('[email protected]', 'deadbeef')
66
);

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "Get a GitHub username from an email address",
55
"license": "MIT",
66
"repository": "sindresorhus/github-username",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1112
},
1213
"engines": {
13-
"node": ">=8"
14+
"node": ">=10"
1415
},
1516
"scripts": {
1617
"test": "xo && ava && tsd"
@@ -32,8 +33,8 @@
3233
"@octokit/rest": "^18.0.6"
3334
},
3435
"devDependencies": {
35-
"ava": "^1.4.1",
36-
"tsd": "^0.7.2",
37-
"xo": "^0.24.0"
36+
"ava": "^2.4.0",
37+
"tsd": "^0.14.0",
38+
"xo": "^0.36.1"
3839
}
3940
}

readme.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# github-username [![Build Status](https://travis-ci.org/sindresorhus/github-username.svg?branch=master)](https://travis-ci.org/sindresorhus/github-username)
1+
# github-username
22

33
> Get a GitHub username from an email address
44
5-
65
## Install
76

87
```
98
$ npm install github-username
109
```
1110

12-
1311
## Usage
1412

1513
```js
@@ -21,12 +19,13 @@ const githubUsername = require('github-username');
2119
})();
2220
```
2321

24-
2522
## API
2623

27-
### githubUsername(email, [token])
24+
### githubUsername(email, token?)
25+
26+
Get the GitHub username from an email address if the email can be found in any commits on GitHub.
2827

29-
Returns a `Promise<string>` with the username.
28+
Returns a `Promise<string?>` with the username.
3029

3130
#### email
3231

@@ -40,12 +39,6 @@ Type: `string`
4039

4140
GitHub [personal access token](https://github.com/settings/tokens/new).
4241

43-
4442
## Related
4543

4644
- [github-username-cli](https://github.com/sindresorhus/github-username-cli) - CLI for this module
47-
48-
49-
## License
50-
51-
MIT © [Sindre Sorhus](https://sindresorhus.com)

0 commit comments

Comments
 (0)