replicache
Advanced tools
Comparing version 13.0.0-beta.0 to 13.0.0-beta.1
@@ -7,4 +7,14 @@ /** | ||
declare type LogLevel = 'error' | 'info' | 'debug'; | ||
/** | ||
* A Context ferries additional information that can be associated with | ||
* each logged message. The handling of the information in the Context is | ||
* specific to the LogSink; text-only implementations generally prepend | ||
* stringified representations of the Context's properties to the logged | ||
* message. | ||
*/ | ||
declare type Context = { | ||
[key: string]: unknown | undefined; | ||
}; | ||
interface LogSink { | ||
log(level: LogLevel, ...args: unknown[]): void; | ||
log(level: LogLevel, context: Context | undefined, ...args: unknown[]): void; | ||
flush?(): Promise<void>; | ||
@@ -20,2 +30,11 @@ } | ||
declare const hashTag: unique symbol; | ||
/** | ||
* Opaque type representing a hash. The only way to create one is using `parse` | ||
* or `hashOf` (except for static unsafe cast of course). | ||
*/ | ||
type Hash = string & { | ||
[hashTag]: true; | ||
}; | ||
/** The values that can be represented in JSON */ | ||
@@ -31,5 +50,16 @@ type JSONValue = | ||
/** | ||
* A JSON object. This is a map from strings to JSON values. | ||
* A JSON object. This is a map from strings to JSON values or `undefined`. We | ||
* allow `undefined` values as a convenience... but beware that the `undefined` | ||
* values do not round trip to the server. For example: | ||
* | ||
* ``` | ||
* // Time t1 | ||
* await tx.put('a', {a: undefined}); | ||
* | ||
* // time passes, in a new transaction | ||
* const v = await tx.get('a'); | ||
* console.log(v); // either {a: undefined} or {} | ||
* ``` | ||
*/ | ||
type JSONObject = {[key: string]: JSONValue}; | ||
type JSONObject = {[key: string]: JSONValue | undefined}; | ||
@@ -47,3 +77,3 @@ /** Like {@link JSONValue} but deeply readonly */ | ||
type ReadonlyJSONObject = { | ||
readonly [key: string]: ReadonlyJSONValue; | ||
readonly [key: string]: ReadonlyJSONValue | undefined; | ||
}; | ||
@@ -69,12 +99,3 @@ | ||
declare const hashTag: unique symbol; | ||
/** | ||
* Opaque type representing a hash. The only way to create one is using `parse` | ||
* or `hashOf` (except for static unsafe cast of course). | ||
*/ | ||
type Hash = string & { | ||
[hashTag]: true; | ||
}; | ||
/** | ||
* The ID describing a group of clients. All clients in the same group share a | ||
@@ -795,2 +816,4 @@ * persistent storage (IDB). | ||
type IterableUnion<T> = AsyncIterable<T> | Iterable<T>; | ||
/** | ||
@@ -803,4 +826,2 @@ * This error is thrown when you try to call methods on a closed transaction. | ||
type IterableUnion<T> = AsyncIterable<T> | Iterable<T>; | ||
type ScanKey = string | IndexKey; | ||
@@ -840,2 +861,3 @@ interface ScanResult<K extends ScanKey> extends AsyncIterable<ReadonlyJSONValue> { | ||
} | ||
type Entry<V> = readonly [key: string, value: V]; | ||
/** | ||
@@ -1421,3 +1443,2 @@ * This is called when doing a {@link ReadTransaction.scan | scan} without an | ||
type Entry<V> = readonly [key: string, value: V]; | ||
/** | ||
@@ -1424,0 +1445,0 @@ * Describes the changes that happened to Replicache after a |
{ | ||
"name": "replicache", | ||
"description": "Realtime sync for any backend stack", | ||
"version": "13.0.0-beta.0", | ||
"version": "13.0.0-beta.1", | ||
"repository": "github:rocicorp/replicache", | ||
@@ -25,11 +25,11 @@ "license": "https://roci.dev/terms.html", | ||
"@rocicorp/lock": "^1.0.1", | ||
"@rocicorp/logger": "^4.1.0", | ||
"@rocicorp/logger": "^5.1.0", | ||
"@rocicorp/resolver": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4-fix.0", | ||
"@rocicorp/eslint-config": "^0.3.0", | ||
"@rocicorp/licensing": "^5.0.0", | ||
"@rocicorp/eslint-config": "^0.4.2", | ||
"@rocicorp/licensing": "^7.0.0", | ||
"@rocicorp/prettier-config": "^0.1.1", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
"@types/chai": "^4.3.5", | ||
"@types/command-line-usage": "^5.0.2", | ||
@@ -43,2 +43,3 @@ "@types/mocha": "^9.1.0", | ||
"benchmark": "^2.1.4", | ||
"chai": "^5.0.0-alpha.0", | ||
"command-line-args": "^5.2.1", | ||
@@ -56,3 +57,3 @@ "command-line-usage": "^6.1.2", | ||
"rollup-plugin-dts": "^5.2.0", | ||
"shared": "*", | ||
"shared": "0.0.0", | ||
"sinon": "^13.0.1", | ||
@@ -59,0 +60,0 @@ "typescript": "^4.9.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
415873
2935
30
+ Added@rocicorp/logger@5.3.0(transitive)
- Removed@rocicorp/logger@4.1.0(transitive)
Updated@rocicorp/logger@^5.1.0