ember-data-model-fragments 6.0.4 → 6.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,17 @@
13
13
 
14
14
 
15
15
 
16
+
17
+ ## v6.0.6 (2023-12-13)
18
+
19
+ ## v6.0.5 (2023-09-30)
20
+
21
+ #### :bug: Bug Fix
22
+ * [#480](https://github.com/adopted-ember-addons/ember-data-model-fragments/pull/480) fix(changedAttributes): initial value of property which are supposed to be null return a value when the record is in flight ([@VincentMolinie](https://github.com/VincentMolinie))
23
+
24
+ #### Committers: 1
25
+ - Vincent Molinié ([@VincentMolinie](https://github.com/VincentMolinie))
26
+
16
27
  ## v6.0.4 (2023-09-01)
17
28
 
18
29
  #### :bug: Bug Fix
@@ -671,10 +671,7 @@ export default class FragmentRecordData extends RecordData {
671
671
  this._fragmentsOrInFlight
672
672
  )) {
673
673
  const behavior = this._fragmentBehavior[key];
674
- const oldFragment =
675
- key in this._inFlightFragments
676
- ? this._inFlightFragments[key]
677
- : this._fragmentData[key];
674
+ const oldFragment = this._fragmentData[key];
678
675
  diffData[key] = [
679
676
  behavior.canonicalState(oldFragment),
680
677
  behavior.currentState(newFragment),
@@ -970,12 +967,21 @@ export default class FragmentRecordData extends RecordData {
970
967
  }
971
968
 
972
969
  notifyStateChange(key) {
973
- this.storeWrapper.notifyStateChange(
974
- this.modelName,
975
- this.id,
976
- this.clientId,
977
- key
978
- );
970
+ if (key && gte('ember-data', '4.5.0')) {
971
+ this.storeWrapper.notifyPropertyChange(
972
+ this.modelName,
973
+ this.id,
974
+ this.clientId,
975
+ key
976
+ );
977
+ } else {
978
+ this.storeWrapper.notifyStateChange(
979
+ this.modelName,
980
+ this.id,
981
+ this.clientId,
982
+ key
983
+ );
984
+ }
979
985
  }
980
986
 
981
987
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-data-model-fragments",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "description": "Ember Data addon to support nested JSON documents",
5
5
  "keywords": [
6
6
  "ember-addon",