Skip to content

Merge svelte-query and CI changes into v5#4816

Merged
TkDodo merged 39 commits intoTanStack:v5from
lachlancollins:v5
Jan 25, 2023
Merged

Merge svelte-query and CI changes into v5#4816
TkDodo merged 39 commits intoTanStack:v5from
lachlancollins:v5

Conversation

@lachlancollins
Copy link
Copy Markdown
Member

@lachlancollins lachlancollins commented Jan 14, 2023

This brings the latest v4 changes into the v5 branch. This includes svelte-query and the CI improvements.

lachlancollins and others added 19 commits January 8, 2023 12:28
* feat: svelte-query adapter

* add examples

* add @testing-library/svelte and svelte-jester

* add transform for testing svelte components

* re-export @tanstack/core core

* add a few initial test

* delete tests in examples

* use ^ in dependencies

* delete and gitignore .vscode

* rename basic-typescript to basic

* add basic example to ci.json

* remove transform from global preset

* update version

* don't gitignore lib directory in svelte examples

* fix build files location in package.json

* chore: prettier formatting

* add missing state

* chore: fix eslint errors

* add context

* unsubscribe

* add missing export

* use svelte context

* update version

* update examples to use context

* release: v4.14.5

* remove onMount

* add onMount to setQueryClient

* remove unneeded exports

* Add basic svelte docs overview

* Add SvelteKit 1.0 example

Uses the data from the simple example

* Edit nodeResolve settings

* More rollup and babel tweaks

Seems to be working

* Try svelte plugin options

* Separate out svelte config

* Switch to svelte-package

* Reset rollup config

* Output to ./build

* Use vitest in svelte-query

* Fix test imports

* Avoid transpiling TS during typecheck

* Fix vitest command

* More vitest migration work

* Minor fixes to tests

* Rename file to types.d.ts

* Replace setQueryContext with QueryClientProvider

* Replace tabs with spaces for repo consistency

* Update examples to sveltekit 1.0

* Implement Hydrate component

* Add playground example

Rewrite of the react example

* Start adding star-wars example

* Add films and film pages

* Finish star-wars example

* Rename store functions with create prefix

* Add correct favicons

* Reorder some files in svelte-query

* Undo rollup.config.ts changes

* Add new createQuery and createMutation tests

* More descriptive test name

* Misc fixes from feedback

- Max TS 4.7.4
- Move root package.json dependencies
- Use object syntax
- Use test:jest script (for now)
- Remove sveltekit autogenerated files

* Fix pnpm-lock

* Specify svelte-package source, update TS to 4.7.4

* Remove unnecessary packages in examples

* Sync pnpm-lock

* Reset pnpm-lock to upstream

* Run pnpm install

* Remove svelte-query from root tsconfg

Needs to be run from its own svelte-check package... sorry

* Run prettier, remove unused import

* Run prettier on svelte files

Requires prettier-plugin-svelte to run

* Prettier for changed files

* Fix cipublish from svelte-query

* rimraf to remove build/lib/package.json

* Run svelte-kit sync before vitest

* Add files field to package.json

* Add types field to package.json

* Bump svelte-query version to 4.20.0

In case this fixes the CI issue

* Add path alias to vitest

* Update vitest to 0.26

Changes module resolution?

* More CI improvements

* Remove --parallel from pnpm scripts

* Remove unused dependency

* Add eslint settings

Thanks @rivo420

* Add coverage report

Co-authored-by: DeAndre Johnson <dre@phreshr.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

RELEASE_ALL
* Remove coverage flag

Add back again in a simpler script setup

* Allow coverage to run on test:ci
…rateOptions` (#4751)

* export default hydration metods to allow for easier extending

* pretty

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Use rimraf for clean script

Supported on windows

* Restructure jest tests, types test, and building types

* Relative eslint and jest paths are not needed

Now works on windows too, and tested to make sure it doesn't break linux

* Run codemod tests from main jest.config.ts

--collectCoverage false breaks when passed in to the union of these

* Remove unused test:lib scripts

* Add prettier-plugin-svelte

* Call test:types in github workflow

* Add missing build:types to query-async-storage-persister

* Simplify build script

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Add SSR docs

* Remove semicolons to match project style
* Use rimraf for clean script

Supported on windows

* Restructure jest tests, types test, and building types

* Relative eslint and jest paths are not needed

Now works on windows too, and tested to make sure it doesn't break linux

* Run codemod tests from main jest.config.ts

--collectCoverage false breaks when passed in to the union of these

* Remove unused test:lib scripts

* Add prettier-plugin-svelte

* Call test:types in github workflow

* Add missing build:types to query-async-storage-persister

* Build without sveltekit

* Update vite-plugin-svelte to 2.0

* Add dev/watch script to svelte-query

* Replace sveltePreprocess with vitePreprocess

* Fix example component and indentation

* Remove dev/watch

Breaks setup because it adds package.json that isn't removed by rimraf

* Move /src/lib to /src, ignore __tests__ in build

* Fix tsconfig included files

* Replace tabs with spaces

* Whoops messed up merge

* Add more tsconfig.json settings

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Simplify types

* Run prettier

* Add reactivity docs, rename example

* This function does not need to be reactive
* docs(svelte-query): Expand SSR docs

* Expand wording

* Run prettier
)

This can save others some time browsing around trying to get it to work
…ria (#4532)

* docs: clarify interaction of query filter predicates with other criteria

* Update docs/guides/filters.md

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

* Update docs/guides/filters.md

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Add some default options

* Rewrite hydration example

* Run prettier

* Rename example to SSR

* Add recommended SvelteKit setup

* Rework infinite scroll in sveltekit

* Add SvelteKit note to overview

* Switch basic example to sveltekit

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Jan 14, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 21297f0:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@lachlancollins lachlancollins marked this pull request as draft January 14, 2023 03:04
@lachlancollins
Copy link
Copy Markdown
Member Author

@TkDodo I think I'll feel uneasy trying to update svelte-query without tests... I'll prioritise these for now :)

lachlancollins and others added 8 commits January 14, 2023 17:25
…4815)

* Add recommended defaults to prefetch example

* Move SSR docs up in sidebar
* docs: clarify the documentation on running examples

* docs: use the proper watch command in docs for running examples
* test: stabilize various tests

* chore: bump istanbul version
* docs(useMutation): clarify `mutationFn` option default

* Make optionality consistent with `useQuery` documentation

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
…ments (#4847)

* Update createMutation test function name

* Default TVariables = void

* Fix createMutation test

* Fix prettier
janlat and others added 5 commits January 22, 2023 16:56
…ount (#4848)

* test: add mutation callback after unmount test

* test: make test more resilient

* fix(core): do not call mutate callbacks if mutation started after unmount

* test: adapt tests to what we have in v5

- one test has been removed (because setState was removed entirely)
- the second test has been re-written to not use internals anymore, and it works in v4 as well

* fix(core): do not call mutate callbacks if mutation started after unmount

by making sure the callbacks are only invoked if we have an active listener

* chore: prettier again

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* docs(useMutation): correct docs for mutate function callbacks

* docs: fix merge conflicts

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
# Conflicts:
#	docs/react/guides/caching.md
#	package.json
#	packages/query-core/src/mutationObserver.ts
#	packages/react-query/src/__tests__/suspense.test.tsx
#	packages/react-query/src/__tests__/useMutation.test.tsx
#	packages/react-query/src/__tests__/useQueries.test.tsx
#	pnpm-lock.yaml
@lachlancollins lachlancollins marked this pull request as ready for review January 23, 2023 23:38
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 24, 2023

Codecov Report

❗ No coverage uploaded for pull request base (v5@5b252e6). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff          @@
##             v5    #4816   +/-   ##
=====================================
  Coverage      ?   89.74%           
=====================================
  Files         ?      106           
  Lines         ?     3783           
  Branches      ?      959           
=====================================
  Hits          ?     3395           
  Misses        ?      361           
  Partials      ?       27           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TkDodo
Copy link
Copy Markdown
Collaborator

TkDodo commented Jan 25, 2023

I'll ship it - thank you ❤️ 🚀

@TkDodo TkDodo merged commit c4f90ad into TanStack:v5 Jan 25, 2023
@lachlancollins lachlancollins deleted the v5 branch January 25, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.