Skip to content

Commit

Permalink
Require Node.js 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 2, 2024
1 parent b19081a commit 4277e47
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ jobs:
fail-fast: false
matrix:
node-version:
- 16
- 14
- 12
- 20
- 18
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
11 changes: 6 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
import process from 'node:process';
import meow from 'meow';
import makeDir from 'make-dir';
import {makeDirectorySync} from 'make-dir';

const cli = meow(`
Usage
Expand All @@ -16,9 +17,9 @@ const cli = meow(`
importMeta: import.meta,
flags: {
mode: {
type: 'string'
}
}
type: 'string',
},
},
});

const {input: directories} = cli;
Expand All @@ -35,5 +36,5 @@ if (cli.flags.mode) {
}

for (const directory of directories) {
makeDir.sync(directory, options);
makeDirectorySync(directory, options);
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"make-dir": "./cli.js"
},
"engines": {
"node": ">=12.17"
"node": ">=18"
},
"scripts": {
"test": "xo && ava"
Expand Down Expand Up @@ -49,13 +49,13 @@
"windows"
],
"dependencies": {
"make-dir": "^4.0.0",
"meow": "^10.0.0"
"make-dir": "^5.0.0",
"meow": "^13.2.0"
},
"devDependencies": {
"ava": "^3.15.0",
"execa": "^5.0.0",
"tempy": "^1.0.1",
"xo": "^0.39.1"
"ava": "^6.1.2",
"execa": "^8.0.1",
"tempy": "^3.1.0",
"xo": "^0.58.0"
}
}
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
## Install

```
$ npm install --global make-dir-cli
```sh
npm install --global make-dir-cli
```

## Usage
Expand Down Expand Up @@ -44,11 +44,11 @@ $ tree

Create a shell alias for less typing:

```
```sh
alias md=make-dir
```

## Related

- [make-dir](https://github.com/sindresorhus/make-dir) - API for this module
- [make-dir](https://github.com/sindresorhus/make-dir) - API for this package
- [del-cli](https://github.com/sindresorhus/del-cli) - Delete files and directories
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import fs from 'node:fs';
import path from 'node:path';
import test from 'ava';
import execa from 'execa';
import tempy from 'tempy';
import {execa} from 'execa';
import {temporaryDirectory} from 'tempy';

test('main', async t => {
const paths = [
path.join(tempy.directory(), 'foo/unicorn'),
path.join(tempy.directory(), 'bar/rainbow')
path.join(temporaryDirectory(), 'foo/unicorn'),
path.join(temporaryDirectory(), 'bar/rainbow'),
];
await execa('./cli.js', paths);
t.true(fs.existsSync(paths[0]));
Expand Down

0 comments on commit 4277e47

Please sign in to comment.