From bc0d44ca81dce48961c81bf2d1cc268d9c99d2df Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 9 Oct 2017 07:08:06 +0300 Subject: [PATCH] Upgrade eslint to 4.8.0 (#445) * Upgrade eslint * Fix post-merge errors --- .eslintrc | 3 + js/automation-editor/automation.js | 4 +- js/automation-editor/trigger/numeric_state.js | 4 +- .../component/condition/numeric_state.js | 4 +- js/common/component/condition/sun.js | 4 +- js/common/component/script/action_edit.js | 1 - js/common/component/script/action_row.js | 1 - package.json | 6 +- .../automation/ha-automation-editor.html | 32 +- .../automation/ha-automation-picker.html | 3 +- .../config/cloud/ha-config-cloud-account.html | 3 +- .../ha-config-cloud-forgot-password.html | 37 +- .../config/cloud/ha-config-cloud-login.html | 44 +- .../cloud/ha-config-cloud-register.html | 41 +- panels/config/core/ha-config-core.html | 1 - .../config/core/ha-config-section-core.html | 1 - .../config/core/ha-config-section-group.html | 1 - .../core/ha-config-section-hassbian.html | 1 - .../config/core/ha-config-section-themes.html | 1 - panels/config/core/ha-form-group.html | 1 - .../customize/ha-customize-attribute.html | 1 - .../ha-form-customize-attributes.html | 1 - .../config/customize/ha-form-customize.html | 43 +- .../customize/types/ha-customize-array.html | 2 - .../customize/types/ha-customize-boolean.html | 1 - .../customize/types/ha-customize-icon.html | 1 - .../types/ha-customize-key-value.html | 1 - .../customize/types/ha-customize-string.html | 1 - .../dashboard/ha-config-navigation.html | 6 +- panels/config/ha-panel-config.html | 4 +- panels/config/script/ha-script-editor.html | 32 +- panels/config/script/ha-script-picker.html | 3 +- panels/config/zwave/ha-config-zwave.html | 48 +-- panels/config/zwave/zwave-groups.html | 25 +- panels/config/zwave/zwave-node-config.html | 31 +- panels/config/zwave/zwave-usercodes.html | 31 +- panels/config/zwave/zwave-values.html | 19 +- panels/dev-info/ha-panel-dev-info.html | 7 +- panels/history/ha-panel-history.html | 3 +- panels/map/ha-panel-map.html | 10 +- src/cards/ha-camera-card.html | 3 +- src/cards/ha-card-chooser.html | 6 +- src/cards/ha-weather-card.html | 3 +- src/components/entity/ha-entity-toggle.html | 3 +- .../entity/ha-state-label-badge.html | 2 +- src/components/ha-attributes.html | 7 +- src/components/ha-cards.html | 24 +- src/components/ha-climate-control.html | 3 +- .../ha-push-notifications-toggle.html | 3 +- src/components/ha-sidebar.html | 1 - src/components/state-history-chart-line.html | 32 +- .../state-history-chart-timeline.html | 21 +- src/data/ha-state-history-data.html | 73 ++-- src/dialogs/more-info-dialog.html | 4 +- src/home-assistant.html | 50 +-- src/layouts/partial-cards.html | 3 +- src/layouts/partial-panel-resolver.html | 18 +- src/more-infos/more-info-climate.html | 30 +- src/more-infos/more-info-content.html | 3 +- src/more-infos/more-info-fan.html | 7 +- src/more-infos/more-info-group.html | 5 +- src/more-infos/more-info-light.html | 6 +- src/state-summary/state-card-content.html | 4 +- .../state-card-input_number.html | 1 - src/state-summary/state-card-input_text.html | 1 - src/state-summary/state-card-scene.html | 3 +- src/state-summary/state-card-script.html | 3 +- src/util/cover-model.html | 6 +- src/util/hass-attributes-util.html | 15 +- src/util/hass-call-api.html | 2 +- src/util/hass-mixins.html | 39 +- src/util/hass-util.html | 39 +- src/util/media-player-model.html | 9 +- yarn.lock | 398 ++++++++++-------- 74 files changed, 651 insertions(+), 639 deletions(-) diff --git a/.eslintrc b/.eslintrc index 452fbe9d41..fa07caaf99 100644 --- a/.eslintrc +++ b/.eslintrc @@ -40,6 +40,9 @@ "no-multi-assign": 0, "radix": 0, "no-alert": 0, + "prefer-destructuring": 0, + "no-restricted-globals": 0, + "prefer-promise-reject-errors": 0, "import/prefer-default-export": 0, "react/jsx-no-bind": [2, { "ignoreRefs": true }], "react/jsx-no-duplicate-props": 2, diff --git a/js/automation-editor/automation.js b/js/automation-editor/automation.js index 12108f46e2..7e65380a95 100644 --- a/js/automation-editor/automation.js +++ b/js/automation-editor/automation.js @@ -43,7 +43,9 @@ export default class Automation extends Component { } render({ automation, isWide }) { - const { alias, trigger, condition, action } = automation; + const { + alias, trigger, condition, action + } = automation; return (
diff --git a/js/automation-editor/trigger/numeric_state.js b/js/automation-editor/trigger/numeric_state.js index 47659fe1d7..983dd4abac 100644 --- a/js/automation-editor/trigger/numeric_state.js +++ b/js/automation-editor/trigger/numeric_state.js @@ -11,7 +11,9 @@ export default class NumericStateTrigger extends Component { /* eslint-disable camelcase */ render({ trigger }) { - const { value_template, entity_id, below, above } = trigger; + const { + value_template, entity_id, below, above + } = trigger; return (
diff --git a/js/common/component/script/action_edit.js b/js/common/component/script/action_edit.js index b470308899..cc52a1fd46 100644 --- a/js/common/component/script/action_edit.js +++ b/js/common/component/script/action_edit.js @@ -74,5 +74,4 @@ export default class Action extends Component {
); } - } diff --git a/js/common/component/script/action_row.js b/js/common/component/script/action_row.js index 235fa4e337..841b90387a 100644 --- a/js/common/component/script/action_row.js +++ b/js/common/component/script/action_row.js @@ -42,5 +42,4 @@ export default class Action extends Component { ); } - } diff --git a/package.json b/package.json index 0b50292d74..841b657edc 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "bower": "^1.8.2", "css-slam": "^2.0.2", "del": "^3.0.0", - "eslint": "^3.19.0", - "eslint-config-airbnb-base": "^11.1.3", - "eslint-plugin-html": "^2.0.1", + "eslint": "^4.8.0", + "eslint-config-airbnb-base": "^12.0.2", + "eslint-plugin-html": "^3.2.2", "eslint-plugin-import": "^2.2.0", "eslint-plugin-react": "^7.0.0", "gulp": "^3.9.1", diff --git a/panels/config/automation/ha-automation-editor.html b/panels/config/automation/ha-automation-editor.html index 837ffac19d..d51e87c2c3 100644 --- a/panels/config/automation/ha-automation-editor.html +++ b/panels/config/automation/ha-automation-editor.html @@ -239,28 +239,26 @@ Polymer({ }, _updateComponent: function () { - this._rendered = window.AutomationEditor( - this.$.root, { - automation: this.config, - onChange: this.configChanged, - isWide: this.isWide, - }, this._rendered); + this._rendered = window.AutomationEditor(this.$.root, { + automation: this.config, + onChange: this.configChanged, + isWide: this.isWide, + }, this._rendered); }, saveAutomation: function () { var id = this.creatingNew ? '' + Date.now() : this.automation.attributes.id; - this.hass.callApi( - 'post', 'config/automation/config/' + id, this.config).then(function () { - this.dirty = false; + this.hass.callApi('post', 'config/automation/config/' + id, this.config).then(function () { + this.dirty = false; - if (this.creatingNew) { - history.replaceState(null, null, '/config/automation/edit/' + id); - this.fire('location-changed'); - } - }.bind(this), function (errors) { - this.errors = errors.body.message; - throw errors; - }.bind(this)); + if (this.creatingNew) { + history.replaceState(null, null, '/config/automation/edit/' + id); + this.fire('location-changed'); + } + }.bind(this), function (errors) { + this.errors = errors.body.message; + throw errors; + }.bind(this)); }, computeName: function (automation) { diff --git a/panels/config/automation/ha-automation-picker.html b/panels/config/automation/ha-automation-picker.html index c1e9dd1cd1..b0bc4f7c23 100644 --- a/panels/config/automation/ha-automation-picker.html +++ b/panels/config/automation/ha-automation-picker.html @@ -119,8 +119,7 @@ Polymer({ }, automationTapped: function (ev) { - history.pushState( - null, null, '/config/automation/edit/' + this.automations[ev.model.index].attributes.id); + history.pushState(null, null, '/config/automation/edit/' + this.automations[ev.model.index].attributes.id); this.fire('location-changed'); }, diff --git a/panels/config/cloud/ha-config-cloud-account.html b/panels/config/cloud/ha-config-cloud-account.html index 72bbd1ed14..937baafdcf 100644 --- a/panels/config/cloud/ha-config-cloud-account.html +++ b/panels/config/cloud/ha-config-cloud-account.html @@ -74,8 +74,7 @@ class HaConfigCloudAccount extends window.hassMixins.EventsMixin(Polymer.Element } handleLogout() { - this.hass.callApi('post', 'cloud/logout').then( - () => this.fire('ha-account-refreshed', { account: null })); + this.hass.callApi('post', 'cloud/logout').then(() => this.fire('ha-account-refreshed', { account: null })); } } diff --git a/panels/config/cloud/ha-config-cloud-forgot-password.html b/panels/config/cloud/ha-config-cloud-forgot-password.html index 33febe1ff8..8f48f1abc7 100644 --- a/panels/config/cloud/ha-config-cloud-forgot-password.html +++ b/panels/config/cloud/ha-config-cloud-forgot-password.html @@ -113,8 +113,7 @@ diff --git a/panels/config/customize/types/ha-customize-boolean.html b/panels/config/customize/types/ha-customize-boolean.html index 8cb8619fd4..2e48e54983 100644 --- a/panels/config/customize/types/ha-customize-boolean.html +++ b/panels/config/customize/types/ha-customize-boolean.html @@ -14,7 +14,6 @@ diff --git a/panels/config/zwave/zwave-usercodes.html b/panels/config/zwave/zwave-usercodes.html index e424545a0f..1d89068785 100644 --- a/panels/config/zwave/zwave-usercodes.html +++ b/panels/config/zwave/zwave-usercodes.html @@ -145,13 +145,17 @@ Polymer({ var valueData = null; if (type === 'Add') { valueData = selectedUserCodeValue; - serviceData = { node_id: this.nodes[this.selectedNode].attributes.node_id, + serviceData = { + node_id: this.nodes[this.selectedNode].attributes.node_id, code_slot: this.selectedUserCode, - usercode: valueData }; + usercode: valueData + }; } if (type === 'Delete') { - serviceData = { node_id: this.nodes[this.selectedNode].attributes.node_id, - code_slot: this.selectedUserCode }; + serviceData = { + node_id: this.nodes[this.selectedNode].attributes.node_id, + code_slot: this.selectedUserCode + }; } return serviceData; }, @@ -159,17 +163,16 @@ Polymer({ refreshUserCodes: function (selectedNode) { this.selectedUserCodeValue = ''; var userCodes = []; - this.hass.callApi('GET', 'zwave/usercodes/' + this.nodes[selectedNode].attributes.node_id).then( - function (usercodes) { - Object.keys(usercodes).forEach(function (key) { - userCodes.push({ - key: key, - value: usercodes[key], - }); + this.hass.callApi('GET', 'zwave/usercodes/' + this.nodes[selectedNode].attributes.node_id).then(function (usercodes) { + Object.keys(usercodes).forEach(function (key) { + userCodes.push({ + key: key, + value: usercodes[key], }); - this.userCodes = userCodes; - this.selectedUserCodeChanged(this.selectedUserCode); - }.bind(this)); + }); + this.userCodes = userCodes; + this.selectedUserCodeChanged(this.selectedUserCode); + }.bind(this)); }, }); diff --git a/panels/config/zwave/zwave-values.html b/panels/config/zwave/zwave-values.html index bc86ff9e1b..cc9a261da1 100644 --- a/panels/config/zwave/zwave-values.html +++ b/panels/config/zwave/zwave-values.html @@ -122,17 +122,16 @@ Polymer({ refreshValues: function (selectedNode) { var valueData = []; - this.hass.callApi('GET', 'zwave/values/' + this.nodes[selectedNode].attributes.node_id).then( - function (values) { - Object.keys(values).forEach(function (key) { - valueData.push({ - key: key, - value: values[key], - }); + this.hass.callApi('GET', 'zwave/values/' + this.nodes[selectedNode].attributes.node_id).then(function (values) { + Object.keys(values).forEach(function (key) { + valueData.push({ + key: key, + value: values[key], }); - this.values = valueData; - this.selectedValueChanged(this.selectedValue); - }.bind(this)); + }); + this.values = valueData; + this.selectedValueChanged(this.selectedValue); + }.bind(this)); }, computeValueNameServiceData: function (newValueNameInput) { diff --git a/panels/dev-info/ha-panel-dev-info.html b/panels/dev-info/ha-panel-dev-info.html index 68c58fd00b..7c55d54bdf 100644 --- a/panels/dev-info/ha-panel-dev-info.html +++ b/panels/dev-info/ha-panel-dev-info.html @@ -141,10 +141,9 @@ Polymer({ this.errorLog = 'Loading error log…'; - this.hass.callApi('GET', 'error_log').then( - function (log) { - this.errorLog = log || 'No errors have been reported.'; - }.bind(this)); + this.hass.callApi('GET', 'error_log').then(function (log) { + this.errorLog = log || 'No errors have been reported.'; + }.bind(this)); }, }); diff --git a/panels/history/ha-panel-history.html b/panels/history/ha-panel-history.html index 08a8618856..ea1aa5f9e1 100644 --- a/panels/history/ha-panel-history.html +++ b/panels/history/ha-panel-history.html @@ -177,8 +177,7 @@ Polymer({ _computeEndTime: function (_currentDate, periodIndex) { var startTime = this._computeStartTime(_currentDate); var endTime = new Date(startTime); - endTime.setDate( - startTime.getDate() + this._computeFilterDays(periodIndex)); + endTime.setDate(startTime.getDate() + this._computeFilterDays(periodIndex)); return endTime; }, diff --git a/panels/map/ha-panel-map.html b/panels/map/ha-panel-map.html index e5cc206cad..07baa535fe 100644 --- a/panels/map/ha-panel-map.html +++ b/panels/map/ha-panel-map.html @@ -52,8 +52,8 @@ Polymer({ var map = this._map = window.L.map(this.$.map); var style = document.createElement('link'); style.setAttribute('href', window.HASS_DEV ? - '/static/home-assistant-polymer/bower_components/leaflet/dist/leaflet.css' : - '/static/images/leaflet/leaflet.css'); + '/static/home-assistant-polymer/bower_components/leaflet/dist/leaflet.css' : + '/static/images/leaflet/leaflet.css'); style.setAttribute('rel', 'stylesheet'); this.$.map.parentNode.appendChild(style); map.setView([51.505, -0.09], 13); @@ -79,10 +79,10 @@ Polymer({ if (this._mapItems.length === 0) { this._map.setView( new window.L.LatLng(this.hass.config.core.latitude, this.hass.config.core.longitude), - 14); + 14 + ); } else { - bounds = new window.L.latLngBounds( - this._mapItems.map(function (item) { return item.getLatLng(); })); + bounds = new window.L.latLngBounds(this._mapItems.map(item => item.getLatLng())); this._map.fitBounds(bounds.pad(0.5)); } }, diff --git a/src/cards/ha-camera-card.html b/src/cards/ha-camera-card.html index f8bf0c3009..98750e9f55 100644 --- a/src/cards/ha-camera-card.html +++ b/src/cards/ha-camera-card.html @@ -91,7 +91,8 @@ Polymer({ function () { this.updateCameraFeedSrc(this.stateObj); }.bind(this), - this.UPDATE_INTERVAL); + this.UPDATE_INTERVAL + ); }, detached: function () { diff --git a/src/cards/ha-card-chooser.html b/src/cards/ha-card-chooser.html index 35c0e59223..50b72e3f26 100644 --- a/src/cards/ha-card-chooser.html +++ b/src/cards/ha-card-chooser.html @@ -22,8 +22,10 @@ Polymer({ cardDataChanged: function (newData) { if (!newData) return; - window.hassUtil.dynamicContentUpdater(this, 'HA-' + newData.cardType.toUpperCase() + '-CARD', - newData); + window.hassUtil.dynamicContentUpdater( + this, 'HA-' + newData.cardType.toUpperCase() + '-CARD', + newData + ); }, }); diff --git a/src/cards/ha-weather-card.html b/src/cards/ha-weather-card.html index a35132ef9d..7ba1445496 100644 --- a/src/cards/ha-weather-card.html +++ b/src/cards/ha-weather-card.html @@ -153,8 +153,7 @@ } if (!this.chartEngine) { - this.chartEngine = new window.google.visualization.LineChart( - this.$.chart_id); + this.chartEngine = new window.google.visualization.LineChart(this.$.chart_id); } if (!this.attr.forecast) { diff --git a/src/components/entity/ha-entity-toggle.html b/src/components/entity/ha-entity-toggle.html index cf7fd3cea7..5677716e35 100644 --- a/src/components/entity/ha-entity-toggle.html +++ b/src/components/entity/ha-entity-toggle.html @@ -129,7 +129,8 @@ Polymer({ currentState = this.stateObj; this.hass.callService( serviceDomain, service, - { entity_id: this.stateObj.entity_id }) + { entity_id: this.stateObj.entity_id } + ) .then(function () { setTimeout(function () { // If after 2 seconds we have not received a state update diff --git a/src/components/entity/ha-state-label-badge.html b/src/components/entity/ha-state-label-badge.html index 18f9d8a01c..fda3a29b93 100644 --- a/src/components/entity/ha-state-label-badge.html +++ b/src/components/entity/ha-state-label-badge.html @@ -116,7 +116,7 @@ Polymer({ return window.hassUtil.stateIcon(state); case 'sun': return state.state === 'above_horizon' ? - window.hassUtil.domainIcon(domain) : 'mdi:brightness-3'; + window.hassUtil.domainIcon(domain) : 'mdi:brightness-3'; default: return null; } diff --git a/src/components/ha-attributes.html b/src/components/ha-attributes.html index be2b02faae..2e665e0d92 100644 --- a/src/components/ha-attributes.html +++ b/src/components/ha-attributes.html @@ -57,10 +57,9 @@ if (!stateObj) { return []; } - return Object.keys(stateObj.attributes).filter( - function (key) { - return filtersArray.indexOf(key) === -1; - }); + return Object.keys(stateObj.attributes).filter(function (key) { + return filtersArray.indexOf(key) === -1; + }); }, formatAttribute: function (attribute) { diff --git a/src/components/ha-cards.html b/src/components/ha-cards.html index 1b867bdbf4..fdf21da391 100644 --- a/src/components/ha-cards.html +++ b/src/components/ha-cards.html @@ -189,19 +189,23 @@ 'updateCards(columns, states, showIntroduction, panelVisible, viewVisible, orderedGroups)', ], - updateCards: function (columns, states, showIntroduction, panelVisible, viewVisible, - orderedGroups) { - /* eslint-disable no-console */ + updateCards: function ( + columns, + states, + showIntroduction, + panelVisible, + viewVisible, + orderedGroups + ) { if (!panelVisible || !viewVisible) { return; } - this.debounce( - 'updateCards', function () { - // Things might have changed since it got scheduled. - if (this.panelVisible && this.viewVisible) { - this.cards = this.computeCards(columns, states, showIntroduction, orderedGroups); - } - }.bind(this), 10); + this.debounce('updateCards', function () { + // Things might have changed since it got scheduled. + if (this.panelVisible && this.viewVisible) { + this.cards = this.computeCards(columns, states, showIntroduction, orderedGroups); + } + }.bind(this), 10); }, computeCards: function (columns, states, showIntroduction, orderedGroups) { diff --git a/src/components/ha-climate-control.html b/src/components/ha-climate-control.html index f5c4570eb7..38b715ed84 100644 --- a/src/components/ha-climate-control.html +++ b/src/components/ha-climate-control.html @@ -99,8 +99,7 @@ }, 2010, this); } }, - } - ); + }); diff --git a/src/components/ha-push-notifications-toggle.html b/src/components/ha-push-notifications-toggle.html index fbdd2a16a9..13413c421c 100644 --- a/src/components/ha-push-notifications-toggle.html +++ b/src/components/ha-push-notifications-toggle.html @@ -52,7 +52,8 @@ Polymer({ function () { // no service worker. el._setPushSupported(false); - }); + } + ); }, handlePushChange: function (ev) { if (ev.target.checked) { diff --git a/src/components/ha-sidebar.html b/src/components/ha-sidebar.html index 2be039681f..c66bf42f26 100644 --- a/src/components/ha-sidebar.html +++ b/src/components/ha-sidebar.html @@ -172,7 +172,6 @@ diff --git a/src/state-summary/state-card-script.html b/src/state-summary/state-card-script.html index b28b1263ff..1a8afdeacd 100644 --- a/src/state-summary/state-card-script.html +++ b/src/state-summary/state-card-script.html @@ -55,7 +55,8 @@ Polymer({ ev.stopPropagation(); this.hass.callService( 'script', 'turn_on', - { entity_id: this.stateObj.entity_id }); + { entity_id: this.stateObj.entity_id } + ); }, }); diff --git a/src/util/cover-model.html b/src/util/cover-model.html index 5a87115699..034ffc8e49 100644 --- a/src/util/cover-model.html +++ b/src/util/cover-model.html @@ -6,8 +6,10 @@ }; function addGetter(name, getter) { - Object.defineProperty(window.CoverEntity.prototype, name, - { get: getter }); + Object.defineProperty( + window.CoverEntity.prototype, name, + { get: getter } + ); } addGetter('isFullyOpen', function () { diff --git a/src/util/hass-attributes-util.html b/src/util/hass-attributes-util.html index f1038c9f9c..e17d821d3b 100644 --- a/src/util/hass-attributes-util.html +++ b/src/util/hass-attributes-util.html @@ -32,10 +32,12 @@ window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES = icon: { type: 'icon' }, emulated_hue: { type: 'boolean', - domains: ['emulated_hue'] }, + domains: ['emulated_hue'] + }, emulated_hue_name: { type: 'string', - domains: ['emulated_hue'] }, + domains: ['emulated_hue'] + }, haaska_hidden: undefined, haaska_name: undefined, homebridge_hidden: { type: 'boolean' }, @@ -47,14 +49,17 @@ window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES = type: 'array', options: window.hassAttributeUtil.DOMAIN_DEVICE_CLASS, description: 'Device class', - domains: ['binary_sensor', 'cover'] }, + domains: ['binary_sensor', 'cover'] + }, hidden: { type: 'boolean', description: 'Hide from UI' }, assumed_state: { type: 'boolean', - domains: ['switch', 'light', 'cover', 'climate', 'fan', 'group'] }, + domains: ['switch', 'light', 'cover', 'climate', 'fan', 'group'] + }, initial_state: { type: 'string', - domains: ['automation'] }, + domains: ['automation'] + }, unit_of_measurement: { type: 'string' }, }; diff --git a/src/util/hass-call-api.html b/src/util/hass-call-api.html index 385c342f83..7d6e36bad9 100644 --- a/src/util/hass-call-api.html +++ b/src/util/hass-call-api.html @@ -22,7 +22,7 @@ window.hassCallApi = function (host, auth, method, path, parameters) { if (data) { resolve(data); } else { - reject('Request not allowed in demo mode.'); + reject(new Error('Request not allowed in demo mode.')); } }); } diff --git a/src/util/hass-mixins.html b/src/util/hass-mixins.html index 24647f1e2c..7eef947c6f 100644 --- a/src/util/hass-mixins.html +++ b/src/util/hass-mixins.html @@ -33,10 +33,8 @@ window.hassMixins = window.hassMixins || {}; /* @polymerMixin */ -window.hassMixins.EventsMixin = Polymer.dedupingMixin( - superClass => class extends superClass { - - /** +window.hassMixins.EventsMixin = Polymer.dedupingMixin(superClass => class extends superClass { + /** * Dispatches a custom event with an optional detail value. * * @param {string} type Name of event type. @@ -51,25 +49,24 @@ window.hassMixins.EventsMixin = Polymer.dedupingMixin( * `node` on which to fire the event (HTMLElement, defaults to `this`). * @return {Event} The new event that was fired. */ - fire(type, detail, options) { - options = options || {}; - detail = (detail === null || detail === undefined) ? {} : detail; - const event = new Event(type, { - bubbles: options.bubbles === undefined ? true : options.bubbles, - cancelable: Boolean(options.cancelable), - composed: options.composed === undefined ? true : options.composed - }); - event.detail = detail; - const node = options.node || this; - node.dispatchEvent(event); - return event; - } + fire(type, detail, options) { + options = options || {}; + detail = (detail === null || detail === undefined) ? {} : detail; + const event = new Event(type, { + bubbles: options.bubbles === undefined ? true : options.bubbles, + cancelable: Boolean(options.cancelable), + composed: options.composed === undefined ? true : options.composed + }); + event.detail = detail; + const node = options.node || this; + node.dispatchEvent(event); + return event; } -); +}); /* @polymerMixin */ -window.hassMixins.NavigateMixin = Polymer.dedupingMixin( - superClass => class extends window.hassMixins.EventsMixin(superClass) { +window.hassMixins.NavigateMixin = Polymer.dedupingMixin(superClass => + class extends window.hassMixins.EventsMixin(superClass) { navigate(path, replace = false) { if (replace) { history.replaceState(null, null, path); @@ -78,6 +75,6 @@ window.hassMixins.NavigateMixin = Polymer.dedupingMixin( } this.fire('location-changed'); } -}); + }); diff --git a/src/util/hass-util.html b/src/util/hass-util.html index 03ef4bfb31..8a77d4ff31 100644 --- a/src/util/hass-util.html +++ b/src/util/hass-util.html @@ -40,11 +40,9 @@ window.hassUtil.LANGUAGE = navigator.languages ? window.hassUtil.attributeClassNames = function (stateObj, attributes) { if (!stateObj) return ''; - return attributes.map( - function (attribute) { - return attribute in stateObj.attributes ? 'has-' + attribute : ''; - } - ).join(' '); + return attributes.map(function (attribute) { + return attribute in stateObj.attributes ? 'has-' + attribute : ''; + }).join(' '); }; // Expects featureClassNames to be an object mapping feature-bit -> className @@ -53,11 +51,9 @@ window.hassUtil.featureClassNames = function (stateObj, featureClassNames) { var features = stateObj.attributes.supported_features; - return Object.keys(featureClassNames).map( - function (feature) { - return (features & feature) !== 0 ? featureClassNames[feature] : ''; - } - ).join(' '); + return Object.keys(featureClassNames).map(function (feature) { + return (features & feature) !== 0 ? featureClassNames[feature] : ''; + }).join(' '); }; @@ -164,8 +160,10 @@ if (toLocaleStringSupportsOptions()) { if (toLocaleDateStringSupportsOptions()) { window.hassUtil.formatDate = function (dateObj) { - return dateObj.toLocaleDateString(window.hassUtil.LANGUAGE, - { year: 'numeric', month: 'long', day: 'numeric' }); + return dateObj.toLocaleDateString( + window.hassUtil.LANGUAGE, + { year: 'numeric', month: 'long', day: 'numeric' } + ); }; } else { window.hassUtil.formatDate = function (dateObj) { @@ -175,8 +173,10 @@ if (toLocaleDateStringSupportsOptions()) { if (toLocaleTimeStringSupportsOptions()) { window.hassUtil.formatTime = function (dateObj) { - return dateObj.toLocaleTimeString(window.hassUtil.LANGUAGE, - { hour: 'numeric', minute: '2-digit' }); + return dateObj.toLocaleTimeString( + window.hassUtil.LANGUAGE, + { hour: 'numeric', minute: '2-digit' } + ); }; } else { window.hassUtil.formatTime = function (dateObj) { @@ -193,8 +193,10 @@ window.hassUtil.relativeTime = function (dateObj) { for (i = 0; i < tests.length; i += 2) { if (delta < tests[i]) { delta = Math.floor(delta); - return format.replace('%s', - delta === 1 ? '1 ' + tests[i + 1] : delta + ' ' + tests[i + 1] + 's'); + return format.replace( + '%s', + delta === 1 ? '1 ' + tests[i + 1] : delta + ' ' + tests[i + 1] + 's' + ); } delta /= tests[i]; @@ -353,8 +355,7 @@ window.hassUtil.domainIcon = function (domain, state) { default: /* eslint-disable no-console */ - console.warn( - 'Unable to find icon for domain ' + domain + ' (' + state + ')'); + console.warn('Unable to find icon for domain ' + domain + ' (' + state + ')'); /* eslint-enable no-console */ return window.hassUtil.DEFAULT_ICON; } @@ -445,7 +446,7 @@ window.hassUtil.computeStateName = function (stateObj) { stateObj._entityDisplay = ( stateObj.attributes.friendly_name || window.HAWS.extractObjectId(stateObj.entity_id) - .replace(/_/g, ' ')); + .replace(/_/g, ' ')); } return stateObj._entityDisplay; diff --git a/src/util/media-player-model.html b/src/util/media-player-model.html index 99fd60e928..e111b8fca1 100644 --- a/src/util/media-player-model.html +++ b/src/util/media-player-model.html @@ -6,8 +6,10 @@ }; function addGetter(name, getter) { - Object.defineProperty(window.MediaPlayerEntity.prototype, name, - { get: getter }); + Object.defineProperty( + window.MediaPlayerEntity.prototype, name, + { get: getter } + ); } addGetter('isOff', function () { @@ -39,8 +41,7 @@ }); addGetter('hasMediaControl', function () { - return ['playing', 'paused', 'unknown'].indexOf( - this.stateObj.state) !== -1; + return ['playing', 'paused', 'unknown'].indexOf(this.stateObj.state) !== -1; }); addGetter('volumeSliderValue', function () { diff --git a/yarn.lock b/yarn.lock index c637f544b7..3bd8689cb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -511,18 +511,18 @@ agent-base@2: extend "~3.0.0" semver "~5.0.1" -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" +ajv-keywords@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" -ajv@^4.7.0, ajv@^4.9.1: +ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0: +ajv@^5.1.0, ajv@^5.2.0, ajv@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2" dependencies: @@ -559,6 +559,10 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + ansi-regex@^0.2.0, ansi-regex@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9" @@ -579,6 +583,12 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + ansi-styles@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" @@ -781,7 +791,7 @@ aws4@^1.2.1, aws4@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-code-frame@^6.16.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -1808,6 +1818,14 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chalk@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" @@ -1897,6 +1915,12 @@ cli-cursor@^1.0.1: dependencies: restore-cursor "^1.0.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" @@ -1955,6 +1979,16 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + colors@1.0.3, colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -2070,7 +2104,7 @@ concat-stream@1.5.x: readable-stream "~2.0.0" typedarray "~0.0.5" -concat-stream@^1.4.7, concat-stream@^1.5.0, concat-stream@^1.5.2: +concat-stream@^1.4.7, concat-stream@^1.5.0, concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -2160,7 +2194,7 @@ create-error-class@^3.0.0, create-error-class@^3.0.1: dependencies: capture-stack-trace "^1.0.0" -cross-spawn@^5.0.1: +cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -2217,12 +2251,6 @@ cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - dargs@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" @@ -2244,7 +2272,7 @@ dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" -debug@2, debug@2.6.9, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1: +debug@2, debug@2.6.9, debug@^2.0.0, debug@^2.1.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -2268,6 +2296,12 @@ debug@2.6.8, debug@^2.2.0, debug@^2.6.8: dependencies: ms "2.0.0" +debug@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + debug@~2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.1.3.tgz#ce8ab1b5ee8fbee2bfa3b633cab93d366b63418e" @@ -2635,32 +2669,6 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.30" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - es6-object-assign@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" @@ -2673,32 +2681,6 @@ es6-promise@^4.0.5: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - escape-html@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.1.tgz#181a286ead397a39a92857cfb1d43052e356bff0" @@ -2722,18 +2704,9 @@ escodegen@^1.7.0: optionalDependencies: source-map "~0.2.0" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-config-airbnb-base@^11.1.3: - version "11.3.2" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a" +eslint-config-airbnb-base@^12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.0.2.tgz#45fea317d71b8f1da323c730f3a8471988757793" dependencies: eslint-restricted-globals "^0.1.1" @@ -2751,11 +2724,12 @@ eslint-module-utils@^2.1.1: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-html@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-2.0.3.tgz#7c89883ab0c85fa5d28b666a14a4e906aa90b897" +eslint-plugin-html@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-3.2.2.tgz#ef7093621d3a93de3206fd1f92f347ea9a1a4dfa" dependencies: htmlparser2 "^3.8.2" + semver "^5.4.1" eslint-plugin-import@^2.2.0: version "2.7.0" @@ -2785,45 +2759,54 @@ eslint-restricted-globals@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" -eslint@^3.19.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.8.0.tgz#229ef0e354e0e61d837c7a80fdfba825e199815e" + dependencies: + ajv "^5.2.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.0.1" doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" + eslint-scope "^3.7.1" + espree "^3.5.1" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" + inquirer "^3.0.6" is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify "^1.0.1" levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" strip-json-comments "~2.0.1" - table "^3.7.8" + table "^4.0.1" text-table "~0.2.0" - user-home "^2.0.0" espree@^3.1.3: version "3.5.0" @@ -2832,7 +2815,7 @@ espree@^3.1.3: acorn "^5.1.1" acorn-jsx "^3.0.0" -espree@^3.1.7, espree@^3.4.0: +espree@^3.1.7, espree@^3.4.0, espree@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" dependencies: @@ -2906,13 +2889,6 @@ etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - event-stream@^3.0.20: version "3.3.4" resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" @@ -3025,6 +3001,14 @@ external-editor@^1.1.0: spawn-sync "^1.0.15" tmp "^0.0.29" +external-editor@^2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -3085,6 +3069,12 @@ figures@^1.3.5: escape-string-regexp "^1.0.5" object-assign "^4.1.0" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" @@ -3311,6 +3301,10 @@ function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3514,7 +3508,7 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" -globals@^9.14.0, globals@^9.18.0: +globals@^9.17.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -3838,6 +3832,10 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + has-gulplog@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" @@ -4038,11 +4036,11 @@ hydrolysis@^1.19.1: estraverse "^3.1.0" path-is-absolute "^1.0.0" -iconv-lite@0.4.19, iconv-lite@~0.4.13: +iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -ignore@^3.2.0: +ignore@^3.3.3: version "3.3.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" @@ -4083,24 +4081,6 @@ ini@^1.3.4, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - inquirer@^1.0.2: version "1.2.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-1.2.3.tgz#4dec6f32f37ef7bb0b2ed3f1d1a5c3f545074918" @@ -4120,6 +4100,25 @@ inquirer@^1.0.2: strip-ansi "^3.0.0" through "^2.3.6" +inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" @@ -4247,7 +4246,7 @@ is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: +is-my-json-valid@^2.12.4: version "2.16.1" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" dependencies: @@ -4429,7 +4428,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.5.1: +js-yaml@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: @@ -4440,6 +4439,10 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jschardet@^1.4.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" + jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -4843,7 +4846,7 @@ lodash@^3.0.0, lodash@^3.0.1, lodash@^3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.8.0: +lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.8.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -5045,6 +5048,10 @@ mime@1.4.1, mime@^1.2.11, mime@^1.3.4: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" @@ -5177,14 +5184,14 @@ multipipe@^1.0.2: duplexer2 "^0.1.2" object-assign "^4.1.0" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - mute-stream@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + mz@^2.4.0, mz@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -5390,6 +5397,12 @@ onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + opn@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" @@ -5438,7 +5451,7 @@ os-shim@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -5582,7 +5595,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -5694,9 +5707,9 @@ plist@^2.0.1: xmlbuilder "8.2.2" xmldom "0.1.x" -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" plylog@^0.4.0: version "0.4.0" @@ -5953,10 +5966,14 @@ process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -progress@1.1.8, progress@^1.1.8: +progress@1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + promise@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-6.1.0.tgz#2ce729f6b94b45c26891ad0602c5c90e04c6eef6" @@ -6161,14 +6178,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -6361,7 +6370,7 @@ require-relative@0.8.7: version "0.8.7" resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" -require-uncached@^1.0.2: +require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: @@ -6404,6 +6413,13 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -6495,12 +6511,6 @@ rollup@^0.50.0: version "0.50.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.50.0.tgz#4c158f4e780e6cb33ff0dbfc184a52cc58cd5f3b" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - run-async@^2.0.0, run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -6514,9 +6524,15 @@ run-sequence@^2.2.0: chalk "^1.1.3" gulp-util "^3.0.8" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" rx@^4.1.0: version "4.1.0" @@ -6570,7 +6586,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -6702,7 +6718,7 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shelljs@^0.7.0, shelljs@^0.7.5: +shelljs@^0.7.0: version "0.7.8" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" dependencies: @@ -6714,7 +6730,7 @@ sigmund@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -6735,9 +6751,11 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" slide@^1.1.5: version "1.1.6" @@ -6966,7 +6984,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0: +string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -7068,6 +7086,12 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^4.0.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + sw-precache@^5.1.1, sw-precache@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.0.tgz#eb6225ce580ceaae148194578a0ad01ab7ea199c" @@ -7108,16 +7132,16 @@ table-layout@^0.3.0: typical "^2.6.0" wordwrapjs "^2.0.0-0" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +table@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" tar-fs@^1.12.0: version "1.16.0" @@ -7273,6 +7297,12 @@ tmp@^0.0.29: dependencies: os-tmpdir "~1.0.1" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + to-absolute-glob@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"