Skip to content

Commit 28d063a

Browse files
committed
Update ember-cli and dependencies
1 parent a144d4a commit 28d063a

14 files changed

+2669
-1949
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
root = true
66

7-
87
[*]
98
end_of_line = lf
109
charset = utf-8

.eslintrc.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
'use strict';
2+
13
module.exports = {
24
root: true,
35
parser: 'babel-eslint',
46
parserOptions: {
57
ecmaVersion: 2018,
6-
sourceType: 'module'
8+
sourceType: 'module',
9+
ecmaFeatures: {
10+
legacyDecorators: true
11+
}
712
},
813
plugins: [
914
'ember'

.travis.yml

+12-15
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ language: node_js
33
node_js:
44
# we recommend testing addons with the same minimum supported node version as Ember CLI
55
# so that your addon works for all apps
6-
- "8"
6+
- "10"
77

8-
sudo: false
98
dist: trusty
109

1110
addons:
@@ -26,43 +25,41 @@ branches:
2625
- /^v\d+\.\d+\.\d+/
2726

2827
jobs:
29-
fail_fast: true
28+
fast_finish: true
3029
allow_failures:
3130
- env: EMBER_TRY_SCENARIO=ember-canary
3231

3332
include:
3433
# runs linting and tests with current locked deps
35-
3634
- stage: "Tests"
3735
name: "Tests"
38-
install:
39-
- yarn install --non-interactive
4036
script:
41-
- yarn lint:hbs
42-
- yarn lint:js
43-
- yarn test
37+
- yarn lint
38+
- yarn test:ember
4439

45-
- name: "Floating Dependencies"
40+
- stage: "Additional Tests"
41+
name: "Floating Dependencies"
42+
install:
43+
- yarn install --no-lockfile --non-interactive
4644
script:
47-
- yarn test
45+
- yarn test:ember
4846

4947
# we recommend new addons test the current and previous LTS
5048
# as well as latest stable release (bonus points to beta/canary)
51-
- stage: "Additional Tests"
52-
env: EMBER_TRY_SCENARIO=ember-lts-3.4
53-
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
5449
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
50+
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
5551
- env: EMBER_TRY_SCENARIO=ember-release
5652
- env: EMBER_TRY_SCENARIO=ember-beta
5753
- env: EMBER_TRY_SCENARIO=ember-canary
5854
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
55+
- env: EMBER_TRY_SCENARIO=ember-classic
5956

6057
before_install:
6158
- curl -o- -L https://yarnpkg.com/install.sh | bash
6259
- export PATH=$HOME/.yarn/bin:$PATH
6360

6461
install:
65-
- yarn install --no-lockfile --non-interactive
62+
- yarn install --non-interactive
6663

6764
script:
6865
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
## Installation
44

55
* `git clone https://github.com/btecu/ember-simple-tree`
6-
* `cd my-addon`
7-
* `npm install`
6+
* `cd ember-simple-tree`
7+
* `yarn install`
88

99
## Linting
1010

11-
* `npm run lint:hbs`
12-
* `npm run lint:js`
13-
* `npm run lint:js -- --fix`
11+
* `yarn lint:hbs`
12+
* `yarn lint:js`
13+
* `yarn lint:js --fix`
1414

1515
## Running tests
1616

addon/components/x-tree-children.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Component from '@ember/component';
22
import layout from '../templates/components/x-tree-children';
3-
import { get, setProperties } from '@ember/object';
3+
import { setProperties } from '@ember/object';
44

55
export default Component.extend({
66
layout,
@@ -10,7 +10,7 @@ export default Component.extend({
1010
actions: {
1111
updateCheckbox() {
1212
if (this.recursiveCheck) {
13-
let children = get(this, 'model.children');
13+
let { children } = this.model;
1414

1515
if (children.length) {
1616
let isChecked = false;

addon/components/x-tree-node.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/* eslint-disable ember/no-get */
12
import Component from '@ember/component';
2-
import { computed, get, set, setProperties } from '@ember/object';
3+
import { computed, get, set, setProperties } from '@ember/object';
34
import layout from '../templates/components/x-tree-node';
45

56
export default Component.extend({

config/ember-try.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,18 @@ module.exports = async function() {
77
useYarn: true,
88
scenarios: [
99
{
10-
name: 'ember-lts-3.4',
11-
npm: {
12-
devDependencies: {
13-
'ember-source': '~3.4.0'
14-
}
15-
}
16-
},
17-
{
18-
name: 'ember-lts-3.8',
10+
name: 'ember-lts-3.12',
1911
npm: {
2012
devDependencies: {
21-
'ember-source': '~3.8.0'
13+
'ember-source': '~3.12.0'
2214
}
2315
}
2416
},
2517
{
26-
name: 'ember-lts-3.12',
18+
name: 'ember-lts-3.16',
2719
npm: {
2820
devDependencies: {
29-
'ember-source': '~3.12.0'
21+
'ember-source': '~3.16.0'
3022
}
3123
}
3224
},
@@ -54,7 +46,7 @@ module.exports = async function() {
5446
}
5547
}
5648
},
57-
// The default `.travis.yml` runs this scenario via `npm test`,
49+
// The default `.travis.yml` runs this scenario via `yarn test`,
5850
// not via `ember try`. It's still included here so that running
5951
// `ember try:each` manually or from a customized CI config will run it
6052
// along with all the other scenarios.
@@ -76,6 +68,21 @@ module.exports = async function() {
7668
'@ember/jquery': '^0.5.1'
7769
}
7870
}
71+
},
72+
{
73+
name: 'ember-classic',
74+
env: {
75+
EMBER_OPTIONAL_FEATURES: JSON.stringify({
76+
'application-template-wrapper': true,
77+
'default-async-observers': false,
78+
'template-only-glimmer-components': false
79+
})
80+
},
81+
npm: {
82+
ember: {
83+
edition: 'classic'
84+
}
85+
}
7986
}
8087
]
8188
};

package.json

+27-19
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,47 @@
2222
"test": "tests"
2323
},
2424
"scripts": {
25-
"build": "ember build",
25+
"build": "ember build --environment=production",
26+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
2627
"lint:hbs": "ember-template-lint .",
2728
"lint:js": "eslint .",
2829
"start": "ember serve",
29-
"test": "ember test",
30-
"test:all": "ember try:each"
30+
"test": "npm-run-all lint:* test:*",
31+
"test:ember": "ember test",
32+
"test:ember-compatibility": "ember try:each"
3133
},
3234
"dependencies": {
33-
"ember-cli-babel": "^7.11.1",
34-
"ember-cli-htmlbars": "^4.0.0"
35+
"ember-cli-babel": "^7.19.0",
36+
"ember-cli-htmlbars": "^4.3.1"
3537
},
3638
"devDependencies": {
37-
"@ember/optional-features": "^1.0.0",
38-
"babel-eslint": "^10.0.3",
39+
"@ember/optional-features": "^1.3.0",
40+
"@glimmer/component": "^1.0.0",
41+
"@glimmer/tracking": "^1.0.0",
42+
"babel-eslint": "^10.1.0",
3943
"broccoli-asset-rev": "^3.0.0",
40-
"ember-cli": "~3.13.1",
41-
"ember-cli-eslint": "^5.1.0",
42-
"ember-cli-template-lint": "^1.0.0-beta.3",
44+
"ember-cli": "~3.17.0",
4345
"ember-disable-prototype-extensions": "^1.1.3",
44-
"ember-load-initializers": "^2.1.0",
46+
"ember-load-initializers": "^2.1.1",
4547
"ember-maybe-import-regenerator": "^0.1.6",
46-
"ember-qunit": "^4.5.1",
47-
"ember-resolver": "^5.3.0",
48-
"ember-source": "~3.13.0",
48+
"ember-qunit": "^4.6.0",
49+
"ember-resolver": "^7.0.0",
50+
"ember-source": "~3.17.3",
4951
"ember-source-channel-url": "^2.0.1",
50-
"ember-try": "^1.2.1",
51-
"eslint-plugin-ember": "^7.1.0",
52-
"eslint-plugin-node": "^10.0.0",
52+
"ember-template-lint": "^2.4.0",
53+
"ember-try": "^1.4.0",
54+
"eslint": "^6.8.0",
55+
"eslint-plugin-ember": "^8.1.1",
56+
"eslint-plugin-node": "^11.1.0",
5357
"loader.js": "^4.7.0",
54-
"qunit-dom": "^0.9.0"
58+
"npm-run-all": "^4.1.5",
59+
"qunit-dom": "^1.1.0"
5560
},
5661
"engines": {
57-
"node": "8.* || 10.* || 12.*"
62+
"node": "10.* || >= 12"
63+
},
64+
"ember": {
65+
"edition": "octane"
5866
},
5967
"ember-addon": {
6068
"configPath": "tests/dummy/config"

testem.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = {
24
test_page: 'tests/index.html?hidepassed',
35
disable_watching: true,
@@ -7,6 +9,7 @@ module.exports = {
79
launch_in_dev: [
810
'Chrome'
911
],
12+
browser_start_timeout: 120,
1013
browser_args: {
1114
Chrome: {
1215
ci: [

tests/dummy/app/app.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import Application from '@ember/application';
2-
import Resolver from './resolver';
2+
import Resolver from 'ember-resolver';
33
import loadInitializers from 'ember-load-initializers';
44
import config from './config/environment';
55

6-
const App = Application.extend({
7-
modulePrefix: config.modulePrefix,
8-
podModulePrefix: config.podModulePrefix,
9-
Resolver
10-
});
6+
export default class App extends Application {
7+
modulePrefix = config.modulePrefix;
8+
podModulePrefix = config.podModulePrefix;
9+
Resolver = Resolver;
10+
}
1111

1212
loadInitializers(App, config.modulePrefix);
13-
14-
export default App;

tests/dummy/app/controllers/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import { buildTree } from 'ember-simple-tree/utils/tree';
44

55
export default Controller.extend({
66
tree: computed('model', function() {
7-
return buildTree(this.get('model'));
7+
return buildTree(this.model);
88
})
99
});

tests/dummy/app/router.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import EmberRouter from '@ember/routing/router';
22
import config from './config/environment';
33

4-
const Router = EmberRouter.extend({
5-
location: config.locationType,
6-
rootURL: config.rootURL
7-
});
4+
export default class Router extends EmberRouter {
5+
location = config.locationType;
6+
rootURL = config.rootURL;
7+
}
88

99
Router.map(function() {
1010
});
11-
12-
export default Router;
+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"jquery-integration": false
2+
"application-template-wrapper": false,
3+
"default-async-observers": true,
4+
"jquery-integration": false,
5+
"template-only-glimmer-components": true
36
}

0 commit comments

Comments
 (0)