Skip to content

Commit b0c2e62

Browse files
author
Sam De Maeyer
committed
Upgrade ember
1 parent f85febc commit b0c2e62

Some content is hidden

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

48 files changed

+3689
-2247
lines changed

.bowerrc

-4
This file was deleted.

.eslintignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist/
5+
/tmp/
6+
7+
# dependencies
8+
/bower_components/
9+
/node_modules/
10+
11+
# misc
12+
/.sass-cache
13+
/connect.lock
14+
/coverage/
15+
/libpeerconnection.log
16+
/npm-debug.log*
17+
/testem.log
18+
/yarn-error.log
19+
20+
# ember-try
21+
/.node_modules.ember-try/
22+
/bower.json.ember-try
23+
/package.json.ember-try

.eslintrc.js

+40-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,48 @@ module.exports = {
77
ecmaVersion: 2017,
88
sourceType: 'module'
99
},
10-
extends: 'eslint:recommended',
10+
plugins: [
11+
'ember'
12+
],
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:ember/recommended'
16+
],
1117
env: {
1218
browser: true
1319
},
1420
rules: {
15-
}
21+
},
22+
overrides: [
23+
// node files
24+
{
25+
files: [
26+
'.template-lintrc.js',
27+
'ember-cli-build.js',
28+
'index.js',
29+
'testem.js',
30+
'blueprints/*/index.js',
31+
'config/**/*.js',
32+
'tests/dummy/config/**/*.js'
33+
],
34+
excludedFiles: [
35+
'addon/**',
36+
'addon-test-support/**',
37+
'app/**',
38+
'tests/dummy/app/**'
39+
],
40+
parserOptions: {
41+
sourceType: 'script',
42+
ecmaVersion: 2015
43+
},
44+
env: {
45+
browser: false,
46+
node: true
47+
},
48+
plugins: ['node'],
49+
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
50+
// add your custom rules and overrides for node files here
51+
})
52+
}
53+
]
1654
};

.gitignore

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
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
1212
/.sass-cache
1313
/connect.lock
14-
/coverage/*
14+
/coverage/
1515
/libpeerconnection.log
16-
npm-debug.log*
17-
testem.log
16+
/npm-debug.log*
17+
/testem.log
18+
/yarn-error.log
19+
20+
# ember-try
21+
/.node_modules.ember-try/
22+
/bower.json.ember-try
23+
/package.json.ember-try

.npmignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
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+
yarn.lock
18+
19+
# ember-try
20+
.node_modules.ember-try/
21+
bower.json.ember-try
22+
package.json.ember-try

.template-lintrc.js

+5
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

+22-17
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,47 @@
11
---
22
language: node_js
33
node_js:
4+
# we recommend testing addons with the same minimum supported node version as Ember CLI
5+
# so that your addon works for all apps
46
- "6"
57

6-
sudo: required
8+
sudo: false
79
dist: trusty
810

911
addons:
1012
chrome: stable
1113

1214
cache:
13-
yarn: true
15+
directories:
16+
- $HOME/.npm
1417

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

2533
matrix:
2634
fast_finish: true
2735
allow_failures:
2836
- env: EMBER_TRY_SCENARIO=ember-canary
2937

3038
before_install:
31-
- curl -o- -L https://yarnpkg.com/install.sh | bash
32-
- export PATH=$HOME/.yarn/bin:$PATH
33-
- "sudo chown root /opt/google/chrome/chrome-sandbox"
34-
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
35-
36-
install:
37-
- yarn install --no-lockfile --non-interactive
39+
- npm config set spin false
40+
- npm install -g npm@4
41+
- npm --version
3842

3943
script:
44+
- npm run lint:js
4045
# Usually, it's ok to finish the test scenario without reverting
4146
# to the addon's original dependency state, skipping "cleanup".
4247
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

CHANGELOG.md

-69
This file was deleted.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015
3+
Copyright (c) 2018
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

addon/mixins/url-templates-serializer.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import Ember from 'ember';
2-
3-
const { get } = Ember;
1+
import { get } from '@ember/object';
2+
import Mixin from '@ember/object/mixin';
43

54
export const LINK_PREFIX = 'urlTemplate:';
65

7-
export default Ember.Mixin.create({
6+
export default Mixin.create({
87
normalize(modelClass) {
98
let result = this._super(...arguments);
109
return _injectLinksForRelationships(modelClass, result);

addon/mixins/url-templates.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
import Ember from 'ember';
1+
import { isArray } from '@ember/array';
2+
import { typeOf } from '@ember/utils';
3+
import Mixin from '@ember/object/mixin';
4+
import EmberObject from '@ember/object';
25
import UriTemplate from 'uri-templates';
36
import { assign } from '@ember/polyfills';
47
import { LINK_PREFIX } from "ember-data-url-templates/mixins/url-templates-serializer";
58
import flattenQueryParams from 'ember-data-url-templates/utils/flatten-query-params';
69

7-
const { isArray, typeOf } = Ember;
8-
910
const ID_KEY_RE = /(_id|Id)$/;
1011
const LINK_PREFIX_RE = new RegExp(`^${LINK_PREFIX}`);
1112

12-
export default Ember.Mixin.create({
13+
export default Mixin.create({
1314
mergedProperties: ['urlSegments'],
1415
buildURL(type, id, snapshot, requestType, query) {
1516
const templateString = this.getTemplate(requestType);
@@ -54,7 +55,7 @@ export default Ember.Mixin.create({
5455
// TODO: Add ability to customize templateResolver
5556
// TODO: Add reference to the adapter
5657
templateResolverFor(/* type */) {
57-
return Ember.Object.create(this.get('urlSegments'));
58+
return EmberObject.create(this.get('urlSegments'));
5859
},
5960

6061
// HACK: Prevent query/queryRecord from appending query params to urls, we

0 commit comments

Comments
 (0)