axe 7.0.2 → 8.1.2
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.
- package/README.md +18 -5
- package/dist/axe.js +3252 -1580
- package/dist/axe.min.js +1 -1
- package/lib/index.js +72 -56
- package/package.json +31 -27
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* [Suppress logs](#suppress-logs)
|
|
26
26
|
* [Stack Traces and Error Handling](#stack-traces-and-error-handling)
|
|
27
27
|
* [Options](#options)
|
|
28
|
+
* [DEPRECATED](#deprecated)
|
|
28
29
|
* [Aliases](#aliases)
|
|
29
30
|
* [Methods](#methods)
|
|
30
31
|
* [Send Logs To Slack](#send-logs-to-slack)
|
|
@@ -164,7 +165,7 @@ axe.info('hello world');
|
|
|
164
165
|
**The browser-ready bundle is only 36 KB (minified and gzipped)**.
|
|
165
166
|
|
|
166
167
|
```html
|
|
167
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,Map,Map.prototype,Math.sign,Promise,Reflect,Symbol,Symbol.iterator,Symbol.prototype,Symbol.toPrimitive,Symbol.toStringTag,Uint32Array,window.crypto,Object.assign,Object.getOwnPropertySymbols,Array.from,Set"></script>
|
|
168
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,Map,Map.prototype,Math.sign,Promise,Reflect,Symbol,Symbol.iterator,Symbol.prototype,Symbol.toPrimitive,Symbol.toStringTag,Uint32Array,window.crypto,Object.assign,Object.getOwnPropertySymbols,Array.from,Set,BigInt,WeakMap,WeakRef,WeakSet"></script>
|
|
168
169
|
<script src="https://unpkg.com/axe"></script>
|
|
169
170
|
<script type="text/javascript">
|
|
170
171
|
(function() {
|
|
@@ -179,7 +180,7 @@ axe.info('hello world');
|
|
|
179
180
|
We recommend using <https://polyfill.io> (specifically with the bundle mentioned in [VanillaJS](#vanillajs) above):
|
|
180
181
|
|
|
181
182
|
```html
|
|
182
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,Map,Map.prototype,Math.sign,Promise,Reflect,Symbol,Symbol.iterator,Symbol.prototype,Symbol.toPrimitive,Symbol.toStringTag,Uint32Array,window.crypto,Object.assign,Object.getOwnPropertySymbols,Array.from,Set"></script>
|
|
183
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,Map,Map.prototype,Math.sign,Promise,Reflect,Symbol,Symbol.iterator,Symbol.prototype,Symbol.toPrimitive,Symbol.toStringTag,Uint32Array,window.crypto,Object.assign,Object.getOwnPropertySymbols,Array.from,Set,BigInt,WeakMap,WeakRef,WeakSet"></script>
|
|
183
184
|
```
|
|
184
185
|
|
|
185
186
|
* Map is not supported in IE 10
|
|
@@ -187,7 +188,6 @@ We recommend using <https://polyfill.io> (specifically with the bundle mentioned
|
|
|
187
188
|
* Math.sign() is not supported in IE 10
|
|
188
189
|
* Promise is not supported in Opera Mobile 12.1, Opera Mini all, IE Mobile 10, IE 10, Blackberry Browser 7
|
|
189
190
|
* Reflect is not supported in IE 10
|
|
190
|
-
* Symbol is not supported in IE 10
|
|
191
191
|
* Symbol.iterator() is not supported in IE 10
|
|
192
192
|
* Symbol.prototype() is not supported in IE 10
|
|
193
193
|
* Symbol.toPrimitive() is not supported in IE 10
|
|
@@ -198,6 +198,11 @@ We recommend using <https://polyfill.io> (specifically with the bundle mentioned
|
|
|
198
198
|
* Object.getOwnPropertySymbols() is not supported in IE 10
|
|
199
199
|
* Array.from() is not supported in IE 10
|
|
200
200
|
* Set is not supported in IE 10
|
|
201
|
+
* Symbol is not supported in IE 10
|
|
202
|
+
* BigInt is not supported in IE 10
|
|
203
|
+
* WeakMap is not supported in IE 10
|
|
204
|
+
* WeakRef is not supported in Opera 81, IE 10
|
|
205
|
+
* WeakSet is not supported in IE 10
|
|
201
206
|
|
|
202
207
|
#### Bundler
|
|
203
208
|
|
|
@@ -296,15 +301,23 @@ Please see Cabin's documentation for [stack traces and error handling](https://g
|
|
|
296
301
|
* `timeout` (Number) - defaults to `5000`, number of milliseconds to wait for a response
|
|
297
302
|
* `retry` (Number) - defaults to `3`, number of attempts to retry sending log over HTTP
|
|
298
303
|
* `showStack` (Boolean) - defaults to `true` (attempts to parse a boolean value from `process.env.SHOW_STACK`) - whether or not to output a stack trace
|
|
299
|
-
* `
|
|
304
|
+
* `meta` (Object) - stores all meta config information
|
|
305
|
+
* `show` (Boolean) - defaults to `true` (attempts to parse a boolean value from `process.env.SHOW_META` – meaning you can pass a flag `SHOW_META=true node app.js` when needed for debugging), whether or not to output metadata to logger methods.
|
|
306
|
+
* `showApp` (Boolean) - defaults to `false` (attempts to parse a boolean value from `process.env.SHOW_META_APP` – meaning you can pass a flag `SHOW_META_APP=true node app.js` when needed for debugging), whether or not to output `appInfo` in the metadata to logger methods.
|
|
307
|
+
* `omittedFields` (Array) - defaults to `[]` (attempts to parse an array value from `process.env.OMIT_META_FIELDS` (`,` delimited) - meaning you can pass a flag `OMIT_META_FIELDS=user,id node app.js`), determining which fields to omit in the metadata passed to logger methods.
|
|
300
308
|
* `silent` (Boolean) - defaults to `false`, whether or not to suppress log output to console
|
|
301
309
|
* `logger` (Object) - defaults to `console` (with [console-polyfill][] added automatically), but you may wish to use a [custom logger](#custom-logger)
|
|
302
310
|
* `name` (String) - the default name for the logger (defaults to `false`, which does not set `logger.name`). If you wish to pass a name such as `os.hostname()`, then set `name: os.hostname()` – this is useful if you are using a logger like `pino` which prefixes log output with the name set here.
|
|
303
311
|
* `level` (String) - the default level of logging to capture (defaults to `info`, which includes all logs including info and higher in severity (e.g. `info`, `warn`, `error`, `fatal`)
|
|
304
|
-
* `capture` (Boolean) - defaults to `false
|
|
312
|
+
* `capture` (Boolean) - defaults to `false`, whether or not to `POST` logs to the `endpoint` (takes into consideration the `config.level` to only send valid capture levels)
|
|
305
313
|
* `callback` (Function) - defaults to `false`, but if it is a `Function`, then it will be called with `callback(level, message, meta)` – this is super useful for [sending messages to Slack when errors occur (see below)](#send-logs-to-slack). Note that if you specify `{ callback: false }` in the meta object when logging, it will prevent the callback function from being invoked (e.g. `axe.error(new Error('Slack callback failed'), { callback: false })` ‐ see below example). The `callback` property is always purged from `meta` object for sanity.
|
|
306
314
|
* `appInfo` (Boolean) - defaults to `true` (attempts to parse a boolean value from `process.env.APP_INFO`) - whether or not to parse application information (using [parse-app-info][]).
|
|
307
315
|
|
|
316
|
+
### DEPRECATED
|
|
317
|
+
|
|
318
|
+
* `showMeta` (Boolean) - defaults to `true` (attempts to parse a boolean value from `process.env.SHOW_META` – meaning you can pass a flag `SHOW_META=true node app.js` when needed for debugging), whether or not to output metadata to logger methods.
|
|
319
|
+
* This will be automatically assigned to `meta.show` when passed as part of config.
|
|
320
|
+
|
|
308
321
|
|
|
309
322
|
## Aliases
|
|
310
323
|
|