@tanstack/svelte-query-persist-client 6.3.0 → 6.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,11 @@
1
1
  type Box<T> = {
2
2
  current: T;
3
3
  };
4
+ /**
5
+ * Creates a reactive box: an object whose `current` property is backed by `$state`.
6
+ * @param initial - The initial value of `current`.
7
+ * @returns An object whose `current` property reads and writes the state.
8
+ */
4
9
  export declare function box<T>(initial: T): Box<T>;
5
10
  export {};
6
11
  //# sourceMappingURL=utils.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.svelte.d.ts","sourceRoot":"","sources":["../src/utils.svelte.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAA;AAE5B,wBAAgB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAWzC"}
1
+ {"version":3,"file":"utils.svelte.d.ts","sourceRoot":"","sources":["../src/utils.svelte.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAA;AAE5B;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAWzC"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Creates a reactive box: an object whose `current` property is backed by `$state`.
3
+ * @param initial - The initial value of `current`.
4
+ * @returns An object whose `current` property reads and writes the state.
5
+ */
1
6
  export function box(initial) {
2
7
  let current = $state(initial);
3
8
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/svelte-query-persist-client",
3
- "version": "6.3.0",
3
+ "version": "6.3.2",
4
4
  "description": "Svelte bindings to work with persisters in TanStack/svelte-query",
5
5
  "author": "Lachlan Collins",
6
6
  "license": "MIT",
@@ -39,29 +39,34 @@
39
39
  "!src/__tests__"
40
40
  ],
41
41
  "dependencies": {
42
- "@tanstack/query-persist-client-core": "5.104.0"
42
+ "@tanstack/query-persist-client-core": "5.104.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@sveltejs/package": "^2.5.8",
46
46
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
47
47
  "@tanstack/query-test-utils": "0.0.0",
48
- "@tanstack/svelte-query": "6.3.0",
48
+ "@tanstack/svelte-query": "6.3.2",
49
49
  "@testing-library/svelte": "^5.2.8",
50
- "@typescript-eslint/parser": "^8.70.1",
50
+ "@typescript-eslint/parser": "^8.71.0",
51
51
  "eslint-plugin-svelte": "^3.23.0",
52
52
  "svelte": "^5.57.1",
53
53
  "svelte-check": "^4.4.5",
54
- "typescript": "5.9.3"
54
+ "typescript": "6.0.3"
55
55
  },
56
56
  "peerDependencies": {
57
- "@tanstack/svelte-query": "^6.3.0",
57
+ "@tanstack/svelte-query": "^6.3.2",
58
58
  "svelte": "^5.25.0"
59
59
  },
60
60
  "scripts": {
61
61
  "clean": "premove ./dist ./coverage ./.svelte-kit ./dist-ts",
62
62
  "compile": "tsc --project tsconfig.json",
63
- "test:types": "svelte-check --tsconfig ./tsconfig.json",
63
+ "test:types": "npm-run-all --serial test:types:*",
64
+ "test:types:ts57": "node -e \"const Module = require('module'); const resolveFilename = Module._resolveFilename; let swapped = false; Module._resolveFilename = function (request, ...args) { if (request === 'typescript' || request.startsWith('typescript/')) { request = request.replace('typescript', 'typescript57'); swapped = true } return resolveFilename.call(this, request, ...args) }; process.on('exit', () => { if (!swapped) { console.error('svelte-check did not load typescript57'); process.exitCode = 1 } }); process.argv.splice(1, 0, ''); require('svelte-check/bin/svelte-check')\" -- --tsconfig ./tsconfig.legacy.json",
65
+ "test:types:ts58": "node -e \"const Module = require('module'); const resolveFilename = Module._resolveFilename; let swapped = false; Module._resolveFilename = function (request, ...args) { if (request === 'typescript' || request.startsWith('typescript/')) { request = request.replace('typescript', 'typescript58'); swapped = true } return resolveFilename.call(this, request, ...args) }; process.on('exit', () => { if (!swapped) { console.error('svelte-check did not load typescript58'); process.exitCode = 1 } }); process.argv.splice(1, 0, ''); require('svelte-check/bin/svelte-check')\" -- --tsconfig ./tsconfig.legacy.json",
66
+ "test:types:ts59": "node -e \"const Module = require('module'); const resolveFilename = Module._resolveFilename; let swapped = false; Module._resolveFilename = function (request, ...args) { if (request === 'typescript' || request.startsWith('typescript/')) { request = request.replace('typescript', 'typescript59'); swapped = true } return resolveFilename.call(this, request, ...args) }; process.on('exit', () => { if (!swapped) { console.error('svelte-check did not load typescript59'); process.exitCode = 1 } }); process.argv.splice(1, 0, ''); require('svelte-check/bin/svelte-check')\" -- --tsconfig ./tsconfig.legacy.json",
67
+ "test:types:tscurrent": "svelte-check --tsconfig ./tsconfig.json",
64
68
  "test:eslint": "eslint --concurrency=auto ./src ./tests",
69
+ "test:oxlint": "oxlint ./src ./tests",
65
70
  "test:lib": "vitest",
66
71
  "test:lib:dev": "pnpm run test:lib --watch",
67
72
  "test:build": "publint --strict && attw --pack",
@@ -1,5 +1,10 @@
1
1
  type Box<T> = { current: T }
2
2
 
3
+ /**
4
+ * Creates a reactive box: an object whose `current` property is backed by `$state`.
5
+ * @param initial - The initial value of `current`.
6
+ * @returns An object whose `current` property reads and writes the state.
7
+ */
3
8
  export function box<T>(initial: T): Box<T> {
4
9
  let current = $state(initial)
5
10