Skip to content

Commit

Permalink
fix: Upgrade Ember v3.13.1...v3.21.2
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop Node < 10
BREAKING CHANGE: Drop Ember < 3.12 LTS (might work, but untested going forward)
  • Loading branch information
knownasilya committed Sep 12, 2020
1 parent 51ba80c commit 764d27f
Show file tree
Hide file tree
Showing 17 changed files with 172 additions and 119 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
27 changes: 14 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
Expand Down Expand Up @@ -41,19 +46,15 @@ module.exports = {
node: true,
},
plugins: ['node'],
rules: Object.assign(
{},
require('eslint-plugin-node').configs.recommended.rules,
{
// add your custom rules and overrides for node files here
'node/no-unpublished-require': [
'error',
{
allowModules: ['toastr'],
},
],
}
),
extends: ['plugin:node/recommended'],
rules: {
'node/no-unpublished-require': [
'error',
{
allowModules: ['toastr'],
},
],
},
},
],
};
5 changes: 3 additions & 2 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module.exports = {
extends: 'recommended',
rules: {
quotes: 'single'
}
quotes: false,
},
// extends: 'octane'
};
31 changes: 20 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ 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
- '8'
- '10'

sudo: false
dist: trusty
dist: xenial

addons:
chrome: stable
Expand All @@ -26,31 +25,41 @@ branches:
- /^v\d+\.\d+\.\d+/

jobs:
fail_fast: true
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=embroider-tests

include:
# runs linting and tests with current locked deps

- stage: 'Tests'
name: 'Tests'
script:
- npm run lint:hbs
- npm run lint:js
- npm test
- yarn lint
- yarn test:ember

- stage: 'Additional Tests'
name: 'Floating Dependencies'
install:
- yarn install --no-lockfile --non-interactive
script:
- yarn test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: 'Additional Tests'
env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic
- env: EMBER_TRY_SCENARIO=embroider-tests

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

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

## Installation

* `git clone <repository-url>`
* `cd my-addon`
* `npm install`
- `git clone <repository-url>`
- `cd my-addon`
- `npm install`

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`
- `npm run lint:hbs`
- `npm run lint:js`
- `npm run lint:js -- --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
- `ember test` – Runs the test suite on the current Ember version
- `ember test --server` – Runs the test suite in "watch mode"
- `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
- `ember serve`
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).

## Publish Demo Site

Expand All @@ -30,4 +30,4 @@ ember github-pages:commit --message <message>
git push
```

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ A service wrapper for [toastr.js] with auto injection into routes, components, a
[![Build Status](https://travis-ci.org/knownasilya/ember-toastr.svg)](https://travis-ci.org/knownasilya/ember-toastr)
[![Ember Observer Score](http://emberobserver.com/badges/ember-toastr.svg)](http://emberobserver.com/addons/ember-toastr)

Compatibility
------------------------------------------------------------------------------
## Compatibility

* Ember.js v3.4 or above
* Ember CLI v2.13 or above
* Node.js v8 or above
* Requires jQuery (see https://github.com/emberjs/ember-jquery)
- Ember.js v3.16 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
- Requires jQuery (see https://github.com/emberjs/ember-jquery)

## Usage

Expand All @@ -24,16 +23,23 @@ You can now access the notifications service as `toast`.
You can inject it in routes, controllers or components using the following syntax:

```js
import Route from '@ember/routing/route';
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';

export default Route.extend({
notifications: service('toast'),
export default class SomeController extends Controller {
@service toast;

@action
test() {
this.notifications.info('text', 'title', options);
let title = 'Test';
let message = 'A test happened';

this.toast.info(message, title, {
// options here
});
}
});
}
```

> If using newer versions of Ember you can inject using the decorator syntax, see the Ember documentation for @ember/service#inject decorator.
Expand Down Expand Up @@ -80,7 +86,6 @@ A method to remove all toasts, or the individual toast.

A property to access all toasts that are added.


## Configuration

These are the default options:
Expand All @@ -102,20 +107,17 @@ ENV['ember-toastr'] = {
showEasing: 'swing',
hideEasing: 'linear',
showMethod: 'fadeIn',
hideMethod: 'fadeOut'
}
hideMethod: 'fadeOut',
},
};
```

All options in `toastrOptions` are direct options for toastr.js.


Contributing
------------------------------------------------------------------------------
## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.


[toastr.js]: https://github.com/CodeSeven/toastr
[toastr.js documentation]: https://github.com/CodeSeven/toastr#other-options
[demo]: http://codeseven.github.io/toastr/demo.html
41 changes: 27 additions & 14 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@ module.exports = async function () {
return {
scenarios: [
{
name: 'ember-lts-3.4',
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~3.4.0',
'ember-source': '~3.12.0',
},
},
},
{
name: 'ember-lts-3.8',
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.8.0',
'ember-source': '~3.16.0',
},
},
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
},
},
},
Expand Down Expand Up @@ -45,26 +53,31 @@ module.exports = async function () {
},
},
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
}),
},
npm: {
devDependencies: {},
devDependencies: {
'@ember/jquery': '^1.1.0',
},
},
},
{
name: 'ember-default-with-jquery',
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
ember: {
edition: 'classic',
},
},
},
Expand Down

0 comments on commit 764d27f

Please sign in to comment.