Skip to content

Commit 049946f

Browse files
Merge pull request #385 from patocallaghan/patoc/ember-cli-upgrade
Upgrade to ember 3.20 LTS
2 parents e9ab4ca + 6eba4bb commit 049946f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+5640
-3156
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
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

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88

99
# dependencies
1010
/bower_components/
11+
/node_modules/
1112

1213
# misc
1314
/coverage/
15+
!.*
1416

1517
# ember-try
1618
/.node_modules.ember-try/
19+
/bower.json.ember-try
20+
/package.json.ember-try

.eslintrc.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
'use strict';
2+
13
module.exports = {
24
root: true,
5+
parser: 'babel-eslint',
36
parserOptions: {
4-
ecmaVersion: 2017,
5-
sourceType: 'module'
7+
ecmaVersion: 2018,
8+
sourceType: 'module',
9+
ecmaFeatures: {
10+
legacyDecorators: true
11+
}
612
},
713
plugins: [
814
'ember'
@@ -34,6 +40,8 @@ module.exports = {
3440
// node files
3541
{
3642
files: [
43+
'.eslintrc.js',
44+
'.template-lintrc.js',
3745
'ember-cli-build.js',
3846
'index.js',
3947
'testem.js',
@@ -49,18 +57,14 @@ module.exports = {
4957
'tests/dummy/app/**'
5058
],
5159
parserOptions: {
52-
sourceType: 'script',
53-
ecmaVersion: 2015
60+
sourceType: 'script'
5461
},
5562
env: {
5663
browser: false,
5764
node: true
5865
},
5966
plugins: ['node'],
60-
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
61-
// add your custom rules and overrides for node files here
62-
'camelcase': 'off'
63-
})
67+
extends: ['plugin:node/recommended']
6468
}
6569
]
6670
};

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
/node_modules/
1010

1111
# misc
12+
/.env*
13+
/.pnp*
1214
/.sass-cache
1315
/connect.lock
1416
/coverage/

.npmignore

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
/bower_components
1+
# compiled output
2+
/dist/
3+
/tmp/
4+
5+
# dependencies
6+
/bower_components/
7+
8+
# misc
9+
/.bowerrc
10+
/.editorconfig
11+
/.ember-cli
12+
/.env*
13+
/.eslintignore
14+
/.eslintrc.js
15+
/.git/
16+
/.gitignore
17+
/.template-lintrc.js
18+
/.travis.yml
19+
/.watchmanconfig
20+
/bower.json
221
/config/ember-try.js
3-
/dist
4-
/tests
5-
/tmp
6-
**/.gitkeep
7-
.bowerrc
8-
.editorconfig
9-
.ember-cli
10-
.gitignore
11-
.jshintrc
12-
.watchmanconfig
13-
.travis.yml
14-
bower.json
15-
ember-cli-build.js
16-
testem.js
17-
yarn.lock
22+
/CONTRIBUTING.md
23+
/ember-cli-build.js
24+
/testem.js
25+
/tests/
26+
/yarn.lock
27+
.gitkeep
1828

1929
# ember-try
20-
.node_modules.ember-try/
21-
bower.json.ember-try
22-
package.json.ember-try
30+
/.node_modules.ember-try/
31+
/bower.json.ember-try
32+
/package.json.ember-try

.template-lintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: 'octane'
5+
};

.travis.yml

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ node_js:
55
# so that your addon works for all apps
66
- "10"
77

8-
sudo: false
9-
dist: trusty
8+
dist: xenial
109

1110
addons:
1211
chrome: stable
@@ -20,31 +19,48 @@ env:
2019
global:
2120
# See https://git.io/vdao3 for details.
2221
- JOBS=1
23-
matrix:
24-
# we recommend new addons test the current and previous LTS
25-
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
26-
- EMBER_TRY_SCENARIO=ember-3.16.0
27-
- EMBER_TRY_SCENARIO=ember-3.15.0
28-
- EMBER_TRY_SCENARIO=ember-3.14.0
29-
- EMBER_TRY_SCENARIO=ember-3.13.0
30-
- EMBER_TRY_SCENARIO=ember-release
31-
- EMBER_TRY_SCENARIO=ember-beta
32-
- EMBER_TRY_SCENARIO=ember-canary
33-
- EMBER_TRY_SCENARIO=ember-default
34-
35-
matrix:
22+
23+
branches:
24+
only:
25+
- master
26+
# npm version tags
27+
- /^v\d+\.\d+\.\d+/
28+
29+
jobs:
3630
fast_finish: true
3731
allow_failures:
3832
- env: EMBER_TRY_SCENARIO=ember-canary
3933
- env: EMBER_TRY_SCENARIO=ember-beta
4034

35+
include:
36+
# runs linting and tests with current locked deps
37+
- stage: "Tests"
38+
name: "Tests"
39+
script:
40+
- yarn lint
41+
- yarn test:ember
42+
43+
- stage: "Additional Tests"
44+
name: "Floating Dependencies"
45+
install:
46+
- yarn install --no-lockfile --non-interactive
47+
script:
48+
- yarn test:ember
49+
50+
# we recommend new addons test the current and previous LTS
51+
# as well as latest stable release (bonus points to beta/canary)
52+
- env: EMBER_TRY_SCENARIO=ember-3.13
53+
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
54+
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
55+
- env: EMBER_TRY_SCENARIO=ember-release
56+
- env: EMBER_TRY_SCENARIO=ember-beta
57+
- env: EMBER_TRY_SCENARIO=ember-canary
58+
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
59+
- env: EMBER_TRY_SCENARIO=ember-classic
60+
4161
before_install:
4262
- curl -o- -L https://yarnpkg.com/install.sh | bash
4363
- export PATH=$HOME/.yarn/bin:$PATH
44-
- yarn --version
4564

4665
script:
47-
- npm run lint:js
48-
# Usually, it's ok to finish the test scenario without reverting
49-
# to the addon's original dependency state, skipping "cleanup".
50-
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
66+
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# How To Contribute
2+
3+
## Installation
4+
5+
* `git clone <repository-url>`
6+
* `cd my-addon`
7+
* `yarn`
8+
9+
## Linting
10+
11+
* `yarn lint:hbs`
12+
* `yarn lint:js`
13+
* `yarn lint:js -- --fix`
14+
15+
## Running tests
16+
17+
* `ember test` – Runs the test suite on the current Ember version
18+
* `ember test --server` – Runs the test suite in "watch mode"
19+
* `ember try:each` – Runs the test suite against multiple Ember versions
20+
21+
## Running the dummy application
22+
23+
* `ember serve`
24+
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
25+
26+
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

addon/array/fragment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const FragmentArray = StatefulArray.extend({
8787
@param {Object} data
8888
*/
8989
_normalizeData(data) {
90-
let content = get(this, 'content');
90+
let content = this.content;
9191

9292
return normalizeFragmentArray(this, content, data, true);
9393
},
@@ -200,7 +200,7 @@ const FragmentArray = StatefulArray.extend({
200200
@private
201201
*/
202202
replaceContent(index, amount, objs) {
203-
let content = get(this, 'content');
203+
let content = this.content;
204204
let replacedContent = content.slice(index, index + amount);
205205
let fragments = normalizeFragmentArray(this, replacedContent, objs);
206206

@@ -239,9 +239,9 @@ const FragmentArray = StatefulArray.extend({
239239
@return {MF.Fragment} the newly added fragment
240240
*/
241241
createFragment(props) {
242-
let record = get(this, 'owner');
242+
let record = this.owner;
243243
let store = get(record, 'store');
244-
let type = get(this, 'type');
244+
let type = this.type;
245245
let fragment = store.createFragment(type, props);
246246

247247
return this.pushObject(fragment);

0 commit comments

Comments
 (0)