Skip to content

Commit bd5532b

Browse files
committed
chore: bump to ember@3
fixes #5 BREAKING CHANGE: this changes the minimum supported version of IE to IE11.
1 parent 59218f6 commit bd5532b

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

+2507
-1568
lines changed

.eslintrc.js

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,52 @@ module.exports = {
44
ecmaVersion: 2017,
55
sourceType: 'module'
66
},
7-
extends: 'eslint:recommended',
7+
plugins: [
8+
'ember'
9+
],
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:ember/recommended'
13+
],
814
env: {
915
browser: true
1016
},
1117
rules: {
1218
'no-console': 0,
1319
'no-multi-spaces': 2,
1420
'one-var': ['error', 'never'],
15-
'indent': ['error', 2, { "SwitchCase": 1 }]
16-
}
21+
'indent': ['error', 2, { "SwitchCase": 1 }],
22+
'ember/avoid-leaking-state-in-ember-objects': 0,
23+
'ember/closure-actions': 0,
24+
},
25+
overrides: [
26+
// node files
27+
{
28+
files: [
29+
'ember-cli-build.js',
30+
'index.js',
31+
'testem.js',
32+
'config/**/*.js',
33+
'tests/dummy/config/**/*.js'
34+
],
35+
excludedFiles: [
36+
'addon/**',
37+
'addon-test-support/**',
38+
'app/**',
39+
'tests/dummy/app/**'
40+
],
41+
parserOptions: {
42+
sourceType: 'script',
43+
ecmaVersion: 2015
44+
},
45+
env: {
46+
browser: false,
47+
node: true
48+
},
49+
plugins: ['node'],
50+
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
51+
// add your custom rules and overrides for node files here
52+
})
53+
}
54+
]
1755
};

.npmignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
.bowerrc
88
.editorconfig
99
.ember-cli
10-
.gitignore
1110
.eslintrc.js
11+
.gitignore
1212
.watchmanconfig
1313
.travis.yml
1414
bower.json
1515
ember-cli-build.js
1616
testem.js
17+
18+
# ember-try
19+
.node_modules.ember-try/
20+
bower.json.ember-try
21+
package.json.ember-try

.travis.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,39 @@ dist: trusty
1111
addons:
1212
chrome: stable
1313

14-
cache:
15-
directories:
16-
- $HOME/.npm
14+
cache: yarn
1715

1816
env:
19-
# we recommend new addons test the current and previous LTS
20-
# as well as latest stable release (bonus points to beta/canary)
21-
- EMBER_TRY_SCENARIO=ember-lts-2.8
22-
- EMBER_TRY_SCENARIO=ember-lts-2.12
23-
- EMBER_TRY_SCENARIO=ember-release
24-
- EMBER_TRY_SCENARIO=ember-beta
25-
- EMBER_TRY_SCENARIO=ember-canary
26-
- EMBER_TRY_SCENARIO=ember-default
17+
global:
18+
# See https://git.io/vdao3 for details.
19+
- JOBS=1
20+
matrix:
21+
# we recommend new addons test the current and previous LTS
22+
# as well as latest stable release (bonus points to beta/canary)
23+
- EMBER_TRY_SCENARIO=ember-lts-2.12
24+
- EMBER_TRY_SCENARIO=ember-lts-2.16
25+
- EMBER_TRY_SCENARIO=ember-lts-2.18
26+
- EMBER_TRY_SCENARIO=ember-release
27+
- EMBER_TRY_SCENARIO=ember-beta
28+
- EMBER_TRY_SCENARIO=ember-canary
29+
- EMBER_TRY_SCENARIO=ember-default
2730

2831
matrix:
2932
fast_finish: true
3033
allow_failures:
3134
- env: EMBER_TRY_SCENARIO=ember-canary
3235

3336
before_install:
34-
- npm config set spin false
35-
- npm install -g bower npm@4
36-
- npm --version
37+
- yarn global add bower
38+
- yarn --version
3739
- bower --version
3840

3941
install:
40-
- npm install
42+
- yarn
4143
- bower install
4244

4345
script:
46+
- yarn lint:js
4447
# Usually, it's ok to finish the test scenario without reverting
4548
# to the addon's original dependency state, skipping "cleanup".
4649
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

LICENSE

Lines changed: 0 additions & 22 deletions
This file was deleted.

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) 2018
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.

README.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,60 @@
1-
# Ember-keyword-complete
1+
ember-keyword-complete
2+
==============================================================================
23

34
[![npm version](https://badge.fury.io/js/ember-keyword-complete.svg)](https://badge.fury.io/js/ember-keyword-complete)
45
[![Build Status](https://travis-ci.org/makepanic/ember-keyword-complete.svg?branch=master)](https://travis-ci.org/makepanic/ember-keyword-complete)
56
[![Ember Observer Score](http://emberobserver.com/badges/ember-keyword-complete.svg)](http://emberobserver.com/addons/ember-keyword-complete)
67

7-
> An easy way to add keyword autocompletion to existing input/textarea elements
8+
An easy way to add keyword autocompletion to existing input/textarea elements
89

910
[ember-keyword-complete demo + docs](http://makepanic.github.io/ember-keyword-complete/#/)
1011

11-
## Usage
12-
13-
Installing this addon is as easy as:
12+
Installation
13+
------------------------------------------------------------------------------
1414

1515
```
1616
ember install ember-keyword-complete
1717
```
1818

19+
20+
Usage
21+
------------------------------------------------------------------------------
22+
1923
In order to break control whether the component breaks on spaces simply set the `breakOnSpaces` property to false.
2024
Great for Facebook tags.
2125

2226
```
2327
{{#keyword-complete dataSources=ds breakOnSpaces=false}}
2428
```
2529

30+
Contributing
31+
------------------------------------------------------------------------------
2632

27-
This README outlines the details of collaborating on this Ember addon.
28-
29-
## Installation
33+
### Installation
3034

31-
* `git clone <repository-url>` this repository
35+
* `git clone <repository-url>`
3236
* `cd ember-keyword-complete`
33-
* `npm install`
34-
* `bower install`
37+
* `yarn`
3538

36-
## Running
39+
### Linting
3740

38-
* `ember serve`
39-
* Visit your app at [http://localhost:4200](http://localhost:4200).
41+
* `yarn lint:js`
42+
* `yarn lint:js -- --fix`
4043

41-
## Running Tests
44+
### Running tests
4245

43-
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
44-
* `ember test`
45-
* `ember test --server`
46+
* `ember test` Runs the test suite on the current Ember version
47+
* `ember test --server` – Runs the test suite in "watch mode"
48+
* `ember try:each` – Runs the test suite against multiple Ember versions
4649

47-
## Building
50+
### Running the dummy application
4851

49-
* `ember build`
52+
* `ember serve`
53+
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
5054

5155
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
56+
57+
License
58+
------------------------------------------------------------------------------
59+
60+
This project is licensed under the [MIT License](LICENSE.md).

addon/components/keyword-complete-tooltip-item.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
22
import layout from '../templates/components/keyword-complete-tooltip-item';
33

4-
export default Ember.Component.extend({
4+
export default Component.extend({
55
/**
66
* Flag that represents whether the item is active.
77
* @property active
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
22

3-
export default Ember.Component.extend({
3+
export default Component.extend({
44
classNames: ['complete-tooltip'],
55
classNameBindings: ['visible::complete-tooltip--invisible']
66
});

addon/components/keyword-complete.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import Ember from 'ember';
21
import layout from '../templates/components/keyword-complete';
3-
4-
const {observer, computed, run, assert, $} = Ember;
2+
import Component from '@ember/component';
3+
import {observer, computed} from '@ember/object';
4+
import $ from 'jquery';
5+
import {run} from '@ember/runloop';
6+
import {assert} from '@ember/debug';
57

68
const REGEX_WHITESPACE = /[\s\t]/;
79
const REGEX_KEYWORDS = /[0-9a-zA-Z_.]/;
@@ -44,7 +46,7 @@ function getCaretPosition(el) {
4446
* @extends Ember.Component
4547
* @public
4648
*/
47-
export default Ember.Component.extend({
49+
export default Component.extend({
4850
layout,
4951
classNames: ['auto-complete'],
5052

0 commit comments

Comments
 (0)