Skip to content

Commit d4354fb

Browse files
authored
feat(breaking): upgrade to ember 3.28 (#51)
* drops support for nodes 10 and below * drops support for ember < 3.24
1 parent d342f1c commit d4354fb

16 files changed

+4173
-2612
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

.eslintrc.js

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,52 @@
22

33
module.exports = {
44
root: true,
5+
parser: 'babel-eslint',
56
parserOptions: {
6-
ecmaVersion: 2017,
7-
sourceType: 'module'
7+
ecmaVersion: 2018,
8+
sourceType: 'module',
9+
ecmaFeatures: {
10+
legacyDecorators: true,
11+
},
812
},
9-
plugins: ['ember', 'prettier'],
10-
extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'],
13+
plugins: ['ember'],
14+
extends: [
15+
'eslint:recommended',
16+
'plugin:ember/recommended',
17+
'plugin:prettier/recommended',
18+
],
1119
env: {
12-
browser: true
13-
},
14-
rules: {
15-
'ember/avoid-leaking-state-in-ember-objects': 0,
16-
'prettier/prettier': ['error', { singleQuote: true }]
20+
browser: true,
1721
},
22+
rules: {},
1823
overrides: [
1924
// node files
2025
{
2126
files: [
22-
'.eslintrc.js',
23-
'.prettierrc.js',
24-
'.template-lintrc.js',
25-
'ember-cli-build.js',
26-
'index.js',
27-
'testem.js',
28-
'blueprints/*/index.js',
29-
'config/**/*.js',
30-
'tests/dummy/config/**/*.js'
31-
],
32-
excludedFiles: [
33-
'addon/**',
34-
'addon-test-support/**',
35-
'app/**',
36-
'tests/dummy/app/**'
27+
'./.eslintrc.js',
28+
'./.prettierrc.js',
29+
'./.template-lintrc.js',
30+
'./ember-cli-build.js',
31+
'./index.js',
32+
'./testem.js',
33+
'./blueprints/*/index.js',
34+
'./config/**/*.js',
35+
'./tests/dummy/config/**/*.js',
3736
],
3837
parserOptions: {
3938
sourceType: 'script',
40-
ecmaVersion: 2015
4139
},
4240
env: {
4341
browser: false,
44-
node: true
42+
node: true,
4543
},
4644
plugins: ['node'],
47-
rules: Object.assign(
48-
{},
49-
require('eslint-plugin-node').configs.recommended.rules,
50-
{
51-
// add your custom rules and overrides for node files here
52-
}
53-
)
45+
extends: ['plugin:node/recommended'],
5446
},
5547
{
56-
files: ['tests/unit/**/*.js'],
57-
env: {
58-
browser: false,
59-
node: true,
60-
mocha: true
61-
},
62-
plugins: ['node'],
63-
rules: Object.assign(
64-
{},
65-
require('eslint-plugin-node').configs.recommended.rules,
66-
{
67-
// add your custom rules and overrides for node files here
68-
}
69-
)
70-
}
71-
]
48+
// Test files:
49+
files: ['tests/**/*-test.{js,ts}'],
50+
// extends: ['plugin:qunit/recommended'],
51+
},
52+
],
7253
};

.gitignore

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist
5-
/tmp
4+
/dist/
5+
/tmp/
66

77
# dependencies
8-
/node_modules
9-
/bower_components
8+
/bower_components/
9+
/node_modules/
1010

1111
# misc
12+
/.env*
13+
/.pnp*
1214
/.sass-cache
15+
/.eslintcache
1316
/connect.lock
14-
/coverage/*
17+
/coverage/
1518
/libpeerconnection.log
16-
npm-debug.log*
17-
testem.log
19+
/npm-debug.log*
20+
/testem.log
21+
/yarn-error.log
22+
23+
# ember-try
24+
/.node_modules.ember-try/
25+
/bower.json.ember-try
26+
/package.json.ember-try

.npmignore

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
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+
/.eslintcache
14+
/.eslintignore
15+
/.eslintrc.js
16+
/.git/
17+
/.gitignore
18+
/.prettierignore
19+
/.prettierrc.js
20+
/.template-lintrc.js
21+
/.travis.yml
22+
/.watchmanconfig
23+
/bower.json
224
/config/ember-try.js
3-
/dist
4-
/tests
5-
/tmp
6-
**/.gitkeep
7-
.bowerrc
8-
.editorconfig
9-
.ember-cli
10-
.gitignore
11-
.eslintrc.js
12-
.watchmanconfig
13-
.travis.yml
14-
bower.json
15-
ember-cli-build.js
16-
testem.js
25+
/CONTRIBUTING.md
26+
/ember-cli-build.js
27+
/testem.js
28+
/tests/
29+
/yarn-error.log
30+
/yarn.lock
31+
.gitkeep
32+
33+
# ember-try
34+
/.node_modules.ember-try/
35+
/bower.json.ember-try
36+
/package.json.ember-try

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
singleQuote: true
4+
singleQuote: true,
55
};

.travis.yml

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,64 @@
11
---
22
language: node_js
33
node_js:
4-
- "6"
4+
# we recommend testing addons with the same minimum supported node version as Ember CLI
5+
# so that your addon works for all apps
6+
- "12"
57

6-
sudo: false
7-
dist: trusty
8+
dist: xenial
9+
10+
addons:
11+
chrome: stable
812

913
cache:
1014
yarn: true
1115

16+
env:
17+
global:
18+
# See https://git.io/vdao3 for details.
19+
- JOBS=1
20+
21+
branches:
22+
only:
23+
- master
24+
# npm version tags
25+
- /^v\d+\.\d+\.\d+/
26+
27+
jobs:
28+
fast_finish: true
29+
allow_failures:
30+
- env: EMBER_TRY_SCENARIO=ember-canary
31+
32+
include:
33+
# runs linting and tests with current locked deps
34+
- stage: "Tests"
35+
name: "Tests"
36+
script:
37+
- yarn lint
38+
- yarn test:ember
39+
40+
- stage: "Additional Tests"
41+
name: "Floating Dependencies"
42+
install:
43+
- yarn install --no-lockfile --non-interactive
44+
script:
45+
- yarn test:ember
46+
47+
# we recommend new addons test the current and previous LTS
48+
# as well as latest stable release (bonus points to beta/canary)
49+
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
50+
- env: EMBER_TRY_SCENARIO=ember-lts-3.28
51+
- env: EMBER_TRY_SCENARIO=ember-release
52+
- env: EMBER_TRY_SCENARIO=ember-beta
53+
- env: EMBER_TRY_SCENARIO=ember-canary
54+
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
55+
- env: EMBER_TRY_SCENARIO=ember-classic
56+
- env: EMBER_TRY_SCENARIO=embroider-safe
57+
- env: EMBER_TRY_SCENARIO=embroider-optimized
58+
1259
before_install:
1360
- curl -o- -L https://yarnpkg.com/install.sh | bash
1461
- export PATH=$HOME/.yarn/bin:$PATH
1562

16-
install:
17-
- yarn install --no-lockfile --non-interactive
18-
1963
script:
20-
- yarn test
64+
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

CONTRIBUTING.md

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

README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# ember-cli-deploy-bugsnag
1+
ember-cli-deploy-bugsnag
2+
==============================================================================
23

34
[![NPM release][npm-badge]][npm-badge-url]
45
[![Build][travis-badge]][travis-badge-url]
@@ -15,11 +16,24 @@ An [Ember CLI Deploy](http://ember-cli-deploy.com/) plugin for [uploading source
1516

1617
To send errors to Bugsnag, see [`ember-cli-bugsnag`](https://github.com/binhums/ember-cli-bugsnag).
1718

18-
## Installation
19+
Compatibility
20+
------------------------------------------------------------------------------
1921

20-
* `ember install ember-cli-deploy ember-cli-deploy-build ember-cli-deploy-bugsnag`
22+
* Ember.js v3.24 or above
23+
* Ember CLI v3.24 or above
24+
* Node.js v12 or above
2125

22-
### Quick start
26+
27+
Installation
28+
------------------------------------------------------------------------------
29+
30+
```
31+
ember install ember-cli-deploy-bugsnag
32+
```
33+
34+
35+
Usage
36+
------------------------------------------------------------------------------
2337

2438
Enable sourcemaps for all environments in `ember-cli-build.js`:
2539

@@ -105,15 +119,13 @@ Heroku strips away git information, so this addon grabs the revision info from t
105119
};
106120
```
107121

108-
## Developing
122+
Contributing
123+
------------------------------------------------------------------------------
109124

110-
### Running
125+
See the [Contributing](CONTRIBUTING.md) guide for details.
111126

112-
* `ember serve`
113-
* Visit your app at [http://localhost:4200](http://localhost:4200).
114127

115-
### Running Tests
128+
License
129+
------------------------------------------------------------------------------
116130

117-
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
118-
* `ember test`
119-
* `ember test --server`
131+
This project is licensed under the [MIT License](LICENSE.md).

config/environment.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/* eslint-env node */
21
'use strict';
32

4-
module.exports = function(/* environment, appConfig */) {
3+
module.exports = function (/* environment, appConfig */) {
54
return {};
65
};

ember-cli-build.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/* eslint-env node */
1+
'use strict';
2+
23
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
34

4-
module.exports = function(defaults) {
5-
var app = new EmberAddon(defaults, {
5+
module.exports = function (defaults) {
6+
let app = new EmberAddon(defaults, {
67
// Add options here
78
});
89

@@ -13,5 +14,12 @@ module.exports = function(defaults) {
1314
behave. You most likely want to be modifying `./index.js` or app's build file
1415
*/
1516

16-
return app.toTree();
17+
const { maybeEmbroider } = require('@embroider/test-setup');
18+
return maybeEmbroider(app, {
19+
skipBabel: [
20+
{
21+
package: 'qunit',
22+
},
23+
],
24+
});
1725
};

0 commit comments

Comments
 (0)