Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 24, 2021
1 parent 4ce6838 commit bb4f822
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
1 change: 1 addition & 0 deletions browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Buffer} from 'node:buffer';
import {ReadableWebToNodeStream} from 'readable-web-to-node-stream';
import {fileTypeFromBuffer, fileTypeFromStream as coreFileTypeFromStream} from './core.js';

Expand Down
1 change: 1 addition & 0 deletions core.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Buffer} from 'node:buffer';
import Token from 'token-types';
import * as strtok3 from 'strtok3/core';
import {
Expand Down
1 change: 1 addition & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Buffer} from 'node:buffer';
import fs from 'node:fs';
import {expectType} from 'tsd';
import {
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
"./core": "./core.js"
},
"engines": {
"node": ">=12.20"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"ava": "ava --serial --verbose",
"test": "xo && ava && tsd"
},
"files": [
Expand Down Expand Up @@ -197,17 +196,17 @@
],
"dependencies": {
"readable-web-to-node-stream": "^3.0.2",
"strtok3": "^7.0.0-alpha.4",
"token-types": "^4.1.0"
"strtok3": "7.0.0-alpha.4",
"token-types": "^4.1.1"
},
"devDependencies": {
"@tokenizer/token": "^0.3.0",
"@types/node": "^16.4.1",
"@types/node": "^16.11.10",
"ava": "^3.15.0",
"noop-stream": "^0.1.0",
"tsd": "^0.17.0",
"typescript": "^4.3.5",
"xo": "^0.42.0"
"noop-stream": "^1.0.0",
"tsd": "^0.19.0",
"typescript": "^4.5.2",
"xo": "^0.46.4"
},
"xo": {
"envs": [
Expand All @@ -217,10 +216,12 @@
"rules": {
"no-inner-declarations": "warn",
"no-await-in-loop": "warn",
"promise/prefer-await-to-then": "warn",
"prefer-named-capture-group": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"no-bitwise": "off",
"@typescript-eslint/no-unsafe-assignment": "off"
}
},
"ava": {
"serial": true,
"verbose": true
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ This package is for detecting binary-based file formats, not text-based formats

## Install

```
$ npm install file-type
```sh
npm install file-type
```

## Usage
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import process from 'node:process';
import {Buffer} from 'node:buffer';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import fs from 'node:fs';
Expand Down
1 change: 1 addition & 0 deletions type.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/node
import process from 'node:process';
import {fileTypeFromFile} from './index.js';

const [file] = process.argv.slice(2);
Expand Down

0 comments on commit bb4f822

Please sign in to comment.