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
@@ -245,7 +245,10 @@ for (var i = 0; i < R; i++) {
|
|
245
245
|
}
|
246
246
|
|
247
247
|
exports.parse = parse;
|
248
|
-
function parse(version,
|
248
|
+
function parse(version, options) {
|
249
|
+
if (!options || typeof options !== 'object')
|
250
|
+
options = { loose: !!options, includePrerelease: false }
|
251
|
+
|
249
252
|
if (version instanceof SemVer)
|
250
253
|
return version;
|
251
254
|
|
@@ -255,35 +258,37 @@ function parse(version, loose) {
|
|
255
258
|
if (version.length > MAX_LENGTH)
|
256
259
|
return null;
|
257
260
|
|
258
|
-
var r = loose ? re[LOOSE] : re[FULL];
|
261
|
+
var r = options.loose ? re[LOOSE] : re[FULL];
|
259
262
|
if (!r.test(version))
|
260
263
|
return null;
|
261
264
|
|
262
265
|
try {
|
263
|
-
return new SemVer(version,
|
266
|
+
return new SemVer(version, options);
|
264
267
|
} catch (er) {
|
265
268
|
return null;
|
266
269
|
}
|
267
270
|
}
|
268
271
|
|
269
272
|
exports.valid = valid;
|
270
|
-
function valid(version,
|
271
|
-
var v = parse(version,
|
273
|
+
function valid(version, options) {
|
274
|
+
var v = parse(version, options);
|
272
275
|
return v ? v.version : null;
|
273
276
|
}
|
274
277
|
|
275
278
|
|
276
279
|
exports.clean = clean;
|
277
|
-
function clean(version,
|
278
|
-
var s = parse(version.trim().replace(/^[=v]+/, ''),
|
280
|
+
function clean(version, options) {
|
281
|
+
var s = parse(version.trim().replace(/^[=v]+/, ''), options);
|
279
282
|
return s ? s.version : null;
|
280
283
|
}
|
281
284
|
|
282
285
|
exports.SemVer = SemVer;
|
283
286
|
|
284
|
-
function SemVer(version,
|
287
|
+
function SemVer(version, options) {
|
288
|
+
if (!options || typeof options !== 'object')
|
289
|
+
options = { loose: !!options, includePrerelease: false }
|
285
290
|
if (version instanceof SemVer) {
|
286
|
-
if (version.loose === loose)
|
291
|
+
if (version.loose === options.loose)
|
287
292
|
return version;
|
288
293
|
else
|
289
294
|
version = version.version;
|
@@ -295,11 +300,13 @@ function SemVer(version, loose) {
|
|
295
300
|
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
|
296
301
|
|
297
302
|
if (!(this instanceof SemVer))
|
298
|
-
return new SemVer(version,
|
303
|
+
return new SemVer(version, options);
|
304
|
+
|
305
|
+
debug('SemVer', version, options);
|
306
|
+
this.options = options;
|
307
|
+
this.loose = !!options.loose;
|
299
308
|
|
300
|
-
|
301
|
-
this.loose = loose;
|
302
|
-
var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
|
309
|
+
var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]);
|
303
310
|
|
304
311
|
if (!m)
|
305
312
|
throw new TypeError('Invalid Version: ' + version);
|
@@ -349,16 +356,16 @@ SemVer.prototype.toString = function() {
|
|
349
356
|
};
|
350
357
|
|
351
358
|
SemVer.prototype.compare = function(other) {
|
352
|
-
debug('SemVer.compare', this.version, this.
|
359
|
+
debug('SemVer.compare', this.version, this.options, other);
|
353
360
|
if (!(other instanceof SemVer))
|
354
|
-
other = new SemVer(other, this.
|
361
|
+
other = new SemVer(other, this.options);
|
355
362
|
|
356
363
|
return this.compareMain(other) || this.comparePre(other);
|
357
364
|
};
|
358
365
|
|
359
366
|
SemVer.prototype.compareMain = function(other) {
|
360
367
|
if (!(other instanceof SemVer))
|
361
|
-
other = new SemVer(other, this.
|
368
|
+
other = new SemVer(other, this.options);
|
362
369
|
|
363
370
|
return compareIdentifiers(this.major, other.major) ||
|
364
371
|
compareIdentifiers(this.minor, other.minor) ||
|
@@ -367,7 +374,7 @@ SemVer.prototype.compareMain = function(other) {
|
|
367
374
|
|
368
375
|
SemVer.prototype.comparePre = function(other) {
|
369
376
|
if (!(other instanceof SemVer))
|
370
|
-
other = new SemVer(other, this.
|
377
|
+
other = new SemVer(other, this.options);
|
371
378
|
|
372
379
|
// NOT having a prerelease is > having one
|
373
380
|
if (this.prerelease.length && !other.prerelease.length)
|
@@ -658,19 +665,23 @@ function cmp(a, op, b, loose) {
|
|
658
665
|
}
|
659
666
|
|
660
667
|
exports.Comparator = Comparator;
|
661
|
-
function Comparator(comp,
|
668
|
+
function Comparator(comp, options) {
|
669
|
+
if (!options || typeof options !== 'object')
|
670
|
+
options = { loose: !!options, includePrerelease: false }
|
671
|
+
|
662
672
|
if (comp instanceof Comparator) {
|
663
|
-
if (comp.loose === loose)
|
673
|
+
if (comp.loose === !!options.loose)
|
664
674
|
return comp;
|
665
675
|
else
|
666
676
|
comp = comp.value;
|
667
677
|
}
|
668
678
|
|
669
679
|
if (!(this instanceof Comparator))
|
670
|
-
return new Comparator(comp,
|
680
|
+
return new Comparator(comp, options);
|
671
681
|
|
672
|
-
debug('comparator', comp,
|
673
|
-
this.
|
682
|
+
debug('comparator', comp, options);
|
683
|
+
this.options = options;
|
684
|
+
this.loose = !!options.loose;
|
674
685
|
this.parse(comp);
|
675
686
|
|
676
687
|
if (this.semver === ANY)
|
@@ -683,7 +694,7 @@ function Comparator(comp, loose) {
|
|
683
694
|
|
684
695
|
var ANY = {};
|
685
696
|
Comparator.prototype.parse = function(comp) {
|
686
|
-
var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
|
697
|
+
var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
|
687
698
|
var m = comp.match(r);
|
688
699
|
|
689
700
|
if (!m)
|
@@ -697,7 +708,7 @@ Comparator.prototype.parse = function(comp) {
|
|
697
708
|
if (!m[2])
|
698
709
|
this.semver = ANY;
|
699
710
|
else
|
700
|
-
this.semver = new SemVer(m[2], this.loose);
|
711
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
701
712
|
};
|
702
713
|
|
703
714
|
Comparator.prototype.toString = function() {
|
@@ -705,30 +716,33 @@ Comparator.prototype.toString = function() {
|
|
705
716
|
};
|
706
717
|
|
707
718
|
Comparator.prototype.test = function(version) {
|
708
|
-
debug('Comparator.test', version, this.loose);
|
719
|
+
debug('Comparator.test', version, this.options.loose);
|
709
720
|
|
710
721
|
if (this.semver === ANY)
|
711
722
|
return true;
|
712
723
|
|
713
724
|
if (typeof version === 'string')
|
714
|
-
version = new SemVer(version, this.
|
725
|
+
version = new SemVer(version, this.options);
|
715
726
|
|
716
|
-
return cmp(version, this.operator, this.semver, this.
|
727
|
+
return cmp(version, this.operator, this.semver, this.options);
|
717
728
|
};
|
718
729
|
|
719
|
-
Comparator.prototype.intersects = function(comp,
|
730
|
+
Comparator.prototype.intersects = function(comp, options) {
|
720
731
|
if (!(comp instanceof Comparator)) {
|
721
732
|
throw new TypeError('a Comparator is required');
|
722
733
|
}
|
723
734
|
|
735
|
+
if (!options || typeof options !== 'object')
|
736
|
+
options = { loose: !!options, includePrerelease: false }
|
737
|
+
|
724
738
|
var rangeTmp;
|
725
739
|
|
726
740
|
if (this.operator === '') {
|
727
|
-
rangeTmp = new Range(comp.value,
|
728
|
-
return satisfies(this.value, rangeTmp,
|
741
|
+
rangeTmp = new Range(comp.value, options);
|
742
|
+
return satisfies(this.value, rangeTmp, options);
|
729
743
|
} else if (comp.operator === '') {
|
730
|
-
rangeTmp = new Range(this.value,
|
731
|
-
return satisfies(comp.semver, rangeTmp,
|
744
|
+
rangeTmp = new Range(this.value, options);
|
745
|
+
return satisfies(comp.semver, rangeTmp, options);
|
732
746
|
}
|
733
747
|
|
734
748
|
var sameDirectionIncreasing =
|
@@ -742,11 +756,11 @@ Comparator.prototype.intersects = function(comp, loose) {
|
|
742
756
|
(this.operator === '>=' || this.operator === '<=') &&
|
743
757
|
(comp.operator === '>=' || comp.operator === '<=');
|
744
758
|
var oppositeDirectionsLessThan =
|
745
|
-
cmp(this.semver, '<', comp.semver,
|
759
|
+
cmp(this.semver, '<', comp.semver, options) &&
|
746
760
|
((this.operator === '>=' || this.operator === '>') &&
|
747
761
|
(comp.operator === '<=' || comp.operator === '<'));
|
748
762
|
var oppositeDirectionsGreaterThan =
|
749
|
-
cmp(this.semver, '>', comp.semver,
|
763
|
+
cmp(this.semver, '>', comp.semver, options) &&
|
750
764
|
((this.operator === '<=' || this.operator === '<') &&
|
751
765
|
(comp.operator === '>=' || comp.operator === '>'));
|
752
766
|
|
@@ -757,23 +771,29 @@ Comparator.prototype.intersects = function(comp, loose) {
|
|
757
771
|
|
758
772
|
|
759
773
|
exports.Range = Range;
|
760
|
-
function Range(range,
|
774
|
+
function Range(range, options) {
|
775
|
+
if (!options || typeof options !== 'object')
|
776
|
+
options = { loose: !!options, includePrerelease: false }
|
777
|
+
|
761
778
|
if (range instanceof Range) {
|
762
|
-
if (range.loose === loose
|
779
|
+
if (range.loose === !!options.loose &&
|
780
|
+
range.includePrerelease === !!options.includePrerelease) {
|
763
781
|
return range;
|
764
782
|
} else {
|
765
|
-
return new Range(range.raw,
|
783
|
+
return new Range(range.raw, options);
|
766
784
|
}
|
767
785
|
}
|
768
786
|
|
769
787
|
if (range instanceof Comparator) {
|
770
|
-
return new Range(range.value,
|
788
|
+
return new Range(range.value, options);
|
771
789
|
}
|
772
790
|
|
773
791
|
if (!(this instanceof Range))
|
774
|
-
return new Range(range,
|
792
|
+
return new Range(range, options);
|
775
793
|
|
776
|
-
this.
|
794
|
+
this.options = options;
|
795
|
+
this.loose = !!options.loose;
|
796
|
+
this.includePrerelease = !!options.includePrerelease
|
777
797
|
|
778
798
|
// First, split based on boolean or ||
|
779
799
|
this.raw = range;
|
@@ -803,9 +823,8 @@ Range.prototype.toString = function() {
|
|
803
823
|
};
|
804
824
|
|
805
825
|
Range.prototype.parseRange = function(range) {
|
806
|
-
var loose = this.loose;
|
826
|
+
var loose = this.options.loose;
|
807
827
|
range = range.trim();
|
808
|
-
debug('range', range, loose);
|
809
828
|
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
810
829
|
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
|
811
830
|
range = range.replace(hr, hyphenReplace);
|
@@ -828,22 +847,22 @@ Range.prototype.parseRange = function(range) {
|
|
828
847
|
|
829
848
|
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
|
830
849
|
var set = range.split(' ').map(function(comp) {
|
831
|
-
return parseComparator(comp,
|
832
|
-
}).join(' ').split(/\s+/);
|
833
|
-
if (this.loose) {
|
850
|
+
return parseComparator(comp, this.options);
|
851
|
+
}, this).join(' ').split(/\s+/);
|
852
|
+
if (this.options.loose) {
|
834
853
|
// in loose mode, throw out any that are not valid comparators
|
835
854
|
set = set.filter(function(comp) {
|
836
855
|
return !!comp.match(compRe);
|
837
856
|
});
|
838
857
|
}
|
839
858
|
set = set.map(function(comp) {
|
840
|
-
return new Comparator(comp,
|
841
|
-
});
|
859
|
+
return new Comparator(comp, this.options);
|
860
|
+
}, this);
|
842
861
|
|
843
862
|
return set;
|
844
863
|
};
|
845
864
|
|
846
|
-
Range.prototype.intersects = function(range,
|
865
|
+
Range.prototype.intersects = function(range, options) {
|
847
866
|
if (!(range instanceof Range)) {
|
848
867
|
throw new TypeError('a Range is required');
|
849
868
|
}
|
@@ -852,7 +871,7 @@ Range.prototype.intersects = function(range, loose) {
|
|
852
871
|
return thisComparators.every(function(thisComparator) {
|
853
872
|
return range.set.some(function(rangeComparators) {
|
854
873
|
return rangeComparators.every(function(rangeComparator) {
|
855
|
-
return thisComparator.intersects(rangeComparator,
|
874
|
+
return thisComparator.intersects(rangeComparator, options);
|
856
875
|
});
|
857
876
|
});
|
858
877
|
});
|
@@ -861,8 +880,8 @@ Range.prototype.intersects = function(range, loose) {
|
|
861
880
|
|
862
881
|
// Mostly just for testing and legacy API reasons
|
863
882
|
exports.toComparators = toComparators;
|
864
|
-
function toComparators(range,
|
865
|
-
return new Range(range,
|
883
|
+
function toComparators(range, options) {
|
884
|
+
return new Range(range, options).set.map(function(comp) {
|
866
885
|
return comp.map(function(c) {
|
867
886
|
return c.value;
|
868
887
|
}).join(' ').trim().split(' ');
|
@@ -872,15 +891,15 @@ function toComparators(range, loose) {
|
|
872
891
|
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
873
892
|
// already replaced the hyphen ranges
|
874
893
|
// turn into a set of JUST comparators.
|
875
|
-
function parseComparator(comp,
|
876
|
-
debug('comp', comp);
|
877
|
-
comp = replaceCarets(comp,
|
894
|
+
function parseComparator(comp, options) {
|
895
|
+
debug('comp', comp, options);
|
896
|
+
comp = replaceCarets(comp, options);
|
878
897
|
debug('caret', comp);
|
879
|
-
comp = replaceTildes(comp,
|
898
|
+
comp = replaceTildes(comp, options);
|
880
899
|
debug('tildes', comp);
|
881
|
-
comp = replaceXRanges(comp,
|
900
|
+
comp = replaceXRanges(comp, options);
|
882
901
|
debug('xrange', comp);
|
883
|
-
comp = replaceStars(comp,
|
902
|
+
comp = replaceStars(comp, options);
|
884
903
|
debug('stars', comp);
|
885
904
|
return comp;
|
886
905
|
}
|
@@ -895,14 +914,16 @@ function isX(id) {
|
|
895
914
|
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
|
896
915
|
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
|
897
916
|
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
|
898
|
-
function replaceTildes(comp,
|
917
|
+
function replaceTildes(comp, options) {
|
899
918
|
return comp.trim().split(/\s+/).map(function(comp) {
|
900
|
-
return replaceTilde(comp,
|
919
|
+
return replaceTilde(comp, options);
|
901
920
|
}).join(' ');
|
902
921
|
}
|
903
922
|
|
904
|
-
function replaceTilde(comp,
|
905
|
-
|
923
|
+
function replaceTilde(comp, options) {
|
924
|
+
if (!options || typeof options !== 'object')
|
925
|
+
options = { loose: !!options, includePrerelease: false }
|
926
|
+
var r = options.loose ? re[TILDELOOSE] : re[TILDE];
|
906
927
|
return comp.replace(r, function(_, M, m, p, pr) {
|
907
928
|
debug('tilde', comp, _, M, m, p, pr);
|
908
929
|
var ret;
|
@@ -936,15 +957,17 @@ function replaceTilde(comp, loose) {
|
|
936
957
|
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
|
937
958
|
// ^1.2.3 --> >=1.2.3 <2.0.0
|
938
959
|
// ^1.2.0 --> >=1.2.0 <2.0.0
|
939
|
-
function replaceCarets(comp,
|
960
|
+
function replaceCarets(comp, options) {
|
940
961
|
return comp.trim().split(/\s+/).map(function(comp) {
|
941
|
-
return replaceCaret(comp,
|
962
|
+
return replaceCaret(comp, options);
|
942
963
|
}).join(' ');
|
943
964
|
}
|
944
965
|
|
945
|
-
function replaceCaret(comp,
|
946
|
-
debug('caret', comp,
|
947
|
-
|
966
|
+
function replaceCaret(comp, options) {
|
967
|
+
debug('caret', comp, options);
|
968
|
+
if (!options || typeof options !== 'object')
|
969
|
+
options = { loose: !!options, includePrerelease: false }
|
970
|
+
var r = options.loose ? re[CARETLOOSE] : re[CARET];
|
948
971
|
return comp.replace(r, function(_, M, m, p, pr) {
|
949
972
|
debug('caret', comp, _, M, m, p, pr);
|
950
973
|
var ret;
|
@@ -991,16 +1014,18 @@ function replaceCaret(comp, loose) {
|
|
991
1014
|
});
|
992
1015
|
}
|
993
1016
|
|
994
|
-
function replaceXRanges(comp,
|
995
|
-
debug('replaceXRanges', comp,
|
1017
|
+
function replaceXRanges(comp, options) {
|
1018
|
+
debug('replaceXRanges', comp, options);
|
996
1019
|
return comp.split(/\s+/).map(function(comp) {
|
997
|
-
return replaceXRange(comp,
|
1020
|
+
return replaceXRange(comp, options);
|
998
1021
|
}).join(' ');
|
999
1022
|
}
|
1000
1023
|
|
1001
|
-
function replaceXRange(comp,
|
1024
|
+
function replaceXRange(comp, options) {
|
1002
1025
|
comp = comp.trim();
|
1003
|
-
|
1026
|
+
if (!options || typeof options !== 'object')
|
1027
|
+
options = { loose: !!options, includePrerelease: false }
|
1028
|
+
var r = options.loose ? re[XRANGELOOSE] : re[XRANGE];
|
1004
1029
|
return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
|
1005
1030
|
debug('xRange', comp, ret, gtlt, M, m, p, pr);
|
1006
1031
|
var xM = isX(M);
|
@@ -1064,8 +1089,8 @@ function replaceXRange(comp, loose) {
|
|
1064
1089
|
|
1065
1090
|
// Because * is AND-ed with everything else in the comparator,
|
1066
1091
|
// and '' means "any version", just remove the *s entirely.
|
1067
|
-
function replaceStars(comp,
|
1068
|
-
debug('replaceStars', comp,
|
1092
|
+
function replaceStars(comp, options) {
|
1093
|
+
debug('replaceStars', comp, options);
|
1069
1094
|
// Looseness is ignored here. star is always as loose as it gets!
|
1070
1095
|
return comp.trim().replace(re[STAR], '');
|
1071
1096
|
}
|
@@ -1109,22 +1134,25 @@ Range.prototype.test = function(version) {
|
|
1109
1134
|
return false;
|
1110
1135
|
|
1111
1136
|
if (typeof version === 'string')
|
1112
|
-
version = new SemVer(version, this.
|
1137
|
+
version = new SemVer(version, this.options);
|
1113
1138
|
|
1114
1139
|
for (var i = 0; i < this.set.length; i++) {
|
1115
|
-
if (testSet(this.set[i], version))
|
1140
|
+
if (testSet(this.set[i], version, this.options))
|
1116
1141
|
return true;
|
1117
1142
|
}
|
1118
1143
|
return false;
|
1119
1144
|
};
|
1120
1145
|
|
1121
|
-
function testSet(set, version) {
|
1146
|
+
function testSet(set, version, options) {
|
1122
1147
|
for (var i = 0; i < set.length; i++) {
|
1123
1148
|
if (!set[i].test(version))
|
1124
1149
|
return false;
|
1125
1150
|
}
|
1126
1151
|
|
1127
|
-
if (
|
1152
|
+
if (!options)
|
1153
|
+
options = {}
|
1154
|
+
|
1155
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
1128
1156
|
// Find the set of versions that are allowed to have prereleases
|
1129
1157
|
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
1130
1158
|
// That should allow `1.2.3-pr.2` to pass.
|
@@ -1152,9 +1180,9 @@ function testSet(set, version) {
|
|
1152
1180
|
}
|
1153
1181
|
|
1154
1182
|
exports.satisfies = satisfies;
|
1155
|
-
function satisfies(version, range,
|
1183
|
+
function satisfies(version, range, options) {
|
1156
1184
|
try {
|
1157
|
-
range = new Range(range,
|
1185
|
+
range = new Range(range, options);
|
1158
1186
|
} catch (er) {
|
1159
1187
|
return false;
|
1160
1188
|
}
|
@@ -1162,19 +1190,19 @@ function satisfies(version, range, loose) {
|
|
1162
1190
|
}
|
1163
1191
|
|
1164
1192
|
exports.maxSatisfying = maxSatisfying;
|
1165
|
-
function maxSatisfying(versions, range,
|
1193
|
+
function maxSatisfying(versions, range, options) {
|
1166
1194
|
var max = null;
|
1167
1195
|
var maxSV = null;
|
1168
1196
|
try {
|
1169
|
-
var rangeObj = new Range(range,
|
1197
|
+
var rangeObj = new Range(range, options);
|
1170
1198
|
} catch (er) {
|
1171
1199
|
return null;
|
1172
1200
|
}
|
1173
1201
|
versions.forEach(function (v) {
|
1174
|
-
if (rangeObj.test(v)) { // satisfies(v, range,
|
1202
|
+
if (rangeObj.test(v)) { // satisfies(v, range, options)
|
1175
1203
|
if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
|
1176
1204
|
max = v;
|
1177
|
-
maxSV = new SemVer(max,
|
1205
|
+
maxSV = new SemVer(max, options);
|
1178
1206
|
}
|
1179
1207
|
}
|
1180
1208
|
})
|
@@ -1182,19 +1210,19 @@ function maxSatisfying(versions, range, loose) {
|
|
1182
1210
|
}
|
1183
1211
|
|
1184
1212
|
exports.minSatisfying = minSatisfying;
|
1185
|
-
function minSatisfying(versions, range,
|
1213
|
+
function minSatisfying(versions, range, options) {
|
1186
1214
|
var min = null;
|
1187
1215
|
var minSV = null;
|
1188
1216
|
try {
|
1189
|
-
var rangeObj = new Range(range,
|
1217
|
+
var rangeObj = new Range(range, options);
|
1190
1218
|
} catch (er) {
|
1191
1219
|
return null;
|
1192
1220
|
}
|
1193
1221
|
versions.forEach(function (v) {
|
1194
|
-
if (rangeObj.test(v)) { // satisfies(v, range,
|
1222
|
+
if (rangeObj.test(v)) { // satisfies(v, range, options)
|
1195
1223
|
if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
|
1196
1224
|
min = v;
|
1197
|
-
minSV = new SemVer(min,
|
1225
|
+
minSV = new SemVer(min, options);
|
1198
1226
|
}
|
1199
1227
|
}
|
1200
1228
|
})
|
@@ -1202,11 +1230,11 @@ function minSatisfying(versions, range, loose) {
|
|
1202
1230
|
}
|
1203
1231
|
|
1204
1232
|
exports.validRange = validRange;
|
1205
|
-
function validRange(range,
|
1233
|
+
function validRange(range, options) {
|
1206
1234
|
try {
|
1207
1235
|
// Return '*' instead of '' so that truthiness works.
|
1208
1236
|
// This will throw if it's invalid anyway
|
1209
|
-
return new Range(range,
|
1237
|
+
return new Range(range, options).range || '*';
|
1210
1238
|
} catch (er) {
|
1211
1239
|
return null;
|
1212
1240
|
}
|
@@ -1214,20 +1242,20 @@ function validRange(range, loose) {
|
|
1214
1242
|
|
1215
1243
|
// Determine if version is less than all the versions possible in the range
|
1216
1244
|
exports.ltr = ltr;
|
1217
|
-
function ltr(version, range,
|
1218
|
-
return outside(version, range, '<',
|
1245
|
+
function ltr(version, range, options) {
|
1246
|
+
return outside(version, range, '<', options);
|
1219
1247
|
}
|
1220
1248
|
|
1221
1249
|
// Determine if version is greater than all the versions possible in the range.
|
1222
1250
|
exports.gtr = gtr;
|
1223
|
-
function gtr(version, range,
|
1224
|
-
return outside(version, range, '>',
|
1251
|
+
function gtr(version, range, options) {
|
1252
|
+
return outside(version, range, '>', options);
|
1225
1253
|
}
|
1226
1254
|
|
1227
1255
|
exports.outside = outside;
|
1228
|
-
function outside(version, range, hilo,
|
1229
|
-
version = new SemVer(version,
|
1230
|
-
range = new Range(range,
|
1256
|
+
function outside(version, range, hilo, options) {
|
1257
|
+
version = new SemVer(version, options);
|
1258
|
+
range = new Range(range, options);
|
1231
1259
|
|
1232
1260
|
var gtfn, ltefn, ltfn, comp, ecomp;
|
1233
1261
|
switch (hilo) {
|
@@ -1250,7 +1278,7 @@ function outside(version, range, hilo, loose) {
|
|
1250
1278
|
}
|
1251
1279
|
|
1252
1280
|
// If it satisifes the range it is not outside
|
1253
|
-
if (satisfies(version, range,
|
1281
|
+
if (satisfies(version, range, options)) {
|
1254
1282
|
return false;
|
1255
1283
|
}
|
1256
1284
|
|
@@ -1269,9 +1297,9 @@ function outside(version, range, hilo, loose) {
|
|
1269
1297
|
}
|
1270
1298
|
high = high || comparator;
|
1271
1299
|
low = low || comparator;
|
1272
|
-
if (gtfn(comparator.semver, high.semver,
|
1300
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
1273
1301
|
high = comparator;
|
1274
|
-
} else if (ltfn(comparator.semver, low.semver,
|
1302
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
1275
1303
|
low = comparator;
|
1276
1304
|
}
|
1277
1305
|
});
|
@@ -1295,15 +1323,15 @@ function outside(version, range, hilo, loose) {
|
|
1295
1323
|
}
|
1296
1324
|
|
1297
1325
|
exports.prerelease = prerelease;
|
1298
|
-
function prerelease(version,
|
1299
|
-
var parsed = parse(version,
|
1326
|
+
function prerelease(version, options) {
|
1327
|
+
var parsed = parse(version, options);
|
1300
1328
|
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
|
1301
1329
|
}
|
1302
1330
|
|
1303
1331
|
exports.intersects = intersects;
|
1304
|
-
function intersects(r1, r2,
|
1305
|
-
r1 = new Range(r1,
|
1306
|
-
r2 = new Range(r2,
|
1332
|
+
function intersects(r1, r2, options) {
|
1333
|
+
r1 = new Range(r1, options)
|
1334
|
+
r2 = new Range(r2, options)
|
1307
1335
|
return r1.intersects(r2)
|
1308
1336
|
}
|
1309
1337
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
22
22
|
"_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7",
|
23
23
|
"_spec": "set-blocking@~2.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
|
25
25
|
"author": {
|
26
26
|
"name": "Ben Coe",
|
27
27
|
"email": "ben@npmjs.com"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
22
22
|
"_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d",
|
23
23
|
"_spec": "signal-exit@^3.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Ben Coe",
|
27
27
|
"email": "ben@npmjs.com"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
23
23
|
"_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
|
24
24
|
"_spec": "string-width@^1.0.1",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
26
26
|
"author": {
|
27
27
|
"name": "Sindre Sorhus",
|
28
28
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
22
22
|
"_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
|
23
23
|
"_spec": "string_decoder@~1.1.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
|
25
25
|
"bugs": {
|
26
26
|
"url": "https://github.com/nodejs/string_decoder/issues"
|
27
27
|
},
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
23
23
|
"_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
|
24
24
|
"_spec": "strip-ansi@^3.0.1",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
26
26
|
"author": {
|
27
27
|
"name": "Sindre Sorhus",
|
28
28
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
22
22
|
"_shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a",
|
23
23
|
"_spec": "strip-json-comments@~2.0.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/rc",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -108,7 +108,7 @@ tar.c( // or tar.create
|
|
108
108
|
gzip: <true|gzip options>
|
109
109
|
},
|
110
110
|
['some', 'files', 'and', 'folders']
|
111
|
-
).pipe(fs.createWriteStream('my-tarball.tgz')
|
111
|
+
).pipe(fs.createWriteStream('my-tarball.tgz'))
|
112
112
|
```
|
113
113
|
|
114
114
|
To replicate `tar xf my-tarball.tgz` you'd do:
|
@@ -230,6 +230,9 @@ The following options are supported:
|
|
230
230
|
Note that this prevents using other mtime-based features like
|
231
231
|
`tar.update` or the `keepNewer` option with the resulting tar archive.
|
232
232
|
[Alias: `m`, `no-mtime`]
|
233
|
+
- `mtime` Set to a `Date` object to force a specific `mtime` for
|
234
|
+
everything added to the archive. Overridden by `noMtime`.
|
235
|
+
|
233
236
|
|
234
237
|
The following options are mostly internal, but can be modified in some
|
235
238
|
advanced use cases, such as re-using caches between runs.
|
@@ -534,7 +537,6 @@ The following options are supported:
|
|
534
537
|
- `mtime` Set to a `Date` object to force a specific `mtime` for
|
535
538
|
everything added to the archive. Overridden by `noMtime`.
|
536
539
|
|
537
|
-
|
538
540
|
#### add(path)
|
539
541
|
|
540
542
|
Adds an entry to the archive. Returns the Pack stream.
|
@@ -784,6 +786,9 @@ The following options are supported:
|
|
784
786
|
- `noMtime` Set to true to omit writing `mtime` values for entries.
|
785
787
|
Note that this prevents using other mtime-based features like
|
786
788
|
`tar.update` or the `keepNewer` option with the resulting tar archive.
|
789
|
+
- `umask` Set to restrict the modes on the entries in the archive,
|
790
|
+
somewhat like how umask works on file creation. Defaults to
|
791
|
+
`process.umask()` on unix systems, or `0o22` on Windows.
|
787
792
|
|
788
793
|
#### warn(message, data)
|
789
794
|
|