-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update all the things #564
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9aa026e
Add vscode files
offirgolan 4e21506
Run codemods
offirgolan f089d2a
Upgrade ember and ember-cli via ember-cli-upgrade
offirgolan 0e9f0f0
Remove no longer required blueprint legacy logic
offirgolan f5f0ee1
Init setup for prettier
offirgolan 504ca54
make it all pretty
offirgolan b250b7c
Switch over to MIT license
offirgolan d04ab0b
Move beta to allow failures (for now)
offirgolan f28415b
Remove legacy ember-get-helper blueprint
offirgolan a011338
Add code climate repo token back
offirgolan 490bb63
Upgrade ember-data version
offirgolan f2c6b61
Upgrade ember-require-module and ember-validators
offirgolan 821d8d1
Revert back license to yahoo bsd-3 and update validators dep
offirgolan 04289fc
Fix ember beta failing test case
offirgolan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,53 @@ | ||
--- | ||
language: node_js | ||
node_js: | ||
- "6" | ||
# we recommend testing addons with the same minimum supported node version as Ember CLI | ||
# so that your addon works for all apps | ||
- "4" | ||
|
||
sudo: false | ||
dist: trusty | ||
|
||
cache: | ||
yarn: true | ||
|
||
addons: | ||
chrome: stable | ||
code_climate: | ||
repo_token: 32e4df25574ba02aacb75e6d34b9c667044984df279e20a208884d7e9e9d4a8d | ||
|
||
cache: | ||
yarn: true | ||
|
||
env: | ||
- EMBER_TRY_SCENARIO=default | ||
- EMBER_TRY_SCENARIO=ember-1.13 | ||
- EMBER_TRY_SCENARIO=ember-lts-2.4 | ||
- EMBER_TRY_SCENARIO=ember-lts-2.8 | ||
- EMBER_TRY_SCENARIO=ember-2.12 | ||
- EMBER_TRY_SCENARIO=ember-release | ||
- EMBER_TRY_SCENARIO=ember-beta | ||
- EMBER_TRY_SCENARIO=ember-canary | ||
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: | ||
fast_finish: true | ||
allow_failures: | ||
- env: EMBER_TRY_SCENARIO=ember-beta | ||
- env: EMBER_TRY_SCENARIO=ember-canary | ||
- env: EMBER_TRY_SCENARIO=ember-beta | ||
|
||
before_install: | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash | ||
- export PATH=$HOME/.yarn/bin:$PATH | ||
- yarn global add codeclimate-test-reporter | ||
|
||
install: | ||
- yarn install --no-lockfile | ||
- yarn install --no-lockfile --non-interactive | ||
|
||
script: | ||
- HEADLESS=true node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup | ||
- yarn 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 | ||
|
||
after_script: | ||
- codeclimate-test-reporter < coverage/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,9 @@ | ||
Copyright 2016 Yahoo Inc. | ||
All rights reserved. | ||
The MIT License (MIT) | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
Copyright (c) 2018 | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
* Neither the name of the Yahoo Inc. nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,15 @@ | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these not needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. I've looked at some older yahoo OSS and they dont have it. I think just the BSD-3 license was enough. |
||
* Copyright 2016, Yahoo! Inc. | ||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. | ||
*/ | ||
import { and, not, readOnly } from '@ember/object/computed'; | ||
import { isNone } from '@ember/utils'; | ||
import { makeArray } from '@ember/array'; | ||
import EmberObject, { defineProperty, computed, set, get } from '@ember/object'; | ||
|
||
import Ember from 'ember'; | ||
import ValidationError from '../validations/error'; | ||
import { isDsModel, isPromise } from '../utils/utils'; | ||
|
||
const { | ||
get, | ||
set, | ||
isNone, | ||
computed, | ||
canInvoke, | ||
makeArray, | ||
defineProperty | ||
} = Ember; | ||
|
||
const { | ||
and, | ||
not, | ||
readOnly | ||
} = computed; | ||
|
||
export default Ember.Object.extend({ | ||
const { canInvoke } = Ember; | ||
|
||
export default EmberObject.extend({ | ||
model: null, | ||
isValid: true, | ||
isValidating: false, | ||
|
@@ -39,7 +25,11 @@ export default Ember.Object.extend({ | |
init() { | ||
this._super(...arguments); | ||
|
||
defineProperty(this, 'attrValue', computed.readOnly(`model.${get(this, 'attribute')}`)); | ||
defineProperty( | ||
this, | ||
'attrValue', | ||
readOnly(`model.${get(this, 'attribute')}`) | ||
); | ||
|
||
if (this.get('isAsync')) { | ||
this._handlePromise(); | ||
|
@@ -100,17 +90,23 @@ export default Ember.Object.extend({ | |
return makeArray(get(this, 'warningMessage')); | ||
}), | ||
|
||
warning: computed('isWarning', 'type', 'warningMessage', 'attribute', function() { | ||
if (get(this, 'isWarning') && !isNone(get(this, 'warningMessage'))) { | ||
return ValidationError.create({ | ||
type: get(this, '_type'), | ||
message: get(this, 'warningMessage'), | ||
attribute: get(this, 'attribute') | ||
}); | ||
} | ||
warning: computed( | ||
'isWarning', | ||
'type', | ||
'warningMessage', | ||
'attribute', | ||
function() { | ||
if (get(this, 'isWarning') && !isNone(get(this, 'warningMessage'))) { | ||
return ValidationError.create({ | ||
type: get(this, '_type'), | ||
message: get(this, 'warningMessage'), | ||
attribute: get(this, 'attribute') | ||
}); | ||
} | ||
|
||
return null; | ||
}), | ||
return null; | ||
} | ||
), | ||
|
||
warnings: computed('warning', function() { | ||
return makeArray(get(this, 'warning')); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably bring back the original here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure here! Since Yahoo as an entity no longer exists, im not sure that the license still stands? If that's not the case, I'll revert it back to the BSD-3 license.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ended up reverting the license back.