Skip to content

Commit

Permalink
Merge pull request #9 from DockYard/upgrade-little-by-little
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
Lisa Backer committed Oct 30, 2020
2 parents 7a5da02 + 815b446 commit 457618d
Show file tree
Hide file tree
Showing 29 changed files with 18,564 additions and 8,162 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
38 changes: 18 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
Expand All @@ -14,43 +20,35 @@ module.exports = {
env: {
browser: true
},
rules: {
},
rules: {},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'ember-cli-build.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'addon/**'
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
extends: ['plugin:node/recommended']
}
]
};
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
47 changes: 29 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'octane'
};
57 changes: 35 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"
- "10"

sudo: required
dist: trusty
dist: xenial

addons:
chrome: stable
Expand All @@ -19,28 +18,42 @@ env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:

branches:
only:
- master
# npm version tags
- /^v\d+\.\d+\.\d+/

jobs:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version
include:
# runs linting and tests with current locked deps
- stage: "Tests"
name: "Tests"
script:
- npm run lint
- npm run test:ember

- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- npm install --no-package-lock
script:
- npm run test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic

script:
- npm run lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone <repository-url>`
* `cd ember-one-way-select`
* `npm install`

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,13 @@ to the following structure:

* `ember build`

## Compatibility

* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Node.js v10 or above


For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).

## Legal
Expand Down
20 changes: 0 additions & 20 deletions addon/-private/dynamic-attribute-bindings.js

This file was deleted.

21 changes: 15 additions & 6 deletions addon/components/one-way-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ import { isBlank, isNone, isPresent } from '@ember/utils';
import { w } from '@ember/string';

import layout from '../templates/components/one-way-select';
import DynamicAttributeBindings from '../-private/dynamic-attribute-bindings';

import { invokeAction } from 'ember-invoke-action';

const OneWaySelectComponent = Component.extend(DynamicAttributeBindings, {
const OneWaySelectComponent = Component.extend({
layout,
tagName: 'select',

Expand All @@ -26,7 +23,9 @@ const OneWaySelectComponent = Component.extend(DynamicAttributeBindings, {
'optionValuePath',
'optionLabelPath',
'optionComponent',
'groupLabelPath'
'groupLabelPath',
'class',
'classNames'
],

attributeBindings: [
Expand All @@ -36,6 +35,16 @@ const OneWaySelectComponent = Component.extend(DynamicAttributeBindings, {
didReceiveAttrs() {
this._super(...arguments);

let newAttributeBindings = [];
// eslint-disable-next-line ember/no-attrs-in-components
for (let key in this.attrs) {
if (this.NON_ATTRIBUTE_BOUND_PROPS.indexOf(key) === -1 && this.attributeBindings.indexOf(key) === -1) {
newAttributeBindings.push(key);
}
}

set(this, 'attributeBindings', this.attributeBindings.concat(newAttributeBindings));

let value = get(this, 'paramValue');
if (value === undefined) {
value = get(this, 'value');
Expand Down Expand Up @@ -109,7 +118,7 @@ const OneWaySelectComponent = Component.extend(DynamicAttributeBindings, {
value = this._selectedSingle();
}

invokeAction(this, 'update', value);
this.update(value);
},

prompt: alias('includeBlank'),
Expand Down
Loading

0 comments on commit 457618d

Please sign in to comment.