fsevents 1.2.7 → 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 (122) hide show
  1. package/.travis.yml +0 -2
  2. package/node_modules/abbrev/package.json +2 -3
  3. package/node_modules/ansi-regex/package.json +1 -1
  4. package/node_modules/aproba/package.json +1 -1
  5. package/node_modules/are-we-there-yet/package.json +1 -1
  6. package/node_modules/balanced-match/package.json +1 -1
  7. package/node_modules/brace-expansion/package.json +1 -1
  8. package/node_modules/chownr/package.json +1 -1
  9. package/node_modules/code-point-at/package.json +1 -1
  10. package/node_modules/concat-map/package.json +1 -1
  11. package/node_modules/console-control-strings/package.json +1 -1
  12. package/node_modules/core-util-is/package.json +1 -1
  13. package/node_modules/debug/CHANGELOG.md +34 -1
  14. package/node_modules/debug/README.md +206 -63
  15. package/node_modules/debug/dist/debug.js +912 -0
  16. package/node_modules/debug/package.json +40 -26
  17. package/node_modules/debug/src/browser.js +185 -106
  18. package/node_modules/debug/src/common.js +266 -0
  19. package/node_modules/debug/src/index.js +4 -4
  20. package/node_modules/debug/src/node.js +174 -165
  21. package/node_modules/deep-extend/package.json +1 -1
  22. package/node_modules/delegates/package.json +1 -1
  23. package/node_modules/detect-libc/package.json +1 -1
  24. package/node_modules/fs-minipass/package.json +1 -1
  25. package/node_modules/fs.realpath/package.json +1 -1
  26. package/node_modules/gauge/package.json +1 -1
  27. package/node_modules/glob/package.json +1 -1
  28. package/node_modules/has-unicode/package.json +1 -1
  29. package/node_modules/iconv-lite/package.json +1 -1
  30. package/node_modules/ignore-walk/package.json +1 -1
  31. package/node_modules/inflight/package.json +1 -1
  32. package/node_modules/inherits/package.json +2 -4
  33. package/node_modules/ini/package.json +1 -1
  34. package/node_modules/is-fullwidth-code-point/package.json +1 -1
  35. package/node_modules/isarray/package.json +1 -1
  36. package/node_modules/minimatch/package.json +1 -1
  37. package/node_modules/minimist/package.json +1 -1
  38. package/node_modules/minipass/package.json +1 -1
  39. package/node_modules/minizlib/package.json +1 -1
  40. package/node_modules/mkdirp/package.json +1 -2
  41. package/node_modules/ms/index.js +28 -18
  42. package/node_modules/ms/package.json +17 -17
  43. package/node_modules/ms/readme.md +17 -8
  44. package/node_modules/needle/.npmignore +6 -0
  45. package/node_modules/needle/README.md +1 -2
  46. package/node_modules/needle/examples/multipart-stream.js +1 -1
  47. package/node_modules/needle/lib/auth.js +1 -1
  48. package/node_modules/needle/lib/multipart.js +1 -1
  49. package/node_modules/needle/lib/needle.js +2 -2
  50. package/node_modules/needle/package-lock.json +395 -0
  51. package/node_modules/needle/package.json +13 -13
  52. package/node_modules/needle/test/basic_auth_spec.js +1 -1
  53. package/node_modules/needle/test/cookies_spec.js +2 -2
  54. package/node_modules/needle/test/keys/ssl.cert +21 -0
  55. package/node_modules/needle/test/keys/ssl.key +27 -0
  56. package/node_modules/needle/test/output_spec.js +1 -1
  57. package/node_modules/needle/test/post_data_spec.js +20 -20
  58. package/node_modules/needle/test/proxy_spec.js +1 -1
  59. package/node_modules/needle/test/utils/test.js +1 -1
  60. package/node_modules/node-pre-gyp/CHANGELOG.md +10 -0
  61. package/node_modules/node-pre-gyp/README.md +41 -6
  62. package/node_modules/node-pre-gyp/lib/build.js +1 -1
  63. package/node_modules/node-pre-gyp/lib/install.js +20 -8
  64. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
  65. package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
  66. package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
  67. package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
  68. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +48 -0
  69. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
  70. package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
  71. package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
  72. package/node_modules/node-pre-gyp/package.json +13 -12
  73. package/node_modules/nopt/package.json +1 -1
  74. package/node_modules/npm-bundled/index.js +13 -1
  75. package/node_modules/npm-bundled/package.json +6 -6
  76. package/node_modules/npm-packlist/index.js +29 -8
  77. package/node_modules/npm-packlist/package.json +6 -6
  78. package/node_modules/npmlog/package.json +1 -1
  79. package/node_modules/number-is-nan/package.json +1 -1
  80. package/node_modules/object-assign/package.json +1 -1
  81. package/node_modules/once/package.json +1 -1
  82. package/node_modules/os-homedir/package.json +1 -1
  83. package/node_modules/os-tmpdir/package.json +1 -1
  84. package/node_modules/osenv/package.json +1 -1
  85. package/node_modules/path-is-absolute/package.json +1 -1
  86. package/node_modules/process-nextick-args/package.json +1 -1
  87. package/node_modules/rc/node_modules/minimist/package.json +1 -1
  88. package/node_modules/rc/package.json +1 -1
  89. package/node_modules/readable-stream/package.json +1 -1
  90. package/node_modules/rimraf/package.json +1 -1
  91. package/node_modules/safe-buffer/package.json +1 -1
  92. package/node_modules/safer-buffer/package.json +1 -1
  93. package/node_modules/sax/package.json +1 -1
  94. package/node_modules/semver/CHANGELOG.md +39 -0
  95. package/node_modules/semver/README.md +14 -2
  96. package/node_modules/semver/bin/semver +84 -77
  97. package/node_modules/semver/package.json +14 -8
  98. package/node_modules/semver/semver.js +906 -775
  99. package/node_modules/set-blocking/package.json +1 -1
  100. package/node_modules/signal-exit/package.json +1 -1
  101. package/node_modules/string-width/package.json +1 -1
  102. package/node_modules/string_decoder/package.json +1 -1
  103. package/node_modules/strip-ansi/package.json +1 -1
  104. package/node_modules/strip-json-comments/package.json +1 -1
  105. package/node_modules/tar/package.json +1 -1
  106. package/node_modules/util-deprecate/package.json +1 -1
  107. package/node_modules/wide-align/package.json +1 -1
  108. package/node_modules/wrappy/package.json +1 -1
  109. package/node_modules/yallist/package.json +1 -1
  110. package/package.json +5 -8
  111. package/node_modules/debug/.coveralls.yml +0 -1
  112. package/node_modules/debug/.eslintrc +0 -11
  113. package/node_modules/debug/.npmignore +0 -9
  114. package/node_modules/debug/.travis.yml +0 -14
  115. package/node_modules/debug/Makefile +0 -50
  116. package/node_modules/debug/component.json +0 -19
  117. package/node_modules/debug/karma.conf.js +0 -70
  118. package/node_modules/debug/node.js +0 -1
  119. package/node_modules/debug/src/debug.js +0 -202
  120. package/node_modules/debug/src/inspector-log.js +0 -15
  121. package/node_modules/needle/note.xml +0 -7
  122. package/node_modules/needle/note.xml.1 +0 -7
@@ -1,27 +1,27 @@
1
1
  {
2
- "_from": "debug@^2.1.2",
3
- "_id": "debug@2.6.9",
2
+ "_from": "debug@^4.1.0",
3
+ "_id": "debug@4.1.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
5
+ "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
6
6
  "_location": "/debug",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
9
9
  "type": "range",
10
10
  "registry": true,
11
- "raw": "debug@^2.1.2",
11
+ "raw": "debug@^4.1.0",
12
12
  "name": "debug",
13
13
  "escapedName": "debug",
14
- "rawSpec": "^2.1.2",
14
+ "rawSpec": "^4.1.0",
15
15
  "saveSpec": null,
16
- "fetchSpec": "^2.1.2"
16
+ "fetchSpec": "^4.1.0"
17
17
  },
18
18
  "_requiredBy": [
19
19
  "/needle"
20
20
  ],
21
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
22
- "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
23
- "_spec": "debug@^2.1.2",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/needle",
21
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
22
+ "_shasum": "3b72260255109c6b589cee050f1d516139664791",
23
+ "_spec": "debug@^4.1.0",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/needle",
25
25
  "author": {
26
26
  "name": "TJ Holowaychuk",
27
27
  "email": "tj@vision-media.ca"
@@ -31,12 +31,6 @@
31
31
  "url": "https://github.com/visionmedia/debug/issues"
32
32
  },
33
33
  "bundleDependencies": false,
34
- "component": {
35
- "scripts": {
36
- "debug/index.js": "browser.js",
37
- "debug/debug.js": "debug.js"
38
- }
39
- },
40
34
  "contributors": [
41
35
  {
42
36
  "name": "Nathan Rajlich",
@@ -49,28 +43,34 @@
49
43
  }
50
44
  ],
51
45
  "dependencies": {
52
- "ms": "2.0.0"
46
+ "ms": "^2.1.1"
53
47
  },
54
48
  "deprecated": false,
55
49
  "description": "small debugging utility",
56
50
  "devDependencies": {
57
- "browserify": "9.0.3",
51
+ "@babel/cli": "^7.0.0",
52
+ "@babel/core": "^7.0.0",
53
+ "@babel/preset-env": "^7.0.0",
54
+ "browserify": "14.4.0",
58
55
  "chai": "^3.5.0",
59
56
  "concurrently": "^3.1.0",
60
- "coveralls": "^2.11.15",
61
- "eslint": "^3.12.1",
57
+ "coveralls": "^3.0.2",
62
58
  "istanbul": "^0.4.5",
63
- "karma": "^1.3.0",
59
+ "karma": "^3.0.0",
64
60
  "karma-chai": "^0.1.0",
65
61
  "karma-mocha": "^1.3.0",
66
62
  "karma-phantomjs-launcher": "^1.0.2",
67
- "karma-sinon": "^1.0.5",
68
- "mocha": "^3.2.0",
63
+ "mocha": "^5.2.0",
69
64
  "mocha-lcov-reporter": "^1.2.0",
70
65
  "rimraf": "^2.5.4",
71
- "sinon": "^1.17.6",
72
- "sinon-chai": "^2.8.0"
66
+ "xo": "^0.23.0"
73
67
  },
68
+ "files": [
69
+ "src",
70
+ "dist/debug.js",
71
+ "LICENSE",
72
+ "README.md"
73
+ ],
74
74
  "homepage": "https://github.com/visionmedia/debug#readme",
75
75
  "keywords": [
76
76
  "debug",
@@ -84,5 +84,19 @@
84
84
  "type": "git",
85
85
  "url": "git://github.com/visionmedia/debug.git"
86
86
  },
87
- "version": "2.6.9"
87
+ "scripts": {
88
+ "build": "npm run build:debug && npm run build:test",
89
+ "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js",
90
+ "build:test": "babel -d dist test.js",
91
+ "clean": "rimraf dist coverage",
92
+ "lint": "xo",
93
+ "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .",
94
+ "pretest:browser": "npm run build",
95
+ "test": "npm run test:node && npm run test:browser",
96
+ "test:browser": "karma start --single-run",
97
+ "test:coverage": "cat ./coverage/lcov.info | coveralls",
98
+ "test:node": "istanbul cover _mocha -- test.js"
99
+ },
100
+ "unpkg": "./dist/debug.js",
101
+ "version": "4.1.1"
88
102
  }
@@ -1,31 +1,97 @@
1
+ /* eslint-env browser */
2
+
1
3
  /**
2
4
  * This is the web browser implementation of `debug()`.
3
- *
4
- * Expose `debug()` as the module.
5
5
  */
6
6
 
7
- exports = module.exports = require('./debug');
8
7
  exports.log = log;
9
8
  exports.formatArgs = formatArgs;
10
9
  exports.save = save;
11
10
  exports.load = load;
12
11
  exports.useColors = useColors;
13
- exports.storage = 'undefined' != typeof chrome
14
- && 'undefined' != typeof chrome.storage
15
- ? chrome.storage.local
16
- : localstorage();
12
+ exports.storage = localstorage();
17
13
 
18
14
  /**
19
15
  * Colors.
20
16
  */
21
17
 
22
18
  exports.colors = [
23
- 'lightseagreen',
24
- 'forestgreen',
25
- 'goldenrod',
26
- 'dodgerblue',
27
- 'darkorchid',
28
- 'crimson'
19
+ '#0000CC',
20
+ '#0000FF',
21
+ '#0033CC',
22
+ '#0033FF',
23
+ '#0066CC',
24
+ '#0066FF',
25
+ '#0099CC',
26
+ '#0099FF',
27
+ '#00CC00',
28
+ '#00CC33',
29
+ '#00CC66',
30
+ '#00CC99',
31
+ '#00CCCC',
32
+ '#00CCFF',
33
+ '#3300CC',
34
+ '#3300FF',
35
+ '#3333CC',
36
+ '#3333FF',
37
+ '#3366CC',
38
+ '#3366FF',
39
+ '#3399CC',
40
+ '#3399FF',
41
+ '#33CC00',
42
+ '#33CC33',
43
+ '#33CC66',
44
+ '#33CC99',
45
+ '#33CCCC',
46
+ '#33CCFF',
47
+ '#6600CC',
48
+ '#6600FF',
49
+ '#6633CC',
50
+ '#6633FF',
51
+ '#66CC00',
52
+ '#66CC33',
53
+ '#9900CC',
54
+ '#9900FF',
55
+ '#9933CC',
56
+ '#9933FF',
57
+ '#99CC00',
58
+ '#99CC33',
59
+ '#CC0000',
60
+ '#CC0033',
61
+ '#CC0066',
62
+ '#CC0099',
63
+ '#CC00CC',
64
+ '#CC00FF',
65
+ '#CC3300',
66
+ '#CC3333',
67
+ '#CC3366',
68
+ '#CC3399',
69
+ '#CC33CC',
70
+ '#CC33FF',
71
+ '#CC6600',
72
+ '#CC6633',
73
+ '#CC9900',
74
+ '#CC9933',
75
+ '#CCCC00',
76
+ '#CCCC33',
77
+ '#FF0000',
78
+ '#FF0033',
79
+ '#FF0066',
80
+ '#FF0099',
81
+ '#FF00CC',
82
+ '#FF00FF',
83
+ '#FF3300',
84
+ '#FF3333',
85
+ '#FF3366',
86
+ '#FF3399',
87
+ '#FF33CC',
88
+ '#FF33FF',
89
+ '#FF6600',
90
+ '#FF6633',
91
+ '#FF9900',
92
+ '#FF9933',
93
+ '#FFCC00',
94
+ '#FFCC33'
29
95
  ];
30
96
 
31
97
  /**
@@ -36,38 +102,31 @@ exports.colors = [
36
102
  * TODO: add a `localStorage` variable to explicitly enable/disable colors
37
103
  */
38
104
 
105
+ // eslint-disable-next-line complexity
39
106
  function useColors() {
40
- // NB: In an Electron preload script, document will be defined but not fully
41
- // initialized. Since we know we're in Chrome, we'll just detect this case
42
- // explicitly
43
- if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
44
- return true;
45
- }
46
-
47
- // is webkit? http://stackoverflow.com/a/16459606/376773
48
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
49
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
50
- // is firebug? http://stackoverflow.com/a/398120/376773
51
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
52
- // is firefox >= v31?
53
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
54
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
55
- // double check webkit in userAgent just in case we are in a worker
56
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
57
- }
58
-
59
- /**
60
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
61
- */
107
+ // NB: In an Electron preload script, document will be defined but not fully
108
+ // initialized. Since we know we're in Chrome, we'll just detect this case
109
+ // explicitly
110
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
111
+ return true;
112
+ }
62
113
 
63
- exports.formatters.j = function(v) {
64
- try {
65
- return JSON.stringify(v);
66
- } catch (err) {
67
- return '[UnexpectedJSONParseError]: ' + err.message;
68
- }
69
- };
114
+ // Internet Explorer and Edge do not support colors.
115
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
116
+ return false;
117
+ }
70
118
 
119
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
120
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
121
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
122
+ // Is firebug? http://stackoverflow.com/a/398120/376773
123
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
124
+ // Is firefox >= v31?
125
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
126
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
127
+ // Double check webkit in userAgent just in case we are in a worker
128
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
129
+ }
71
130
 
72
131
  /**
73
132
  * Colorize log arguments if enabled.
@@ -76,36 +135,38 @@ exports.formatters.j = function(v) {
76
135
  */
77
136
 
78
137
  function formatArgs(args) {
79
- var useColors = this.useColors;
80
-
81
- args[0] = (useColors ? '%c' : '')
82
- + this.namespace
83
- + (useColors ? ' %c' : ' ')
84
- + args[0]
85
- + (useColors ? '%c ' : ' ')
86
- + '+' + exports.humanize(this.diff);
87
-
88
- if (!useColors) return;
89
-
90
- var c = 'color: ' + this.color;
91
- args.splice(1, 0, c, 'color: inherit')
92
-
93
- // the final "%c" is somewhat tricky, because there could be other
94
- // arguments passed either before or after the %c, so we need to
95
- // figure out the correct index to insert the CSS into
96
- var index = 0;
97
- var lastC = 0;
98
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
99
- if ('%%' === match) return;
100
- index++;
101
- if ('%c' === match) {
102
- // we only are interested in the *last* %c
103
- // (the user may have provided their own)
104
- lastC = index;
105
- }
106
- });
107
-
108
- args.splice(lastC, 0, c);
138
+ args[0] = (this.useColors ? '%c' : '') +
139
+ this.namespace +
140
+ (this.useColors ? ' %c' : ' ') +
141
+ args[0] +
142
+ (this.useColors ? '%c ' : ' ') +
143
+ '+' + module.exports.humanize(this.diff);
144
+
145
+ if (!this.useColors) {
146
+ return;
147
+ }
148
+
149
+ const c = 'color: ' + this.color;
150
+ args.splice(1, 0, c, 'color: inherit');
151
+
152
+ // The final "%c" is somewhat tricky, because there could be other
153
+ // arguments passed either before or after the %c, so we need to
154
+ // figure out the correct index to insert the CSS into
155
+ let index = 0;
156
+ let lastC = 0;
157
+ args[0].replace(/%[a-zA-Z%]/g, match => {
158
+ if (match === '%%') {
159
+ return;
160
+ }
161
+ index++;
162
+ if (match === '%c') {
163
+ // We only are interested in the *last* %c
164
+ // (the user may have provided their own)
165
+ lastC = index;
166
+ }
167
+ });
168
+
169
+ args.splice(lastC, 0, c);
109
170
  }
110
171
 
111
172
  /**
@@ -114,13 +175,12 @@ function formatArgs(args) {
114
175
  *
115
176
  * @api public
116
177
  */
117
-
118
- function log() {
119
- // this hackery is required for IE8/9, where
120
- // the `console.log` function doesn't have 'apply'
121
- return 'object' === typeof console
122
- && console.log
123
- && Function.prototype.apply.call(console.log, console, arguments);
178
+ function log(...args) {
179
+ // This hackery is required for IE8/9, where
180
+ // the `console.log` function doesn't have 'apply'
181
+ return typeof console === 'object' &&
182
+ console.log &&
183
+ console.log(...args);
124
184
  }
125
185
 
126
186
  /**
@@ -129,15 +189,17 @@ function log() {
129
189
  * @param {String} namespaces
130
190
  * @api private
131
191
  */
132
-
133
192
  function save(namespaces) {
134
- try {
135
- if (null == namespaces) {
136
- exports.storage.removeItem('debug');
137
- } else {
138
- exports.storage.debug = namespaces;
139
- }
140
- } catch(e) {}
193
+ try {
194
+ if (namespaces) {
195
+ exports.storage.setItem('debug', namespaces);
196
+ } else {
197
+ exports.storage.removeItem('debug');
198
+ }
199
+ } catch (error) {
200
+ // Swallow
201
+ // XXX (@Qix-) should we be logging these?
202
+ }
141
203
  }
142
204
 
143
205
  /**
@@ -146,27 +208,23 @@ function save(namespaces) {
146
208
  * @return {String} returns the previously persisted debug modes
147
209
  * @api private
148
210
  */
149
-
150
211
  function load() {
151
- var r;
152
- try {
153
- r = exports.storage.debug;
154
- } catch(e) {}
212
+ let r;
213
+ try {
214
+ r = exports.storage.getItem('debug');
215
+ } catch (error) {
216
+ // Swallow
217
+ // XXX (@Qix-) should we be logging these?
218
+ }
155
219
 
156
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
157
- if (!r && typeof process !== 'undefined' && 'env' in process) {
158
- r = process.env.DEBUG;
159
- }
220
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
221
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
222
+ r = process.env.DEBUG;
223
+ }
160
224
 
161
- return r;
225
+ return r;
162
226
  }
163
227
 
164
- /**
165
- * Enable namespaces listed in `localStorage.debug` initially.
166
- */
167
-
168
- exports.enable(load());
169
-
170
228
  /**
171
229
  * Localstorage attempts to return the localstorage.
172
230
  *
@@ -179,7 +237,28 @@ exports.enable(load());
179
237
  */
180
238
 
181
239
  function localstorage() {
182
- try {
183
- return window.localStorage;
184
- } catch (e) {}
240
+ try {
241
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
242
+ // The Browser also has localStorage in the global context.
243
+ return localStorage;
244
+ } catch (error) {
245
+ // Swallow
246
+ // XXX (@Qix-) should we be logging these?
247
+ }
185
248
  }
249
+
250
+ module.exports = require('./common')(exports);
251
+
252
+ const {formatters} = module.exports;
253
+
254
+ /**
255
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
256
+ */
257
+
258
+ formatters.j = function (v) {
259
+ try {
260
+ return JSON.stringify(v);
261
+ } catch (error) {
262
+ return '[UnexpectedJSONParseError]: ' + error.message;
263
+ }
264
+ };