Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from kunai-consulting/ve-ember-3.12
Browse files Browse the repository at this point in the history
Bump ember 3.12
  • Loading branch information
veelenga authored Jan 3, 2020
2 parents 169849f + 747e656 commit 548956f
Show file tree
Hide file tree
Showing 11 changed files with 2,225 additions and 877 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: [
Expand Down Expand Up @@ -36,8 +36,7 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# misc
/.env*
/.pnp*
/.log*
/.sass-cache
/connect.lock
/coverage/
Expand Down
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,11 @@ jobs:
# 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-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
2 changes: 1 addition & 1 deletion addon/mixins/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const resetRelations = function(record) {
if (isPresent(relation)) {
relation.removeObject(r);
}
r.set('markedForDeletion', false);
r.set('_markedForDeletion', false);
}
});
});
Expand Down
130 changes: 60 additions & 70 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,72 @@

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
scenarios: [
{
name: 'ember-lts-2.18',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true })
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.18.0'
}
module.exports = async function() {
return {
scenarios: [
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
},
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
},
// 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',
npm: {
devDependencies: {}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
}
}
},
// 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',
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
]
};
});
}
]
};
};
40 changes: 25 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
"test:all": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.1.2",
"ember-data": "~3.8.0"
"ember-cli-babel": "^7.7.3",
"ember-data": "~3.12.0"
},
"devDependencies": {
"@ember/jquery": "^0.5.2",
"@ember/optional-features": "^0.6.3",
"broccoli-asset-rev": "^2.7.0",
"ember-cli": "~3.8.3",
"@ember/optional-features": "^0.7.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.12.0",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "4.2.3",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
"ember-cli-eslint": "^5.1.0",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-mirage": "^0.4.14",
"ember-cli-page-object": "^1.15.3",
Expand All @@ -42,25 +42,35 @@
"ember-copy": "^1.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-load-initializers": "^2.0.0",
"ember-lodash": "^4.19.5",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^3.4.1",
"ember-qunit": "^4.4.1",
"ember-resolver": "^5.1.1",
"ember-source": "~3.8.0",
"ember-source": "~3.12.0",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.2.1",
"eslint-plugin-ember": "^5.2.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^9.0.1",
"loader.js": "^4.7.0",
"materialize-css": "1.0.0",
"pretender": "~2.1.1",
"qunit-dom": "^0.8.0"
"qunit-dom": "^0.8.4"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
"node": "8.* || >= 10.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"resolutions": {
"lodash": "^4.17.12",
"lodash.defaultsdeep": "^4.6.1",
"eslint-utils": "^1.4.1",
"mixin-deep": "^1.3.2",
"set-value": "^2.0.1",
"handlebars": "^4.5.2",
"jquery": "^3.4.0",
"clean-css": "^4.1.11"
}
}
1 change: 0 additions & 1 deletion testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(environment) {
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/mixins/model-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ module('Unit | Mixin | model', function(hooks) {
assert.ok(post.get('hasDirtyAttributes'), 'should be true when persisted record with changes');
post.set('title', 'test title');
assert.notOk(post.get('hasDirtyAttributes'), 'should be false when attributes reset');
post.set('markedForDestruction', true);
post.set('_markedForDestruction', true);
assert.ok(post.get('hasDirtyAttributes'), 'should be true when marked for destruction');
post.set('markedForDestruction', false);
post.set('markedForDeletion', true);
post.set('_markedForDestruction', false);
post.set('_markedForDeletion', true);
assert.ok(post.get('hasDirtyAttributes'), 'should be true when marked for deletion');
});
});
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/mixins/nested-relations-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ module('Unit | Mixin | nested-relations', function(hooks) {
seedPostWithAuthor();

let post = store.peekRecord('post', 1);
post.get('author').set('markedForDeletion', true);
post.get('author').set('_markedForDeletion', true);

let json = serialize(post, { attributes: false, relationships: 'author' });
let expectedJSON = {
Expand Down Expand Up @@ -364,7 +364,7 @@ module('Unit | Mixin | nested-relations', function(hooks) {
seedPostWithAuthor();

let post = store.peekRecord('post', 1);
post.get('author').set('markedForDestruction', true);
post.get('author').set('_markedForDestruction', true);

let json = serialize(post, { attributes: false, relationships: 'author' });
let expectedJSON = {
Expand Down Expand Up @@ -425,8 +425,8 @@ module('Unit | Mixin | nested-relations', function(hooks) {
run(() => {
seedPostWithTags();
let post = store.peekRecord('post', 1);
post.get('tags').objectAt(1).set('markedForDeletion', true);
post.get('tags').objectAt(2).set('markedForDestruction', true);
post.get('tags').objectAt(1).set('_markedForDeletion', true);
post.get('tags').objectAt(2).set('_markedForDestruction', true);
let json = serialize(post, { attributes: false, relationships: 'tags' });
let expectedJSON = {
data: {
Expand Down
Loading

0 comments on commit 548956f

Please sign in to comment.