@nanostores/query
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -199,4 +199,4 @@ import { map, onStart, onStop, atom, startTask } from "nanostores"; | ||
const mutate = async (data) => { | ||
var _a, _b; | ||
const newMutator = (_a = rewrittenSettings.fetcher) != null ? _a : mutator; | ||
var _a; | ||
const newMutator = rewrittenSettings.fetcher ?? mutator; | ||
const keysToInvalidate = []; | ||
@@ -228,3 +228,3 @@ try { | ||
} catch (error) { | ||
(_b = globalSettings == null ? void 0 : globalSettings.onError) == null ? void 0 : _b.call(globalSettings, error); | ||
(_a = globalSettings == null ? void 0 : globalSettings.onError) == null ? void 0 : _a.call(globalSettings, error); | ||
store.setKey("error", error); | ||
@@ -258,3 +258,3 @@ } finally { | ||
function isSomeKey(key) { | ||
return typeof key === "string" || typeof key === "number"; | ||
return typeof key === "string" || typeof key === "number" || key === true; | ||
} | ||
@@ -267,3 +267,3 @@ const getKeyStore = (keys) => { | ||
const setKeyStoreValue = () => { | ||
if (keyParts.some((v) => v === null || v === void 0)) { | ||
if (keyParts.some((v) => v === null || v === void 0 || v === false)) { | ||
keyStore.set(null); | ||
@@ -306,3 +306,3 @@ } else { | ||
}; | ||
const getNow = () => new Date().getTime(); | ||
const getNow = () => (/* @__PURE__ */ new Date()).getTime(); | ||
const loading = { loading: true }, notLoading = { loading: false }; | ||
@@ -309,0 +309,0 @@ export { |
{ | ||
"name": "@nanostores/query", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Tiny remote data fetching library for Nano Stores", | ||
@@ -8,5 +8,7 @@ "scripts": { | ||
"build": "vite build", | ||
"check": "tsc --noEmit && vitest typecheck --run", | ||
"test": "vitest", | ||
"testrun": "vitest run" | ||
"test:types": "tsc --noEmit && vitest typecheck --run", | ||
"test:unit": "vitest run", | ||
"test:size": "size-limit --silent", | ||
"test": "pnpm run /^test:/", | ||
"dev:test": "vitest" | ||
}, | ||
@@ -42,19 +44,21 @@ "keywords": [ | ||
"dependencies": { | ||
"nanoevents": "7" | ||
"nanoevents": "^8.0.0" | ||
}, | ||
"devDependencies": { | ||
"@evilmartians/lefthook": "^1.2.6", | ||
"@evilmartians/lefthook": "^1.4.8", | ||
"@nanostores/react": "^0.7.1", | ||
"@rollup/plugin-strip": "^3.0.2", | ||
"@size-limit/preset-small-lib": "^8.2.6", | ||
"@testing-library/react": "^14.0.0", | ||
"@types/react": "^18.2.7", | ||
"@types/react-dom": "^18.2.4", | ||
"happy-dom": "^9.20.3", | ||
"nanostores": "^0.7.1", | ||
"@types/react": "^18.2.20", | ||
"@types/react-dom": "^18.2.7", | ||
"happy-dom": "^10.9.0", | ||
"nanostores": "^0.9.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^4.9.4", | ||
"vite": "^3.0.4", | ||
"vite-plugin-dts": "^1.7.1", | ||
"vitest": "^0.26.2" | ||
"size-limit": "^8.2.6", | ||
"typescript": "^5.1.6", | ||
"vite": "^4.4.9", | ||
"vite-plugin-dts": "^3.5.1", | ||
"vitest": "^0.34.1" | ||
}, | ||
@@ -70,2 +74,11 @@ "peerDependencies": { | ||
}, | ||
"size-limit": [ | ||
{ | ||
"name": "All", | ||
"import": { | ||
"./dist/nanoquery.js": "{ nanoquery }" | ||
}, | ||
"limit": "1600 B" | ||
} | ||
], | ||
"repository": { | ||
@@ -72,0 +85,0 @@ "type": "git", |
@@ -8,3 +8,3 @@ # Nano Stores Query | ||
- **Small**. 1.59 Kb (minified and gzipped). | ||
- **Small**. 1.6 Kb (minified and gzipped). | ||
- **Familiar DX**. If you've used [`swr`](https://swr.vercel.app/) or | ||
@@ -11,0 +11,0 @@ [`react-query`](https://react-query-v3.tanstack.com/), you'll get the same treatment, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34796
12
679
16
+ Addednanoevents@8.0.0(transitive)
- Removednanoevents@7.0.1(transitive)
Updatednanoevents@^8.0.0