Skip to content

Commit

Permalink
Require Node.js 12.20
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 17, 2021
1 parent 67006c7 commit f7154cc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ jobs:
fail-fast: false
matrix:
node-version:
- 14
- 12
- 10
- 16
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
14 changes: 8 additions & 6 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const got = require('got');
import process from 'node:process';
import meow from 'meow';
import got from 'got';

meow(`
Usage
$ is-github-down
🦄 It's down. Play with your 😸/🐶! And stay home!
`);
`, {
importMeta: import.meta,
});

(async () => {
const {status} = await got('https://kctbh9vrtdwd.statuspage.io/api/v2/summary.json', {
timeout: 10000,
retry: 2
timeout: 10_000,
retry: 2,
}).json();

if (['major', 'critical'].includes(status.indicator)) {
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"bin": "cli.js",
"type": "module",
"bin": "./cli.js",
"engines": {
"node": ">=10"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -30,12 +31,12 @@
"status"
],
"dependencies": {
"got": "^11.0.1",
"meow": "^6.1.0"
"got": "^11.8.2",
"meow": "^10.1.1"
},
"devDependencies": {
"ava": "^2.4.0",
"execa": "^4.0.0",
"xo": "^0.29.1"
"ava": "^3.15.0",
"execa": "^5.1.1",
"xo": "^0.45.0"
}
}
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
## Quick usage

```
$ npx is-github-down
```sh
npx is-github-down
```

## Install

```
$ npm install --global is-github-down
```sh
npm install --global is-github-down
```

## Usage
Expand Down

0 comments on commit f7154cc

Please sign in to comment.