Skip to content

Commit

Permalink
Require Node.js 12
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 3, 2021
1 parent c632011 commit fc768f1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
3 changes: 0 additions & 3 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
11 changes: 5 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 fs = require('fs');
const meow = require('meow');
const prettyBytes = require('pretty-bytes');
const gzipSize = require('gzip-size');
const chalk = require('chalk');
import fs from 'node:fs';
import meow from 'meow';
import prettyBytes from 'pretty-bytes';
import gzipSize from 'gzip-size';
import chalk from 'chalk';

const cli = meow(`
Usage
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"bin": {
"gzip-size": "cli.js"
"gzip-size": "./cli.js"
},
"engines": {
"node": ">=10"
"node": ">=12"
},
"scripts": {
"test": "xo && ava"
Expand Down
9 changes: 4 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';
const fs = require('fs');
const execa = require('execa');
const test = require('ava');
const gzipSize = require('gzip-size');
import fs from 'node:fs';
import execa from 'execa';
import test from 'ava';
import gzipSize from 'gzip-size';

const fixture = fs.readFileSync('test.js', 'utf8');

Expand Down

0 comments on commit fc768f1

Please sign in to comment.