Skip to content
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

Upgrade ember-cli & blueprint #206

Merged
merged 1 commit into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
**/*{.,-}min.js
**/test/fixtures/*
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/
155 changes: 44 additions & 111 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,120 +1,53 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: false,
node: true,
es6: true,
},
globals: {
browser: true
},
rules: {
/*** Possible Errors ***/

'no-console': 0,
'no-template-curly-in-string': 2,
'no-unsafe-negation': 2,

/*** Best Practices ***/

'curly': 2,
'eqeqeq': 2,
'guard-for-in': 0,
'no-caller': 2,
'no-eq-null': 2,
'no-eval': 2,
'no-multi-spaces': [2, {
'exceptions': {
'ObjectExpression': true,
'Property': true,
},
}],
'no-new': 0,
'no-unused-expressions': [2, {
allowShortCircuit: true,
allowTernary: true,
}],
'wrap-iife': 0,
'yoda': 2,

/*** Strict Mode ***/

'strict': [2, 'global'],

/*** Variables ***/

'no-undef': 2,
'no-unused-vars': 2,
'no-use-before-define': [2, 'nofunc'],

/*** Stylistic Issues ***/

'array-bracket-spacing': 2,
'block-spacing': 2,
'brace-style': [2, '1tbs', {
'allowSingleLine': true,
}],
'camelcase': 2,
'comma-dangle': [2, 'always-multiline'],
'comma-spacing': 2,
'comma-style': 2,
'eol-last': 2,
'func-call-spacing': 2,
'indent': [2, 2, {
'SwitchCase': 1,
'VariableDeclarator': { 'var': 2, 'let': 2, 'const': 3 }
}],
'key-spacing': 2,
'keyword-spacing': 2,
'linebreak-style': [2, 'unix'],
'new-cap': [2, {
properties: false,
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-bitwise': 2,
'no-lonely-if': 2,
'no-mixed-operators': 2,
'no-plusplus': 0,
'no-trailing-spaces': 2,
'no-unneeded-ternary': 2,
'no-whitespace-before-property': 2,
'object-curly-spacing': [2, 'always'],
'semi-spacing': 2,
'semi': 2,
'space-before-blocks': 2,
'space-before-function-paren': [2, 'never'],
'space-in-parens': 2,
'space-infix-ops': 2,
'space-unary-ops': 2,
'quotes': [2, 'single', {
'allowTemplateLiterals': true,
}],
'semi': [2, 'always'],
'wrap-regex': 2,

/*** ECMAScript 6 ***/

'arrow-body-style': [2, 'always'],
'arrow-parens': [2, 'always'],
'arrow-spacing': 2,
'generator-star-spacing': 2,
'no-confusing-arrow': [2, {
'allowParens': true,
}],
'no-useless-computed-key': 2,
'no-var': 2,
'object-shorthand': 2,
'prefer-arrow-callback': [2, {
'allowNamedFunctions': true,
}],
'prefer-template': 2,
'rest-spread-spacing': 2,
'symbol-description': 2,
'template-curly-spacing': 2,
'yield-star-spacing': 2,
},
overrides: [
// node files
{
files: [
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'test/**/*.js',
'lib/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'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
'no-process-exit': 'off'
})
}
]
};
26 changes: 13 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/.nyc_output
*.tgz
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

/.nyc_output
*.tgz
.scratch
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ appveyor.yml
bower.json
ember-cli-build.js
testem.js
yarn.lock
run-smoke-test.sh
*.tgz
testem.json
Expand Down
2 changes: 1 addition & 1 deletion lib/dependency-manager-adapters/bower.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports = CoreObject.extend({
debug('Remove backup bower.json');
return rimraf(path.join(adapter.cwd, adapter.bowerJSONBackupFileName));
}).catch((e) => {
console.log('Error cleaning up bower scenario:', e);
console.log('Error cleaning up bower scenario:', e); // eslint-disable-line no-console
})
.then(() => {
return adapter._install();
Expand Down
2 changes: 1 addition & 1 deletion lib/dependency-manager-adapters/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = CoreObject.extend({

return RSVP.all(cleanupTasks);
}).catch((e) => {
console.log('Error cleaning up npm scenario:', e);
console.log('Error cleaning up npm scenario:', e); // eslint-disable-line no-console
});
},
_runYarnCheck(ui) {
Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
"name": "ember-try",
"version": "1.0.0-beta.3",
"description": "An ember-cli addon to test against multiple bower dependencies, such as ember and ember-data.",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"lint:js": "eslint .",
"start": "ember serve",
"test": "npm run-script lint && npm run-script node-test && npm run-script client-test",
"client-test": "./run-smoke-test.sh all-commands.sh",
Expand All @@ -18,32 +14,30 @@
"smoke-test": "./run-smoke-test.sh smoke-test.sh",
"lint": "eslint lib test"
},
"repository": "ember-cli/ember-try",
"engines": {
"node": "6.* || >= 7.*"
"node": "6.* || 8.* || >= 10.*"
},
"author": "Katie Gengler",
"license": "MIT",
"devDependencies": {
"bower": "^1.8.2",
"broccoli-asset-rev": "^2.4.5",
"broccoli-asset-rev": "^2.7.0",
"chai": "^4.1.2",
"codecov": "^3.0.0",
"ember-cli": "~2.18.0",
"ember-cli": "~3.3.0",
"ember-cli-babel": "^6.6.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.1.1",
"ember-cli-qunit": "^4.3.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^4.0.0",
"ember-source": "~2.18.0",
"ember-source": "~3.3.0",
"eslint": "^5.4.0",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^7.0.1",
Expand All @@ -58,6 +52,13 @@
"ember-addon",
"testing"
],
"repository": "ember-cli/ember-try",
"license": "MIT",
"author": "Katie Gengler",
"directories": {
"doc": "doc",
"test": "tests"
},
"dependencies": {
"chalk": "^2.3.0",
"cli-table3": "^0.5.1",
Expand Down
15 changes: 9 additions & 6 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ module.exports = {
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900',
'--no-sandbox'
]
'--window-size=1440,900'
].filter(Boolean)
}
}
};
14 changes: 7 additions & 7 deletions tests/acceptance/poc-test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Ember from 'ember';
import { test } from 'qunit';
import moduleForAcceptance from '../helpers/module-for-acceptance';
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';

moduleForAcceptance('Acceptance Test - To use to try running included commands');
module('Acceptance Test - To use to try running included commands', function(hooks) {
setupApplicationTest(hooks);

test('visiting /', function(assert) {
visit('/');
test('visiting /', async function(assert) {
await visit('/');

andThen(function() {
assert.equal(currentURL(), '/');
});
});
22 changes: 16 additions & 6 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
'use strict';

const browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
];

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}

module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
browsers
};
Empty file added tests/helpers/.gitkeep
Empty file.
5 changes: 0 additions & 5 deletions tests/helpers/destroy-app.js

This file was deleted.

Loading