@sindresorhus/df
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -1,31 +0,33 @@ | ||
export interface SpaceInfo { | ||
/** | ||
* Name of the filesystem. | ||
*/ | ||
readonly filesystem: string; | ||
declare namespace df { | ||
interface SpaceInfo { | ||
/** | ||
* Name of the filesystem. | ||
*/ | ||
readonly filesystem: string; | ||
/** | ||
* Total size in bytes. | ||
*/ | ||
readonly size: number; | ||
/** | ||
* Total size in bytes. | ||
*/ | ||
readonly size: number; | ||
/** | ||
* Used size in bytes. | ||
*/ | ||
readonly used: number; | ||
/** | ||
* Used size in bytes. | ||
*/ | ||
readonly used: number; | ||
/** | ||
* Available size in bytes. | ||
*/ | ||
readonly available: number; | ||
/** | ||
* Available size in bytes. | ||
*/ | ||
readonly available: number; | ||
/** | ||
* Capacity as a float from `0` to `1`. | ||
*/ | ||
readonly capacity: number; | ||
/** | ||
* Capacity as a float from `0` to `1`. | ||
*/ | ||
readonly capacity: number; | ||
/** | ||
* Disk mount location. | ||
*/ | ||
readonly mountpoint: string; | ||
/** | ||
* Disk mount location. | ||
*/ | ||
readonly mountpoint: string; | ||
} | ||
} | ||
@@ -39,3 +41,3 @@ | ||
*/ | ||
(): Promise<SpaceInfo[]>; | ||
(): Promise<df.SpaceInfo[]>; | ||
@@ -46,3 +48,3 @@ /** | ||
*/ | ||
fs(path: string): Promise<SpaceInfo>; | ||
fs(path: string): Promise<df.SpaceInfo>; | ||
@@ -53,5 +55,8 @@ /** | ||
*/ | ||
file(path: string): Promise<SpaceInfo>; | ||
file(path: string): Promise<df.SpaceInfo>; | ||
// TODO: remove this in the next major version | ||
default: typeof df; | ||
}; | ||
export default df; | ||
export = df; |
@@ -59,2 +59,3 @@ 'use strict'; | ||
module.exports = df; | ||
// TODO: remove this in the next major version | ||
module.exports.default = df; |
{ | ||
"name": "@sindresorhus/df", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Get free disk space info from `df -kP`", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -44,6 +44,6 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"tsd-check": "^0.3.0", | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.1", | ||
"xo": "^0.24.0" | ||
} | ||
} |
6116
96