fsevents 1.2.3 → 1.2.8

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.

Files changed (186) hide show
  1. package/.travis.yml +1 -3
  2. package/fsevents.cc +6 -15
  3. package/node_modules/abbrev/package.json +13 -14
  4. package/node_modules/ansi-regex/package.json +13 -14
  5. package/node_modules/aproba/package.json +13 -14
  6. package/node_modules/are-we-there-yet/CHANGES.md +6 -0
  7. package/node_modules/are-we-there-yet/package.json +19 -20
  8. package/node_modules/are-we-there-yet/tracker-stream.js +1 -0
  9. package/node_modules/balanced-match/package.json +13 -14
  10. package/node_modules/brace-expansion/package.json +13 -14
  11. package/node_modules/chownr/chownr.js +74 -38
  12. package/node_modules/chownr/package.json +22 -20
  13. package/node_modules/code-point-at/package.json +13 -14
  14. package/node_modules/concat-map/package.json +8 -9
  15. package/node_modules/console-control-strings/package.json +14 -14
  16. package/node_modules/core-util-is/package.json +13 -14
  17. package/node_modules/debug/CHANGELOG.md +34 -1
  18. package/node_modules/debug/README.md +206 -63
  19. package/node_modules/debug/dist/debug.js +912 -0
  20. package/node_modules/debug/package.json +46 -33
  21. package/node_modules/debug/src/browser.js +185 -106
  22. package/node_modules/debug/src/common.js +266 -0
  23. package/node_modules/debug/src/index.js +4 -4
  24. package/node_modules/debug/src/node.js +174 -165
  25. package/node_modules/deep-extend/CHANGELOG.md +28 -3
  26. package/node_modules/deep-extend/LICENSE +1 -1
  27. package/node_modules/deep-extend/README.md +2 -1
  28. package/node_modules/deep-extend/lib/deep-extend.js +11 -5
  29. package/node_modules/deep-extend/package.json +26 -28
  30. package/node_modules/delegates/package.json +13 -14
  31. package/node_modules/detect-libc/package.json +13 -14
  32. package/node_modules/fs-minipass/package.json +13 -14
  33. package/node_modules/fs.realpath/package.json +13 -14
  34. package/node_modules/gauge/package.json +13 -14
  35. package/node_modules/glob/package.json +18 -19
  36. package/node_modules/has-unicode/package.json +13 -14
  37. package/node_modules/iconv-lite/Changelog.md +16 -0
  38. package/node_modules/iconv-lite/encodings/sbcs-codec.js +2 -2
  39. package/node_modules/iconv-lite/encodings/sbcs-data.js +5 -0
  40. package/node_modules/iconv-lite/lib/extend-node.js +1 -1
  41. package/node_modules/iconv-lite/lib/index.d.ts +2 -2
  42. package/node_modules/iconv-lite/package.json +19 -20
  43. package/node_modules/ignore-walk/package.json +13 -14
  44. package/node_modules/inflight/package.json +13 -14
  45. package/node_modules/inherits/package.json +14 -14
  46. package/node_modules/ini/package.json +13 -14
  47. package/node_modules/is-fullwidth-code-point/package.json +13 -14
  48. package/node_modules/isarray/package.json +13 -14
  49. package/node_modules/minimatch/package.json +14 -14
  50. package/node_modules/minimist/package.json +8 -9
  51. package/node_modules/minipass/LICENSE +15 -0
  52. package/node_modules/minipass/README.md +81 -3
  53. package/node_modules/minipass/index.js +77 -6
  54. package/node_modules/minipass/package.json +21 -20
  55. package/node_modules/minizlib/index.js +66 -95
  56. package/node_modules/minizlib/package.json +18 -19
  57. package/node_modules/mkdirp/package.json +14 -14
  58. package/node_modules/ms/index.js +28 -18
  59. package/node_modules/ms/package.json +22 -23
  60. package/node_modules/ms/readme.md +17 -8
  61. package/node_modules/needle/.npmignore +6 -0
  62. package/node_modules/needle/README.md +3 -3
  63. package/node_modules/needle/examples/multipart-stream.js +1 -1
  64. package/node_modules/needle/lib/auth.js +1 -1
  65. package/node_modules/needle/lib/cookies.js +12 -10
  66. package/node_modules/needle/lib/multipart.js +1 -1
  67. package/node_modules/needle/lib/needle.js +18 -6
  68. package/node_modules/needle/package-lock.json +395 -0
  69. package/node_modules/needle/package.json +26 -27
  70. package/node_modules/needle/test/basic_auth_spec.js +1 -1
  71. package/node_modules/needle/test/cookies_spec.js +2 -2
  72. package/node_modules/needle/test/errors_spec.js +4 -4
  73. package/node_modules/needle/test/keys/ssl.cert +21 -0
  74. package/node_modules/needle/test/keys/ssl.key +27 -0
  75. package/node_modules/needle/test/long_string_spec.js +1 -1
  76. package/node_modules/needle/test/output_spec.js +1 -1
  77. package/node_modules/needle/test/post_data_spec.js +20 -20
  78. package/node_modules/needle/test/proxy_spec.js +1 -1
  79. package/node_modules/needle/test/url_spec.js +11 -3
  80. package/node_modules/needle/test/utils/test.js +1 -1
  81. package/node_modules/node-pre-gyp/CHANGELOG.md +34 -3
  82. package/node_modules/node-pre-gyp/README.md +53 -21
  83. package/node_modules/node-pre-gyp/appveyor.yml +2 -9
  84. package/node_modules/node-pre-gyp/contributing.md +2 -2
  85. package/node_modules/node-pre-gyp/lib/build.js +1 -1
  86. package/node_modules/node-pre-gyp/lib/install.js +46 -12
  87. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
  88. package/node_modules/node-pre-gyp/lib/package.js +5 -2
  89. package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
  90. package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
  91. package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
  92. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +148 -0
  93. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
  94. package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
  95. package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
  96. package/node_modules/node-pre-gyp/package.json +16 -19
  97. package/node_modules/nopt/package.json +13 -14
  98. package/node_modules/npm-bundled/LICENSE +15 -0
  99. package/node_modules/npm-bundled/README.md +2 -0
  100. package/node_modules/npm-bundled/index.js +16 -2
  101. package/node_modules/npm-bundled/package.json +18 -19
  102. package/node_modules/npm-packlist/index.js +43 -13
  103. package/node_modules/npm-packlist/package.json +18 -19
  104. package/node_modules/npmlog/package.json +13 -14
  105. package/node_modules/number-is-nan/package.json +13 -14
  106. package/node_modules/object-assign/package.json +13 -14
  107. package/node_modules/once/package.json +14 -14
  108. package/node_modules/os-homedir/package.json +13 -14
  109. package/node_modules/os-tmpdir/package.json +13 -14
  110. package/node_modules/osenv/package.json +13 -14
  111. package/node_modules/path-is-absolute/package.json +13 -14
  112. package/node_modules/process-nextick-args/package.json +13 -14
  113. package/node_modules/rc/node_modules/minimist/package.json +13 -14
  114. package/node_modules/rc/package.json +18 -19
  115. package/node_modules/readable-stream/package.json +13 -14
  116. package/node_modules/rimraf/package.json +22 -20
  117. package/node_modules/safe-buffer/index.d.ts +187 -0
  118. package/node_modules/safe-buffer/package.json +23 -21
  119. package/node_modules/safer-buffer/package.json +13 -14
  120. package/node_modules/sax/package.json +13 -14
  121. package/node_modules/semver/CHANGELOG.md +39 -0
  122. package/node_modules/semver/README.md +31 -8
  123. package/node_modules/semver/bin/semver +92 -75
  124. package/node_modules/semver/package.json +25 -20
  125. package/node_modules/semver/semver.js +922 -763
  126. package/node_modules/set-blocking/package.json +13 -14
  127. package/node_modules/signal-exit/package.json +13 -14
  128. package/node_modules/string-width/package.json +14 -14
  129. package/node_modules/string_decoder/package.json +13 -14
  130. package/node_modules/strip-ansi/package.json +14 -14
  131. package/node_modules/strip-json-comments/package.json +13 -14
  132. package/node_modules/tar/README.md +7 -2
  133. package/node_modules/tar/lib/header.js +20 -4
  134. package/node_modules/tar/lib/mode-fix.js +14 -0
  135. package/node_modules/tar/lib/pack.js +1 -0
  136. package/node_modules/tar/lib/parse.js +2 -1
  137. package/node_modules/tar/lib/unpack.js +67 -6
  138. package/node_modules/tar/lib/write-entry.js +25 -6
  139. package/node_modules/tar/package.json +25 -26
  140. package/node_modules/util-deprecate/package.json +13 -14
  141. package/node_modules/wide-align/package.json +19 -20
  142. package/node_modules/wrappy/package.json +14 -14
  143. package/node_modules/yallist/iterator.js +5 -5
  144. package/node_modules/yallist/package.json +19 -19
  145. package/node_modules/yallist/yallist.js +2 -2
  146. package/package.json +6 -9
  147. package/src/async.cc +2 -2
  148. package/src/thread.cc +5 -6
  149. package/.npmignore +0 -1
  150. package/build/.target.mk +0 -53
  151. package/build/Makefile +0 -352
  152. package/build/Release/.deps/Release/.node.d +0 -1
  153. package/build/Release/.deps/Release/fse.node.d +0 -1
  154. package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
  155. package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +0 -65
  156. package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node.d +0 -1
  157. package/build/Release/.node +0 -0
  158. package/build/Release/fse.node +0 -0
  159. package/build/Release/obj.target/action_after_build.stamp +0 -0
  160. package/build/Release/obj.target/fse/fsevents.o +0 -0
  161. package/build/action_after_build.target.mk +0 -32
  162. package/build/binding.Makefile +0 -6
  163. package/build/fse.target.mk +0 -179
  164. package/build/gyp-mac-tool +0 -611
  165. package/build/stage/v1.1.2/fse-v1.1.2-node-v48-darwin-x64.tar.gz +0 -0
  166. package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
  167. package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
  168. package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
  169. package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
  170. package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
  171. package/node_modules/are-we-there-yet/CHANGES.md~ +0 -27
  172. package/node_modules/debug/.coveralls.yml +0 -1
  173. package/node_modules/debug/.eslintrc +0 -11
  174. package/node_modules/debug/.npmignore +0 -9
  175. package/node_modules/debug/.travis.yml +0 -14
  176. package/node_modules/debug/Makefile +0 -50
  177. package/node_modules/debug/component.json +0 -19
  178. package/node_modules/debug/karma.conf.js +0 -70
  179. package/node_modules/debug/node.js +0 -1
  180. package/node_modules/debug/src/debug.js +0 -202
  181. package/node_modules/debug/src/inspector-log.js +0 -15
  182. package/node_modules/iconv-lite/.travis.yml +0 -23
  183. package/node_modules/rc/.npmignore +0 -3
  184. package/node_modules/safe-buffer/.travis.yml +0 -7
  185. package/node_modules/safe-buffer/test.js +0 -101
  186. package/src/locking.cc +0 -27
@@ -9,8 +9,8 @@ module.exports = exports;
9
9
 
10
10
  exports.usage = 'Finds the require path for the node-pre-gyp installed module';
11
11
 
12
- exports.validate = function(package_json) {
13
- versioning.validate_config(package_json);
12
+ exports.validate = function(package_json,opts) {
13
+ versioning.validate_config(package_json,opts);
14
14
  };
15
15
 
16
16
  exports.find = function(package_json_path,opts) {
@@ -18,10 +18,10 @@ exports.find = function(package_json_path,opts) {
18
18
  throw new Error("package.json does not exist at " + package_json_path);
19
19
  }
20
20
  var package_json = require(package_json_path);
21
- versioning.validate_config(package_json);
21
+ versioning.validate_config(package_json,opts);
22
22
  var napi_build_version;
23
- if (napi.get_napi_build_versions (package_json)) {
24
- napi_build_version = napi.get_best_napi_build_version(package_json);
23
+ if (napi.get_napi_build_versions (package_json, opts)) {
24
+ napi_build_version = napi.get_best_napi_build_version(package_json, opts);
25
25
  }
26
26
  opts = opts || {};
27
27
  if (!opts.module_root) opts.module_root = path.dirname(package_json_path);
@@ -13,7 +13,7 @@ function rebuild (gyp, argv, callback) {
13
13
  { name: 'clean', args: [] },
14
14
  { name: 'build', args: ['rebuild'] }
15
15
  ];
16
- commands = napi.expand_commands(package_json, commands);
16
+ commands = napi.expand_commands(package_json, gyp.opts, commands);
17
17
  for (var i = commands.length; i !== 0; i--) {
18
18
  gyp.todo.unshift(commands[i-1]);
19
19
  }
@@ -10,7 +10,7 @@ var napi = require('./util/napi.js');
10
10
  function rebuild (gyp, argv, callback) {
11
11
  var package_json = JSON.parse(fs.readFileSync('./package.json'));
12
12
  var installArgs = [];
13
- var napi_build_version = napi.get_best_napi_version(package_json);
13
+ var napi_build_version = napi.get_best_napi_build_version(package_json, gyp.opts);
14
14
  if (napi_build_version != null) installArgs = [ napi.get_command_arg (napi_build_version) ];
15
15
  gyp.todo.unshift(
16
16
  { name: 'clean', args: [] },
@@ -1263,6 +1263,14 @@
1263
1263
  "node_abi": 46,
1264
1264
  "v8": "4.5"
1265
1265
  },
1266
+ "4.9.0": {
1267
+ "node_abi": 46,
1268
+ "v8": "4.5"
1269
+ },
1270
+ "4.9.1": {
1271
+ "node_abi": 46,
1272
+ "v8": "4.5"
1273
+ },
1266
1274
  "5.0.0": {
1267
1275
  "node_abi": 47,
1268
1276
  "v8": "4.6"
@@ -1479,6 +1487,26 @@
1479
1487
  "node_abi": 48,
1480
1488
  "v8": "5.1"
1481
1489
  },
1490
+ "6.14.0": {
1491
+ "node_abi": 48,
1492
+ "v8": "5.1"
1493
+ },
1494
+ "6.14.1": {
1495
+ "node_abi": 48,
1496
+ "v8": "5.1"
1497
+ },
1498
+ "6.14.2": {
1499
+ "node_abi": 48,
1500
+ "v8": "5.1"
1501
+ },
1502
+ "6.14.3": {
1503
+ "node_abi": 48,
1504
+ "v8": "5.1"
1505
+ },
1506
+ "6.14.4": {
1507
+ "node_abi": 48,
1508
+ "v8": "5.1"
1509
+ },
1482
1510
  "7.0.0": {
1483
1511
  "node_abi": 51,
1484
1512
  "v8": "5.4"
@@ -1631,6 +1659,30 @@
1631
1659
  "node_abi": 57,
1632
1660
  "v8": "6.2"
1633
1661
  },
1662
+ "8.11.0": {
1663
+ "node_abi": 57,
1664
+ "v8": "6.2"
1665
+ },
1666
+ "8.11.1": {
1667
+ "node_abi": 57,
1668
+ "v8": "6.2"
1669
+ },
1670
+ "8.11.2": {
1671
+ "node_abi": 57,
1672
+ "v8": "6.2"
1673
+ },
1674
+ "8.11.3": {
1675
+ "node_abi": 57,
1676
+ "v8": "6.2"
1677
+ },
1678
+ "8.11.4": {
1679
+ "node_abi": 57,
1680
+ "v8": "6.2"
1681
+ },
1682
+ "8.12.0": {
1683
+ "node_abi": 57,
1684
+ "v8": "6.2"
1685
+ },
1634
1686
  "9.0.0": {
1635
1687
  "node_abi": 59,
1636
1688
  "v8": "6.2"
@@ -1678,5 +1730,101 @@
1678
1730
  "9.8.0": {
1679
1731
  "node_abi": 59,
1680
1732
  "v8": "6.2"
1733
+ },
1734
+ "9.9.0": {
1735
+ "node_abi": 59,
1736
+ "v8": "6.2"
1737
+ },
1738
+ "9.10.0": {
1739
+ "node_abi": 59,
1740
+ "v8": "6.2"
1741
+ },
1742
+ "9.10.1": {
1743
+ "node_abi": 59,
1744
+ "v8": "6.2"
1745
+ },
1746
+ "9.11.0": {
1747
+ "node_abi": 59,
1748
+ "v8": "6.2"
1749
+ },
1750
+ "9.11.1": {
1751
+ "node_abi": 59,
1752
+ "v8": "6.2"
1753
+ },
1754
+ "9.11.2": {
1755
+ "node_abi": 59,
1756
+ "v8": "6.2"
1757
+ },
1758
+ "10.0.0": {
1759
+ "node_abi": 64,
1760
+ "v8": "6.6"
1761
+ },
1762
+ "10.1.0": {
1763
+ "node_abi": 64,
1764
+ "v8": "6.6"
1765
+ },
1766
+ "10.2.0": {
1767
+ "node_abi": 64,
1768
+ "v8": "6.6"
1769
+ },
1770
+ "10.2.1": {
1771
+ "node_abi": 64,
1772
+ "v8": "6.6"
1773
+ },
1774
+ "10.3.0": {
1775
+ "node_abi": 64,
1776
+ "v8": "6.6"
1777
+ },
1778
+ "10.4.0": {
1779
+ "node_abi": 64,
1780
+ "v8": "6.7"
1781
+ },
1782
+ "10.4.1": {
1783
+ "node_abi": 64,
1784
+ "v8": "6.7"
1785
+ },
1786
+ "10.5.0": {
1787
+ "node_abi": 64,
1788
+ "v8": "6.7"
1789
+ },
1790
+ "10.6.0": {
1791
+ "node_abi": 64,
1792
+ "v8": "6.7"
1793
+ },
1794
+ "10.7.0": {
1795
+ "node_abi": 64,
1796
+ "v8": "6.7"
1797
+ },
1798
+ "10.8.0": {
1799
+ "node_abi": 64,
1800
+ "v8": "6.7"
1801
+ },
1802
+ "10.9.0": {
1803
+ "node_abi": 64,
1804
+ "v8": "6.8"
1805
+ },
1806
+ "10.10.0": {
1807
+ "node_abi": 64,
1808
+ "v8": "6.8"
1809
+ },
1810
+ "10.11.0": {
1811
+ "node_abi": 64,
1812
+ "v8": "6.8"
1813
+ },
1814
+ "10.12.0": {
1815
+ "node_abi": 64,
1816
+ "v8": "6.8"
1817
+ },
1818
+ "10.13.0": {
1819
+ "node_abi": 64,
1820
+ "v8": "6.8"
1821
+ },
1822
+ "11.0.0": {
1823
+ "node_abi": 67,
1824
+ "v8": "7.0"
1825
+ },
1826
+ "11.1.0": {
1827
+ "node_abi": 67,
1828
+ "v8": "7.0"
1681
1829
  }
1682
1830
  }
@@ -47,7 +47,8 @@ var share_with_node_gyp = [
47
47
  'module_path',
48
48
  'napi_version',
49
49
  'node_abi_napi',
50
- 'napi_build_version'
50
+ 'napi_build_version',
51
+ 'node_napi_label'
51
52
  ];
52
53
 
53
54
  function handle_gyp_opts(gyp, argv, callback) {
@@ -61,8 +62,10 @@ function handle_gyp_opts(gyp, argv, callback) {
61
62
  var val = opts[key];
62
63
  if (val) {
63
64
  node_pre_gyp_options.push('--' + key + '=' + val);
65
+ } else if (key === 'napi_build_version') {
66
+ node_pre_gyp_options.push('--' + key + '=0');
64
67
  } else {
65
- if (key !== 'napi_version' && key !== 'node_abi_napi' && key !== 'napi_build_version')
68
+ if (key !== 'napi_version' && key !== 'node_abi_napi')
66
69
  return callback(new Error("Option " + key + " required but not found by node-pre-gyp"));
67
70
  }
68
71
  });
@@ -2,6 +2,7 @@
2
2
 
3
3
  var fs = require('fs');
4
4
  var rm = require('rimraf');
5
+ var log = require('npmlog');
5
6
 
6
7
  module.exports = exports;
7
8
 
@@ -27,8 +28,9 @@ var napi_multiple_commands = [
27
28
 
28
29
  var napi_build_version_tag = 'napi_build_version=';
29
30
 
30
- module.exports.get_napi_version = function() {
31
+ module.exports.get_napi_version = function(target) { // target may be undefined
31
32
  // returns the non-zero numeric napi version or undefined if napi is not supported.
33
+ // correctly supporting target requires an updated cross-walk
32
34
  var version = process.versions.napi; // can be undefined
33
35
  if (!version) { // this code should never need to be updated
34
36
  if (versionArray[0] === 9 && versionArray[1] >= 3) version = 2; // 9.3.0+
@@ -37,18 +39,20 @@ module.exports.get_napi_version = function() {
37
39
  return version;
38
40
  };
39
41
 
40
- module.exports.get_napi_version_as_string = function() {
42
+ module.exports.get_napi_version_as_string = function(target) {
41
43
  // returns the napi version as a string or an empty string if napi is not supported.
42
- var version = module.exports.get_napi_version();
44
+ var version = module.exports.get_napi_version(target);
43
45
  return version ? ''+version : '';
44
46
  };
45
47
 
46
- module.exports.validate_package_json = function(package_json) { // return err
48
+ module.exports.validate_package_json = function(package_json, opts) { // throws Error
49
+
47
50
  var binary = package_json.binary;
48
- var module_path_ok = binary.module_path && binary.module_path.indexOf('{napi_build_version}') !== -1;
49
- var remote_path_ok = binary.remote_path && binary.remote_path.indexOf('{napi_build_version}') !== -1;
50
- var package_name_ok = binary.package_name && binary.package_name.indexOf('{napi_build_version}') !== -1;
51
- var napi_build_versions = module.exports.get_napi_build_versions(package_json);
51
+ var module_path_ok = pathOK(binary.module_path);
52
+ var remote_path_ok = pathOK(binary.remote_path);
53
+ var package_name_ok = pathOK(binary.package_name);
54
+ var napi_build_versions = module.exports.get_napi_build_versions(package_json,opts,true);
55
+ var napi_build_versions_raw = module.exports.get_napi_build_versions_raw(package_json);
52
56
 
53
57
  if (napi_build_versions) {
54
58
  napi_build_versions.forEach(function(napi_build_version){
@@ -63,29 +67,41 @@ module.exports.validate_package_json = function(package_json) { // return err
63
67
  "package_name must contain the substitution string '{napi_build_version}`.");
64
68
  }
65
69
 
66
- if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions) {
70
+ if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions_raw) {
67
71
  throw new Error("When the substitution string '{napi_build_version}` is specified in " +
68
72
  "module_path, remote_path, or package_name; napi_versions must also be specified.");
69
73
  }
70
74
 
71
- if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json)) {
75
+ if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json, opts) &&
76
+ module.exports.build_napi_only(package_json)) {
77
+ throw new Error(
78
+ 'The N-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
79
+ 'This module supports N-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
80
+ 'This Node instance cannot run this module.');
81
+ }
82
+
83
+ if (napi_build_versions_raw && !napi_build_versions && module.exports.build_napi_only(package_json)) {
72
84
  throw new Error(
73
- 'The N-API version of this Node instance is ' + module.exports.get_napi_version() + '. ' +
74
- 'This module supports N-API version(s) ' + module.exports.get_napi_build_versions(package_json) + '. ' +
85
+ 'The N-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
86
+ 'This module supports N-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
75
87
  'This Node instance cannot run this module.');
76
88
  }
77
89
 
78
90
  };
79
91
 
80
- module.exports.expand_commands = function(package_json, commands) {
92
+ function pathOK (path) {
93
+ return path && (path.indexOf('{napi_build_version}') !== -1 || path.indexOf('{node_napi_label}') !== -1);
94
+ }
95
+
96
+ module.exports.expand_commands = function(package_json, opts, commands) {
81
97
  var expanded_commands = [];
82
- var napi_build_versions = module.exports.get_napi_build_versions(package_json);
98
+ var napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
83
99
  commands.forEach(function(command){
84
100
  if (napi_build_versions && command.name === 'install') {
85
- var napi_build_version = module.exports.get_best_napi_build_version(package_json);
101
+ var napi_build_version = module.exports.get_best_napi_build_version(package_json, opts);
86
102
  var args = napi_build_version ? [ napi_build_version_tag+napi_build_version ] : [ ];
87
103
  expanded_commands.push ({ name: command.name, args: args });
88
- } else if (napi_build_versions && napi_multiple_commands.includes(command.name)) {
104
+ } else if (napi_build_versions && napi_multiple_commands.indexOf(command.name) !== -1) {
89
105
  napi_build_versions.forEach(function(napi_build_version){
90
106
  var args = command.args.slice();
91
107
  args.push (napi_build_version_tag+napi_build_version);
@@ -98,11 +114,38 @@ module.exports.expand_commands = function(package_json, commands) {
98
114
  return expanded_commands;
99
115
  };
100
116
 
101
- module.exports.get_napi_build_versions = function(package_json) {
117
+ module.exports.get_napi_build_versions = function(package_json, opts, warnings) { // opts may be undefined
118
+ var napi_build_versions = [];
119
+ var supported_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
120
+ // remove duplicates, verify each napi version can actaully be built
121
+ if (package_json.binary && package_json.binary.napi_versions) {
122
+ package_json.binary.napi_versions.forEach(function(napi_version) {
123
+ var duplicated = napi_build_versions.indexOf(napi_version) !== -1;
124
+ if (!duplicated && supported_napi_version && napi_version <= supported_napi_version) {
125
+ napi_build_versions.push(napi_version);
126
+ } else if (warnings && !duplicated && supported_napi_version) {
127
+ log.info('This Node instance does not support builds for N-API version', napi_version);
128
+ }
129
+ });
130
+ }
131
+ if (opts && opts["build-latest-napi-version-only"]) {
132
+ var latest_version = 0;
133
+ napi_build_versions.forEach(function(napi_version) {
134
+ if (napi_version > latest_version) latest_version = napi_version;
135
+ });
136
+ napi_build_versions = latest_version ? [ latest_version ] : [];
137
+ }
138
+ return napi_build_versions.length ? napi_build_versions : undefined;
139
+ };
140
+
141
+ module.exports.get_napi_build_versions_raw = function(package_json) {
102
142
  var napi_build_versions = [];
103
- if (package_json.binary && package_json.binary.napi_versions) { // remove duplicates
143
+ // remove duplicates
144
+ if (package_json.binary && package_json.binary.napi_versions) {
104
145
  package_json.binary.napi_versions.forEach(function(napi_version) {
105
- if (!napi_build_versions.includes(napi_version)) napi_build_versions.push(napi_version);
146
+ if (napi_build_versions.indexOf(napi_version) === -1) {
147
+ napi_build_versions.push(napi_version);
148
+ }
106
149
  });
107
150
  }
108
151
  return napi_build_versions.length ? napi_build_versions : undefined;
@@ -140,11 +183,11 @@ module.exports.get_build_dir = function(napi_build_version) {
140
183
  return 'build-tmp-napi-v'+napi_build_version;
141
184
  };
142
185
 
143
- module.exports.get_best_napi_build_version = function(package_json) {
186
+ module.exports.get_best_napi_build_version = function(package_json, opts) {
144
187
  var best_napi_build_version = 0;
145
- var napi_build_versions = module.exports.get_napi_build_versions (package_json);
188
+ var napi_build_versions = module.exports.get_napi_build_versions (package_json, opts);
146
189
  if (napi_build_versions) {
147
- var our_napi_version = module.exports.get_napi_version();
190
+ var our_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
148
191
  napi_build_versions.forEach(function(napi_build_version){
149
192
  if (napi_build_version > best_napi_build_version &&
150
193
  napi_build_version <= our_napi_version) {
@@ -154,3 +197,8 @@ module.exports.get_best_napi_build_version = function(package_json) {
154
197
  }
155
198
  return best_napi_build_version === 0 ? undefined : best_napi_build_version;
156
199
  };
200
+
201
+ module.exports.build_napi_only = function(package_json) {
202
+ return package_json.binary && package_json.binary.package_name &&
203
+ package_json.binary.package_name.indexOf('{node_napi_label}') === -1;
204
+ };
@@ -192,7 +192,7 @@ var required_parameters = [
192
192
  'host'
193
193
  ];
194
194
 
195
- function validate_config(package_json) {
195
+ function validate_config(package_json,opts) {
196
196
  var msg = package_json.name + ' package.json is not node-pre-gyp ready:\n';
197
197
  var missing = [];
198
198
  if (!package_json.main) {
@@ -226,7 +226,7 @@ function validate_config(package_json) {
226
226
  throw new Error("'host' protocol ("+protocol+") is invalid - only 'https:' is accepted");
227
227
  }
228
228
  }
229
- napi.validate_package_json(package_json);
229
+ napi.validate_package_json(package_json,opts);
230
230
  }
231
231
 
232
232
  module.exports.validate_config = validate_config;
@@ -276,7 +276,7 @@ var default_remote_path = '';
276
276
 
277
277
  module.exports.evaluate = function(package_json,options,napi_build_version) {
278
278
  options = options || {};
279
- validate_config(package_json);
279
+ validate_config(package_json,options); // options is a suitable substitute for opts in this case
280
280
  var v = package_json.version;
281
281
  var module_version = semver.parse(v);
282
282
  var runtime = options.runtime || get_process_runtime(process.versions);
@@ -293,9 +293,10 @@ module.exports.evaluate = function(package_json,options,napi_build_version) {
293
293
  patch: module_version.patch,
294
294
  runtime: runtime,
295
295
  node_abi: get_runtime_abi(runtime,options.target),
296
- node_abi_napi: napi.get_napi_version() ? 'napi' : get_runtime_abi(runtime,options.target),
297
- napi_version: napi.get_napi_version(), // non-zero numeric, undefined if unsupported
298
- napi_build_version: napi_build_version, // undefined if not specified
296
+ node_abi_napi: napi.get_napi_version(options.target) ? 'napi' : get_runtime_abi(runtime,options.target),
297
+ napi_version: napi.get_napi_version(options.target), // non-zero numeric, undefined if unsupported
298
+ napi_build_version: napi_build_version || '',
299
+ node_napi_label: napi_build_version ? 'napi-v' + napi_build_version : get_runtime_abi(runtime,options.target),
299
300
  target: options.target || '',
300
301
  platform: options.target_platform || process.platform,
301
302
  target_platform: options.target_platform || process.platform,
@@ -1,32 +1,28 @@
1
1
  {
2
- "_args": [
3
- [
4
- "node-pre-gyp@0.9.1",
5
- "/Users/eshanker/Code/fsevents"
6
- ]
7
- ],
8
- "_from": "node-pre-gyp@0.9.1",
9
- "_id": "node-pre-gyp@0.9.1",
2
+ "_from": "node-pre-gyp@0.12.0",
3
+ "_id": "node-pre-gyp@0.12.0",
10
4
  "_inBundle": false,
11
- "_integrity": "sha1-8RwHUW3ZL4cZnbx+GDjqt81WyeA=",
5
+ "_integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
12
6
  "_location": "/node-pre-gyp",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
9
  "type": "version",
16
10
  "registry": true,
17
- "raw": "node-pre-gyp@0.9.1",
11
+ "raw": "node-pre-gyp@0.12.0",
18
12
  "name": "node-pre-gyp",
19
13
  "escapedName": "node-pre-gyp",
20
- "rawSpec": "0.9.1",
14
+ "rawSpec": "0.12.0",
21
15
  "saveSpec": null,
22
- "fetchSpec": "0.9.1"
16
+ "fetchSpec": "0.12.0"
23
17
  },
24
18
  "_requiredBy": [
19
+ "#USER",
25
20
  "/"
26
21
  ],
27
- "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz",
28
- "_spec": "0.9.1",
29
- "_where": "/Users/eshanker/Code/fsevents",
22
+ "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
23
+ "_shasum": "39ba4bb1439da030295f899e3b520b7785766149",
24
+ "_spec": "node-pre-gyp@0.12.0",
25
+ "_where": "/Users/pipobscure/fsevents",
30
26
  "author": {
31
27
  "name": "Dane Springmeyer",
32
28
  "email": "dane@mapbox.com"
@@ -37,24 +33,25 @@
37
33
  "bugs": {
38
34
  "url": "https://github.com/mapbox/node-pre-gyp/issues"
39
35
  },
36
+ "bundleDependencies": false,
40
37
  "dependencies": {
41
38
  "detect-libc": "^1.0.2",
42
39
  "mkdirp": "^0.5.1",
43
- "needle": "^2.2.0",
40
+ "needle": "^2.2.1",
44
41
  "nopt": "^4.0.1",
45
42
  "npm-packlist": "^1.1.6",
46
43
  "npmlog": "^4.0.2",
47
- "rc": "^1.1.7",
44
+ "rc": "^1.2.7",
48
45
  "rimraf": "^2.6.1",
49
46
  "semver": "^5.3.0",
50
47
  "tar": "^4"
51
48
  },
49
+ "deprecated": false,
52
50
  "description": "Node.js native addon binary install tool",
53
51
  "devDependencies": {
54
52
  "aws-sdk": "^2.28.0",
55
53
  "jshint": "^2.9.5",
56
54
  "nock": "^9.2.3",
57
- "retire": "^1.2.12",
58
55
  "tape": "^4.6.3"
59
56
  },
60
57
  "homepage": "https://github.com/mapbox/node-pre-gyp#readme",
@@ -86,5 +83,5 @@
86
83
  "test": "jshint lib lib/util scripts bin/node-pre-gyp && tape test/*test.js",
87
84
  "update-crosswalk": "node scripts/abi_crosswalk.js"
88
85
  },
89
- "version": "0.9.1"
86
+ "version": "0.12.0"
90
87
  }
@@ -1,30 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "nopt@4.0.1",
5
- "/Users/eshanker/Code/fsevents"
6
- ]
7
- ],
8
- "_from": "nopt@4.0.1",
2
+ "_from": "nopt@^4.0.1",
9
3
  "_id": "nopt@4.0.1",
10
4
  "_inBundle": false,
11
5
  "_integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
12
6
  "_location": "/nopt",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "nopt@4.0.1",
11
+ "raw": "nopt@^4.0.1",
18
12
  "name": "nopt",
19
13
  "escapedName": "nopt",
20
- "rawSpec": "4.0.1",
14
+ "rawSpec": "^4.0.1",
21
15
  "saveSpec": null,
22
- "fetchSpec": "4.0.1"
16
+ "fetchSpec": "^4.0.1"
23
17
  },
24
- "_requiredBy": [],
18
+ "_requiredBy": [
19
+ "/node-pre-gyp"
20
+ ],
25
21
  "_resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
26
- "_spec": "4.0.1",
27
- "_where": "/Users/eshanker/Code/fsevents",
22
+ "_shasum": "d0d4685afd5415193c8c7505602d0d17cd64474d",
23
+ "_spec": "nopt@^4.0.1",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
28
25
  "author": {
29
26
  "name": "Isaac Z. Schlueter",
30
27
  "email": "i@izs.me",
@@ -36,10 +33,12 @@
36
33
  "bugs": {
37
34
  "url": "https://github.com/npm/nopt/issues"
38
35
  },
36
+ "bundleDependencies": false,
39
37
  "dependencies": {
40
38
  "abbrev": "1",
41
39
  "osenv": "^0.1.4"
42
40
  },
41
+ "deprecated": false,
43
42
  "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
44
43
  "devDependencies": {
45
44
  "tap": "^8.0.1"
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) npm, Inc. and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -4,6 +4,8 @@ Run this in a node package, and it'll tell you which things in
4
4
  node_modules are bundledDependencies, or transitive dependencies of
5
5
  bundled dependencies.
6
6
 
7
+ [![Build Status](https://travis-ci.org/npm/npm-bundled.svg?branch=master)](https://travis-ci.org/npm/npm-bundled)
8
+
7
9
  ## USAGE
8
10
 
9
11
  To get the list of deps at the top level that are bundled (or
@@ -35,6 +35,7 @@ class BundleWalker extends EE {
35
35
  this.packageJsonCache = opt.packageJsonCache || new Map()
36
36
  }
37
37
 
38
+ this.seen = new Set()
38
39
  this.didDone = false
39
40
  this.children = 0
40
41
  this.node_modules = []
@@ -42,6 +43,18 @@ class BundleWalker extends EE {
42
43
  this.bundle = null
43
44
  }
44
45
 
46
+ addListener (ev, fn) {
47
+ return this.on(ev, fn)
48
+ }
49
+
50
+ on (ev, fn) {
51
+ const ret = super.on(ev, fn)
52
+ if (ev === 'done' && this.didDone) {
53
+ this.emit('done', this.result)
54
+ }
55
+ return ret
56
+ }
57
+
45
58
  done () {
46
59
  if (!this.didDone) {
47
60
  this.didDone = true
@@ -56,7 +69,7 @@ class BundleWalker extends EE {
56
69
  }
57
70
 
58
71
  start () {
59
- const pj = this.path + '/package.json'
72
+ const pj = path.resolve(this.path, 'package.json')
60
73
  if (this.packageJsonCache.has(pj))
61
74
  this.onPackage(this.packageJsonCache.get(pj))
62
75
  else
@@ -114,7 +127,8 @@ class BundleWalker extends EE {
114
127
  }
115
128
 
116
129
  childDep (dep) {
117
- if (this.node_modules.indexOf(dep) !== -1) {
130
+ if (this.node_modules.indexOf(dep) !== -1 && !this.seen.has(dep)) {
131
+ this.seen.add(dep)
118
132
  this.child(dep)
119
133
  } else if (this.parent) {
120
134
  this.parent.childDep(dep)