fsevents 1.2.2 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.travis.yml +2 -1
- package/fsevents.cc +9 -22
- package/node_modules/abbrev/package.json +1 -1
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/aproba/package.json +1 -1
- package/node_modules/are-we-there-yet/CHANGES.md +6 -0
- package/node_modules/are-we-there-yet/package.json +8 -8
- package/node_modules/are-we-there-yet/tracker-stream.js +1 -0
- package/node_modules/balanced-match/package.json +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/chownr/chownr.js +74 -38
- package/node_modules/chownr/package.json +16 -13
- package/node_modules/code-point-at/package.json +1 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/core-util-is/package.json +1 -1
- package/node_modules/debug/package.json +1 -1
- package/node_modules/deep-extend/CHANGELOG.md +28 -3
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +2 -1
- package/node_modules/deep-extend/lib/deep-extend.js +11 -5
- package/node_modules/deep-extend/package.json +20 -21
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/package.json +1 -1
- package/node_modules/fs-minipass/package.json +1 -1
- package/node_modules/fs.realpath/package.json +1 -1
- package/node_modules/gauge/package.json +1 -1
- package/node_modules/glob/package.json +12 -12
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/iconv-lite/Changelog.md +16 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +2 -2
- package/node_modules/iconv-lite/encodings/sbcs-data.js +5 -0
- package/node_modules/iconv-lite/lib/extend-node.js +1 -1
- package/node_modules/iconv-lite/lib/index.d.ts +2 -2
- package/node_modules/iconv-lite/package.json +8 -8
- package/node_modules/ignore-walk/package.json +1 -1
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/inherits/package.json +1 -1
- package/node_modules/ini/package.json +1 -1
- package/node_modules/is-fullwidth-code-point/package.json +1 -1
- package/node_modules/isarray/package.json +1 -1
- package/node_modules/minimatch/package.json +1 -1
- package/node_modules/minimist/package.json +1 -1
- package/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass/README.md +81 -3
- package/node_modules/minipass/index.js +77 -6
- package/node_modules/minipass/package.json +13 -13
- package/node_modules/minizlib/index.js +66 -95
- package/node_modules/minizlib/package.json +12 -12
- package/node_modules/mkdirp/package.json +1 -1
- package/node_modules/ms/package.json +1 -1
- package/node_modules/needle/README.md +2 -1
- package/node_modules/needle/lib/cookies.js +12 -10
- package/node_modules/needle/lib/needle.js +16 -4
- package/node_modules/needle/note.xml +7 -0
- package/node_modules/needle/note.xml.1 +7 -0
- package/node_modules/needle/package.json +13 -13
- package/node_modules/needle/test/errors_spec.js +4 -4
- package/node_modules/needle/test/long_string_spec.js +1 -1
- package/node_modules/needle/test/url_spec.js +11 -3
- package/node_modules/node-pre-gyp/CHANGELOG.md +24 -3
- package/node_modules/node-pre-gyp/README.md +15 -18
- package/node_modules/node-pre-gyp/appveyor.yml +2 -9
- package/node_modules/node-pre-gyp/contributing.md +2 -2
- package/node_modules/node-pre-gyp/lib/install.js +29 -7
- package/node_modules/node-pre-gyp/lib/package.js +5 -2
- package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +100 -0
- package/node_modules/node-pre-gyp/package.json +13 -14
- package/node_modules/nopt/package.json +1 -1
- package/node_modules/npm-bundled/LICENSE +15 -0
- package/node_modules/npm-bundled/README.md +2 -0
- package/node_modules/npm-bundled/index.js +3 -1
- package/node_modules/npm-bundled/package.json +7 -7
- package/node_modules/npm-packlist/index.js +16 -7
- package/node_modules/npm-packlist/package.json +7 -7
- package/node_modules/npmlog/package.json +1 -1
- package/node_modules/number-is-nan/package.json +1 -1
- package/node_modules/object-assign/package.json +1 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/os-homedir/package.json +1 -1
- package/node_modules/os-tmpdir/package.json +1 -1
- package/node_modules/osenv/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/process-nextick-args/package.json +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/rimraf/package.json +11 -8
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/package.json +9 -9
- package/node_modules/safer-buffer/package.json +6 -6
- package/node_modules/sax/package.json +1 -1
- package/node_modules/semver/README.md +17 -6
- package/node_modules/semver/bin/semver +14 -4
- package/node_modules/semver/package.json +7 -7
- package/node_modules/semver/semver.js +132 -104
- package/node_modules/set-blocking/package.json +1 -1
- package/node_modules/signal-exit/package.json +1 -1
- package/node_modules/string-width/package.json +1 -1
- package/node_modules/string_decoder/package.json +1 -1
- package/node_modules/strip-ansi/package.json +1 -1
- package/node_modules/strip-json-comments/package.json +1 -1
- package/node_modules/tar/README.md +7 -2
- package/node_modules/tar/lib/header.js +20 -4
- package/node_modules/tar/lib/mode-fix.js +14 -0
- package/node_modules/tar/lib/pack.js +1 -0
- package/node_modules/tar/lib/parse.js +2 -1
- package/node_modules/tar/lib/unpack.js +67 -6
- package/node_modules/tar/lib/write-entry.js +25 -6
- package/node_modules/tar/package.json +14 -14
- package/node_modules/util-deprecate/package.json +1 -1
- package/node_modules/wide-align/package.json +8 -8
- package/node_modules/wrappy/package.json +1 -1
- package/node_modules/yallist/iterator.js +5 -5
- package/node_modules/yallist/package.json +7 -7
- package/node_modules/yallist/yallist.js +2 -2
- package/package.json +3 -3
- package/src/async.cc +2 -2
- package/src/methods.cc +9 -7
- package/src/thread.cc +5 -6
- package/.npmignore +0 -1
- package/build/.target.mk +0 -53
- package/build/Makefile +0 -352
- package/build/Release/.deps/Release/.node.d +0 -1
- package/build/Release/.deps/Release/fse.node.d +0 -1
- package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
- package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +0 -65
- package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node.d +0 -1
- package/build/Release/.node +0 -0
- package/build/Release/fse.node +0 -0
- package/build/Release/obj.target/action_after_build.stamp +0 -0
- package/build/Release/obj.target/fse/fsevents.o +0 -0
- package/build/action_after_build.target.mk +0 -32
- package/build/binding.Makefile +0 -6
- package/build/fse.target.mk +0 -179
- package/build/gyp-mac-tool +0 -611
- package/build/stage/v1.1.2/fse-v1.1.2-node-v48-darwin-x64.tar.gz +0 -0
- package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
- package/node_modules/are-we-there-yet/CHANGES.md~ +0 -27
- package/node_modules/iconv-lite/.travis.yml +0 -23
- package/node_modules/rc/.npmignore +0 -3
- package/node_modules/safe-buffer/.travis.yml +0 -7
- package/node_modules/safe-buffer/test.js +0 -101
- package/src/locking.cc +0 -27
package/.travis.yml
CHANGED
@@ -5,13 +5,14 @@ env:
|
|
5
5
|
- secure: "gve1nkeKkwFEG1VAT3i+JwYyAdF0gKXwKx0uxbkBTsmm2M+0MDusohQdFLoEIkSIFktXBIDefoa7iGpLKRfG2VsZLpwJgnvnD0HqbnuR+k+W+bu7BHt4CAaR6GTllsDCjyq9zNyhUThzSnf2WNIpOEF5kHspZlbGfawURuUJH/U="
|
6
6
|
- secure: "jqVpmWxxBVXu2X8+XJMpKH0cooc2EKz9xKL2znBfYdNafJORSXcFAVbjCX5mZmVDcgIMwDtm2+gIG4P73hzJ2e3S+y2Z9ROJGyXHa3AxUTvXHQsxqzH8coHHqB8vTvfr0t2O5aKfpvpICpSea39r0hzNoMv6Ie5SwBdqj1YY9K0="
|
7
7
|
matrix:
|
8
|
+
- NODE_VERSION="v11"
|
9
|
+
- NODE_VERSION="v10"
|
8
10
|
- NODE_VERSION="v9"
|
9
11
|
- NODE_VERSION="v8"
|
10
12
|
- NODE_VERSION="v7"
|
11
13
|
- NODE_VERSION="v6"
|
12
14
|
- NODE_VERSION="v5"
|
13
15
|
- NODE_VERSION="v4"
|
14
|
-
- NODE_VERSION="v0.10"
|
15
16
|
|
16
17
|
before_install:
|
17
18
|
|
package/fsevents.cc
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
#include "nan.h"
|
7
7
|
#include "uv.h"
|
8
8
|
#include "v8.h"
|
9
|
-
#include "pthread.h"
|
10
9
|
#include "CoreFoundation/CoreFoundation.h"
|
11
10
|
#include "CoreServices/CoreServices.h"
|
12
11
|
#include <iostream>
|
@@ -14,18 +13,12 @@
|
|
14
13
|
|
15
14
|
#include "src/storage.cc"
|
16
15
|
namespace fse {
|
17
|
-
class FSEvents : public
|
16
|
+
class FSEvents : public Nan::ObjectWrap {
|
18
17
|
public:
|
19
|
-
FSEvents(const char *path
|
18
|
+
explicit FSEvents(const char *path);
|
20
19
|
~FSEvents();
|
21
20
|
|
22
|
-
|
23
|
-
bool lockStarted;
|
24
|
-
pthread_mutex_t lockmutex;
|
25
|
-
void lockingStart();
|
26
|
-
void lock();
|
27
|
-
void unlock();
|
28
|
-
void lockingStop();
|
21
|
+
uv_mutex_t mutex;
|
29
22
|
|
30
23
|
// async.cc
|
31
24
|
uv_async_t async;
|
@@ -34,15 +27,14 @@ namespace fse {
|
|
34
27
|
void asyncStop();
|
35
28
|
|
36
29
|
// thread.cc
|
37
|
-
|
30
|
+
uv_thread_t thread;
|
38
31
|
CFRunLoopRef threadloop;
|
39
32
|
void threadStart();
|
40
|
-
static void
|
33
|
+
static void threadRun(void *ctx);
|
41
34
|
void threadStop();
|
42
35
|
|
43
36
|
// methods.cc - internal
|
44
37
|
Nan::AsyncResource async_resource;
|
45
|
-
Nan::Callback *handler;
|
46
38
|
void emitEvent(const char *path, UInt32 flags, UInt64 id);
|
47
39
|
|
48
40
|
// Common
|
@@ -60,27 +52,22 @@ namespace fse {
|
|
60
52
|
|
61
53
|
using namespace fse;
|
62
54
|
|
63
|
-
FSEvents::FSEvents(const char *path
|
64
|
-
|
55
|
+
FSEvents::FSEvents(const char *path)
|
56
|
+
: async_resource("fsevents:FSEvents") {
|
65
57
|
CFStringRef dirs[] = { CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8) };
|
66
58
|
paths = CFArrayCreate(NULL, (const void **)&dirs, 1, NULL);
|
67
59
|
threadloop = NULL;
|
68
|
-
|
60
|
+
if (uv_mutex_init(&mutex)) abort();
|
69
61
|
}
|
70
62
|
FSEvents::~FSEvents() {
|
71
|
-
std::cout << "YIKES" << std::endl;
|
72
|
-
lockingStop();
|
73
|
-
delete handler;
|
74
|
-
handler = NULL;
|
75
|
-
|
76
63
|
CFRelease(paths);
|
64
|
+
uv_mutex_destroy(&mutex);
|
77
65
|
}
|
78
66
|
|
79
67
|
#ifndef kFSEventStreamEventFlagItemCreated
|
80
68
|
#define kFSEventStreamEventFlagItemCreated 0x00000010
|
81
69
|
#endif
|
82
70
|
|
83
|
-
#include "src/locking.cc"
|
84
71
|
#include "src/async.cc"
|
85
72
|
#include "src/thread.cc"
|
86
73
|
#include "src/constants.cc"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
23
23
|
"_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
|
24
24
|
"_spec": "abbrev@1",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/nopt",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
22
22
|
"_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
|
23
23
|
"_spec": "ansi-regex@^2.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/strip-ansi",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
22
22
|
"_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
|
23
23
|
"_spec": "aproba@^1.0.3",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org"
|
@@ -1,5 +1,11 @@
|
|
1
1
|
Hi, figured we could actually use a changelog now:
|
2
2
|
|
3
|
+
## 1.1.5 2018-05-24
|
4
|
+
|
5
|
+
* [#92](https://github.com/iarna/are-we-there-yet/pull/92) Fix bug where
|
6
|
+
`finish` would throw errors when including `TrackerStream` objects in
|
7
|
+
`TrackerGroup` collections. (@brianloveswords)
|
8
|
+
|
3
9
|
## 1.1.4 2017-04-21
|
4
10
|
|
5
11
|
* Fix typo in package.json
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "are-we-there-yet@~1.1.2",
|
3
|
-
"_id": "are-we-there-yet@1.1.
|
3
|
+
"_id": "are-we-there-yet@1.1.5",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "
|
5
|
+
"_integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
6
6
|
"_location": "/are-we-there-yet",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/npmlog"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
22
|
+
"_shasum": "4b35c2944f062a8bfcda66410760350fe9ddfc21",
|
23
23
|
"_spec": "are-we-there-yet@~1.1.2",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"url": "http://re-becca.org"
|
@@ -37,8 +37,8 @@
|
|
37
37
|
"deprecated": false,
|
38
38
|
"description": "Keep track of the overall completion of many disparate processes",
|
39
39
|
"devDependencies": {
|
40
|
-
"standard": "^
|
41
|
-
"tap": "^
|
40
|
+
"standard": "^11.0.1",
|
41
|
+
"tap": "^12.0.1"
|
42
42
|
},
|
43
43
|
"files": [
|
44
44
|
"index.js",
|
@@ -59,5 +59,5 @@
|
|
59
59
|
"scripts": {
|
60
60
|
"test": "standard && tap test/*.js"
|
61
61
|
},
|
62
|
-
"version": "1.1.
|
62
|
+
"version": "1.1.5"
|
63
63
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
22
22
|
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
23
23
|
"_spec": "balanced-match@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/brace-expansion",
|
25
25
|
"author": {
|
26
26
|
"name": "Julian Gruber",
|
27
27
|
"email": "mail@juliangruber.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
22
22
|
"_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
|
23
23
|
"_spec": "brace-expansion@^1.1.7",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/minimatch",
|
25
25
|
"author": {
|
26
26
|
"name": "Julian Gruber",
|
27
27
|
"email": "mail@juliangruber.com",
|
@@ -1,52 +1,88 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
'use strict'
|
2
|
+
const fs = require('fs')
|
3
|
+
const path = require('path')
|
4
|
+
|
5
|
+
/* istanbul ignore next */
|
6
|
+
const LCHOWN = fs.lchown ? 'lchown' : 'chown'
|
7
|
+
/* istanbul ignore next */
|
8
|
+
const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
|
9
|
+
|
10
|
+
// fs.readdir could only accept an options object as of node v6
|
11
|
+
const nodeVersion = process.version
|
12
|
+
let readdir = (path, options, cb) => fs.readdir(path, options, cb)
|
13
|
+
let readdirSync = (path, options) => fs.readdirSync(path, options)
|
14
|
+
/* istanbul ignore next */
|
15
|
+
if (/^v4\./.test(nodeVersion))
|
16
|
+
readdir = (path, options, cb) => fs.readdir(path, cb)
|
17
|
+
|
18
|
+
const chownrKid = (p, child, uid, gid, cb) => {
|
19
|
+
if (typeof child === 'string')
|
20
|
+
return fs.lstat(path.resolve(p, child), (er, stats) => {
|
21
|
+
if (er)
|
22
|
+
return cb(er)
|
23
|
+
stats.name = child
|
24
|
+
chownrKid(p, stats, uid, gid, cb)
|
25
|
+
})
|
3
26
|
|
4
|
-
|
5
|
-
,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
// any error other than ENOTDIR means it's not readable, or
|
10
|
-
// doesn't exist. give up.
|
11
|
-
if (er && er.code !== "ENOTDIR") return cb(er)
|
12
|
-
if (er || !children.length) return fs.chown(p, uid, gid, cb)
|
13
|
-
|
14
|
-
var len = children.length
|
15
|
-
, errState = null
|
16
|
-
children.forEach(function (child) {
|
17
|
-
var pathChild = path.resolve(p, child);
|
18
|
-
fs.lstat(pathChild, function(er, stats) {
|
19
|
-
if (er)
|
20
|
-
return cb(er)
|
21
|
-
if (!stats.isSymbolicLink())
|
22
|
-
chownr(pathChild, uid, gid, then)
|
23
|
-
else
|
24
|
-
then()
|
25
|
-
})
|
27
|
+
if (child.isDirectory()) {
|
28
|
+
chownr(path.resolve(p, child.name), uid, gid, er => {
|
29
|
+
if (er)
|
30
|
+
return cb(er)
|
31
|
+
fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
|
26
32
|
})
|
27
|
-
|
33
|
+
} else
|
34
|
+
fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
const chownr = (p, uid, gid, cb) => {
|
39
|
+
readdir(p, { withFileTypes: true }, (er, children) => {
|
40
|
+
// any error other than ENOTDIR or ENOTSUP means it's not readable,
|
41
|
+
// or doesn't exist. give up.
|
42
|
+
if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
|
43
|
+
return cb(er)
|
44
|
+
if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb)
|
45
|
+
|
46
|
+
let len = children.length
|
47
|
+
let errState = null
|
48
|
+
const then = er => {
|
28
49
|
if (errState) return
|
29
50
|
if (er) return cb(errState = er)
|
30
|
-
if (-- len === 0) return fs
|
51
|
+
if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb)
|
31
52
|
}
|
53
|
+
|
54
|
+
children.forEach(child => chownrKid(p, child, uid, gid, then))
|
32
55
|
})
|
33
56
|
}
|
34
57
|
|
35
|
-
|
36
|
-
|
58
|
+
const chownrKidSync = (p, child, uid, gid) => {
|
59
|
+
if (typeof child === 'string') {
|
60
|
+
const stats = fs.lstatSync(path.resolve(p, child))
|
61
|
+
stats.name = child
|
62
|
+
child = stats
|
63
|
+
}
|
64
|
+
|
65
|
+
if (child.isDirectory())
|
66
|
+
chownrSync(path.resolve(p, child.name), uid, gid)
|
67
|
+
|
68
|
+
fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid)
|
69
|
+
}
|
70
|
+
|
71
|
+
const chownrSync = (p, uid, gid) => {
|
72
|
+
let children
|
37
73
|
try {
|
38
|
-
children =
|
74
|
+
children = readdirSync(p, { withFileTypes: true })
|
39
75
|
} catch (er) {
|
40
|
-
if (er && er.code ===
|
76
|
+
if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
|
77
|
+
return fs[LCHOWNSYNC](p, uid, gid)
|
41
78
|
throw er
|
42
79
|
}
|
43
|
-
if (!children.length) return fs.chownSync(p, uid, gid)
|
44
80
|
|
45
|
-
children.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
chownrSync(pathChild, uid, gid)
|
50
|
-
})
|
51
|
-
return fs.chownSync(p, uid, gid)
|
81
|
+
if (children.length)
|
82
|
+
children.forEach(child => chownrKidSync(p, child, uid, gid))
|
83
|
+
|
84
|
+
return fs[LCHOWNSYNC](p, uid, gid)
|
52
85
|
}
|
86
|
+
|
87
|
+
module.exports = chownr
|
88
|
+
chownr.sync = chownrSync
|
@@ -1,27 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"_from": "chownr@^1.
|
3
|
-
"_id": "chownr@1.
|
2
|
+
"_from": "chownr@^1.1.1",
|
3
|
+
"_id": "chownr@1.1.1",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "
|
5
|
+
"_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
|
6
6
|
"_location": "/chownr",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
9
9
|
"type": "range",
|
10
10
|
"registry": true,
|
11
|
-
"raw": "chownr@^1.
|
11
|
+
"raw": "chownr@^1.1.1",
|
12
12
|
"name": "chownr",
|
13
13
|
"escapedName": "chownr",
|
14
|
-
"rawSpec": "^1.
|
14
|
+
"rawSpec": "^1.1.1",
|
15
15
|
"saveSpec": null,
|
16
|
-
"fetchSpec": "^1.
|
16
|
+
"fetchSpec": "^1.1.1"
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/tar"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.
|
22
|
-
"_shasum": "
|
23
|
-
"_spec": "chownr@^1.
|
24
|
-
"_where": "/Users/
|
21
|
+
"_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
|
22
|
+
"_shasum": "54726b8b8fff4df053c42187e801fb4412df1494",
|
23
|
+
"_spec": "chownr@^1.1.1",
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/tar",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"devDependencies": {
|
37
37
|
"mkdirp": "0.3",
|
38
38
|
"rimraf": "",
|
39
|
-
"tap": "^
|
39
|
+
"tap": "^12.0.1"
|
40
40
|
},
|
41
41
|
"files": [
|
42
42
|
"chownr.js"
|
@@ -50,7 +50,10 @@
|
|
50
50
|
"url": "git://github.com/isaacs/chownr.git"
|
51
51
|
},
|
52
52
|
"scripts": {
|
53
|
-
"
|
53
|
+
"postpublish": "git push origin --all; git push origin --tags",
|
54
|
+
"postversion": "npm publish",
|
55
|
+
"preversion": "npm test",
|
56
|
+
"test": "tap test/*.js --cov"
|
54
57
|
},
|
55
|
-
"version": "1.
|
58
|
+
"version": "1.1.1"
|
56
59
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
22
22
|
"_shasum": "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77",
|
23
23
|
"_spec": "code-point-at@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/string-width",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
22
22
|
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
|
23
23
|
"_spec": "concat-map@0.0.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/brace-expansion",
|
25
25
|
"author": {
|
26
26
|
"name": "James Halliday",
|
27
27
|
"email": "mail@substack.net",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
23
23
|
"_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e",
|
24
24
|
"_spec": "console-control-strings@~1.1.0",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
|
26
26
|
"author": {
|
27
27
|
"name": "Rebecca Turner",
|
28
28
|
"email": "me@re-becca.org",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
22
22
|
"_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
|
23
23
|
"_spec": "core-util-is@~1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
22
22
|
"_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
|
23
23
|
"_spec": "debug@^2.1.2",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/needle",
|
25
25
|
"author": {
|
26
26
|
"name": "TJ Holowaychuk",
|
27
27
|
"email": "tj@vision-media.ca"
|
@@ -1,19 +1,44 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
v0.6.0
|
5
|
+
------
|
6
|
+
|
7
|
+
- Updated "devDependencies" versions to fix vulnerability alerts
|
8
|
+
- Dropped support of io.js and node.js v0.12.x and lower since new versions of
|
9
|
+
"devDependencies" couldn't work with those old node.js versions
|
10
|
+
(minimal supported version of node.js now is v4.0.0)
|
11
|
+
|
12
|
+
v0.5.1
|
13
|
+
------
|
14
|
+
|
15
|
+
- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
|
16
|
+
- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
|
17
|
+
|
18
|
+
v0.5.0
|
19
|
+
------
|
20
|
+
|
21
|
+
- Auto-testing provided by Travis CI;
|
22
|
+
- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
|
23
|
+
- Removed tests files from npm package.
|
24
|
+
|
25
|
+
v0.4.2
|
26
|
+
------
|
27
|
+
|
28
|
+
- Fix for `null` as an argument.
|
29
|
+
|
4
30
|
v0.4.1
|
5
31
|
------
|
6
32
|
|
7
33
|
- Removed test code from <b>npm</b> package
|
8
34
|
([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
|
9
|
-
- Increased minimal version of Node from 0.4.0 to 0.12.0
|
35
|
+
- Increased minimal version of Node from `0.4.0` to `0.12.0`
|
10
36
|
(because can't run tests on lesser version anyway).
|
11
37
|
|
12
38
|
v0.4.0
|
13
39
|
------
|
14
40
|
|
15
|
-
Broken backward compatibility with v0.3.x
|
16
|
-
|
41
|
+
- **WARNING!** Broken backward compatibility with `v0.3.x`;
|
17
42
|
- Fixed bug with extending arrays instead of cloning;
|
18
43
|
- Deep cloning for arrays;
|
19
44
|
- Check for own property;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2013-
|
3
|
+
Copyright (c) 2013-2018, Viacheslav Lotsmanov
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
@@ -3,8 +3,9 @@ Deep Extend
|
|
3
3
|
|
4
4
|
Recursive object extending.
|
5
5
|
|
6
|
+
[](https://travis-ci.org/unclechu/node-deep-extend)
|
7
|
+
|
6
8
|
[](https://nodei.co/npm/deep-extend/)
|
7
|
-
[](https://nodei.co/npm/deep-extend/)
|
8
9
|
|
9
10
|
Install
|
10
11
|
-------
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*
|
6
6
|
* The MIT License (MIT)
|
7
7
|
*
|
8
|
-
* Copyright (c) 2013-
|
8
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
9
9
|
*
|
10
10
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
11
11
|
* this software and associated documentation files (the "Software"), to deal in
|
@@ -37,7 +37,9 @@ function isSpecificValue(val) {
|
|
37
37
|
|
38
38
|
function cloneSpecificValue(val) {
|
39
39
|
if (val instanceof Buffer) {
|
40
|
-
var x =
|
40
|
+
var x = Buffer.alloc
|
41
|
+
? Buffer.alloc(val.length)
|
42
|
+
: new Buffer(val.length);
|
41
43
|
val.copy(x);
|
42
44
|
return x;
|
43
45
|
} else if (val instanceof Date) {
|
@@ -70,6 +72,10 @@ function deepCloneArray(arr) {
|
|
70
72
|
return clone;
|
71
73
|
}
|
72
74
|
|
75
|
+
function safeGetProperty(object, property) {
|
76
|
+
return property === '__proto__' ? undefined : object[property];
|
77
|
+
}
|
78
|
+
|
73
79
|
/**
|
74
80
|
* Extening object that entered in first argument.
|
75
81
|
*
|
@@ -102,8 +108,8 @@ var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
|
|
102
108
|
}
|
103
109
|
|
104
110
|
Object.keys(obj).forEach(function (key) {
|
105
|
-
src = target
|
106
|
-
val = obj
|
111
|
+
src = safeGetProperty(target, key); // source value
|
112
|
+
val = safeGetProperty(obj, key); // new value
|
107
113
|
|
108
114
|
// recursion prevention
|
109
115
|
if (val === target) {
|
@@ -141,4 +147,4 @@ var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
|
|
141
147
|
});
|
142
148
|
|
143
149
|
return target;
|
144
|
-
}
|
150
|
+
};
|
@@ -1,27 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"_from": "deep-extend
|
3
|
-
"_id": "deep-extend@0.
|
2
|
+
"_from": "deep-extend@^0.6.0",
|
3
|
+
"_id": "deep-extend@0.6.0",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "
|
5
|
+
"_integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
6
6
|
"_location": "/deep-extend",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
9
9
|
"type": "range",
|
10
10
|
"registry": true,
|
11
|
-
"raw": "deep-extend
|
11
|
+
"raw": "deep-extend@^0.6.0",
|
12
12
|
"name": "deep-extend",
|
13
13
|
"escapedName": "deep-extend",
|
14
|
-
"rawSpec": "
|
14
|
+
"rawSpec": "^0.6.0",
|
15
15
|
"saveSpec": null,
|
16
|
-
"fetchSpec": "
|
16
|
+
"fetchSpec": "^0.6.0"
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/rc"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.
|
22
|
-
"_shasum": "
|
23
|
-
"_spec": "deep-extend
|
24
|
-
"_where": "/Users/
|
21
|
+
"_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
22
|
+
"_shasum": "c4fa7c95404a17a9c3e8ca7e1537312b736330ac",
|
23
|
+
"_spec": "deep-extend@^0.6.0",
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/rc",
|
25
25
|
"author": {
|
26
26
|
"name": "Viacheslav Lotsmanov",
|
27
27
|
"email": "lotsmanov89@gmail.com"
|
@@ -42,25 +42,24 @@
|
|
42
42
|
{
|
43
43
|
"name": "Marshall Bowers",
|
44
44
|
"url": "https://github.com/maxdeviant"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"name": "Misha Wakerman",
|
48
|
+
"url": "https://github.com/mwakerman"
|
45
49
|
}
|
46
50
|
],
|
47
51
|
"deprecated": false,
|
48
52
|
"description": "Recursive object extending",
|
49
53
|
"devDependencies": {
|
50
|
-
"mocha": "
|
51
|
-
"should": "
|
52
|
-
},
|
53
|
-
"directories": {
|
54
|
-
"lib": "./lib/",
|
55
|
-
"test": "./test/"
|
54
|
+
"mocha": "5.2.0",
|
55
|
+
"should": "13.2.1"
|
56
56
|
},
|
57
57
|
"engines": {
|
58
|
-
"
|
59
|
-
"node": ">=0.12.0"
|
58
|
+
"node": ">=4.0.0"
|
60
59
|
},
|
61
60
|
"files": [
|
62
|
-
"
|
63
|
-
"
|
61
|
+
"index.js",
|
62
|
+
"lib/"
|
64
63
|
],
|
65
64
|
"homepage": "https://github.com/unclechu/node-deep-extend",
|
66
65
|
"keywords": [
|
@@ -89,5 +88,5 @@
|
|
89
88
|
"scripts": {
|
90
89
|
"test": "mocha"
|
91
90
|
},
|
92
|
-
"version": "0.
|
91
|
+
"version": "0.6.0"
|
93
92
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
22
22
|
"_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a",
|
23
23
|
"_spec": "delegates@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/are-we-there-yet",
|
25
25
|
"bugs": {
|
26
26
|
"url": "https://github.com/visionmedia/node-delegates/issues"
|
27
27
|
},
|