Skip to content

Commit

Permalink
Merge pull request #171 from juwara0/updateDependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
juwara0 authored Jan 25, 2018
2 parents fdbae0d + 0a3b790 commit a44c630
Show file tree
Hide file tree
Showing 30 changed files with 254 additions and 245 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
package-lock.json
testem.log
.idea
coverage.json
Expand Down
1 change: 1 addition & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
13 changes: 0 additions & 13 deletions .remarkrc

This file was deleted.

3 changes: 2 additions & 1 deletion addon/components/frost-list-item-selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {ViewUtils} = Ember
const {isSimpleClick} = ViewUtils
import {Component} from 'ember-frost-core'
import {PropTypes} from 'ember-prop-types'
import UAParser from 'ua-parser-js'

import layout from '../templates/components/frost-list-item-selection'

Expand Down Expand Up @@ -47,7 +48,7 @@ export default Component.extend({
// Acceptable event modifiers
// When the checkbox is the target a simple click is equivalent to a specific select
const isSpecificSelect = isSimpleClick(event) ||
((new window.UAParser()).getOS() === 'Mac OS' ? event.ctrlKey : event.metaKey) // TODO Move instance to a service
((new UAParser()).getOS() === 'Mac OS' ? event.ctrlKey : event.metaKey) // TODO Move instance to a service
const isRangeSelect = event.shiftKey

// Only process simple clicks or clicks with the acceptable modifiers
Expand Down
4 changes: 3 additions & 1 deletion addon/components/frost-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {ViewUtils} = Ember
const {isSimpleClick} = ViewUtils
import {Component} from 'ember-frost-core'
import {PropTypes} from 'ember-prop-types'
import UAParser from 'ua-parser-js'

export default Component.extend({

Expand Down Expand Up @@ -43,7 +44,8 @@ export default Component.extend({

click (event) {
// Acceptable event modifiers
const isSpecificSelect = (new window.UAParser()).getOS().name === 'Mac OS' ? event.metaKey : event.ctrlKey // TODO Move instance to a service
// TODO Move instance to a service
const isSpecificSelect = (new UAParser()).getOS().name === 'Mac OS' ? event.metaKey : event.ctrlKey
const isRangeSelect = event.shiftKey

// Only process simple clicks or clicks with the acceptable modifiers
Expand Down
6 changes: 2 additions & 4 deletions addon/components/frost-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

import Ember from 'ember'
const {$, A, ObjectProxy, String: EmberString, get, isEmpty, isNone, isPresent, run, set} = Ember
import layout from '../templates/components/frost-list'
import getComponentName from '../utils/get-component-name'
import computed, {readOnly} from 'ember-computed-decorators'
import {Component} from 'ember-frost-core'
import {selection} from 'ember-frost-list'
import {PropTypes} from 'ember-prop-types'

import layout from '../templates/components/frost-list'

import getComponentName from '../utils/get-component-name'

export default Component.extend({

// == Dependencies ==========================================================
Expand Down
2 changes: 2 additions & 0 deletions addon/utils/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export default {
* @param {Function} compareFct the compare function
* @returns {Number} the index of the rhs value if it's in the array otherwise -1
*/
/* eslint-disable complexity */
_findIndex (array, rhs, compareFct) {
if (this.isSupportedInEnvironment(array, 'findIndex')) {
return array.findIndex(currentItem => compareFct(currentItem, rhs))
Expand All @@ -185,4 +186,5 @@ export default {
return findIndex
}
}
/* eslint-enable complexity */
}
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ember-frost-list",
"dependencies": {
"dependencies": {},
"devDependencies": {
"Faker": "^3.1.0",
"animation-frame": "~0.2.4",
"jquery-mockjax": "2.2.1"
}
}
5 changes: 1 addition & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')

module.exports = function (defaults) {
var app = new EmberAddon(defaults, {
'ember-cli-mocha': {
useLintTree: false
},
let app = new EmberAddon(defaults, {
sassOptions: {
includePaths: [
]
Expand Down
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
'use strict'

const path = require('path')
const MergeTrees = require('broccoli-merge-trees')
const Funnel = require('broccoli-funnel')

module.exports = {
name: 'ember-frost-list',
Expand All @@ -17,9 +19,11 @@ module.exports = {

if (app) {
app.import(path.join('vendor', 'ua-parser.min.js'))
app.import(path.join('vendor', 'shims', 'ua-parser-js.js'))
}
},

/* eslint-disable complexity */
init: function (app) {
this.options = this.options || {}
this.options.babel = this.options.babel || {}
Expand All @@ -32,5 +36,14 @@ module.exports = {
/* eslint-disable no-unused-expressions */
this._super.init && this._super.init.apply(this, arguments)
/* eslint-enable no-unused-expressions */
},
/* eslint-enable complexity */

treeForVendor: function (vendorTree) {
const packageTree = new Funnel(path.join(this.project.root, 'node_modules', 'ua-parser-js', 'dist'), {
files: ['ua-parser.min.js']
})

return new MergeTrees([vendorTree, packageTree])
}
}
41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,50 +32,51 @@
"bower": "^1.8.2",
"broccoli-asset-rev": "^2.4.5",
"chai-jquery": "^2.0.0",
"ember-async-image": "0.1.1",
"ember-cli": "2.12.3",
"ember-cli-chai": "0.3.2",
"ember-cli-code-coverage": "0.3.5",
"ember-cli-chai": "0.4.3",
"ember-cli-code-coverage": "0.3.12",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-frost-blueprints": "^5.0.1",
"ember-cli-htmlbars-inline-precompile": "0.3.12",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-mocha": "0.13.2",
"ember-cli-notifications": "^4.0.1",
"ember-cli-mocha": "0.14.4",
"ember-cli-notifications": "^4.2.1",
"ember-cli-shims": "^1.0.2",
"ember-cli-uglify": "^1.2.0",
"ember-code-snippet": "1.8.0",
"ember-code-snippet": "1.7.0",
"ember-data": "~2.12.0",
"ember-data-factory-guy": "2.8.2",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-frost-sort": "^9.0.0",
"ember-frost-test": "1.0.1",
"ember-frost-sort": "^10.0.0",
"ember-frost-test": "^4.0.0",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-sinon": "0.6.0",
"ember-sinon": "^0.7.0",
"ember-source": "~2.12.0",
"ember-test-utils": "^5.1.1",
"ember-test-utils": "^8.1.0",
"loader.js": "^4.2.3",
"pr-bumper": "^1.11.0",
"pull-report": "^0.3.1",
"sinon-chai": "^2.8.0"
"sinon-chai": "^2.14.0"
},
"keywords": [
"ember-addon",
"frost"
],
"dependencies": {
"broccoli-funnel": "^2.0.1",
"broccoli-merge-trees": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-sass": "5.6.0",
"ember-cli-sass": "7.1.1",
"ember-computed-decorators": "0.3.0",
"ember-frost-core": "^4.0.1",
"ember-hook": "^1.4.2",
"ember-frost-core": "^5.1.1",
"ember-hook": "1.4.2",
"ember-math-helpers": "2.0.6",
"ember-prop-types": "^5.0.2",
"ember-truth-helpers": "1.3.0",
"ember-prop-types": "^6.0.1",
"ember-truth-helpers": "^1.3.0",
"smoke-and-mirrors": "github:ciena-frost/smoke-and-mirrors",
"ua-parser-js": "^0.7.12"
"ua-parser-js": "^0.7.17"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand All @@ -84,6 +85,6 @@
"name": "frost-list"
},
"pr-bumper": {
"coverage": 97.22
"coverage": 95.84
}
}
}
2 changes: 1 addition & 1 deletion testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env node */

var Reporter = require('ember-test-utils/reporter')
const Reporter = require('ember-test-utils/reporter')

module.exports = {
disable_watching: true,
Expand Down
9 changes: 4 additions & 5 deletions tests/dummy/app/models/list-item.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import DS from 'ember-data'
const {Model, attr} = DS

var Model = DS.Model.extend({
label: DS.attr('string'),
itemType: DS.attr('string') // Cannot use 'type' because it is a reserved word
export default Model.extend({
label: attr('string'),
itemType: attr('string') // Cannot use 'type' because it is a reserved word
})

export default Model
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env node */

module.exports = function (environment) {
var ENV = {
let ENV = {
modulePrefix: 'dummy',
podModulePrefix: 'dummy/pods',
environment: environment,
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/scenarios.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Main from '../scenarios/main'

var main = new Main()
const main = new Main()
main()
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/

import {expect} from 'chai'
const {A} = Ember
import Ember from 'ember'
const {A} = Ember
import {$hook, initialize as initializeHook} from 'ember-hook'
import {registerMockComponent, unregisterMockComponent} from 'ember-test-utils/test-support/mock-component'
import {integration} from 'ember-test-utils/test-support/setup-component-test'
Expand Down Expand Up @@ -45,7 +45,7 @@ describe(test.label, function () {
`)
})

it('has one vertical item created', function () {
it('should have one vertical item created', function () {
expect(this.$('.vertical-item')).to.have.length(1)
})
})
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/components/frost-list-expansion-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe(test.label, function () {
sandbox.restore()
})

it('renders with default class', function () {
it('should render with default class', function () {
this.render(hbs`
{{frost-list-expansion
hook='myExpansion'
Expand All @@ -32,7 +32,7 @@ describe(test.label, function () {
expect(this.$('.frost-list-expansion')).to.be.length(1)
})

it('fires onCollapseAll closure action', function () {
it('should fire onCollapseAll closure action', function () {
const collapseAllSpy = sandbox.spy()

this.on('collapseAllAction', collapseAllSpy)
Expand All @@ -50,7 +50,7 @@ describe(test.label, function () {
expect(collapseAllSpy).have.callCount(1)
})

it('fires onExpandAll closure action', function () {
it('should fire onExpandAll closure action', function () {
const expandAllSpy = sandbox.spy()

this.on('expandAllAction', expandAllSpy)
Expand Down Expand Up @@ -79,13 +79,13 @@ describe(test.label, function () {
`)
})

it('sets -collapse-all hook correctly', function () {
it('should set -collapse-all hook correctly', function () {
expect(
$hook('myExpansion-collapse-all').text().trim()
).to.equal('Collapse all')
})

it('sets -expand-all hook correctly', function () {
it('should set -expand-all hook correctly', function () {
expect(
$hook('myExpansion-expand-all').text().trim()
).to.equal('Expand all')
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/components/frost-list-item-content-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ describe(test.label, function () {
unregisterMockComponent(this, 'mock-list-item-expansion')
})

it('sets "frost-list-item-content" class', function () {
it('should set "frost-list-item-content" class', function () {
expect(this.$('.frost-list-item-content')).to.have.length(1)
})

it('creates one list item content', function () {
it('should create one list item content', function () {
expect($hook('myListItemContent', {index: 0})).to.have.length(1)
})

it('concatenates the -item-container hook property', function () {
it('should concatenate the -item-container hook property', function () {
expect($hook('myListItemContent-item-container', {index: 0})).to.have.length(1)
})

it('concatenates the -item hook property', function () {
it('should concatenate the -item hook property', function () {
expect($hook('myListItemContent-item', {index: 0})).to.have.length(1)
})

it('concatenates the -expnansion hook property', function () {
it('should concatenate the -expnansion hook property', function () {
expect($hook('myListItemContent-expansion', {index: 0})).to.have.length(1)
})
})
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/components/frost-list-item-expansion-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ describe(test.label, function () {
sandbox.restore()
})

it('renders with default class', function () {
it('should render with default class', function () {
expect(this.$('.frost-list-item-expansion')).to.be.length(1)
})

it('adds correct class to frost-icon', function () {
it('should add correct class to frost-icon', function () {
expect(this.$('.frost-list-item-expansion-icon')).to.be.length(1)
})

it('sets -icon hook correctly', function () {
it('should set -icon hook correctly', function () {
expect($hook('myListItemExpansion-icon')).to.be.length(1)
})

it('sets the correct icon', function () {
it('should set the correct icon', function () {
expect(
$hook('myListItemExpansion-icon')
).to.have.class('frost-icon-frost-list-chevron-thin')
Expand All @@ -66,11 +66,11 @@ describe(test.label, function () {
$hook('myListItemExpansion').trigger('click')
})

it('fires onExpand closure action', function () {
it('should fire onExpand closure action', function () {
expect(expandSpy).have.callCount(1)
})

it('passes the model', function () {
it('should pass the model', function () {
expect(expandSpy.args[0][0].id).to.equal('400')
})
})
Expand Down
Loading

0 comments on commit a44c630

Please sign in to comment.