@automerge/automerge-repo-react-hooks 2.0.8 → 2.2.0
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automerge/automerge-repo-react-hooks",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Hooks to access an Automerge Repo from your react app.",
|
|
5
5
|
"repository": "https://github.com/automerge/automerge-repo/tree/master/packages/automerge-repo-react-hooks",
|
|
6
6
|
"author": "Peter van Hardenberg <pvh@pvh.ca>",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"visualize": "VISUALIZE=true vite build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@automerge/automerge": "
|
|
18
|
-
"@automerge/automerge-repo": "2.0
|
|
17
|
+
"@automerge/automerge": "2.2.8 - 3",
|
|
18
|
+
"@automerge/automerge-repo": "2.2.0",
|
|
19
19
|
"eventemitter3": "^5.0.1",
|
|
20
20
|
"react-usestateref": "^1.0.8"
|
|
21
21
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0eab1c635365712017d7ccc000e7cd92f14e7143"
|
|
50
50
|
}
|
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
AutomergeUrl,
|
|
4
4
|
DocHandle,
|
|
5
5
|
generateAutomergeUrl,
|
|
6
|
-
PeerId,
|
|
7
|
-
Repo,
|
|
8
6
|
} from "@automerge/automerge-repo"
|
|
9
7
|
import { render, screen, waitFor } from "@testing-library/react"
|
|
10
8
|
import "@testing-library/jest-dom"
|
|
@@ -15,10 +13,6 @@ import { ErrorBoundary } from "react-error-boundary"
|
|
|
15
13
|
import { setup, setupPairedRepos } from "./testSetup"
|
|
16
14
|
|
|
17
15
|
describe("useDocHandle", () => {
|
|
18
|
-
const repo = new Repo({
|
|
19
|
-
peerId: "bob" as PeerId,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
16
|
const Component = ({
|
|
23
17
|
url,
|
|
24
18
|
onHandle,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { Suspense } from "react"
|
|
2
|
-
import { AutomergeUrl
|
|
3
|
-
import { render,
|
|
1
|
+
import React, { Suspense, act } from "react"
|
|
2
|
+
import { AutomergeUrl } from "@automerge/automerge-repo"
|
|
3
|
+
import { render, waitFor } from "@testing-library/react"
|
|
4
4
|
import { describe, expect, it, vi } from "vitest"
|
|
5
5
|
import { useDocuments } from "../src/useDocuments"
|
|
6
6
|
import { ErrorBoundary } from "react-error-boundary"
|
package/test/useRepo.test.tsx
CHANGED
|
@@ -12,7 +12,6 @@ describe("useRepo", () => {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
test("should error when context unavailable", () => {
|
|
15
|
-
const repo = new Repo()
|
|
16
15
|
// Prevent console spam by swallowing console.error "uncaught error" message
|
|
17
16
|
const spy = vi.spyOn(console, "error")
|
|
18
17
|
spy.mockImplementation(() => {})
|
package/vitest.config.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config"
|
|
2
|
-
import
|
|
1
|
+
import { defineConfig, mergeConfig } from "vitest/config"
|
|
2
|
+
import rootConfig from "../../vitest.config"
|
|
3
3
|
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
test: {
|
|
6
|
-
globals: true,
|
|
7
|
-
setupFiles: [path.join(__dirname, "./test/testSetup.tsx")],
|
|
8
|
-
environment: "jsdom",
|
|
9
|
-
coverage: {
|
|
10
|
-
provider: "v8",
|
|
11
|
-
reporter: ["lcov", "text", "html"],
|
|
12
|
-
skipFull: true,
|
|
13
|
-
exclude: [
|
|
14
|
-
"**/fuzz",
|
|
15
|
-
"**/helpers",
|
|
16
|
-
"**/coverage",
|
|
17
|
-
"examples/**/*",
|
|
18
|
-
"docs/**/*",
|
|
19
|
-
"**/test/**/*",
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
})
|
|
4
|
+
export default mergeConfig(rootConfig, defineConfig({}))
|