Skip to content

Latest commit

 

History

History
906 lines (565 loc) · 37.7 KB

CHANGELOG.md

File metadata and controls

906 lines (565 loc) · 37.7 KB

v6.0.1 (2023-04-11)

🚀 Enhancement

🐛 Bug Fix

Committers: 2

v6.0.0 (2023-04-06)

💥 Breaking Change

  • #1711 Bump node to active (12 -> 14) (@hjdivad)
  • dropped support for ember-data versions < 3.28.0
  • per ember 4 deprecation array observers no longer supported on managed arrays

🐛 Bug Fix

  • #1737 Fixed a m3-store initialization issue (@larry-x-yu)
  • #1726 Fix 'firstObject/lastObject' properties in Ember 4 with native proxies (@larry-x-yu)
  • #1733 Fix nested cache merging for projections (@hjdivad)
    • this fix was in 6.0.0-alpha.2 but is dropped from 6.0.0

🏠 Internal

Committers: 3

v6.0.0-alpha.3 (2023-02-17)

🐛 Bug Fix

Committers: 1

v6.0.0-alpha.2 (2023-02-17)

🐛 Bug Fix

  • #1733 Fix nested cache merging for projections (@hjdivad)
  • #1726 Fix 'firstObject/lastObject' properties in Ember 4 with native proxies (@larry-x-yu)

🏠 Internal

Committers: 2

v6.0.0-alpha.1 (2023-01-28)

💥 Breaking Change

🏠 Internal

Committers: 2

v5.0.8 (2022-12-07)

🏠 Internal

Committers: 2

v5.0.7 (2022-06-28)

🐛 Bug Fix

📝 Documentation

  • #1626 A test case to show how to use a symbol as an attribute name (@larry-x-yu)

🏠 Internal

Committers: 4

v5.0.6 (2022-05-10)

🐛 Bug Fix

Committers: 1

v5.0.5 (2022-05-10)

🐛 Bug Fix

  • #1601 Fix lazy nested model creation for newly written attributes (@larry-x-yu)

🏠 Internal

Committers: 2

v5.0.4 (2022-01-12)

🐛 Bug Fix

  • #1534 [bugfix] ensure that errors can be updated when using useUnderlyingErrorsValue (@gabrielcsapo)

🏠 Internal

Committers: 3

v5.0.3 (2021-11-01)

🐛 Bug Fix

  • #1403 Fix for tracked properties updating when using m3 native properties (@igorT)

Committers: 1

v5.0.2 (2021-09-29)

🐛 Bug Fix

  • #1376 Fix native property access in production (@igorT)

Committers: 1

v5.0.1 (2021-09-09)

🚀 Enhancement

Committers: 1

v5.0.0 (2021-09-02)

💥 Breaking Change

  • #1299 Array.isArray(value) should not be used with M3 Arrays and will be returning true in the future.

With Ember Data versions 3.28.0 and above M3 Arrays can be used as native JS arrays other than in IE11 which doesn't support proxies. For example, instead of having to do m3Array.objectAt(0) you can now do m3Array[0].

However, because M3 Arrays are now proxying JavaScript native arrays, the return value of Array.isArray(m3Array) will change to now be true, so it is no longer safe to rely on Array.isArray to distinguish between native and m3 arrays. If you need to detect an M3 Array we have now provided a utility method isM3Array:

import isM3Array from 'ember-m3/utils/is-m3-array'

// To replicate old behavior of `Array.isArray(value)` you would need to do:
let isJSArray = Array.isArray(value) && !isM3Array(value)

🚀 Enhancement

  • #1300 Do not emit array change events when app is being destroyed (@igorT)
  • #1301 Sync projections and base model deleted state with CUSTOM_MODEL_CLASS (@igorT)
  • #1238 Add array native access (@igorT)
  • #1232 Add native property access for models (@igorT)

🐛 Bug Fix

  • #1315 Add IE testing and guard proxies when they are not present (@igorT)
  • #1298 Do not needlessly access isDirty (@igorT)
  • #1299 Switch m3 array proxies to proxy [] insted of BaseRecordArray (@igorT)
  • #1301 Sync projections and base model deleted state with CUSTOM_MODEL_CLASS (@igorT)
  • #1295 Fix isDeleted rollbackAttributes for Custom Model Class (@igorT)
  • #1241 fix: skip this.errors.remove if useUnderlyingErrorsValue (@spham92)
  • #1243 Fix isError and adapterError with CUSTOM_MODEL_CLASSES (@igorT)
  • #1240 Fix for projected models resolving in projected arrays, when CUSTOM_MODEL_CLASS is on (@igorT)
  • #1248 Add 'for' and 'since' to nativeProperties deprecation (@igorT)
  • #1249 Fix isSaving for embedded records when CUSTOM MODEL CLASS is on (@igorT)
  • #1242 Fix isDirty for inflight records and set _topModel to the proxy value (@igorT)
  • #1247 Don't trigger dot access deprecations when useNativeProperties hook isn't defined (@igorT)

📝 Documentation

  • #1252 Add documentation for native property access (@igorT)

🏠 Internal

  • #1296 Convert state tests to use native property access (@igorT)
  • #1251 Cleanup the invalid errors test (@igorT)

Committers: 2

v4.2.0 (2021-08-02)

🚀 Enhancement

🐛 Bug Fix

  • #1241 fix: skip this.errors.remove if useUnderlyingErrorsValue (@spham92)
  • #1243 Fix isError and adapterError with CUSTOM_MODEL_CLASSES (@igorT)
  • #1240 Fix for projected models resolving in projected arrays, when CUSTOM_MODEL_CLASS is on (@igorT)
  • #1249 Fix isSaving for embedded records when CUSTOM MODEL CLASS is on (@igorT)
  • #1242 Fix isDirty for inflight records and set _topModel to the proxy value (@igorT)

📝 Documentation

  • #1252 Add documentation for native property access (@igorT)

🏠 Internal

Committers: 2

v4.1.3 (2021-07-27)

🐛 Bug Fix

  • #1226 Fix array resolving for non references when CUSTOM_MODEL_CLASS is off (@igorT)
  • #1169 Custom Model Classes: Ensure isDirty for embedded records doesn't recursively loop (@igorT)
  • #1175 Custom Model Classs: Fix isLoading and isLoaded flags on model (@igorT)

🏠 Internal

  • #1184 Use operator instead of property access for existence checks (@igorT)
  • #1183 Avoid repeatedly looking up the schema type when resolving (@igorT)
  • #1179 Make perfomance testing app more robust to slow tests (@igorT)
  • #1172 Upgrade ember-lts versions to actual latest and latest-1 (@igorT)

Committers: 1

v4.1.2 (2021-07-02)

🐛 Bug Fix

🏠 Internal

  • #1174 Make perfomance testing app more robust to slow tests (@igorT)

Committers: 1

v4.1.1 (2021-06-30)

🐛 Bug Fix

  • #1167 Allow custom ObjectProxy instances to be wrapped around an M3Model instance (@igorT)

🏠 Internal

Committers: 2

v4.1.0 (2021-06-25)

🚀 Enhancement

Committers: 1

v4.0.2 (2021-06-24)

Internal release - no user-visible changes

v4.0.1 (2021-06-24)

Internal release - no user-visible changes

v4.0.0 (2021-06-24)

💥 Breaking Change

🚀 Enhancement

  • #1032 Adds support for native Proxy behind a canary feature flag (@pzuraq)
  • #787 replace computeNestedModel and computeAttributeReference schema hooks with computeAttribute (@igorT)

🐛 Bug Fix

  • #1131 Ensure we do not add custom babel plugins multiple times (@rwjblue)
  • #1121 Avoid invalid imports in production app tree (@rwjblue)
  • #1099 Fix state notifications when CUSTOM_MODEL_CLASS is active (@runspired)
  • #1005 Pass owner when creating M3DebugAdapter (@pzuraq)
  • #817 temporary fix for stringifying models in the debug adapter (@betocantu93)
  • #840 Replace new Object(null) with Object.create(null). (@rwjblue)

🏠 Internal

  • #1091 Updated pinned yarn version (@hjdivad)
  • #1047 Refactor warning capturing and testing. (@rwjblue)
  • #822 Remove work around for Ember < 2.12 relying on setOwner enumerability (@rwjblue)
  • #789 and #793 TrackedArrays and ReferenceArrays are now unified as a ManagedArray (@igorT)

Committers: 7

v3.0.8 (2021-07-28)

🐛 Bug Fix

  • #1131 Ensure we do not add custom babel plugins multiple times (@rwjblue)
  • #1121 Avoid invalid imports in production app tree (@rwjblue)
  • #1099 Fix state notifications when CUSTOM_MODEL_CLASS is active (@runspired)

🏠 Internal

v3.0.7 (2021-03-17)

🐛 Bug Fix

  • #1041 Only execute callback once per key for eachAttribute (backport #1022) (@betocantu93)

Committers: 1

v3.0.6 (2021-03-15)

🐛 Bug Fix

  • #1033 fix: outer object replacement and nested property change (backport #1031) (@spham92)

🏠 Internal

  • #1036 chore: bump release-it, release-it-lerna-changelog (@hjdivad)

Committers: 2

v3.0.5 (2021-01-05)

🚀 Enhancement

  • [#784](Add queryParams option for Store.queryURL) (backported via #980)

Committers: 1

v3.0.4 (2020-09-29)

🐛 Bug Fix

  • #892 Fix keeping embedded records in sync inside projections (@igorT)

Committers: 1

v3.0.3 (2020-08-28)

🚀 Enhancement

Committers: 1

v3.0.2 (2020-08-20)

🚀 Enhancement

  • #837 Avoid checking project dependencies more than once per project (@hjdivad)

Committers: 2

v3.0.1 (2020-08-20)

🐛 Bug Fix

Avoid checker.check when project depends on ember-data for a performance gain

Committers: 1

v3.0.0 (2020-06-09)

💥 Breaking Change

Migrating

If your app or addon previously used extendStore or directly applied the store mixin, you will need to migrate your app or addon to extend from the ember-m3 store.

before with extendStore

import { extendStore } from 'ember-m3/mixins/store';
import Store from '@ember-data/store';

class AppStore extends Store {}
extendStore(AppStore);

export default AppStore;

before with Mixin

import StoreMixin from 'ember-m3/mixins/store';
import Store from '@ember-data/store';

class AppStore extends Store.extend(StoreMixin) {}

export default AppStore;

after

import Store from 'ember-m3/services/store';

export default class AppStore extends Store {}

🐛 Bug Fix

Committers: 1

v2.1.0 (2020-06-07)

🚀 Enhancement

🐛 Bug Fix

  • #732 queryURL learns to tolerate empty responses (@hjdivad)

Committers: 1

v2.0.0 (2020-05-18)

💥 Breaking Change

🚀 Enhancement

📝 Documentation

🏠 Internal

Committers: 5

v1.0.3 (2020-04-09)

🐛 Bug Fix

  • #651 Fix monkeypatching logic for memory leak (@igorT)

Committers: 1

v1.0.2 (2020-04-03)

🐛 Bug Fix

  • #642 Fix memory leak in fastboot caused by modifying class prototype (@igorT)

Committers: 3

v1.0.1 (2020-03-19)

🐛 Bug Fix

  • #611 Fix trackedNotifications for destroying records (@igorT)

🏠 Internal

Committers: 3

v1.0.0 (2020-03-04)

💥 Breaking Change

🐛 Bug Fix

  • #567 Drop direct dependencies on Ember Data (@hjdivad)
  • #570 Re-export interop-debug-adapter in app as data-adapter (@SYU15)
  • #544 Allow .toString to be called on record prototype (@SYU15)

🏠 Internal

Committers: 3

v0.11.11 (2020-01-17)

🐛 Bug Fix

  • #529 Fix hasChangedAttributes with arrays of nested models (@igorT)

v0.11.10 (2020-01-13)

🚀 Enhancement

🐛 Bug Fix

  • #513 Fix isDirty check for parents of nested models (@igorT)

Committers: 2

v0.11.9 (2019-12-18)

🚀 Enhancement

🐛 Bug Fix

  • #490 Fix isDirty regression (@hjdivad)
  • #472 fix: remove seen model types in debug-adapter when inspector is closed (@SYU15)
  • #458 fix: don't overwrite existing babel plugins (@hjdivad)

📝 Documentation

🏠 Internal

Committers: 4

0.11.8

  • feat: Add support for Ember Data custom model classes (thanks @igort)
  • feat: Add support for displaying models in ember inspector (thanks @syu15)
  • feat: Add meta support in queryURL (thanks @2hu12)
  • feat: Add headers support in queryURL (thanks @pyuan)
  • fix: Fix isDirty when setting an attr to its previous value (thanks @2hu12)
  • feat: Various updates to maintain compatibility with Ember Data canary (thanks @runspired)

0.11.7

  • fix: Do not cause build errors with ember-cli-babel@7 (#386 thanks @rwjblue)

0.11.6

  • docs: Improved debugging docs (thanks @syu15)
  • feat: adapter.queryURL now supports adapterOptions (thanks @loganrosen)

0.11.5

  • fix: model now dirties during set if the schema dirties any attribute (including ones other than what was set) #377 (thanks @rwjblue)

0.11.4

  • feat: add debug-adapter for Ember-Inspector support (thanks @syu15)
  • fix: fix debugJSON for projections (thanks @syu15)
  • fix: trigger change notifications when updating references in reference arrays (thanks @runspired)
  • fix: trigger array change with correct index arg (thanks @rwjblue)

0.11.3

  • fix: issues when creating record data for projections (thanks @runspired)
  • fix: allow user schemas to compute references with null ids
  • fix: user schema hooks take priority over raw values for determining reference arrays

0.11.2

  • fix: compatibility with Ember Data 3.12.x (thanks @rwjblue)

0.11.1

  • fix: only store base types in global cache (#315)

0.11.0

  • chore: drop support for node 6 and ember 2.18 (we support latest 2 LTS and current release)
  • feat: batch array changes. Array updates (eg from references updated in store.push) are now deferred along with regular property updates.

0.10.6

  • fix: queryURL no longer erroneously caches rejected responses (thanks @teopalva)
  • docs: update contributing guide (thanks @ghaagsma)

0.10.5

  • fix: bring back M3TrackedArray.value and deprecate

0.10.4

  • feat: allow handling of EmbeddedMegamorphicModels by computeNestedModel
  • feat: dont stash value on tracked arrays
  • feat: enable computeNestedModel to handle arrays
  • bugfix: batch change notifications
  • bugfix: setting arrays with a mix of models and pojos
  • bugfix: Revert "Revert "Delegate _destroyChildRecordData to base""

0.10.2

  • bugfix: Revert 'Delegate _destroyChildRecordData to base'

0.10.1

  • bugfix: prevent cycles in dependencies from self-referential schemas (thanks @igort)
  • bugfix: fix changed attributes for projections when dirty nested models set to null

0.10.0

  • feature: Add isAttributeResolved API for schema control over interpreting set values as already resolved or not
  • bugfix: empty native arrays are now correctly treated as unresolved when set
  • breaking: changedAttributes improved format for newly created nested records so they can be distinguished from edits to existing nested records (thanks @iterzic @eddie-ruva)
  • cleanup: add assertion for attempts to save embedded m3 models directly (thanks @ghaagsma)

0.9.9

  • bugfix: changedAttributes could stack overflow from incorrect deep copy cycle detection (#231)

0.9.8

  • bugfix: hasLocalAttr was not taking into account the base record data when dealing with a projection record. (thanks @eddi-ruva)

0.9.7

  • feature: add deleteAttr to schema interface (thanks @eddi-ruva)
  • bugfix: nested model updates from local updates with partial updates from server #215 thanks (@ygongdev)
  • bugfix: rollbackAttributes for record data from projections (thanks @eddi-ruva)

0.9.6

  • bugfix: reference array updates are now resolved lazily #205
  • bugfix: destroying new records does not trigger API request
  • cleanup: dropped use of deprecated Ember.copy
  • cleanup: fixed errors in README (thanks @ibraheem4)

0.9.5

  • bugfix: do not throw when setting an id to its current value
  • bugfix: add support for ember-data 3.5.x

0.9.4

  • bugfix: reference arrays can update to undefined (treated as now empty)

0.9.3

  • bugfix: keep nested model state in sync
  • bugfix: add changedAttributes() to nested models
  • bugfix: projections iterate attributes from base (#165)

0.9.2

  • rollback ember-cli-babel to v6

0.9.1

  • no longer including useless default service in app/services/-ember-m3 which mainly forced apps with in-repo addons to ensure they had after specified

0.9.0

  • apps now specify schemas via a service rather than global registration
  • tracked arrays accept embedded models from other top models (although this is not recommended)

0.8.2

  • bugfix: tracked arrays no longer overwrite existing entries (thanks @dnalagatla)

0.8.1

  • modelName is now passed to computeAttributes

0.8.0

  • bugfix: dependent keys are tracked even when they are initially absent in the server payload
  • breaking: schema manager is now a service. See UPGRADING.md. (thanks @dnachev)
  • bugfix: fix support for ember 3.4.0-beta.1
  • feature: Added cacheURL (thanks @sangm)
  • records added to tracked arrays now remove themselves when unloaded

0.7.13

  • Added support to track changes in Array #136

0.7.12

  • models added to record arrays are now entangled with those arrays, so they'll be auto-removed when eg destroyed. Previously only models that started in record arrays were entangled.

0.7.11

  • Fixed computeNestedModel schema hook to be able to call schemaInterface.getAttr()

0.7.9

  • Added setAttribute schema hook #127

0.7.8

  • Fixed updating state of model to loaded.update.uncommitted upon invoking set in model.

0.7.7

  • Fixed changedAttributes() on a projection to return all changes.

0.7.6

  • Fixed handling of model names normalization. The schema no longer needs to normalize when returning references, nested models and base model names.

0.7.5

  • Model supports client validation errors. For convenience with migrating from @ember-data/model, errors an instance of same Errors class used by @ember-data/model, which provides list of vaidation errors.

0.7.4

  • bugfix: setUnknownProperty remove cache and child model data if value is not resolved.

0.7.3

  • bugfix: setUnknownProperty remove cache after setting a new value and only update cache when value is resolved.

0.7.2

  • bugfix: setUnknownProperty only update cache when value is resolved.

0.7.1

  • bugfix: Now able to get length of M3RecordArray as property.

0.7.0

  • breaking: Properties manually set, including those set in initial record creation, are treated as resolved. This means that createRecord({ myprop }) will not use transforms for myprop.

  • bugfix: now able to set RecordArray properties with RecordArray values. Semantics are still update in-place, as when setting to arrays of models.

0.6.0

  • breaking: To be consistent with the request types used in ember-data, queryURL will pass a requestType of queryURL. Previously query-url was passed.

  • breaking: All arrays of references are now returned as RecordArrays. schema.isAttributeArrayRef is therefore deprecated.

  • store.queryURL will now call adapter.queryURL if it exists, instead of adapter.ajax. This is intended to be a hook for doing app-wide url conversion for store.queryURL calls beyond prepending the adapter namespace.

0.5.1

  • bugfix: when using schemaInterface to compute attribute references from data other than key, dependencies are now tracked and key is invalidated correctly when those dependencies are invalidated. (thanks @dnalagatla)

0.5.0

  • bugfix: prevent notifyProperties(undefined) from nested models with no changed attributes (thanks @sangm)
  • nested models that specify type, id are not re-used when these change. null id is fine for indicating a uniform type that should always be reused when new properties come in (thanks @dnachev)
  • attribute semantics now merge (so missing attributes are not treated as deletes thanks @dnachev)

0.4.2

  • fix phantomjs regression (use of native Map).
  • calls to queryURL for the same cacheKey are now batched (thanks @dnalagatla)

0.4.1

  • fix ember 3.1 regression from unusual CP definition

  • fix regression from 0.4.0: eachAttribute iterates over modified attributes, as well as the last known attributes from the server.

  • deleted models removed from record arrays

0.4.0

  • change to use ModelData. This is based on the implementation of the ModelData RFC and so is "pre-canary". This release should therefore be considered unstable. 0.5.x will likely depend on a version of Ember Data in which ModelData is the intimate addon API.

  • M3 models now report changed attributes via changedAttributes, like Ember Data. changedAttributes reports changed attributes recursively for nested models.

0.3.3

  • schema APIs now have access to the full data hash. This enables schemas that depend on key mutations. For example, computeAttributeReference might work based on a key prefix { '*book': '123' } that differs from the property name (in this example, book). Thanks @dnalagatla

0.3.2

  • setting id now only asserts for top-level models, and not embedded models

0.3.1

  • model.reload now supports passing { adapterOptions }
  • setting id for an existing model now asserts

0.3.0

  • Nested model's unloadRecord now no-ops and warns instead of erroring