Skip to content

TagSpaces is an offline, open source, document manager with tagging support

updating the trash library

uggrock3ccada040829
diff --git a/data/node-webkit/node-webkit.api.js b/data/node-webkit/node-webkit.api.js
index 25923a64f..c0a58bc35 100644
--- a/data/node-webkit/node-webkit.api.js
+++ b/data/node-webkit/node-webkit.api.js
@@ -596,37 +596,42 @@ define(function(require, exports, module) {
function deleteFilePromise(path) {
-
+ //TODO Handling the trash can case
if (TSCORE.PRO && TSCORE.Config.getUseTrashCan()) {
- return trash([path]);
- }
-
- return new Promise(function(resolve, reject) {
- fs.unlink(path, function(error) {
- if (error) {
- reject(error);
- } else {
- resolve();
- }
+ return new Promise(function(resolve, reject) {
+ trash([path]).then(function() {
+ resolve(path);
+ }, function(err) {
+ reject(err);
+ });
});
- });
+ } else {
+ return new Promise(function(resolve, reject) {
+ fs.unlink(path, function(error) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(path);
+ }
+ });
+ });
+ }
}
function deleteDirectoryPromise(path) {
-
if (TSCORE.PRO && TSCORE.Config.getUseTrashCan()) {
return trash([path]);
- }
-
- return new Promise(function(resolve, reject) {
- fs.rmdir(path, function(error) {
- if (error) {
- reject(error);
- } else {
- resolve();
- }
+ } else {
+ return new Promise(function(resolve, reject) {
+ fs.rmdir(path, function(error) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(path);
+ }
+ });
});
- });
+ }
}
diff --git a/data/node-webkit/node_modules/trash/index.js b/data/node-webkit/node_modules/trash/index.js
index 4ae56f84b..9fc5ce11c 100644
--- a/data/node-webkit/node_modules/trash/index.js
+++ b/data/node-webkit/node_modules/trash/index.js
@@ -1,29 +1,26 @@
'use strict';
var path = require('path');
var pathExists = require('path-exists');
+var globby = require('globby');
module.exports = function (paths) {
if (!Array.isArray(paths)) {
return Promise.reject(new TypeError('Expected an array'));
}
+ paths = globby.sync(paths.map(String), {nonull: true})
+ .map(function (x) {
+ return path.resolve(x);
+ })
+ .filter(pathExists.sync);
+
if (paths.length === 0) {
return Promise.resolve();
}
- paths = paths.map(function (x) {
- return path.resolve(String(x));
- }).filter(function (x) {
- return pathExists.sync(x);
- });
-
- if (process.platform === 'darwin') {
- return require('./lib/osx')(paths);
+ switch (process.platform) {
+ case 'darwin': return require('./lib/osx')(paths);
+ case 'win32': return require('./lib/win')(paths);
+ default: return require('./lib/linux')(paths);
}
-
- if (process.platform === 'win32') {
- return require('./lib/win')(paths);
- }
-
- return require('./lib/linux')(paths);
};
diff --git a/data/node-webkit/node_modules/trash/lib/linux.js b/data/node-webkit/node_modules/trash/lib/linux.js
index 589f1a198..4b53c602d 100644
--- a/data/node-webkit/node_modules/trash/lib/linux.js
+++ b/data/node-webkit/node_modules/trash/lib/linux.js
@@ -5,7 +5,7 @@ var pify = require('pify');
var Promise = require('pinkie-promise');
var uuid = require('uuid');
var xdgTrashdir = require('xdg-trashdir');
-var fs = pify.all(fsExtra, Promise);
+var fs = pify(fsExtra, Promise);
function trash(src) {
return xdgTrashdir(src).then(function (dir) {
diff --git a/data/node-webkit/node_modules/trash/node_modules/escape-string-applescript/package.json b/data/node-webkit/node_modules/trash/node_modules/escape-string-applescript/package.json
index 602d7bed6..1467571a7 100644
--- a/data/node-webkit/node_modules/trash/node_modules/escape-string-applescript/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/escape-string-applescript/package.json
@@ -58,6 +58,5 @@
"tarball": "http://registry.npmjs.org/escape-string-applescript/-/escape-string-applescript-1.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/escape-string-applescript/-/escape-string-applescript-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/escape-string-applescript/-/escape-string-applescript-1.0.0.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/path-exists/package.json b/data/node-webkit/node_modules/trash/node_modules/path-exists/package.json
index 94cbb5fe2..3e89f6b39 100644
--- a/data/node-webkit/node_modules/trash/node_modules/path-exists/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/path-exists/package.json
@@ -1,6 +1,6 @@
{
"name": "path-exists",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Check if a path exists",
"license": "MIT",
"repository": {
@@ -34,29 +34,29 @@
"stat"
],
"dependencies": {
- "pinkie-promise": "^1.0.0"
+ "pinkie-promise": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
},
- "gitHead": "a8d30de3a24e7d71ae2c30a057525e603205447d",
+ "gitHead": "3af423661e78466764f87c5712263c5d7a1ce5b7",
"bugs": {
"url": "https://github.com/sindresorhus/path-exists/issues"
},
"homepage": "https://github.com/sindresorhus/path-exists",
- "_id": "[email protected]",
- "_shasum": "c4efe37d7fdc792f9a029ce7906e095e169f9be1",
+ "_id": "[email protected]",
+ "_shasum": "0feb6c64f0fc518d9a754dd5efb62c7022761f4b",
"_from": "path-exists@>=2.0.0 <3.0.0",
- "_npmVersion": "2.11.3",
- "_nodeVersion": "0.12.7",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
"_npmUser": {
"name": "sindresorhus",
"email": "[email protected]"
},
"dist": {
- "shasum": "c4efe37d7fdc792f9a029ce7906e095e169f9be1",
- "tarball": "http://registry.npmjs.org/path-exists/-/path-exists-2.0.0.tgz"
+ "shasum": "0feb6c64f0fc518d9a754dd5efb62c7022761f4b",
+ "tarball": "http://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz"
},
"maintainers": [
{
@@ -65,6 +65,6 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.0.0.tgz",
+ "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/pify/package.json b/data/node-webkit/node_modules/trash/node_modules/pify/package.json
index 56b2f0054..7ec3e1072 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pify/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/pify/package.json
@@ -55,7 +55,7 @@
"homepage": "https://github.com/sindresorhus/pify",
"_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c",
- "_from": "pify@>=2.2.0 <3.0.0",
+ "_from": "pify@>=2.3.0 <3.0.0",
"_npmVersion": "2.14.7",
"_nodeVersion": "4.2.1",
"_npmUser": {
diff --git a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/index.js b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/index.js
index a7e3dc385..fb36c2a45 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/index.js
+++ b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/index.js
@@ -5,9 +5,9 @@ var SETTLED = 'settled';
var FULFILLED = 'fulfilled';
var REJECTED = 'rejected';
var NOOP = function () {};
+var isNode = typeof process !== 'undefined' && typeof process.emit === 'function';
-// async calls
-var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout;
+var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;
var asyncQueue = [];
var asyncTimer;
@@ -83,17 +83,18 @@ function handleThenable(promise, value) {
}
if (value && (typeof value === 'function' || typeof value === 'object')) {
- var then = value.then; // then should be retrived only once
+ // then should be retrieved only once
+ var then = value.then;
if (typeof then === 'function') {
then.call(value, function (val) {
if (!resolved) {
resolved = true;
- if (value !== val) {
- resolve(promise, val);
- } else {
+ if (value === val) {
fulfill(promise, val);
+ } else {
+ resolve(promise, val);
}
}
}, function (reason) {
@@ -154,6 +155,13 @@ function publishFulfillment(promise) {
function publishRejection(promise) {
promise._state = REJECTED;
publish(promise);
+ if (!promise._handled && isNode) {
+ process.emit('unhandledRejection', promise._data, promise);
+ }
+}
+
+function notifyRejectionHandled(promise) {
+ process.emit('rejectionHandled', promise);
}
/**
@@ -179,6 +187,7 @@ Promise.prototype = {
_state: PENDING,
_then: null,
_data: undefined,
+ _handled: false,
then: function (onFulfillment, onRejection) {
var subscriber = {
@@ -188,6 +197,13 @@ Promise.prototype = {
rejected: onRejection
};
+ if ((onRejection || onFulfillment) && !this._handled) {
+ this._handled = true;
+ if (this._state === REJECTED && isNode) {
+ asyncCall(notifyRejectionHandled, this);
+ }
+ }
+
if (this._state === FULFILLED || this._state === REJECTED) {
// already resolved, call callback async
asyncCall(invokeCallback, subscriber);
@@ -199,7 +215,7 @@ Promise.prototype = {
return subscriber.then;
},
- 'catch': function (onRejection) {
+ catch: function (onRejection) {
return this.then(null, onRejection);
}
};
diff --git a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/package.json b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/package.json
index a52f3cdff..96d8da66e 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/package.json
@@ -1,11 +1,11 @@
{
"name": "pinkie",
- "version": "1.0.0",
- "description": "Itty bitty little wittle twinkie pinkie ES6 Promise implementation",
+ "version": "2.0.1",
+ "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation",
"license": "MIT",
"repository": {
"type": "git",
- "url": "git+https://github.com/floatdrop/pinkie.git"
+ "url": "https://github.com/floatdrop/pinkie"
},
"author": {
"name": "Vsevolod Strukchinsky",
@@ -16,45 +16,51 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "mocha"
+ "test": "xo && nyc mocha",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
},
"files": [
"index.js"
],
"keywords": [
"promise",
+ "promises",
+ "es2015",
"es6"
],
- "dependencies": {},
"devDependencies": {
+ "core-assert": "^0.1.1",
+ "coveralls": "^2.11.4",
"mocha": "*",
- "promises-aplus-tests": "*"
+ "nyc": "^3.2.2",
+ "promises-aplus-tests": "*",
+ "xo": "^0.10.1"
},
- "gitHead": "5f8b60f31ec8624995d224f5990c81be83dd1d90",
+ "gitHead": "11d969408e6004f50c3b442fe330f2ead7eb3619",
"bugs": {
"url": "https://github.com/floatdrop/pinkie/issues"
},
- "homepage": "https://github.com/floatdrop/pinkie#readme",
- "_id": "[email protected]",
- "_shasum": "5a47f28ba1015d0201bda7bf0f358e47bec8c7e4",
- "_from": "pinkie@>=1.0.0 <2.0.0",
- "_npmVersion": "2.9.0",
- "_nodeVersion": "2.0.0",
+ "homepage": "https://github.com/floatdrop/pinkie",
+ "_id": "[email protected]",
+ "_shasum": "4236c86fc29f261c2045bbe81f78cbb2a5e8306c",
+ "_from": "pinkie@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.0",
"_npmUser": {
"name": "floatdrop",
"email": "[email protected]"
},
+ "dist": {
+ "shasum": "4236c86fc29f261c2045bbe81f78cbb2a5e8306c",
+ "tarball": "http://registry.npmjs.org/pinkie/-/pinkie-2.0.1.tgz"
+ },
"maintainers": [
{
"name": "floatdrop",
"email": "[email protected]"
}
],
- "dist": {
- "shasum": "5a47f28ba1015d0201bda7bf0f358e47bec8c7e4",
- "tarball": "http://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz"
- },
"directories": {},
- "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz",
+ "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/readme.md b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/readme.md
index faa9b2b88..7e0f95505 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/readme.md
+++ b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/node_modules/pinkie/readme.md
@@ -1,17 +1,17 @@
<h1 align="center">
<br>
- <img width="300" src="https://rawgit.com/floatdrop/pinkie/master/media/logo.png" alt="pinkie">
+ <img width="256" src="media/logo.png" alt="pinkie">
<br>
<br>
</h1>
-> Itty bitty little wittle twinkie pinkie [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation
+> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation
-[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie)
+[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)
-There are [tons of Promise implementations](https://github.com/sorrycc/awesome-javascript#control-flow) out there, but all of them focused on browser compatibility and often bloated with functionality.
+There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.
-This module focused to be exactly Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in NodeJS land (it should be browserify-able thou).
+This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).
## Install
@@ -24,12 +24,14 @@ $ npm install --save pinkie
## Usage
```js
+var fs = require('fs');
var Promise = require('pinkie');
new Promise(function (resolve, reject) {
- got('google.com', function (err, data) {
+ fs.readFile('foo.json', 'utf8', function (err, data) {
if (err) {
- return reject(err);
+ reject(err);
+ return;
}
resolve(data);
@@ -41,7 +43,7 @@ new Promise(function (resolve, reject) {
### API
-`pinkie` exports bare [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation. In case you forgot:
+`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:
#### new Promise(executor)
@@ -52,7 +54,7 @@ Returns new instance of `Promise`.
*Required*
Type: `function`
-Function with two arguments resolve and reject. The first argument fulfills the promise, the second argument rejects it.
+Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.
#### pinkie.all(promises)
@@ -70,6 +72,12 @@ Returns a Promise object that is rejected with the given `reason`.
Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.
+
+## Related
+
+- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module
+
+
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/package.json b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/package.json
index 467ba5d0d..2b704fe1a 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/package.json
@@ -1,11 +1,11 @@
{
"name": "pinkie-promise",
- "version": "1.0.0",
- "description": "ES6 Promise ponyfill",
+ "version": "2.0.0",
+ "description": "ES2015 Promise ponyfill",
"license": "MIT",
"repository": {
"type": "git",
- "url": "git+https://github.com/floatdrop/pinkie-promise.git"
+ "url": "https://github.com/floatdrop/pinkie-promise"
},
"author": {
"name": "Vsevolod Strukchinsky",
@@ -23,41 +23,43 @@
],
"keywords": [
"promise",
+ "promises",
+ "es2015",
"es6",
"polyfill",
"ponyfill"
],
"dependencies": {
- "pinkie": "^1.0.0"
+ "pinkie": "^2.0.0"
},
"devDependencies": {
"mocha": "*"
},
- "gitHead": "ae764482353d0b2b64685686cf49eefeb44a862e",
+ "gitHead": "f90fcae9838bcae7ae1ae4ebc9b29f11e5db4980",
"bugs": {
"url": "https://github.com/floatdrop/pinkie-promise/issues"
},
- "homepage": "https://github.com/floatdrop/pinkie-promise#readme",
- "_id": "[email protected]",
- "_shasum": "d1da67f5482563bb7cf57f286ae2822ecfbf3670",
- "_from": "pinkie-promise@>=1.0.0 <2.0.0",
- "_npmVersion": "2.9.0",
- "_nodeVersion": "2.0.0",
+ "homepage": "https://github.com/floatdrop/pinkie-promise",
+ "_id": "[email protected]",
+ "_shasum": "4c83538de1f6e660c29e0a13446844f7a7e88259",
+ "_from": "pinkie-promise@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.0",
"_npmUser": {
"name": "floatdrop",
"email": "[email protected]"
},
+ "dist": {
+ "shasum": "4c83538de1f6e660c29e0a13446844f7a7e88259",
+ "tarball": "http://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz"
+ },
"maintainers": [
{
"name": "floatdrop",
"email": "[email protected]"
}
],
- "dist": {
- "shasum": "d1da67f5482563bb7cf57f286ae2822ecfbf3670",
- "tarball": "http://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz"
- },
"directories": {},
- "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz",
+ "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/readme.md b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/readme.md
index bb5e9d2e0..78477f429 100644
--- a/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/readme.md
+++ b/data/node-webkit/node_modules/trash/node_modules/pinkie-promise/readme.md
@@ -1,8 +1,6 @@
# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)
-> [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill
->
-> Ponyfill: A polyfill that doesn't overwrite the native method
+> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill
Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.
@@ -21,6 +19,10 @@ new Promise(function (resolve) { resolve('unicorns'); });
//=> Promise { 'unicorns' }
```
+## Related
+
+- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function
+
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/data/node-webkit/node_modules/trash/node_modules/run-applescript/package.json b/data/node-webkit/node_modules/trash/node_modules/run-applescript/package.json
index 26d85d0c6..abf543799 100644
--- a/data/node-webkit/node_modules/trash/node_modules/run-applescript/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/run-applescript/package.json
@@ -1,6 +1,6 @@
{
"name": "run-applescript",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Run AppleScript and get the result",
"license": "MIT",
"repository": {
@@ -31,7 +31,7 @@
],
"dependencies": {
"pify": "^2.2.0",
- "pinkie-promise": "^1.0.0"
+ "pinkie-promise": "^2.0.0"
},
"devDependencies": {
"ava": "*",
@@ -42,23 +42,23 @@
"test.js"
]
},
- "gitHead": "9b9ee92263d8a1908e389a45c463c36f3539f6f0",
+ "gitHead": "0c6d00faf12ddae6b7205753d36a0f22d73639e9",
"bugs": {
"url": "https://github.com/sindresorhus/run-applescript/issues"
},
"homepage": "https://github.com/sindresorhus/run-applescript",
- "_id": "[email protected]",
- "_shasum": "16300884ffc80d81ed33afa480ab390ea001f8f8",
+ "_id": "[email protected]",
+ "_shasum": "3bff2ccf95b6ceacb49723e550f00371d618510d",
"_from": "run-applescript@>=2.0.0 <3.0.0",
- "_npmVersion": "2.14.4",
- "_nodeVersion": "4.1.1",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
"_npmUser": {
"name": "sindresorhus",
"email": "[email protected]"
},
"dist": {
- "shasum": "16300884ffc80d81ed33afa480ab390ea001f8f8",
- "tarball": "http://registry.npmjs.org/run-applescript/-/run-applescript-2.0.0.tgz"
+ "shasum": "3bff2ccf95b6ceacb49723e550f00371d618510d",
+ "tarball": "http://registry.npmjs.org/run-applescript/-/run-applescript-2.1.0.tgz"
},
"maintainers": [
{
@@ -67,6 +67,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-2.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-2.1.0.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/node_modules/@sindresorhus/df/package.json b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/node_modules/@sindresorhus/df/package.json
index e291a4adc..7402f53c1 100644
--- a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/node_modules/@sindresorhus/df/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/node_modules/@sindresorhus/df/package.json
@@ -66,6 +66,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/@sindresorhus/df/-/df-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/@sindresorhus/df/-/df-1.0.1.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/package.json b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/package.json
index 898ad7f78..fa2cf16f1 100644
--- a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/mount-point/package.json
@@ -57,6 +57,5 @@
"tarball": "http://registry.npmjs.org/mount-point/-/mount-point-1.2.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/mount-point/-/mount-point-1.2.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/mount-point/-/mount-point-1.2.0.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/xdg-basedir/package.json b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/xdg-basedir/package.json
index f112287fc..95a4e5eff 100644
--- a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/xdg-basedir/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/node_modules/xdg-basedir/package.json
@@ -64,6 +64,5 @@
"tarball": "http://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/package.json b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/package.json
index dc474a38c..b92e13ba2 100644
--- a/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/package.json
+++ b/data/node-webkit/node_modules/trash/node_modules/xdg-trashdir/package.json
@@ -74,6 +74,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/xdg-trashdir/-/xdg-trashdir-2.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/xdg-trashdir/-/xdg-trashdir-2.0.0.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/package.json b/data/node-webkit/node_modules/trash/package.json
index e269896ff..d38b07427 100644
--- a/data/node-webkit/node_modules/trash/package.json
+++ b/data/node-webkit/node_modules/trash/package.json
@@ -1,6 +1,6 @@
{
"name": "trash",
- "version": "3.1.2",
+ "version": "3.4.1",
"description": "Move files and folders to the trash",
"license": "MIT",
"repository": {
@@ -43,10 +43,11 @@
],
"dependencies": {
"escape-string-applescript": "^1.0.0",
- "fs-extra": "^0.24.0",
+ "fs-extra": "^0.26.2",
+ "globby": "^4.0.0",
"path-exists": "^2.0.0",
- "pify": "^2.2.0",
- "pinkie-promise": "^1.0.0",
+ "pify": "^2.3.0",
+ "pinkie-promise": "^2.0.0",
"run-applescript": "^2.0.0",
"uuid": "^2.0.1",
"xdg-trashdir": "^2.0.0"
@@ -56,28 +57,23 @@
"tempfile": "^1.1.1",
"xo": "*"
},
- "xo": {
- "ignore": [
- "test.js"
- ]
- },
- "gitHead": "13fd3b8b573d6b75573866de612298c60e3a0ab4",
+ "gitHead": "bd513096be57b0ef647c5632f356c346e496a286",
"bugs": {
"url": "https://github.com/sindresorhus/trash/issues"
},
"homepage": "https://github.com/sindresorhus/trash",
- "_id": "[email protected]",
- "_shasum": "9b735cf0e5b215c08b67df892671012240f3cd7f",
- "_from": "[email protected]",
- "_npmVersion": "2.14.7",
- "_nodeVersion": "4.2.1",
+ "_id": "[email protected]",
+ "_shasum": "5de2826ecdaa65474c097b7228dfdc24dc7adcc8",
+ "_from": "trash@>=3.4.1 <3.5.0",
+ "_npmVersion": "2.14.12",
+ "_nodeVersion": "4.2.4",
"_npmUser": {
"name": "sindresorhus",
"email": "[email protected]"
},
"dist": {
- "shasum": "9b735cf0e5b215c08b67df892671012240f3cd7f",
- "tarball": "http://registry.npmjs.org/trash/-/trash-3.1.2.tgz"
+ "shasum": "5de2826ecdaa65474c097b7228dfdc24dc7adcc8",
+ "tarball": "http://registry.npmjs.org/trash/-/trash-3.4.1.tgz"
},
"maintainers": [
{
@@ -90,5 +86,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/trash/-/trash-3.1.2.tgz"
+ "_resolved": "https://registry.npmjs.org/trash/-/trash-3.4.1.tgz"
}
diff --git a/data/node-webkit/node_modules/trash/readme.md b/data/node-webkit/node_modules/trash/readme.md
index df382f299..13ccc79ed 100644
--- a/data/node-webkit/node_modules/trash/readme.md
+++ b/data/node-webkit/node_modules/trash/readme.md
@@ -21,11 +21,22 @@ $ npm install --save trash
```js
const trash = require('trash');
-trash(['unicorn.png', 'rainbow.png']).then(() => {
+trash(['*.png', '!rainbow.png']).then(() => {
console.log('done');
});
```
+*You can use [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).*
+
+
+## CLI
+
+To install the [`trash`](https://github.com/sindresorhus/trash-cli) command, run:
+
+```
+$ npm install --global trash-cli
+```
+
## Info
@@ -45,7 +56,7 @@ Not really. The `mv` command isn't cross-platform and moving to trash is not jus
- [trash-cli](https://github.com/sindresorhus/trash-cli) - CLI for this module
- [empty-trash](https://github.com/sindresorhus/empty-trash) - Empty the trash
-- [del](https://github.com/sindresorhus/del) - Delete files and folders using globs
+- [del](https://github.com/sindresorhus/del) - Delete files and folders
## License
diff --git a/data/node-webkit/package.json b/data/node-webkit/package.json
index e52a3034b..56cbf9674 100644
--- a/data/node-webkit/package.json
+++ b/data/node-webkit/package.json
@@ -17,7 +17,7 @@
"nodejs": true,
"dependencies": {
"fs-extra": "~0.24.0",
- "trash": "~3.1.2"
+ "trash": "~3.4.1"
},
"chromium-args" : "--data-path='../../nwjsdata/'"
}