Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: hasMany linksMode #9676

Merged
merged 21 commits into from
Feb 22, 2025
Merged

Conversation

leoeuclids
Copy link
Contributor

Description

Adds hasMany relationship to SchemaRecord in links mode
Rebased from #9617

@leoeuclids
Copy link
Contributor Author

@runspired Rebased the changes and reopened the PR

@leoeuclids leoeuclids requested a review from runspired February 10, 2025 20:12
@runspired runspired self-assigned this Feb 14, 2025
@runspired runspired added 🎯 canary PR is targeting canary (default) 🏷️ feat This PR introduces a new feature labels Feb 14, 2025
@runspired runspired force-pushed the feat-links-mode-has-many branch from efd1cf6 to 77c2e20 Compare February 14, 2025 16:13
@runspired runspired force-pushed the feat-links-mode-has-many branch from 77c2e20 to 6ea869e Compare February 22, 2025 01:26
@runspired
Copy link
Contributor

Rebased off main

@runspired runspired force-pushed the feat-links-mode-has-many branch from 6ea869e to d15b710 Compare February 22, 2025 02:30
@runspired runspired force-pushed the feat-links-mode-has-many branch from d15b710 to 5470990 Compare February 22, 2025 04:28
@runspired runspired merged commit 2470660 into emberjs:main Feb 22, 2025
23 checks passed
gitKrystan pushed a commit that referenced this pull request Mar 8, 2025
* Port ManyArray class from the model package into the store package

* Improve the MinimumManager type definition

* Relax the json-api validation for hasMany relationships in linksMode

* Adds schema record hasMany relationships in sync linksMode

* Adds ManyArrayManager to manage hasMany relationship arrays

* Adds mutate method to RecordArrayManager

* Set the new ManyArrayManager to newly created ManyArrays

* Fix hasMany read tests

* Adds reloadHasMany method to ManyArrayManager

* Adds mutate method to ManyArrayManager

* Adds reference stability tests for sync hasMany relationships

* Adds reordering hasMany relationship content test

* Adds hasMany relationship reload test

* Adds hasMany relationship reload tests

* General fixes on hasMany tests

* Improve logging on JsonApi cache

* Update the parent record on a findHasMany operation

* cleanup logging and types

* fix types a different way

* smarter still

* fix lint

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>
gitKrystan pushed a commit that referenced this pull request Mar 9, 2025
* Port ManyArray class from the model package into the store package

* Improve the MinimumManager type definition

* Relax the json-api validation for hasMany relationships in linksMode

* Adds schema record hasMany relationships in sync linksMode

* Adds ManyArrayManager to manage hasMany relationship arrays

* Adds mutate method to RecordArrayManager

* Set the new ManyArrayManager to newly created ManyArrays

* Fix hasMany read tests

* Adds reloadHasMany method to ManyArrayManager

* Adds mutate method to ManyArrayManager

* Adds reference stability tests for sync hasMany relationships

* Adds reordering hasMany relationship content test

* Adds hasMany relationship reload test

* Adds hasMany relationship reload tests

* General fixes on hasMany tests

* Improve logging on JsonApi cache

* Update the parent record on a findHasMany operation

* cleanup logging and types

* fix types a different way

* smarter still

* fix lint

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>
gitKrystan added a commit that referenced this pull request Mar 10, 2025
* Add perf info for re-materialization (#9681)

* feat: runtime logging activation (#9683)

* feat: runtime logging activation

* fix bugs

* more fixes

* fix lint

* fix build

* fix more lint

* nicer names

* Fix bug where race condition causes errors during Request refresh (#9685)

* Fix bug where race condition causes errors during Request refresh

* Fix lint

* Lint

* feat(cache): add peekRemoteState to cache to view remote state (#9624)

* feat(cache): add peekRemoteState to cache to view remote state

* fix lint

* update comment

* commit working state

* Add test for getRemoteRelationship

* lint fixes

* another change to expected docs

* prettier fix

* Test fixes

* feat: add patchRecord util to JSON:API (#9687)

* feat: immutable records should show only remote state, make builder types more useful (#9686)

* chore: add more tests around edit workflows, make builder types more useful

* implement immutable-shows-only-remote-state

* fix lint

* Fix: support all known http methods (#9689)

* fix: support all known http methods

* fix: support all known http methods

* chore: fixup SchemaRecord readme (#9690)

* chore: minor docs fixes

* Feat: hasMany linksMode (#9676)

* Port ManyArray class from the model package into the store package

* Improve the MinimumManager type definition

* Relax the json-api validation for hasMany relationships in linksMode

* Adds schema record hasMany relationships in sync linksMode

* Adds ManyArrayManager to manage hasMany relationship arrays

* Adds mutate method to RecordArrayManager

* Set the new ManyArrayManager to newly created ManyArrays

* Fix hasMany read tests

* Adds reloadHasMany method to ManyArrayManager

* Adds mutate method to ManyArrayManager

* Adds reference stability tests for sync hasMany relationships

* Adds reordering hasMany relationship content test

* Adds hasMany relationship reload test

* Adds hasMany relationship reload tests

* General fixes on hasMany tests

* Improve logging on JsonApi cache

* Update the parent record on a findHasMany operation

* cleanup logging and types

* fix types a different way

* smarter still

* fix lint

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>

* fix: make serialize utils smarter (#9692)

* fix: make serialize utils smarter

* fix lint

* chore: add env vars to turbo config (#9693)

* docs: small cleanup for SchemaRecord intro (#9694)

* feat: SchemaRecord guide

* cleanup schema-record

* chore: [BREAKING to prior alpha/betas] prepare SchemaRecord for stable, lockdown exports (#9697)

* chore: prepare SchemaRecord for stable, lockdown exports

* cleanup imports

* fix assertion

* doc: link to jsonapi.org when referencing

* doc: cleanup wording in SchemaRecord README

* fix: Don't notify changes for attributes not registered with the schema (#9698)

* internal: fixup diagnostic reporting (#9704)

* internal: fixup diagnostic reporting

* fix exit code

* chore: update to pnpm 10 (#9699)

* chore: update to pnpm 10

* fix prettier

* fixup settings

* fixup npmrc

* fix lockfile

* bump to 10.5.2

* make work with pnpm

* add script to warp-drive package

* fix patch

* fixup no-shadow-rule

* chore: fix fastboot test app

* fix lock

* chore: make diagnostic shutdown safer, use bun for holodeck server (#9705)

* refactor diagnostic for safer teardown

* make holodeck cleanup appropriately

* fix request test and improve diagnostic a little bit

* fix more tests

* cleanup config

* cleanup dependencies for fastboot scenario

* fix types

* fixup more tests

* fixup more tests

* dont launch holodeck for main test app (yet)

* ensure less noise in CI

* some improvements

* a new approach

* attempt no sync

* use internal sync

* more cleanup

* fix sync

* fix install

* fix more missing peers

* more vite cleanup

* fix more tests, make diagnostic easier to launch

* disable caching

* try something

* fix no-cache

* fix missing testem

* try fastboot again

* cleanup

* cleanup

* try

* updated lockfile with new npmrc settings

* fixup comment

* fixup fastboot

* fix prod tests

* restore settings

* fix deprecation test

* make nicer?

* keep some changes

* fix it

* fix newline

* dont use turbo

* fixup more commands?

* maybe

* fixup

* still use exec

* fix scneario

* update npmrc text

* fix quote mark

* fix(deps): update dependency vite to ^5.4.14 (#9666)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency globby to ^14.1.0 (#9708)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency bun-types to v1.2.4 (#9706)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency inflection to ~3.0.2 (#9664)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency terser-webpack-plugin to ^5.3.12 (#9710)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update node.js to >= 18.20.7 (#9711)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency globals to ^15.15.0 (#9715)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency rollup to ^4.34.9 (#9716)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency semver to ^7.7.1 (#9717)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update ember-core (#9719)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency debug to ^4.4.0 (#9714)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @ember/optional-features to ^2.2.0 (#9713)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update asset-compilation (#9712)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @ember/string to v4.0.1 (#9721)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency command-line-args to v6 (#9722)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency expect-type to v1 (#9724)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency ember-inflector to v5 (#9723)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mocha to v11 (#9726)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency rimraf to v6 (#9727)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update oven-sh/setup-bun action to v2 (#9729)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency ember-cli to v6 (#9733)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update build-tools (#9570)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency ember-load-initializers to v3 (#9736)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency globals to v16 (#9737)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix metric count data typo

* fix(deps): update code-quality (#9571)

* fix(deps): update code-quality

* dont bump @types/qunit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>

* bump version of tracerbench

* chore: add logging to proxy server for debugging

* chore: Modernize Performance App (use Vite) (#9707)

* stash

* stash

* cleanup lockfile

* more updates to harness

* more work on scenarios

* add bun log

* simplify perf test build

* another pass through

* turns out we want compat

* make easier to debug

* turn on verbose logging

* try

* use string :eyeroll:

* exclude more logs

* exclude more

* add debug mode for chrome

* give longer timeout for logging

* lets inspect

* fix server

* update check, reduce logging

* fckn finly

* chore: update main version of perf checks

* chore: fixup vite config for perf (#9744)

fixup vite config for perf

* feat: new perf scenario for complex records (#9745)

* chore: update scenario

* chore: remove mixin workaround

* More dramatic update for update-with-same-state perf test (#9743)

* More dramatic update

* Iterate parent of each child

* Add big many to many scenario

* Tidy up

* Enbiggen

* chore: bump size of benchmark (#9746)

* Actually add the m2m test case to the perf test output (#9748)

* Actually add the m2m test case to the perf test output

* Update .github/workflows/perf-check.yml

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>

* chore: update perf suite (#9749)

* Don't overnotify for updates to added state that match local updates (#9702)

* Don't overnotify for updates to added state that match local updates

* Fix typo

* Tidy up

* stash stuffs

* Add log counts to replace-related-records

* update all the stuffs

* fixup log

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>

* Backport tests/main/tsconfig

* Remove unneccessary test assertions

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>
Co-authored-by: Rich Glazerman <rglazerman@squareup.com>
Co-authored-by: Leo Euclides <leoeuclidss@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
MehulKChaudhari pushed a commit to MehulKChaudhari/ember-data that referenced this pull request Mar 16, 2025
* Port ManyArray class from the model package into the store package

* Improve the MinimumManager type definition

* Relax the json-api validation for hasMany relationships in linksMode

* Adds schema record hasMany relationships in sync linksMode

* Adds ManyArrayManager to manage hasMany relationship arrays

* Adds mutate method to RecordArrayManager

* Set the new ManyArrayManager to newly created ManyArrays

* Fix hasMany read tests

* Adds reloadHasMany method to ManyArrayManager

* Adds mutate method to ManyArrayManager

* Adds reference stability tests for sync hasMany relationships

* Adds reordering hasMany relationship content test

* Adds hasMany relationship reload test

* Adds hasMany relationship reload tests

* General fixes on hasMany tests

* Improve logging on JsonApi cache

* Update the parent record on a findHasMany operation

* cleanup logging and types

* fix types a different way

* smarter still

* fix lint

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 canary PR is targeting canary (default) 🏷️ feat This PR introduces a new feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants