Skip to content

Commit

Permalink
Update Changelog for v3.26.0 (#7444)
Browse files Browse the repository at this point in the history
* Update Changelog for v3.26.0

* [Test]: fix for DataWrapper refactor in emberjs (#7435)

* Fix deprecations for accessing run.* (e.g. `run.next(...)`)
* update to ember-cli-babel 7.26.3
And various other fixes for enabling ember-canary to pass

Co-authored-by: Robert Jackson <[email protected]>

Co-authored-by: Robert Jackson <[email protected]>
  • Loading branch information
snewcomer and rwjblue authored Mar 27, 2021
1 parent d6a8ff9 commit 3fe2e27
Show file tree
Hide file tree
Showing 38 changed files with 2,643 additions and 3,076 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scenario: [ember-lts-3.16, ember-lts-3.20]
scenario: [ember-lts-3.20, ember-lts-3.24]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ember Data Changelog

## Release 3.26.0-beta.0 (February 16, 2021)
## Release 3.26.0 (March 26, 2021)
- [#7416](https://github.com/emberjs/data/pull/7416) [Deps]: bump ember packages (#7416)
- [#7358](https://github.com/emberjs/data/pull/7358) [Chore]: TypeScript adapters (#7358)

Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@
"command-line-args": "^5.1.1",
"common-tags": "^1.8.0",
"debug": "^4.1.1",
"ember-cli": "~3.24.0",
"ember-cli": "~3.25.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-blueprint-test-helpers": "^0.19.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.1.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-internal-test-helpers": "^0.9.1",
"ember-cli-path-utils": "^1.0.0",
"ember-cli-pretender": "^3.2.0",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-template-lint": "^2.0.2",
Expand All @@ -97,7 +95,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.26.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"eslint": "^6.8.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/-ember-data/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ module.exports = function() {
},
},
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.20.0',
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.20.0',
'ember-source': '~3.24.0',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/-ember-data/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function(defaults) {
'ember-cli-babel': {
throwUnlessParallelizable: true,
},
'ember-cli-uglify': {
'ember-cli-terser': {
exclude: ['assets/dummy.js', 'assets/tests.js', 'assets/test-support.js', 'dist/docs/*', 'docs/*'],
},
});
Expand Down
2 changes: 2 additions & 0 deletions packages/-ember-data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = Object.assign({}, addonBaseConfig, {
shouldRollupPrivate: true,
externalDependenciesForPrivateModule() {
return [
'ember',
'@ember/application/namespace',
'@ember-data/record-data/-private',
'ember-data/version',
'@ember-data/store/-private',
Expand Down
8 changes: 3 additions & 5 deletions packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@ember/string": "^1.0.0",
"@glimmer/env": "^0.1.7",
"broccoli-merge-trees": "^4.2.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-typescript": "^4.0.0",
"ember-inflector": "^4.0.1"
},
Expand All @@ -56,14 +56,12 @@
"broccoli-string-replace": "^0.1.2",
"broccoli-test-helper": "^2.0.0",
"broccoli-uglify-sourcemap": "^3.2.0",
"ember-cli": "~3.24.0",
"ember-cli": "~3.25.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.1.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-internal-test-helpers": "^0.9.1",
"ember-cli-pretender": "^3.2.0",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "~4.0.1",
"ember-cli-test-loader": "^3.0.0",
Expand All @@ -77,7 +75,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.26.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"github": "^1.1.1",
Expand Down
29 changes: 19 additions & 10 deletions packages/-ember-data/tests/integration/debug-adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { settled } from '@ember/test-helpers';

import { module, test } from 'qunit';

import { gte } from 'ember-compatibility-helpers';
import { setupTest } from 'ember-qunit';

import Adapter from '@ember-data/adapter';
Expand Down Expand Up @@ -65,7 +66,7 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {
test('Watching Records', async function(assert) {
let { owner } = this;
let debugAdapter = owner.lookup('data-adapter:main');
let addedRecords, updatedRecords, removedIndex, removedCount;
let addedRecords, updatedRecords, removedRecords;

this.owner.register(
'adapter:application',
Expand All @@ -86,15 +87,17 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {
},
});

var recordsAdded = function(wrappedRecords) {
let recordsAdded = function(wrappedRecords) {
addedRecords = wrappedRecords;
};
var recordsUpdated = function(wrappedRecords) {
let recordsUpdated = function(wrappedRecords) {
updatedRecords = wrappedRecords;
};
var recordsRemoved = function(index, count) {
removedIndex = index;
removedCount = count;
let recordsRemoved = function(...args) {
// in 3.26 there is only 1 argument - the record removed
// below 3.26, it is 2 arguments - the index and count removed
// https://github.com/emberjs/ember.js/pull/19379
removedRecords = args;
};

debugAdapter.watchRecords('post', recordsAdded, recordsUpdated, recordsRemoved);
Expand All @@ -114,6 +117,9 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {

post.set('title', 'Modified Post');

// await updated callback
await settled();

assert.equal(get(updatedRecords, 'length'), 1, 'We updated 1 post');
record = updatedRecords[0];
assert.deepEqual(
Expand All @@ -131,7 +137,6 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {

// reset
addedRecords = updatedRecords = [];
removedCount = removedIndex = null;

post = store.createRecord('post', { id: '2', title: 'New Post' });

Expand Down Expand Up @@ -159,14 +164,18 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {

// reset
addedRecords = updatedRecords = [];
removedCount = removedIndex = null;

post.unloadRecord();

await settled();

assert.equal(removedIndex, 1, 'We are notified of the start index of a removal when we remove posts');
assert.equal(removedCount, 1, 'We are notified of the total posts removed');
if (gte('3.26.0')) {
assert.equal(removedRecords.length, 1, 'We are notified of the total posts removed');
assert.equal(removedRecords[0][0].object, post, 'The removed post is correct');
} else {
assert.equal(removedRecords[0], 1, 'We are notified of the start index of a removal when we remove posts');
assert.equal(removedRecords[1], 1, 'We are notified of the total posts removed');
}
});

test('Column names', function(assert) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module('integration/store/creation-recursion', function(hooks) {
let storeFactory = this.owner.factoryFor('service:store');

this.owner.unregister('service:store');
this.owner.register('service:store', storeFactory);
this.owner.register('service:store', storeFactory.class);

let test = this;
test.dateTransformCreated = false;
Expand Down
4 changes: 2 additions & 2 deletions packages/-ember-data/tests/unit/model/merge-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { run } from '@ember/runloop';
import { next, run } from '@ember/runloop';

import { module, test } from 'qunit';
import { Promise as EmberPromise, reject, resolve } from 'rsvp';
Expand Down Expand Up @@ -103,7 +103,7 @@ module('unit/model/merge - Merging', function(hooks) {
updateRecord(store, type, snapshot) {
// Make sure saving isn't resolved synchronously
return new EmberPromise(resolve => {
run.next(null, resolve, {
next(null, resolve, {
data: {
id: 1,
type: 'person',
Expand Down
10 changes: 5 additions & 5 deletions packages/-ember-data/tests/unit/store/adapter-interop-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { A } from '@ember/array';
import { get, set } from '@ember/object';
import { run } from '@ember/runloop';
import { later, run } from '@ember/runloop';

import { module, test } from 'qunit';
import { all, Promise as EmberPromise, resolve } from 'rsvp';
Expand Down Expand Up @@ -693,15 +693,15 @@ module('unit/store/adapter-interop - Store working with a Adapter', function(hoo
let record = { id, type: type.modelName };

return new EmberPromise(resolve => {
run.later(() => resolve({ data: record }), 5);
later(() => resolve({ data: record }), 5);
});
},

findMany(store, type, ids, snapshots) {
let records = ids.map(id => ({ id, type: type.modelName }));

return new EmberPromise(resolve => {
run.later(() => {
later(() => {
resolve({ data: records });
}, 15);
});
Expand Down Expand Up @@ -791,7 +791,7 @@ module('unit/store/adapter-interop - Store working with a Adapter', function(hoo
if (id === 'igor') {
resolve({ data: record });
} else {
run.later(function() {
later(function() {
davidResolved = true;
resolve({ data: record });
}, 5);
Expand Down Expand Up @@ -844,7 +844,7 @@ module('unit/store/adapter-interop - Store working with a Adapter', function(hoo
if (id === 'igor') {
reject({ data: record });
} else {
run.later(() => {
later(() => {
davidResolved = true;
resolve({ data: record });
}, 5);
Expand Down
6 changes: 3 additions & 3 deletions packages/adapter/addon/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getOwner } from '@ember/application';
import { deprecate, warn } from '@ember/debug';
import { computed } from '@ember/object';
import { assign } from '@ember/polyfills';
import { run } from '@ember/runloop';
import { join } from '@ember/runloop';
import { DEBUG } from '@glimmer/env';

import { has } from 'require';
Expand Down Expand Up @@ -1068,12 +1068,12 @@ class RESTAdapter extends Adapter.extend(BuildURLMixin) {
return new RSVPPromise(function(resolve, reject) {
hash.success = function(payload, textStatus, jqXHR) {
let response = ajaxSuccessHandler(adapter, payload, jqXHR, requestData);
run.join(null, resolve, response);
join(null, resolve, response);
};

hash.error = function(jqXHR, textStatus, errorThrown) {
let error = ajaxErrorHandler(adapter, jqXHR, errorThrown, requestData);
run.join(null, reject, error);
join(null, reject, error);
};

adapter._ajax(hash);
Expand Down
6 changes: 3 additions & 3 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"@ember-data/store": "3.26.0-beta.0",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^1.0.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^4.0.0"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "3.26.0-beta.0",
"@ember/optional-features": "^1.3.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.24.0",
"ember-cli": "~3.25.0",
"ember-cli-blueprint-test-helpers": "^0.19.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.1.2",
Expand All @@ -45,7 +45,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.26.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"loader.js": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/canary-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {},
"dependencies": {
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-typescript": "^4.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"@ember-data/private-build-infra": "3.26.0-beta.0",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^1.0.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^4.0.0"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "3.26.0-beta.0",
"@ember/optional-features": "^1.3.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.24.0",
"ember-cli": "~3.25.0",
"ember-cli-blueprint-test-helpers": "^0.19.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.1.2",
Expand All @@ -43,7 +43,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.26.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"loader.js": "^4.7.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ember-data/store": "3.26.0-beta.0",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^1.0.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-test-info": "^1.0.0",
"ember-cli-typescript": "^4.0.0",
Expand All @@ -37,7 +37,7 @@
"@ember-data/unpublished-test-infra": "3.26.0-beta.0",
"@ember/optional-features": "^1.3.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.24.0",
"ember-cli": "~3.25.0",
"ember-cli-blueprint-test-helpers": "^0.19.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.1.2",
Expand All @@ -50,7 +50,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.26.0",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.4.0",
"loader.js": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/private-build-infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"broccoli-rollup": "^4.1.1",
"calculate-cache-key-for-tree": "^2.0.0",
"chalk": "^4.0.0",
"ember-cli-babel": "^7.18.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-path-utils": "^1.0.0",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-typescript": "^3.1.3",
Expand Down
Loading

0 comments on commit 3fe2e27

Please sign in to comment.