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 May 8, 2021
1 parent 9eb3c5d commit d4ff406
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 30 deletions.
4 changes: 0 additions & 4 deletions .github/funding.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 16
- 14
- 12
- 10
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
16 changes: 10 additions & 6 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const captureWebsite = require('capture-website');
const arrify = require('arrify');
const splitOnFirst = require('split-on-first');
const getStdin = require('get-stdin');
import meow from 'meow';
import captureWebsite from 'capture-website';
import arrify from 'arrify';
import splitOnFirst from 'split-on-first';
import getStdin from 'get-stdin';

const cli = meow(`
Usage
Expand Down Expand Up @@ -81,6 +80,7 @@ const cli = meow(`
--inset=10,15,-10,15
--inset=30
`, {
importMeta: import.meta,
flags: {
output: {
type: 'string'
Expand Down Expand Up @@ -196,6 +196,10 @@ options.modules = options.module;
options.scripts = options.script;
options.styles = options.style;
options.cookies = options.cookie;
delete options.module;
delete options.script;
delete options.style;
delete options.cookie;

if (options.launchOptions) {
options.launchOptions = JSON.parse(options.launchOptions);
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"email": "[email protected]",
"url": "https://sindresorhus.com"
},
"type": "module",
"bin": {
"capture-website": "cli.js"
"capture-website": "./cli.js"
},
"engines": {
"node": ">=10"
"node": ">=12.20"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -40,17 +41,17 @@
"jpg"
],
"dependencies": {
"arrify": "^2.0.1",
"capture-website": "^1.4.0",
"get-stdin": "^8.0.0",
"meow": "^7.0.1",
"split-on-first": "^2.0.1"
"arrify": "^3.0.0",
"capture-website": "^2.0.0",
"get-stdin": "^9.0.0",
"meow": "^10.0.0",
"split-on-first": "^3.0.0"
},
"devDependencies": {
"ava": "^2.4.0",
"ava": "^3.15.0",
"create-test-server": "^3.0.1",
"execa": "^5.0.0",
"file-type": "^12.4.0",
"xo": "^0.38.1"
"xo": "^0.39.1"
}
}
12 changes: 3 additions & 9 deletions test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The actual snapshot is saved in `test.js.snap`.

Generated by [AVA](https://ava.li).
Generated by [AVA](https://avajs.dev).

## check flags

Expand All @@ -14,9 +14,6 @@ Generated by [AVA](https://ava.li).
username: 'username',
},
clickElement: 'button',
cookie: [
'id=unicorn; Expires=Wed, 21 Oct 2018 07:28:00 GMT;',
],
cookies: [
'id=unicorn; Expires=Wed, 21 Oct 2018 07:28:00 GMT;',
],
Expand Down Expand Up @@ -49,11 +46,6 @@ Generated by [AVA](https://ava.li).
headless: false,
},
listDevices: false,
module: [
'https://sindresorhus.com/remote-file.js',
'local-file.js',
'document.body.style.backgroundColor = \'red\'',
],
modules: [
'https://sindresorhus.com/remote-file.js',
'local-file.js',
Expand All @@ -66,7 +58,9 @@ Generated by [AVA](https://ava.li).
'img.ad',
],
scaleFactor: 3,
scripts: [],
scrollToElement: '#map',
styles: [],
timeout: 80,
type: 'jpeg.',
userAgent: 'I love unicorns',
Expand Down
Binary file modified test.js.snap
Binary file not shown.

0 comments on commit d4ff406

Please sign in to comment.