Skip to content

Commit

Permalink
ember 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Backer committed Oct 30, 2020
1 parent 6654cfc commit f834589
Show file tree
Hide file tree
Showing 16 changed files with 5,073 additions and 1,393 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
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
extends: 'octane'
};
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ 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
- "8"
- "10"

sudo: false
dist: trusty

addons:
Expand All @@ -27,29 +26,35 @@ branches:
- /^v\d+\.\d+\.\d+/

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

include:
# runs linting and tests with current locked deps

- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test

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

# 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-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- 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:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
* `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/).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ ember-one-way-select
Compatibility
------------------------------------------------------------------------------

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


Installation
Expand Down
72 changes: 36 additions & 36 deletions addon/templates/components/one-way-select.hbs
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
{{#if includeBlank}}
{{#if this.includeBlank}}
<option value=""
disabled={{promptIsDisabled}}
selected={{if nothingSelected "selected"}}>
{{prompt}}
disabled={{this.promptIsDisabled}}
selected={{if this.nothingSelected "selected"}}>
{{this.prompt}}
</option>
{{/if}}
{{#if hasGrouping}}
{{#each optionGroups as |optionGroup groupIndex|}}
{{#if this.hasGrouping}}
{{#each this.optionGroups as |optionGroup groupIndex|}}
<optgroup label={{optionGroup.groupName}}>
{{#each optionGroup.options as |option index|}}
{{#if hasBlock}}
{{#one-way-select/option
selected=selectedValue
option=option
optionValuePath=computedOptionValuePath
optionTargetPath=optionTargetPath}}
<OneWaySelect::option
@selected={{this.selectedValue}}
@option={{option}}
@optionValuePath={{this.computedOptionValuePath}}
@optionTargetPath={{@optionTargetPath}}>
{{yield option index groupIndex}}
{{/one-way-select/option}}
</OneWaySelect::option>
{{else}}
{{one-way-select/option
selected=selectedValue
option=option
index=index
groupIndex=groupIndex
optionComponent=optionComponent
optionValuePath=computedOptionValuePath
optionTargetPath=optionTargetPath
optionLabelPath=optionLabelPath}}
<OneWaySelect::option
@selected={{this.selectedValue}}
@option={{option}}
@index={{index}}
@groupIndex={{groupIndex}}
@optionComponent={{@optionComponent}}
@optionValuePath={{this.computedOptionValuePath}}
@optionTargetPath={{@optionTargetPath}}
@optionLabelPath={{@optionLabelPath}} />
{{/if}}
{{/each}}
</optgroup>
{{/each}}
{{else}}
{{#each options as |option index|}}
{{#each this.options as |option index|}}
{{#if hasBlock}}
{{#one-way-select/option
selected=selectedValue
option=option
optionValuePath=computedOptionValuePath
optionTargetPath=optionTargetPath}}
<OneWaySelect::Option
@selected={{this.selectedValue}}
@option={{@option}}
@optionValuePath={{this.computedOptionValuePath}}
@optionTargetPath={{@optionTargetPath}}>
{{yield option index}}
{{/one-way-select/option}}
</OneWaySelect::Option>
{{else}}
{{one-way-select/option
selected=selectedValue
option=option
index=index
optionComponent=optionComponent
optionValuePath=computedOptionValuePath
optionTargetPath=optionTargetPath
optionLabelPath=optionLabelPath}}
<OneWaySelect::Option
@selected={{this.selectedValue}}
@option={{option}}
@index={{index}}
@optionComponent={{@optionComponent}}
@optionValuePath={{this.computedOptionValuePath}}
@optionTargetPath={{@optionTargetPath}}
@optionLabelPath={{@optionLabelPath}} />
{{/if}}
{{/each}}
{{/if}}
28 changes: 14 additions & 14 deletions addon/templates/components/one-way-select/option.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<option value={{if optionValuePath (get option optionValuePath) option}}
selected={{one-way-select/contains selected option optionValuePath optionTargetPath}}>
<option value={{if @optionValuePath (get @option @optionValuePath) @option}}
selected={{one-way-select/contains @selected @option @optionValuePath @optionTargetPath}}>
{{#if hasBlock}}
{{yield}}
{{else if optionComponent}}
{{component optionComponent
option=option
index=index
groupIndex=groupIndex}}
{{else if optionLabelPath}}
{{get option optionLabelPath}}
{{else if optionValuePath}}
{{get option optionValuePath}}
{{else if optionTargetPath}}
{{get option optionTargetPath}}
{{else if @optionComponent}}
{{component @optionComponent
option=@option
index=@index
groupIndex=@groupIndex}}
{{else if @optionLabelPath}}
{{get @option @optionLabelPath}}
{{else if @optionValuePath}}
{{get @option @optionValuePath}}
{{else if @optionTargetPath}}
{{get @option @optionTargetPath}}
{{else}}
{{option}}
{{@option}}
{{/if}}
</option>
23 changes: 19 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ module.exports = async function() {
return {
scenarios: [
{
name: 'ember-lts-3.4',
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
'ember-source': '~3.12.0'
}
}
},
{
name: 'ember-lts-3.8',
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
'ember-source': '~3.16.0'
}
}
},
Expand Down Expand Up @@ -67,6 +67,21 @@ module.exports = async function() {
'@ember/jquery': '^0.5.1'
}
}
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false
})
},
npm: {
ember: {
edition: 'classic'
}
}
}
]
};
Expand Down
Loading

0 comments on commit f834589

Please sign in to comment.