Skip to content

Commit

Permalink
Require Node.js 16
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
sindresorhus committed Jul 3, 2023
1 parent c6f232d commit b7347e7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Expand Up @@ -10,13 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 14
- 12
- 10
- 8
- 20
- 18
- 16
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
15 changes: 8 additions & 7 deletions cli.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const hasha = require('hasha');
import process from 'node:process';
import meow from 'meow';
import hasha from 'hasha';

const cli = meow(`
Usage
Expand All @@ -16,16 +16,17 @@ const cli = meow(`
$ hasha unicorn --algorithm=md5
1abcb33beeb811dca15f0ac3e47b88d9
`, {
importMeta: import.meta,
flags: {
algorithm: {
type: 'string',
alias: 'a'
shortFlag: 'a',
},
encoding: {
type: 'string',
alias: 'e'
}
}
shortFlag: 'e',
},
},
});

const input = cli.input[0];
Expand Down
2 changes: 1 addition & 1 deletion license
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)

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:

Expand Down
17 changes: 9 additions & 8 deletions package.json
Expand Up @@ -7,13 +7,14 @@
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"bin": {
"hasha": "cli.js"
"hasha": "./cli.js"
},
"engines": {
"node": ">=8"
"node": ">=16"
},
"scripts": {
"test": "xo && ava"
Expand Down Expand Up @@ -46,12 +47,12 @@
"easy"
],
"dependencies": {
"hasha": "^5.0.0",
"meow": "^5.0.0"
"hasha": "^5.2.2",
"meow": "^12.0.1"
},
"devDependencies": {
"ava": "^2.1.0",
"execa": "^2.0.3",
"xo": "^0.24.0"
"ava": "^5.3.1",
"execa": "^7.1.1",
"xo": "^0.54.2"
}
}
6 changes: 2 additions & 4 deletions readme.md
Expand Up @@ -2,13 +2,11 @@

> Hashing made simple. Get the hash of text or stdin.

## Install

```sh
npm install --global hasha-cli
```
$ npm install --global hasha-cli
```


## Usage

Expand Down
2 changes: 1 addition & 1 deletion test.js
@@ -1,5 +1,5 @@
import test from 'ava';
import execa from 'execa';
import {execa} from 'execa';
import hasha from 'hasha';

const input = 'unicorn';
Expand Down

0 comments on commit b7347e7

Please sign in to comment.