fsevents 1.2.7 → 1.2.10

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 (152) hide show
  1. package/.travis.yml +1 -2
  2. package/fsevents.cc +8 -11
  3. package/node_modules/abbrev/package.json +2 -3
  4. package/node_modules/ansi-regex/package.json +1 -1
  5. package/node_modules/aproba/package.json +1 -1
  6. package/node_modules/are-we-there-yet/package.json +1 -1
  7. package/node_modules/balanced-match/package.json +1 -1
  8. package/node_modules/brace-expansion/package.json +1 -1
  9. package/node_modules/chownr/chownr.js +47 -10
  10. package/node_modules/chownr/package.json +7 -7
  11. package/node_modules/code-point-at/package.json +1 -1
  12. package/node_modules/concat-map/package.json +1 -1
  13. package/node_modules/console-control-strings/package.json +1 -1
  14. package/node_modules/core-util-is/package.json +1 -1
  15. package/node_modules/debug/CHANGELOG.md +34 -1
  16. package/node_modules/debug/README.md +188 -63
  17. package/node_modules/debug/dist/debug.js +886 -0
  18. package/node_modules/debug/package.json +28 -26
  19. package/node_modules/debug/src/browser.js +77 -82
  20. package/node_modules/debug/src/common.js +249 -0
  21. package/node_modules/debug/src/index.js +5 -3
  22. package/node_modules/debug/src/node.js +72 -146
  23. package/node_modules/deep-extend/package.json +1 -1
  24. package/node_modules/delegates/package.json +1 -1
  25. package/node_modules/detect-libc/package.json +1 -1
  26. package/node_modules/fs-minipass/index.js +2 -1
  27. package/node_modules/fs-minipass/package.json +13 -10
  28. package/node_modules/fs.realpath/package.json +1 -1
  29. package/node_modules/gauge/package.json +1 -1
  30. package/node_modules/glob/LICENSE +6 -0
  31. package/node_modules/glob/README.md +8 -1
  32. package/node_modules/glob/package.json +9 -6
  33. package/node_modules/has-unicode/package.json +1 -1
  34. package/node_modules/iconv-lite/package.json +1 -1
  35. package/node_modules/ignore-walk/README.md +1 -1
  36. package/node_modules/ignore-walk/index.js +9 -5
  37. package/node_modules/ignore-walk/package.json +11 -8
  38. package/node_modules/inflight/package.json +1 -1
  39. package/node_modules/inherits/inherits.js +2 -0
  40. package/node_modules/inherits/inherits_browser.js +18 -14
  41. package/node_modules/inherits/package.json +9 -11
  42. package/node_modules/ini/package.json +1 -1
  43. package/node_modules/is-fullwidth-code-point/package.json +1 -1
  44. package/node_modules/isarray/package.json +1 -1
  45. package/node_modules/minimatch/package.json +1 -1
  46. package/node_modules/minimist/package.json +1 -1
  47. package/node_modules/minipass/README.md +486 -4
  48. package/node_modules/minipass/index.js +190 -28
  49. package/node_modules/minipass/package.json +17 -14
  50. package/node_modules/minizlib/README.md +36 -27
  51. package/node_modules/minizlib/constants.js +73 -4
  52. package/node_modules/minizlib/index.js +137 -152
  53. package/node_modules/minizlib/package.json +12 -12
  54. package/node_modules/mkdirp/package.json +1 -2
  55. package/node_modules/ms/index.js +29 -19
  56. package/node_modules/ms/package.json +17 -17
  57. package/node_modules/ms/readme.md +18 -9
  58. package/node_modules/needle/README.md +1 -2
  59. package/node_modules/needle/examples/multipart-stream.js +1 -1
  60. package/node_modules/needle/lib/auth.js +1 -1
  61. package/node_modules/needle/lib/multipart.js +1 -1
  62. package/node_modules/needle/lib/needle.js +4 -2
  63. package/node_modules/needle/package.json +13 -13
  64. package/node_modules/needle/test/basic_auth_spec.js +1 -1
  65. package/node_modules/needle/test/cookies_spec.js +2 -2
  66. package/node_modules/needle/test/headers_spec.js +1 -1
  67. package/node_modules/needle/test/output_spec.js +1 -1
  68. package/node_modules/needle/test/post_data_spec.js +20 -20
  69. package/node_modules/needle/test/proxy_spec.js +1 -1
  70. package/node_modules/needle/test/utils/test.js +1 -1
  71. package/node_modules/node-pre-gyp/CHANGELOG.md +10 -0
  72. package/node_modules/node-pre-gyp/README.md +41 -6
  73. package/node_modules/node-pre-gyp/lib/build.js +1 -1
  74. package/node_modules/node-pre-gyp/lib/install.js +20 -8
  75. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
  76. package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
  77. package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
  78. package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
  79. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +48 -0
  80. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
  81. package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
  82. package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
  83. package/node_modules/node-pre-gyp/package.json +11 -11
  84. package/node_modules/nopt/package.json +1 -1
  85. package/node_modules/npm-bundled/index.js +26 -6
  86. package/node_modules/npm-bundled/package.json +9 -6
  87. package/node_modules/npm-normalize-package-bin/.github/settings.yml +2 -0
  88. package/node_modules/npm-normalize-package-bin/.npmignore +24 -0
  89. package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
  90. package/node_modules/npm-normalize-package-bin/README.md +14 -0
  91. package/node_modules/npm-normalize-package-bin/index.js +60 -0
  92. package/node_modules/npm-normalize-package-bin/package-lock.json +3529 -0
  93. package/node_modules/npm-normalize-package-bin/package.json +57 -0
  94. package/node_modules/npm-normalize-package-bin/test/array.js +37 -0
  95. package/node_modules/npm-normalize-package-bin/test/nobin.js +35 -0
  96. package/node_modules/npm-normalize-package-bin/test/object.js +141 -0
  97. package/node_modules/npm-normalize-package-bin/test/string.js +37 -0
  98. package/node_modules/npm-packlist/index.js +76 -16
  99. package/node_modules/npm-packlist/package.json +16 -9
  100. package/node_modules/npmlog/package.json +1 -1
  101. package/node_modules/number-is-nan/package.json +1 -1
  102. package/node_modules/object-assign/package.json +1 -1
  103. package/node_modules/once/package.json +1 -1
  104. package/node_modules/os-homedir/package.json +1 -1
  105. package/node_modules/os-tmpdir/package.json +1 -1
  106. package/node_modules/osenv/package.json +1 -1
  107. package/node_modules/path-is-absolute/package.json +1 -1
  108. package/node_modules/process-nextick-args/index.js +2 -1
  109. package/node_modules/process-nextick-args/package.json +6 -6
  110. package/node_modules/rc/node_modules/minimist/package.json +1 -1
  111. package/node_modules/rc/package.json +1 -1
  112. package/node_modules/readable-stream/package.json +1 -1
  113. package/node_modules/rimraf/package.json +6 -6
  114. package/node_modules/rimraf/rimraf.js +9 -1
  115. package/node_modules/safe-buffer/package.json +1 -1
  116. package/node_modules/safer-buffer/package.json +1 -1
  117. package/node_modules/sax/package.json +1 -1
  118. package/node_modules/semver/CHANGELOG.md +39 -0
  119. package/node_modules/semver/README.md +26 -13
  120. package/node_modules/semver/bin/semver +84 -77
  121. package/node_modules/semver/package.json +14 -8
  122. package/node_modules/semver/semver.js +906 -775
  123. package/node_modules/set-blocking/package.json +1 -1
  124. package/node_modules/signal-exit/package.json +1 -1
  125. package/node_modules/string-width/package.json +1 -1
  126. package/node_modules/string_decoder/package.json +1 -1
  127. package/node_modules/strip-ansi/package.json +1 -1
  128. package/node_modules/strip-json-comments/package.json +1 -1
  129. package/node_modules/tar/lib/large-numbers.js +32 -27
  130. package/node_modules/tar/lib/mkdir.js +2 -2
  131. package/node_modules/tar/lib/parse.js +6 -1
  132. package/node_modules/tar/lib/read-entry.js +4 -0
  133. package/node_modules/tar/lib/write-entry.js +2 -2
  134. package/node_modules/tar/package.json +17 -13
  135. package/node_modules/util-deprecate/package.json +1 -1
  136. package/node_modules/wide-align/package.json +1 -1
  137. package/node_modules/wrappy/package.json +1 -1
  138. package/node_modules/yallist/package.json +11 -11
  139. package/node_modules/yallist/yallist.js +50 -0
  140. package/package.json +5 -8
  141. package/src/constants.cc +20 -20
  142. package/node_modules/debug/.coveralls.yml +0 -1
  143. package/node_modules/debug/.eslintrc +0 -11
  144. package/node_modules/debug/.npmignore +0 -9
  145. package/node_modules/debug/.travis.yml +0 -14
  146. package/node_modules/debug/Makefile +0 -50
  147. package/node_modules/debug/component.json +0 -19
  148. package/node_modules/debug/karma.conf.js +0 -70
  149. package/node_modules/debug/src/debug.js +0 -202
  150. package/node_modules/debug/src/inspector-log.js +0 -15
  151. package/node_modules/needle/note.xml +0 -7
  152. package/node_modules/needle/note.xml.1 +0 -7
@@ -1503,6 +1503,10 @@
1503
1503
  "node_abi": 48,
1504
1504
  "v8": "5.1"
1505
1505
  },
1506
+ "6.14.4": {
1507
+ "node_abi": 48,
1508
+ "v8": "5.1"
1509
+ },
1506
1510
  "7.0.0": {
1507
1511
  "node_abi": 51,
1508
1512
  "v8": "5.4"
@@ -1671,6 +1675,14 @@
1671
1675
  "node_abi": 57,
1672
1676
  "v8": "6.2"
1673
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
+ },
1674
1686
  "9.0.0": {
1675
1687
  "node_abi": 59,
1676
1688
  "v8": "6.2"
@@ -1778,5 +1790,41 @@
1778
1790
  "10.6.0": {
1779
1791
  "node_abi": 64,
1780
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"
1781
1829
  }
1782
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,27 +1,27 @@
1
1
  {
2
- "_from": "node-pre-gyp@^0.10.0",
3
- "_id": "node-pre-gyp@0.10.3",
2
+ "_from": "node-pre-gyp@^0.12.0",
3
+ "_id": "node-pre-gyp@0.12.0",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==",
5
+ "_integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
6
6
  "_location": "/node-pre-gyp",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
9
9
  "type": "range",
10
10
  "registry": true,
11
- "raw": "node-pre-gyp@^0.10.0",
11
+ "raw": "node-pre-gyp@^0.12.0",
12
12
  "name": "node-pre-gyp",
13
13
  "escapedName": "node-pre-gyp",
14
- "rawSpec": "^0.10.0",
14
+ "rawSpec": "^0.12.0",
15
15
  "saveSpec": null,
16
- "fetchSpec": "^0.10.0"
16
+ "fetchSpec": "^0.12.0"
17
17
  },
18
18
  "_requiredBy": [
19
19
  "/"
20
20
  ],
21
- "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz",
22
- "_shasum": "3070040716afdc778747b61b6887bf78880b80fc",
23
- "_spec": "node-pre-gyp@^0.10.0",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents",
21
+ "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
22
+ "_shasum": "39ba4bb1439da030295f899e3b520b7785766149",
23
+ "_spec": "node-pre-gyp@^0.12.0",
24
+ "_where": "/Users/pipobscure/fsevents",
25
25
  "author": {
26
26
  "name": "Dane Springmeyer",
27
27
  "email": "dane@mapbox.com"
@@ -82,5 +82,5 @@
82
82
  "test": "jshint lib lib/util scripts bin/node-pre-gyp && tape test/*test.js",
83
83
  "update-crosswalk": "node scripts/abi_crosswalk.js"
84
84
  },
85
- "version": "0.10.3"
85
+ "version": "0.12.0"
86
86
  }
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
22
22
  "_shasum": "d0d4685afd5415193c8c7505602d0d17cd64474d",
23
23
  "_spec": "nopt@^4.0.1",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/node-pre-gyp",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
25
25
  "author": {
26
26
  "name": "Isaac Z. Schlueter",
27
27
  "email": "i@izs.me",
@@ -10,6 +10,9 @@
10
10
  const fs = require('fs')
11
11
  const path = require('path')
12
12
  const EE = require('events').EventEmitter
13
+ // we don't care about the package bins, but we share a pj cache
14
+ // with other modules that DO care about it, so keep it nice.
15
+ const normalizePackageBin = require('npm-normalize-package-bin')
13
16
 
14
17
  class BundleWalker extends EE {
15
18
  constructor (opt) {
@@ -43,6 +46,18 @@ class BundleWalker extends EE {
43
46
  this.bundle = null
44
47
  }
45
48
 
49
+ addListener (ev, fn) {
50
+ return this.on(ev, fn)
51
+ }
52
+
53
+ on (ev, fn) {
54
+ const ret = super.on(ev, fn)
55
+ if (ev === 'done' && this.didDone) {
56
+ this.emit('done', this.result)
57
+ }
58
+ return ret
59
+ }
60
+
46
61
  done () {
47
62
  if (!this.didDone) {
48
63
  this.didDone = true
@@ -57,7 +72,7 @@ class BundleWalker extends EE {
57
72
  }
58
73
 
59
74
  start () {
60
- const pj = this.path + '/package.json'
75
+ const pj = path.resolve(this.path, 'package.json')
61
76
  if (this.packageJsonCache.has(pj))
62
77
  this.onPackage(this.packageJsonCache.get(pj))
63
78
  else
@@ -72,7 +87,7 @@ class BundleWalker extends EE {
72
87
 
73
88
  onPackageJson (pj, data) {
74
89
  try {
75
- this.package = JSON.parse(data + '')
90
+ this.package = normalizePackageBin(JSON.parse(data + ''))
76
91
  } catch (er) {
77
92
  return this.done()
78
93
  }
@@ -80,17 +95,22 @@ class BundleWalker extends EE {
80
95
  this.onPackage(this.package)
81
96
  }
82
97
 
98
+ allDepsBundled (pkg) {
99
+ return Object.keys(pkg.dependencies || {}).concat(
100
+ Object.keys(pkg.optionalDependencies || {}))
101
+ }
102
+
83
103
  onPackage (pkg) {
84
104
  // all deps are bundled if we got here as a child.
85
105
  // otherwise, only bundle bundledDeps
86
106
  // Get a unique-ified array with a short-lived Set
87
- const bdRaw = this.parent
88
- ? Object.keys(pkg.dependencies || {}).concat(
89
- Object.keys(pkg.optionalDependencies || {}))
107
+ const bdRaw = this.parent ? this.allDepsBundled(pkg)
90
108
  : pkg.bundleDependencies || pkg.bundledDependencies || []
91
109
 
92
110
  const bd = Array.from(new Set(
93
- Array.isArray(bdRaw) ? bdRaw : Object.keys(bdRaw)))
111
+ Array.isArray(bdRaw) ? bdRaw
112
+ : bdRaw === true ? this.allDepsBundled(pkg)
113
+ : Object.keys(bdRaw)))
94
114
 
95
115
  if (!bd.length)
96
116
  return this.done()
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "npm-bundled@^1.0.1",
3
- "_id": "npm-bundled@1.0.5",
3
+ "_id": "npm-bundled@1.1.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==",
5
+ "_integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
6
6
  "_location": "/npm-bundled",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,10 +18,10 @@
18
18
  "_requiredBy": [
19
19
  "/npm-packlist"
20
20
  ],
21
- "_resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz",
22
- "_shasum": "3c1732b7ba936b3a10325aef616467c0ccbcc979",
21
+ "_resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
22
+ "_shasum": "1edd570865a94cdb1bc8220775e29466c9fb234b",
23
23
  "_spec": "npm-bundled@^1.0.1",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npm-packlist",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/npm-packlist",
25
25
  "author": {
26
26
  "name": "Isaac Z. Schlueter",
27
27
  "email": "i@izs.me",
@@ -31,6 +31,9 @@
31
31
  "url": "https://github.com/npm/npm-bundled/issues"
32
32
  },
33
33
  "bundleDependencies": false,
34
+ "dependencies": {
35
+ "npm-normalize-package-bin": "^1.0.1"
36
+ },
34
37
  "deprecated": false,
35
38
  "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
36
39
  "devDependencies": {
@@ -56,5 +59,5 @@
56
59
  "preversion": "npm test",
57
60
  "test": "tap test/*.js -J --100"
58
61
  },
59
- "version": "1.0.5"
62
+ "version": "1.1.1"
60
63
  }
@@ -0,0 +1,2 @@
1
+ ---
2
+ _extends: 'open-source-project-boilerplate'
@@ -0,0 +1,24 @@
1
+ # ignore most things, include some others
2
+ /*
3
+ /.*
4
+
5
+ !bin/
6
+ !lib/
7
+ !docs/
8
+ !package.json
9
+ !package-lock.json
10
+ !README.md
11
+ !CONTRIBUTING.md
12
+ !LICENSE
13
+ !CHANGELOG.md
14
+ !example/
15
+ !scripts/
16
+ !tap-snapshots/
17
+ !test/
18
+ !.github/
19
+ !.travis.yml
20
+ !.gitignore
21
+ !.gitattributes
22
+ !coverage-map.js
23
+ !map.js
24
+ !index.js
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) npm, Inc.
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.
@@ -0,0 +1,14 @@
1
+ # npm-normalize-package-bin
2
+
3
+ Turn any flavor of allowable package.json bin into a normalized object.
4
+
5
+ ## API
6
+
7
+ ```js
8
+ const normalize = require('npm-normalize-package-bin')
9
+ const pkg = {name: 'foo', bin: 'bar'}
10
+ console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}
11
+ ```
12
+
13
+ Also strips out weird dots and slashes to prevent accidental and/or
14
+ malicious bad behavior when the package is installed.
@@ -0,0 +1,60 @@
1
+ // pass in a manifest with a 'bin' field here, and it'll turn it
2
+ // into a properly santized bin object
3
+ const {join, basename} = require('path')
4
+
5
+ const normalize = pkg =>
6
+ !pkg.bin ? removeBin(pkg)
7
+ : typeof pkg.bin === 'string' ? normalizeString(pkg)
8
+ : Array.isArray(pkg.bin) ? normalizeArray(pkg)
9
+ : typeof pkg.bin === 'object' ? normalizeObject(pkg)
10
+ : removeBin(pkg)
11
+
12
+ const normalizeString = pkg => {
13
+ if (!pkg.name)
14
+ return removeBin(pkg)
15
+ pkg.bin = { [pkg.name]: pkg.bin }
16
+ return normalizeObject(pkg)
17
+ }
18
+
19
+ const normalizeArray = pkg => {
20
+ pkg.bin = pkg.bin.reduce((acc, k) => {
21
+ acc[basename(k)] = k
22
+ return acc
23
+ }, {})
24
+ return normalizeObject(pkg)
25
+ }
26
+
27
+ const removeBin = pkg => {
28
+ delete pkg.bin
29
+ return pkg
30
+ }
31
+
32
+ const normalizeObject = pkg => {
33
+ const orig = pkg.bin
34
+ const clean = {}
35
+ let hasBins = false
36
+ Object.keys(orig).forEach(binKey => {
37
+ const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).substr(1)
38
+
39
+ if (typeof orig[binKey] !== 'string' || !base)
40
+ return
41
+
42
+ const binTarget = join('/', orig[binKey])
43
+ .replace(/\\/g, '/').substr(1)
44
+
45
+ if (!binTarget)
46
+ return
47
+
48
+ clean[base] = binTarget
49
+ hasBins = true
50
+ })
51
+
52
+ if (hasBins)
53
+ pkg.bin = clean
54
+ else
55
+ delete pkg.bin
56
+
57
+ return pkg
58
+ }
59
+
60
+ module.exports = normalize