Skip to content

Commit

Permalink
Require Node.js 14
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 12, 2023
1 parent 6cac740 commit 64d0b46
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github: sindresorhus
open_collective: sindresorhus
tidelift: npm/tempfile
custom: https://sindresorhus.com/donate
3 changes: 3 additions & 0 deletions .github/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
7 changes: 3 additions & 4 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:
- 18
- 16
- 14
- 12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import {v4 as uuidv4} from 'uuid';
import {randomUUID} from 'node:crypto';
import tempDirectory from 'temp-dir';

export default function tempfile(extension = '') {
return path.join(tempDirectory, uuidv4() + extension);
return path.join(tempDirectory, randomUUID() + extension);
}
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"engines": {
"node": ">=12.20"
"node": ">=14.18"
},
"scripts": {
"test": "xo && ava && tsd"
Expand All @@ -32,12 +35,11 @@
"uuid"
],
"dependencies": {
"temp-dir": "^2.0.0",
"uuid": "^8.3.2"
"temp-dir": "^3.0.0"
},
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.17.0",
"xo": "^0.40.2"
"ava": "^5.2.0",
"tsd": "^0.25.0",
"xo": "^0.53.1"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## Install

```
$ npm install tempfile
```sh
npm install tempfile
```

## Usage
Expand Down

0 comments on commit 64d0b46

Please sign in to comment.