Skip to content

Commit

Permalink
Merge pull request adfinis#80 from czosel/update_ember_2_18
Browse files Browse the repository at this point in the history
Update ember-cli to 2.18.0
  • Loading branch information
czosel authored Jan 23, 2018
2 parents c6db68d + 7137001 commit 9d8c417
Show file tree
Hide file tree
Showing 21 changed files with 873 additions and 228 deletions.
45 changes: 43 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,52 @@ module.exports = {
plugins: [
'ember'
],
extends: 'eslint:recommended',
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
'ember/new-module-imports': 2
}
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
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
}
}
]
};
7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ env:
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.8
- 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
Expand All @@ -41,6 +41,7 @@ install:
- yarn install --no-lockfile --non-interactive

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
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2018

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:

Expand Down
4 changes: 2 additions & 2 deletions addon/components/validated-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export default Component.extend({
},

update(value) {
if (this.attrs['on-update']) {
this.attrs['on-update'](value, this.get('model'));
if (this.get('on-update')) {
this.get('on-update')(value, this.get('model'));
} else {
this.set(`model.${this.get('name')}`, value);
}
Expand Down
4 changes: 4 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "ember-try-placeholder",
"dependencies": {}
}
19 changes: 5 additions & 14 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
/* eslint-env node */
module.exports = {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
ember: 'components/ember#lts-2-8'
},
resolutions: {
ember: 'lts-2-8'
}
},
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': null
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.12',
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
'ember-source': '~2.16.0'
}
}
},
Expand Down Expand Up @@ -81,4 +72,4 @@ module.exports = {
}
}
]
};
};
1 change: 0 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
},
"scripts": {
"build": "ember build",
"start": "ember server",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"start": "ember serve",
"test": "ember try:each",
"deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -"
},
"dependencies": {
"bower": "^1.8.2",
"ember-changeset": "1.3.0",
"ember-changeset-validations": "1.2.8",
"ember-cli-babel": "^6.6.0",
Expand All @@ -34,15 +36,15 @@
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "~2.16.2",
"ember-cli": "~2.18.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-github-pages": "0.1.2",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-qunit": "^4.1.1",
"ember-cli-release": "^0.2.9",
"ember-cli-shims": "^1.1.0",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^2.0.0",
Expand All @@ -51,8 +53,9 @@
"ember-fork-me": "1.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.16.0",
"eslint-plugin-ember": "^4.5.0",
"ember-source": "~2.12.0",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"loader.js": "^4.2.3"
},
"engines": {
Expand Down
5 changes: 2 additions & 3 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
Expand All @@ -14,9 +13,9 @@ module.exports = {
args: [
'--disable-gpu',
'--headless',
'--remote-debugging-port=9222',
'--remote-debugging-port=0',
'--window-size=1440,900'
]
},
}
}
};
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

44 changes: 28 additions & 16 deletions tests/dummy/app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@ import { task, timeout } from 'ember-concurrency';
export default Controller.extend({
UserValidations,

colors: [
{ name: 'Red', color: 'red' },
{ name: 'Green', color: 'green' },
{ name: 'Blue', color: 'blue' }
],
countries: ['United States', 'United Kingdom', 'Switzerland', 'Other'],
genders: [
{
key: 'm',
label: 'Male'
},
{
key: 'f',
label: 'Female'
}
],

init() {
this._super(...arguments);

this.colors = [
{ name: 'Red', color: 'red' },
{ name: 'Green', color: 'green' },
{ name: 'Blue', color: 'blue' }
];

this.countries = [
'United States',
'United Kingdom',
'Switzerland',
'Other'
];

this.genders= [
{
key: 'm',
label: 'Male'
},
{
key: 'f',
label: 'Female'
}
];
},

/* eslint-disable no-console*/
submit: task(function*(model) {
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
Expand Down Expand Up @@ -58,6 +57,7 @@ module.exports = function(environment) {
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
Expand Down
1 change: 0 additions & 1 deletion tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
module.exports = {
browsers: [
'ie 9',
Expand Down
15 changes: 0 additions & 15 deletions tests/dummy/public/crossdomain.xml

This file was deleted.

11 changes: 0 additions & 11 deletions tests/helpers/resolver.js

This file was deleted.

1 change: 1 addition & 0 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import config from '../../config/environment';

export default function startApp(attrs) {
let attributes = merge({}, config.APP);
attributes.autoboot = true;
attributes = merge(attributes, attrs); // use defaults, but you can override;

return run(() => {
Expand Down
12 changes: 6 additions & 6 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

setResolver(resolver);
start();
Loading

0 comments on commit 9d8c417

Please sign in to comment.