Skip to content

Commit

Permalink
chore(upgrade): upgraded ember cli and all dependecies to latest verson
Browse files Browse the repository at this point in the history
  • Loading branch information
webark committed Jul 31, 2017
1 parent 20d65a4 commit 2400298
Show file tree
Hide file tree
Showing 20 changed files with 1,360 additions and 1,482 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/tmp

# dependencies
node_modules
/node_modules
/bower_components

# misc
Expand All @@ -14,4 +14,10 @@ node_modules
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
---
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

# had an issue with node 4, so bumped back up to 6
- "6"

sudo: false

cache:
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache
yarn: true

env:
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
# 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-1.13
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand All @@ -26,16 +30,15 @@ matrix:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm config set spin false
- npm install -g bower phantomjs-prebuilt
- bower --version
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add phantomjs-prebuilt
- phantomjs --version

install:
- npm install
- bower install
- yarn install --no-lockfile --non-interactive

script:
# 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 test --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
5 changes: 0 additions & 5 deletions bower.json

This file was deleted.

8 changes: 8 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ module.exports = {
}
}
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-release',
bower: {
Expand Down
2 changes: 2 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
Expand Down
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,48 +22,48 @@
"prepublish": "./bin/install-test-addons.sh"
},
"dependencies": {
"broccoli-concat": "^3.0.5",
"broccoli-funnel": "^1.0.9",
"broccoli-concat": "^3.2.2",
"broccoli-funnel": "^1.2.0",
"broccoli-merge-trees": "^2.0.0",
"broccoli-persistent-filter": "^1.2.13",
"broccoli-plugin": "^1.2.1",
"broccoli-persistent-filter": "^1.4.2",
"broccoli-plugin": "^1.3.0",
"broccoli-style-manifest": "^1.2.2",
"ember-cli-babel": "^5.1.7",
"ember-getowner-polyfill": "^1.1.1",
"ember-cli-babel": "^6.6.0",
"ember-getowner-polyfill": "^2.0.1",
"fs-tree-diff": "^0.5.6",
"md5": "^2.1.0",
"postcss": "^5.2.10",
"postcss-less": "^0.15.0",
"postcss-scss": "^0.4.0",
"postcss-selector-namespace": "^1.3.0",
"rsvp": "^3.2.1",
"walk-sync": "^0.3.1"
"md5": "^2.2.1",
"postcss": "^6.0.8",
"postcss-less": "^1.1.0",
"postcss-scss": "^1.0.2",
"postcss-selector-namespace": "^1.4.1",
"rsvp": "^4.0.1",
"walk-sync": "^0.3.2"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "2.12.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^3.1.0",
"ember-cli-shims": "^1.0.2",
"ember-cli-sri": "^2.1.0",
"broccoli-asset-rev": "^2.5.0",
"ember-cli": "^2.14.1",
"ember-cli-dependency-checker": "^2.0.1",
"ember-cli-eslint": "^4.2.0",
"ember-cli-htmlbars": "^2.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.4.4",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-styles-preprocessor": "^0.0.8",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-source": "~2.12.0",
"loader.js": "^4.2.3",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.3.0",
"ember-source": "^2.14.1",
"loader.js": "^4.6.0",
"no-style-files-yet": "file:./tests/dummy/lib/no-style-files-yet",
"second-test-addon": "file:./tests/dummy/lib/second-test-addon",
"test-addon": "file:./tests/dummy/lib/test-addon"
},
"engines": {
"node": ">= 4"
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
14 changes: 7 additions & 7 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-env node */
module.exports = {
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
launch_in_dev: [
'PhantomJS',
'Chrome'
]
};
10 changes: 1 addition & 9 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const {
Application,
} = Ember;

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Application.extend({
const App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
6 changes: 1 addition & 5 deletions tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import Ember from 'ember';
import config from './config/environment';

const {
Router,
} = Ember;

export default Router.extend({
export default Ember.Router.extend({
location: config.locationType,
rootURL: config.rootURL
}).map(function() {
Expand Down
9 changes: 3 additions & 6 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
var ENV = {
let ENV = {
modulePrefix: 'dummy',
podModulePrefix: 'dummy',
environment: environment,
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
Expand Down Expand Up @@ -43,9 +44,5 @@ module.exports = function(environment) {
ENV.APP.rootElement = '#ember-testing';
}

if (environment === 'production') {

}

return ENV;
};
9 changes: 9 additions & 0 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-env node */
module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
2 changes: 1 addition & 1 deletion tests/dummy/lib/no-style-files-yet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "no-style-files-yet",
"version": "0.0.0",
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-babel": "*",
"ember-cli-styles-preprocessor": "*",
"ember-cli-htmlbars": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/lib/second-test-addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "second-test-addon",
"version": "0.0.0",
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-babel": "*",
"ember-cli-styles-preprocessor": "*",
"ember-cli-htmlbars": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/lib/test-addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "test-addon",
"version": "0.0.0",
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-babel": "*",
"ember-cli-styles-preprocessor": "*",
"ember-cli-htmlbars": "*"
},
Expand Down
6 changes: 1 addition & 5 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Ember from 'ember';

const {
run,
} = Ember;

export default function destroyApp(application) {
run(application, 'destroy');
Ember.run(application, 'destroy');
}
4 changes: 2 additions & 2 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

const { RSVP: { Promise } } = Ember;
const { RSVP: { resolve } } = Ember;

export default function(name, options = {}) {
module(name, {
Expand All @@ -17,7 +17,7 @@ export default function(name, options = {}) {

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
return resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
11 changes: 3 additions & 8 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';

const {
merge,
run,
} = Ember;

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

return run(() => {
return Ember.run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
Expand Down
2 changes: 2 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';

setResolver(resolver);
start();
Loading

0 comments on commit 2400298

Please sign in to comment.