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

fix: subpackage dependencies #4013

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

DamianOsipiuk
Copy link
Contributor

@DamianOsipiuk DamianOsipiuk commented Aug 9, 2022

This should allow for automatic deps install on sub packages. Currently when you try to install one of those, you might get an error about missing imports.

@TkDodo This should go to beta for pre-release

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 9, 2022

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 7500310:

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #4013 (7500310) into beta (e0aad73) will decrease coverage by 0.30%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             beta    #4013      +/-   ##
==========================================
- Coverage   97.11%   96.81%   -0.31%     
==========================================
  Files          50       57       +7     
  Lines        2391     2666     +275     
  Branches      706      782      +76     
==========================================
+ Hits         2322     2581     +259     
- Misses         67       83      +16     
  Partials        2        2              
Impacted Files Coverage Δ
src/devtools/useMediaQuery.ts
src/devtools/tests/utils.tsx
src/createAsyncStoragePersister/asyncThrottle.ts
src/reactjs/utils.ts
src/core/focusManager.ts
src/core/utils.ts
src/createWebStoragePersister/index.ts
src/reactjs/tests/utils.tsx
src/reactjs/useQueries.ts
src/core/notifyManager.ts
... and 97 more

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

Comment on lines +34 to +35
"dependencies": {
"@tanstack/react-query-persist-client": "^4.0.10"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's wrong that query-* packages depend on react-query-* packages! It seems that we only import some types, so maybe it should just be the other way around and we should in fact move the types ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good point. However the types that are imported are common for both persisters. I would say that we should extract common logic from react-query-persist-client to query-persist-client so framework-specific adapters would be possible.
But that could be next step.

@TkDodo TkDodo merged commit 9172eab into TanStack:beta Aug 10, 2022
TkDodo added a commit that referenced this pull request Sep 10, 2022
* fix: restore missing `exports` declarations (#3892)

* fix: restore missing `exports` declarations

* fix: restore package.json exports[C

* fix: reexport types used by vue-query

* fix: react-native uSES usage

* fix: emit mjs for esm

* fix: uSES build

* fix: devtools exports to allow devtools in prod

* fix: cjs and esm build bundled to lib dir

* fix: sideEffect in react-query, better files paths

* fix: generate declarations to lib

* fix: lint and tests

* fix: use the same ts build method for tests

* fix: change force prod import

* fix: subpackage dependencies (#4013)

* fix: umd-build (#3924)

* - Fix UMD build getting overwritten
- Updating "browser" field for @tanstack/react-query-devtools

* Updating the "browser" field to be the same as "main"

* release: v4.0.11-beta.0

* release: v4.0.11-beta.1

* fix(react-query-devtools): cjs devtools fallback (#4048)

* release: v4.0.11-beta.2

* fix: remove browser entry, fix umd size (#4044)

* fix: remove browser entry, fix umd size

* fix: bundle query-core with react-query for umd

* fix: remove missed browser entry

* chore: remove 'browser' field from package validation

because it doesn't exist anymore

* release: v4.0.11-beta.3

* release: v4.0.11-beta.4

* chore: react-query should be a peerDependency of the devtools

* release: v4.0.11-beta.5

* release: v4.3.0-beta.0

* fix: webpack 4 fallback to cjs (#4069)

* fix: publish script shouldn't check against module anymore

* fix: publish script

I don't think we can have single quotes in commit message when passing them to --notes

* release: v4.3.0-beta.2

* release: v4.3.0-beta.3

* fix: umd build size, force prod devtools (#4074)

* fix: umd build size

* fix: devtools force production

* release: v4.3.0-beta.4

* release: v4.3.0-beta.5

* fix: reintroduce production export (#4090)

* release: v4.3.0-beta.6

* fix(react-query-devtools): always useEffect for the mounted check

no effect runs on the server, and there is no real advantage to useLayoutEffect on the client; somehow, this dynamic check creates problems with the production build of the devtools

* release: v4.3.0-beta.7

* docs: document devtools in production

* docs: document devtools in production

* docs: document devtools in production

nodenext needs 4.7

* fix: support react-native (#4125)

* fix: support react-native

* chore: remove banner from build

Co-authored-by: Damian Osipiuk <[email protected]>
Co-authored-by: John Daly <[email protected]>
Co-authored-by: Tanner Linsley <[email protected]>
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.

3 participants