File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 fail-fast : false
1111 matrix :
1212 node-version :
13- - 14
14- - 12
15- - 10
16- - 8
13+ - 20
14+ - 18
1715 steps :
1816 - uses : actions/checkout@v4
1917 - uses : actions/setup-node@v4
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ List of binary file extensions.
33
44@example
55```
6- import binaryExtensions = require( 'binary-extensions') ;
6+ import binaryExtensions from 'binary-extensions';
77
88console.log(binaryExtensions);
99//=> ['3ds', '3g2', …]
1010```
1111*/
1212declare const binaryExtensions : readonly string [ ] ;
1313
14- export = binaryExtensions ;
14+ export default binaryExtensions ;
Original file line number Diff line number Diff line change 1- module . exports = require ( './binary-extensions.json' ) ;
1+ import binaryExtensions from './binary-extensions.json' with { type : 'json' } ;
2+
3+ export default binaryExtensions ;
Original file line number Diff line number Diff line change 11import { expectType } from 'tsd' ;
2- import binaryExtensions = require( '.' ) ;
3- import binaryExtensionsJson = require( './binary-extensions.json' ) ;
2+ import binaryExtensions from './index.js' ;
43
54expectType < readonly string [ ] > ( binaryExtensions ) ;
6- expectType < readonly string [ ] > ( binaryExtensionsJson ) ;
Original file line number Diff line number Diff line change 1010 "email" : " sindresorhus@gmail.com" ,
1111 "url" : " https://sindresorhus.com"
1212 },
13+ "type" : " module" ,
14+ "exports" : {
15+ "types" : " ./index.d.ts" ,
16+ "default" : " ./index.js"
17+ },
1318 "sideEffects" : false ,
1419 "engines" : {
15- "node" : " >=8 "
20+ "node" : " >=18.20 "
1621 },
1722 "scripts" : {
18- "test" : " xo && ava && tsd"
23+ "//test" : " xo && ava && tsd" ,
24+ "test" : " ava && tsd"
1925 },
2026 "files" : [
2127 " index.js" ,
2228 " index.d.ts" ,
23- " binary-extensions.json" ,
24- " binary-extensions.json.d.ts"
29+ " binary-extensions.json"
2530 ],
2631 "keywords" : [
2732 " binary" ,
3338 " array"
3439 ],
3540 "devDependencies" : {
36- "ava" : " ^1.4.1 " ,
37- "tsd" : " ^0.7.2 " ,
38- "xo" : " ^0.24 .0"
41+ "ava" : " ^6.1.2 " ,
42+ "tsd" : " ^0.31.0 " ,
43+ "xo" : " ^0.58 .0"
3944 }
4045}
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ npm install binary-extensions
1313## Usage
1414
1515``` js
16- const binaryExtensions = require ( ' binary-extensions' ) ;
16+ import binaryExtensions from ' binary-extensions' ;
1717
1818console .log (binaryExtensions);
1919// => ['3ds', '3g2', …]
2020```
2121
2222## Related
2323
24- - [ is-binary-path] ( https://github.com/sindresorhus/is-binary-path ) - Check if a filepath is a binary file
24+ - [ is-binary-path] ( https://github.com/sindresorhus/is-binary-path ) - Check if a file path is a binary file
2525- [ text-extensions] ( https://github.com/sindresorhus/text-extensions ) - List of text file extensions
Original file line number Diff line number Diff line change 11import test from 'ava' ;
2- import binaryExtensions from '.' ;
2+ import binaryExtensions from './index.js ' ;
33
44test ( 'main' , t => {
55 t . true ( Array . isArray ( binaryExtensions ) ) ;
You can’t perform that action at this time.
0 commit comments