Skip to content

Commit 100aa3d

Browse files
authored
Merge pull request #49 from tniezurawski/tomek-addon-resurection
Fix an issue with notifying about changes in Ember 3.13 and upgrade the addon
2 parents 1249078 + 372b45b commit 100aa3d

34 files changed

+8881
-1746
lines changed

.eslintignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
17+
# ember-try
18+
/.node_modules.ember-try/
19+
/bower.json.ember-try
20+
/package.json.ember-try

.eslintrc.js

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,56 @@
11
module.exports = {
22
root: true,
3+
parser: 'babel-eslint',
34
parserOptions: {
4-
ecmaVersion: 2017,
5-
sourceType: 'module'
5+
ecmaVersion: 2018,
6+
sourceType: 'module',
7+
ecmaFeatures: {
8+
legacyDecorators: true
9+
}
610
},
7-
extends: 'eslint:recommended',
11+
plugins: [
12+
'ember'
13+
],
14+
extends: [
15+
'eslint:recommended',
16+
'plugin:ember/recommended'
17+
],
818
env: {
919
browser: true
1020
},
1121
rules: {
12-
}
22+
'ember/no-jquery': 'error'
23+
},
24+
overrides: [
25+
// node files
26+
{
27+
files: [
28+
'.eslintrc.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'
36+
],
37+
excludedFiles: [
38+
'addon/**',
39+
'addon-test-support/**',
40+
'app/**',
41+
'tests/dummy/app/**'
42+
],
43+
parserOptions: {
44+
sourceType: 'script'
45+
},
46+
env: {
47+
browser: false,
48+
node: true
49+
},
50+
plugins: ['node'],
51+
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
52+
// add your custom rules and overrides for node files here
53+
})
54+
}
55+
]
1356
};

.gitignore

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +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+
/.idea
14+
/.pnp*
1215
/.sass-cache
1316
/connect.lock
14-
/coverage/*
17+
/coverage/
1518
/libpeerconnection.log
16-
npm-debug.log*
17-
yarn-error.log
18-
testem.log
19+
/npm-debug.log*
20+
/testem.log
21+
/yarn-error.log
1922

2023
# ember-try
21-
.node_modules.ember-try/
22-
bower.json.ember-try
23-
package.json.ember-try
24+
/.node_modules.ember-try/
25+
/bower.json.ember-try
26+
/package.json.ember-try

.npmignore

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +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.js
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-
.eslintrc.js
12-
.watchmanconfig
13-
.travis.yml
14-
bower.json
15-
ember-cli-build.js
16-
testem.js
22+
/CONTRIBUTING.md
23+
/ember-cli-build.js
24+
/testem.js
25+
/tests/
26+
/yarn.lock
27+
.gitkeep
28+
29+
# 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: 'recommended'
5+
};

.travis.yml

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ 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-
- "6"
6+
- "8"
77

88
sudo: required
99
dist: trusty
@@ -15,23 +15,40 @@ cache:
1515
yarn: true
1616

1717
env:
18-
# we recommend new addons test the current and previous LTS
19-
# as well as latest stable release (bonus points to beta/canary)
20-
- EMBER_TRY_SCENARIO=ember-lts-2.8
21-
- EMBER_TRY_SCENARIO=ember-lts-2.12
22-
- EMBER_TRY_SCENARIO=ember-lts-2.18
23-
- EMBER_TRY_SCENARIO=ember-lts-3.4
24-
- EMBER_TRY_SCENARIO=ember-lts-3.8
25-
- EMBER_TRY_SCENARIO=ember-release
26-
- EMBER_TRY_SCENARIO=ember-beta
27-
- EMBER_TRY_SCENARIO=ember-canary
28-
- EMBER_TRY_SCENARIO=ember-default
29-
30-
matrix:
31-
fast_finish: true
18+
global:
19+
# See https://git.io/vdao3 for details.
20+
- JOBS=1
21+
22+
branches:
23+
only:
24+
- master
25+
# npm version tags
26+
- /^v\d+\.\d+\.\d+/
27+
28+
jobs:
29+
fail_fast: true
3230
allow_failures:
3331
- env: EMBER_TRY_SCENARIO=ember-canary
3432

33+
include:
34+
# runs linting and tests with current locked deps
35+
36+
- stage: "Tests"
37+
name: "Tests"
38+
script:
39+
- npm run lint:hbs
40+
- npm run lint:js
41+
- npm test
42+
43+
# we recommend new addons test the current and previous LTS
44+
# as well as latest stable release (bonus points to beta/canary)
45+
- stage: "Additional Tests"
46+
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
47+
- env: EMBER_TRY_SCENARIO=ember-release
48+
- env: EMBER_TRY_SCENARIO=ember-beta
49+
- env: EMBER_TRY_SCENARIO=ember-canary
50+
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
51+
3552
before_install:
3653
- curl -o- -L https://yarnpkg.com/install.sh | bash
3754
- export PATH=$HOME/.yarn/bin:$PATH
@@ -40,6 +57,4 @@ install:
4057
- yarn install --no-lockfile --non-interactive
4158

4259
script:
43-
# Usually, it's ok to finish the test scenario without reverting
44-
# to the addon's original dependency state, skipping "cleanup".
45-
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
60+
- 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` this repository
6+
* `cd ember-buffered-proxy`
7+
* `yarn install`
8+
9+
## Linting
10+
11+
* `npm run lint:hbs`
12+
* `npm run lint:js`
13+
* `npm run 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016
3+
Copyright (c) 2016-2019
44

55
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:
66

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ember install ember-buffered-proxy
1111
```js
1212
import BufferedProxy from 'ember-buffered-proxy/proxy';
1313

14-
var content = {
14+
let content = {
1515
firstName: 'stefan'
1616
};
1717

18-
var buffer = BufferedProxy.create({
18+
let buffer = BufferedProxy.create({
1919
content: content
2020
});
2121

@@ -86,38 +86,31 @@ Or you can grab the mixin directly
8686
```js
8787
import BufferedMixin from 'ember-buffered-proxy/mixin';
8888

89-
var content = {
89+
let content = {
9090
firstName: 'stefan'
9191
};
9292

93-
var buffer = ObjectProxy.extend(BufferedMixin).create({
93+
let buffer = ObjectProxy.extend(BufferedMixin).create({
9494
content: content
9595
});
9696

9797
// same as above
9898
```
9999

100100

101-
## development
101+
Compatibility
102+
------------------------------------------------------------------------------
102103

103-
## Installation
104+
* Ember.js v3.8 or above
105+
* Ember CLI v3.8 or above
106+
* Node.js v8 or above
104107

105-
* `git clone` this repository
106-
* `yarn install`
107-
* `bower install`
108+
Contributing
109+
------------------------------------------------------------------------------
108110

109-
## Running
111+
See the [Contributing](CONTRIBUTING.md) guide for details.
110112

111-
* `ember server`
112-
* Visit your app at http://localhost:4200.
113+
License
114+
------------------------------------------------------------------------------
113115

114-
## Running Tests
115-
116-
* `ember test`
117-
* `ember test --server`
118-
119-
## Building
120-
121-
* `ember build`
122-
123-
For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
116+
This project is licensed under the [MIT License](LICENSE.md).

addon/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var hasOwnProp = Object.prototype.hasOwnProperty;
1+
const hasOwnProp = Object.prototype.hasOwnProperty;
22

33
export function aliasMethod(methodName) {
44
return function() {
@@ -7,7 +7,7 @@ export function aliasMethod(methodName) {
77
}
88

99
export function empty(obj) {
10-
var key;
10+
let key;
1111
for (key in obj) {
1212
if (!hasOwnProp.call(obj, key)) { continue; }
1313
return false;

0 commit comments

Comments
 (0)