Skip to content

Commit

Permalink
chore: fix the build
Browse files Browse the repository at this point in the history
1) main field was wrong
2) useSyncExternalStore wasn't picked up correctly
  • Loading branch information
TkDodo committed Jul 13, 2022
1 parent 36e98bb commit 69ba565
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"dependencies": {
"@tanstack/match-sorter-utils": "^8.0.0-alpha.82",
"@types/use-sync-external-store": "^0.0.3",
"use-sync-external-store": "^1.1.0"
"use-sync-external-store": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/react-query-devtools/src/devtools.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index'
import { useSyncExternalStore } from 'use-sync-external-store/shim'
import {
Query,
useQueryClient,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/sponsors/tannerlinsley"
},
"module": "build/esm/index.js",
"main": "build/cjs/packages/query-core/src/index.js",
"main": "build/cjs/packages/react-query/src/index.js",
"browser": "build/umd/index.production.js",
"types": "build/types/index.d.ts",
"sideEffects": [
Expand Down Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"@tanstack/query-core": "^4.0.0-beta.1",
"@types/use-sync-external-store": "^0.0.3",
"use-sync-external-store": "^1.1.0"
"use-sync-external-store": "^1.2.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { useSyncExternalStore } from './useSyncExternalStore'
import { useSyncExternalStore } from 'use-sync-external-store/shim'

import { QueryKey, notifyManager, QueryObserver } from '@tanstack/query-core'
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useIsFetching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
QueryFilters,
} from '@tanstack/query-core'

import { useSyncExternalStore } from './useSyncExternalStore'
import { useSyncExternalStore } from 'use-sync-external-store/shim'
import { ContextOptions } from './types'
import { useQueryClient } from './QueryClientProvider'

Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useIsMutating.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { useSyncExternalStore } from './useSyncExternalStore'
import { useSyncExternalStore } from 'use-sync-external-store/shim'

import {
notifyManager,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useMutation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { useSyncExternalStore } from './useSyncExternalStore'
import { useSyncExternalStore } from 'use-sync-external-store/shim'

import {
notifyManager,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useQueries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { useSyncExternalStore } from './useSyncExternalStore'
import { useSyncExternalStore } from 'use-sync-external-store/shim'

import {
QueryKey,
Expand Down
4 changes: 0 additions & 4 deletions packages/react-query/src/useSyncExternalStore.native.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/react-query/src/useSyncExternalStore.ts

This file was deleted.

0 comments on commit 69ba565

Please sign in to comment.