Comparing version 5.0.0 to 5.1.0
@@ -1,18 +0,38 @@ | ||
export interface Options { | ||
/** | ||
* Enable globbing when matching file paths. | ||
* | ||
* @default true | ||
*/ | ||
readonly glob?: boolean; | ||
declare namespace trash { | ||
interface Options { | ||
/** | ||
Enable globbing when matching file paths. | ||
@default true | ||
*/ | ||
readonly glob?: boolean; | ||
} | ||
} | ||
/** | ||
* Move files and folders to the trash. | ||
* | ||
* @param input - Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). | ||
*/ | ||
export default function trash( | ||
input: string | string[], | ||
options?: Options | ||
): Promise<void>; | ||
declare const trash: { | ||
/** | ||
Move files and folders to the trash. | ||
@param input - Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). | ||
@example | ||
``` | ||
import trash = require('trash'); | ||
(async () => { | ||
await trash(['*.png', '!rainbow.png']); | ||
})(); | ||
``` | ||
*/ | ||
(input: string | string[], options?: trash.Options): Promise<void>; | ||
// TODO: Remove this for the next major release, refactor the whole definition to: | ||
// declare function trash( | ||
// input: string | string[], | ||
// options?: Options | ||
// ): Promise<void>; | ||
// export = trash; | ||
default: typeof trash; | ||
}; | ||
export = trash; |
@@ -56,2 +56,3 @@ 'use strict'; | ||
module.exports = trash; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = trash; |
{ | ||
"name": "trash", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Move files and folders to the trash", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -47,15 +47,15 @@ "files": [ | ||
"make-dir": "^1.3.0", | ||
"move-file": "^1.0.0", | ||
"move-file": "^1.1.0", | ||
"p-map": "^2.0.0", | ||
"p-try": "^2.0.0", | ||
"run-applescript": "^3.0.0", | ||
"uuid": "^3.1.0", | ||
"p-try": "^2.2.0", | ||
"run-applescript": "^3.2.0", | ||
"uuid": "^3.3.2", | ||
"xdg-trashdir": "^2.1.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.0.0-rc.1", | ||
"ava": "^1.4.1", | ||
"tempfile": "^2.0.0", | ||
"tsd-check": "^0.3.0", | ||
"tsd": "^0.7.1", | ||
"xo": "^0.24.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35737
162
Updatedmove-file@^1.1.0
Updatedp-try@^2.2.0
Updatedrun-applescript@^3.2.0
Updateduuid@^3.3.2