Skip to content

Commit

Permalink
ember 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Backer committed Oct 30, 2020
1 parent f166f3a commit 6654cfc
Show file tree
Hide file tree
Showing 10 changed files with 1,880 additions and 1,155 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
Expand All @@ -15,6 +16,7 @@ module.exports = {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
overrides: [
// node files
Expand All @@ -36,8 +38,7 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ember-one-way-select
Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember.js v3.4 or above
* Ember CLI v2.13 or above
* Node.js v8 or above

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

This file was deleted.

17 changes: 14 additions & 3 deletions addon/components/one-way-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +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';

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

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

attributeBindings: [
Expand All @@ -34,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
130 changes: 60 additions & 70 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,72 @@

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
scenarios: [
{
name: 'ember-lts-2.18',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true })
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.18.0'
}
module.exports = async function() {
return {
scenarios: [
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
},
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
}
}
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
]
};
});
}
]
};
};
Loading

0 comments on commit 6654cfc

Please sign in to comment.