@automerge/automerge-repo-react-hooks
Advanced tools
Comparing version 1.1.12 to 1.2.0-alpha.0
@@ -1,2 +0,2 @@ | ||
import { DocHandle, Repo } from '@automerge/automerge-repo'; | ||
import { DocHandle, Repo } from '@automerge/automerge-repo/slim'; | ||
@@ -3,0 +3,0 @@ export declare const setHash: (hash: string, pushState?: boolean) => void; |
@@ -1,3 +0,3 @@ | ||
import { ChangeFn, ChangeOptions, Doc } from '@automerge/automerge/next'; | ||
import { AnyDocumentId } from '@automerge/automerge-repo'; | ||
import { AnyDocumentId } from '@automerge/automerge-repo/slim'; | ||
import { ChangeFn, ChangeOptions, Doc } from '@automerge/automerge/slim/next'; | ||
@@ -4,0 +4,0 @@ /** A hook which returns a document identified by a URL and a function to change the document. |
@@ -1,2 +0,2 @@ | ||
import { AutomergeUrl, DocumentId } from '@automerge/automerge-repo'; | ||
import { AutomergeUrl, DocumentId } from '@automerge/automerge-repo/slim'; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { AnyDocumentId, DocHandle } from '@automerge/automerge-repo'; | ||
import { AnyDocumentId, DocHandle } from '@automerge/automerge-repo/slim'; | ||
@@ -3,0 +3,0 @@ /** A hook which returns a {@link DocHandle} identified by a URL. |
@@ -1,2 +0,2 @@ | ||
import { DocHandle } from '@automerge/automerge-repo'; | ||
import { DocHandle } from '@automerge/automerge-repo/slim'; | ||
@@ -3,0 +3,0 @@ export interface UseLocalAwarenessProps { |
@@ -0,3 +1,3 @@ | ||
import { DocHandle } from '@automerge/automerge-repo/slim'; | ||
import { EventEmitter } from 'eventemitter3'; | ||
import { DocHandle } from '@automerge/automerge-repo'; | ||
@@ -4,0 +4,0 @@ export declare const peerEvents: EventEmitter<string | symbol, any>; |
@@ -1,2 +0,2 @@ | ||
import { Repo } from '@automerge/automerge-repo'; | ||
import { Repo } from '@automerge/automerge-repo/slim'; | ||
@@ -3,0 +3,0 @@ /** A [React context](https://react.dev/learn/passing-data-deeply-with-context) which provides access to an Automerge repo. */ |
{ | ||
"name": "@automerge/automerge-repo-react-hooks", | ||
"version": "1.1.12", | ||
"version": "1.2.0-alpha.0", | ||
"description": "Hooks to access an Automerge Repo from your react app.", | ||
@@ -17,4 +17,4 @@ "repository": "https://github.com/automerge/automerge-repo/tree/master/packages/automerge-repo-react-hooks", | ||
"dependencies": { | ||
"@automerge/automerge": "^2.1.13", | ||
"@automerge/automerge-repo": "1.1.12", | ||
"@automerge/automerge": "2.2.3-alpha.0", | ||
"@automerge/automerge-repo": "1.2.0-alpha.0", | ||
"eventemitter3": "^5.0.1", | ||
@@ -46,3 +46,3 @@ "react": "^18.2.0", | ||
}, | ||
"gitHead": "80be114993cb369fd305c68ca6dfd5a8ae892a30" | ||
"gitHead": "dc277d6de877cb1dd2dde061515c5451ad1178f6" | ||
} |
@@ -18,3 +18,3 @@ # React Hooks for Automerge Repo | ||
#### [useDocument](useDocument.ts) | ||
#### [useDocument](./src/useDocument.ts) | ||
@@ -21,0 +21,0 @@ Return a document & updater fn, by ID. |
@@ -6,3 +6,7 @@ /** Deprecated as of 1.1.6 | ||
import { DocHandle, Repo, type AutomergeUrl } from "@automerge/automerge-repo" | ||
import { | ||
DocHandle, | ||
Repo, | ||
type AutomergeUrl, | ||
} from "@automerge/automerge-repo/slim" | ||
import { useEffect, useState, useMemo } from "react" | ||
@@ -9,0 +13,0 @@ import { useRepo } from "./useRepo.js" |
@@ -1,3 +0,3 @@ | ||
import { AnyDocumentId, DocHandle } from "@automerge/automerge-repo" | ||
import { ChangeFn, ChangeOptions, Doc } from "@automerge/automerge/next" | ||
import { AnyDocumentId, DocHandle } from "@automerge/automerge-repo/slim" | ||
import { ChangeFn, ChangeOptions, Doc } from "@automerge/automerge/slim/next" | ||
import { useCallback, useEffect, useRef, useState } from "react" | ||
@@ -4,0 +4,0 @@ import { useRepo } from "./useRepo.js" |
@@ -9,3 +9,3 @@ import { | ||
parseAutomergeUrl, | ||
} from "@automerge/automerge-repo" | ||
} from "@automerge/automerge-repo/slim" | ||
import { useEffect, useMemo, useRef, useState } from "react" | ||
@@ -12,0 +12,0 @@ import { useRepo } from "./useRepo.js" |
@@ -1,2 +0,2 @@ | ||
import { AnyDocumentId, DocHandle } from "@automerge/automerge-repo" | ||
import { AnyDocumentId, DocHandle } from "@automerge/automerge-repo/slim" | ||
import { useRepo } from "./useRepo.js" | ||
@@ -3,0 +3,0 @@ |
import { useEffect } from "react" | ||
import useStateRef from "react-usestateref" | ||
import { peerEvents } from "./useRemoteAwareness.js" | ||
import { DocHandle } from "@automerge/automerge-repo" | ||
import { DocHandle } from "@automerge/automerge-repo/slim" | ||
@@ -6,0 +6,0 @@ export interface UseLocalAwarenessProps { |
import { | ||
DocHandle, | ||
DocHandleEphemeralMessagePayload, | ||
} from "@automerge/automerge-repo" | ||
} from "@automerge/automerge-repo/slim" | ||
import { useEffect } from "react" | ||
@@ -6,0 +6,0 @@ import useStateRef from "react-usestateref" |
@@ -1,2 +0,2 @@ | ||
import { Repo } from "@automerge/automerge-repo" | ||
import { Repo } from "@automerge/automerge-repo/slim" | ||
import { createContext, useContext } from "react" | ||
@@ -3,0 +3,0 @@ |
@@ -10,3 +10,3 @@ import { defineConfig } from "vitest/config" | ||
plugins: [ | ||
react(), | ||
react({ jsxRuntime: "automatic" }), | ||
wasm(), | ||
@@ -13,0 +13,0 @@ dts({ insertTypesEntry: true }), |
Sorry, the diff of this file is too big to display
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 not supported yet
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 not supported yet
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 not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
163872
4652
2
2
4
+ Added@automerge/automerge@2.2.3-alpha.0(transitive)
+ Added@automerge/automerge-repo@1.2.0-alpha.0(transitive)
- Removed@automerge/automerge@2.2.8(transitive)
- Removed@automerge/automerge-repo@1.1.12(transitive)