Comparing version 2.0.0-rc.1 to 2.0.0-rc.2
@@ -603,3 +603,3 @@ import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useState, createElement, useRef, useCallback } from 'react'; | ||
} | ||
return next(key, fn || config.fetcher, config); | ||
return next(key, fn || config.fetcher || null, config); | ||
}; | ||
@@ -606,0 +606,0 @@ }; |
@@ -607,3 +607,3 @@ var React = require('react'); | ||
} | ||
return next(key, fn || config.fetcher, config); | ||
return next(key, fn || config.fetcher || null, config); | ||
}; | ||
@@ -610,0 +610,0 @@ }; |
import { useRef, useCallback } from 'react'; | ||
import useSWR from 'swr'; | ||
import { withMiddleware, createCacheHelper, isUndefined, useIsomorphicLayoutEffect, serialize, UNDEFINED, isFunction } from 'swr/_internal'; | ||
import { withMiddleware, serialize, createCacheHelper, isUndefined, useIsomorphicLayoutEffect, UNDEFINED, isFunction } from 'swr/_internal'; | ||
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'; | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "swr", | ||
"version": "2.0.0-rc.1", | ||
"version": "2.0.0-rc.2", | ||
"description": "React Hooks library for remote data fetching", | ||
@@ -65,21 +65,2 @@ "keywords": [ | ||
"license": "MIT", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"csb:install": "pnpm i -g pnpm@7", | ||
"csb:build": "pnpm install && pnpm build", | ||
"clean": "pnpm -r run clean", | ||
"watch": "pnpm -r run watch", | ||
"build": "pnpm build-package _internal && pnpm build-package core && pnpm build-package infinite && pnpm build-package immutable && pnpm build-package mutation", | ||
"build-package": "bunchee --target es2018 index.ts --cwd", | ||
"types:check": "pnpm -r run types:check", | ||
"prepublishOnly": "pnpm clean && pnpm build", | ||
"publish-beta": "pnpm publish --tag beta", | ||
"format": "prettier --write ./**/*.{ts,tsx}", | ||
"lint": "eslint . --ext .ts,.tsx --cache", | ||
"lint:fix": "pnpm lint --fix", | ||
"coverage": "jest --coverage", | ||
"test-typing": "tsc --noEmit -p test/type/tsconfig.json && tsc --noEmit -p test/tsconfig.json", | ||
"test": "jest", | ||
"run-all-checks": "pnpm types:check && pnpm lint && pnpm test && pnpm test-typing" | ||
}, | ||
"lint-staged": { | ||
@@ -103,3 +84,3 @@ "*.{ts,tsx}": [ | ||
"@typescript-eslint/parser": "5.36.1", | ||
"bunchee": "2.1.6", | ||
"bunchee": "2.1.7", | ||
"eslint": "8.15.0", | ||
@@ -120,3 +101,3 @@ "eslint-config-prettier": "8.5.0", | ||
"rimraf": "3.0.2", | ||
"swr": "workspace:*", | ||
"swr": "2.0.0-rc.2", | ||
"tslib": "2.4.0", | ||
@@ -141,3 +122,20 @@ "typescript": "4.8.2" | ||
"use-sync-external-store": "^1.2.0" | ||
}, | ||
"scripts": { | ||
"csb:install": "pnpm i -g pnpm@7", | ||
"csb:build": "pnpm install && pnpm build", | ||
"clean": "pnpm -r run clean", | ||
"watch": "pnpm -r run watch", | ||
"build": "pnpm build-package _internal && pnpm build-package core && pnpm build-package infinite && pnpm build-package immutable && pnpm build-package mutation", | ||
"build-package": "bunchee --target es2018 index.ts --cwd", | ||
"types:check": "pnpm -r run types:check", | ||
"publish-beta": "pnpm publish --tag beta", | ||
"format": "prettier --write ./**/*.{ts,tsx}", | ||
"lint": "eslint . --ext .ts,.tsx --cache", | ||
"lint:fix": "pnpm lint --fix", | ||
"coverage": "jest --coverage", | ||
"test-typing": "tsc --noEmit -p test/type/tsconfig.json && tsc --noEmit -p test/tsconfig.json", | ||
"test": "jest", | ||
"run-all-checks": "pnpm types:check && pnpm lint && pnpm test && pnpm test-typing" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
196629
23
4565