* feat(angular-query):
- Created isRestoring injection token and provider
- handled restoration phase in create-base-query.ts
- handled restoration phase in
* feat(angular-query): created package for experimental persistence support, and the withPersistQueryClient feature
* test(persistQuery): add tests for withPersistQueryClient
* docs(angular-query): add basic persister example
* fix(angular-query): synced angular versions in new package
* fix(angular-query): commit before ng update
* feat(angular-query): updated example to v18
* fix(angular-query): fixed project name to basic-persister
* feat(angular-query): updated example basic-persister to v19
* feat(angular-query): included back the persister package after angular migration
* feat(angular-query): migrate to provideEnvironmentInitializer
* fix(angular-query): fix eslint issues in inject-queries.ts
* Revert "feat(angular-query): migrate to provideEnvironmentInitializer"
This reverts commit af5b47b31511dd2db180abfd92f08541f29532d4.
* fix(angular-query): only track the isRestoring in the effect
* fix(angular-query): removed conditional _isRestoring
* ci: apply automated fixes
* fix(angular-query): used effect onCleanup instead of destroy ref
* Update examples/angular/basic-persister/.devcontainer/devcontainer.json
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update examples/angular/basic-persister/package.json
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update examples/angular/basic-persister/src/index.html
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update examples/angular/basic-persister/tsconfig.json
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update examples/angular/basic-persister/tsconfig.json
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update examples/angular/basic-persister/tsconfig.json
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* Update packages/angular-query-experimental/src/inject-is-restoring.ts
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* fix(angular-query): fixed lock file
* fix(angular-query): aligned package.json versions
* added missing dep from basic-persister example
* Added a more complex example for persistence. This examples demonstrates how to selectively persist queries to different persisters.
* fix(angular-query) bumped versions to 5.62.4
* refactor(angular-query) refactored to implicit return
* fix(angular-query) bump angular persister package and examples version
* fix(angular-query) fixed eslint errors
* refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic
* Revert "refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic"
This reverts commit 235bbabebf.
* fix(angular-query) fixed formatting of JSDOC comment ruined by eslint
* update build configs
* zoneless unit tests
* replace deprecated injectQueryClient
* createBaseQuery is always run in injection context, remove inject(Injector)
* remove api extractor config
* update example dependencies
* comment out from publish script for now
* refactor(persist-query-client): simplify configuration by removing array structure for persistOptions
* refactor(angular-query-persist-client): removed experimental from package name and updated configurations
* fix example
* fix outdated comment
* exclude from preview for now
* mark package as private instead
* configure injectIsRestoring injector through options object
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
* fix(query-core): make sure we don't invoke select too often when using placeholderData
* ref: run through placeholderData first, then through
this helps us memoizing select calls, and we can get rid of some duplication around how select is called again after placeholderData
* chore: skip-nx-cache attempt
* test: increase timeout
* chore: re-enable caching
* fix(persistQueryClientRestore): Do not swallow exceptions during in persistQueryClientRestore within `restoreClient` and `removeClient`
* fix: rethrow errors in removeClient within all branches
* fix: test for PersistQueryClientProvider in all consumers
* chore: implement PR feedback
* chore: mock console calls, so they do not end up in the console. This way we can also assert on the invocations
* chore: consoleWarn mocks to be restored after each test
* chore: remove tmp file commited accidentally
* chore: adjust docs and include new optional callback `onError`
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* refactor(angular-query): change query functions to accept an options object instead of an injector
change query functions to accept an options object instead of an injector so that it matches angular APIs such as effect and allows adding more options in the future.
Closes#8711
* ci: apply automated fixes
* fix build error
* revert changes to deprecated injectQueryClient
* Rename optionsFn as we now also have an options parameter
* Revert changes to injectQueries as there's a PR in progress for that
* Add types for options
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
* chore: add eslint test script to package.json
Add a new script "test:eslint" to run eslint on the src directory, improving code quality checks during development.
* fix(nx): ensure test eslint depends on build for plugin workspace
Added nx configuration to make test:eslint target depend on the build target of its dependencies, ensuring the eslint plugin workspace is built before running tests.
* Revert "chore(paths): use customConditions to define internal imports (#8935)"
This reverts commit 8e0c6b7639.
* fix export
* refactor: make test:lib depend on compile again
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* chore(build): restructure eslint-plugin-query build configuration
Aligned the build system with other packages by replacing the custom tsup config with standard modern/legacy build outputs. Moved output files from 'dist' to 'build' directory structure. Removed the patch-missing-export-equals.js script in favor of directly exporting the plugin. Added tsconfig.prod.json for production builds.
* chore(example): eslint classic
* ci: apply automated fixes
* fix: unique name for examples
* remove unused import
* chore: add eslint test script to react examples and update eslint test command
Add `test:eslint` script to react example package.json files to enable linting checks. Update the main `test:eslint` command to remove the exclusion of examples, ensuring linting is applied across the entire project.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: TkDodo <office@dorfmeister.cc>
* fix(paths): use customConditions to define internal imports
* the rest of the changes
* publint and vitest fixes
* order matters!
thanks https://colinhacks.com/essays/live-types-typescript-monorepo
* upgrade publint to get customCondition support
added here: b34ea9433f
* remove dynamicAliases
* remove getViteAliases
* try without references?
* Revert "try without references?"
This reverts commit b18bc946e8.
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>