diff --git a/package-lock.json b/package-lock.json index 7117e15..651644a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@prismicio/richtext": "^2.1.5" }, "devDependencies": { - "@prismicio/client": "7.9.0-alpha.2", - "@prismicio/mock": "0.3.8-alpha.0", + "@prismicio/client": "7.9.0-alpha.3", + "@prismicio/mock": "0.3.8-alpha.2", "@size-limit/preset-small-lib": "^8.2.4", "@testing-library/react": "^14.0.0", "@types/node-fetch": "^3.0.3", @@ -1156,9 +1156,9 @@ "dev": true }, "node_modules/@prismicio/client": { - "version": "7.9.0-alpha.2", - "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-7.9.0-alpha.2.tgz", - "integrity": "sha512-Y4Ti7XoJ57Rk2AkhI0UBxg3f2+wGr4ZwGfr82bFbmY9CCAUXQ+aN8cl3nUSCUafhRyJTcqWSty52D8RKvseY4g==", + "version": "7.9.0-alpha.3", + "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-7.9.0-alpha.3.tgz", + "integrity": "sha512-8u+ot1xTt/wH8BSlnYJ20+fuZRo4TIf4PnkNFMLkgYmNbUTNnsNFsPr0GJC/G9nTZFnn5jV0oTPz48C/ITVnnA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1169,9 +1169,9 @@ } }, "node_modules/@prismicio/mock": { - "version": "0.3.8-alpha.0", - "resolved": "https://registry.npmjs.org/@prismicio/mock/-/mock-0.3.8-alpha.0.tgz", - "integrity": "sha512-w8yGiL6cmapktjeb47IS4zdqFArfo+cC81ahdoDBShOjREqQjzTHECihMudcnePav5Ok11IUHXB0F5Il3aaRjA==", + "version": "0.3.8-alpha.2", + "resolved": "https://registry.npmjs.org/@prismicio/mock/-/mock-0.3.8-alpha.2.tgz", + "integrity": "sha512-LtLeIp88Y1vvQzyWCcK0k0aYdoexh7Yep31WeiUmZXnZ8p91sliw9HXZDEHqnKX2SjZx6sSv+P7oBVcq6IsH+g==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -9601,18 +9601,18 @@ "dev": true }, "@prismicio/client": { - "version": "7.9.0-alpha.2", - "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-7.9.0-alpha.2.tgz", - "integrity": "sha512-Y4Ti7XoJ57Rk2AkhI0UBxg3f2+wGr4ZwGfr82bFbmY9CCAUXQ+aN8cl3nUSCUafhRyJTcqWSty52D8RKvseY4g==", + "version": "7.9.0-alpha.3", + "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-7.9.0-alpha.3.tgz", + "integrity": "sha512-8u+ot1xTt/wH8BSlnYJ20+fuZRo4TIf4PnkNFMLkgYmNbUTNnsNFsPr0GJC/G9nTZFnn5jV0oTPz48C/ITVnnA==", "dev": true, "requires": { "imgix-url-builder": "^0.0.5" } }, "@prismicio/mock": { - "version": "0.3.8-alpha.0", - "resolved": "https://registry.npmjs.org/@prismicio/mock/-/mock-0.3.8-alpha.0.tgz", - "integrity": "sha512-w8yGiL6cmapktjeb47IS4zdqFArfo+cC81ahdoDBShOjREqQjzTHECihMudcnePav5Ok11IUHXB0F5Il3aaRjA==", + "version": "0.3.8-alpha.2", + "resolved": "https://registry.npmjs.org/@prismicio/mock/-/mock-0.3.8-alpha.2.tgz", + "integrity": "sha512-LtLeIp88Y1vvQzyWCcK0k0aYdoexh7Yep31WeiUmZXnZ8p91sliw9HXZDEHqnKX2SjZx6sSv+P7oBVcq6IsH+g==", "dev": true, "requires": { "change-case": "^5.4.4" diff --git a/package.json b/package.json index 5bd0116..56d1257 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,8 @@ "@prismicio/richtext": "^2.1.5" }, "devDependencies": { - "@prismicio/client": "7.9.0-alpha.2", - "@prismicio/mock": "0.3.8-alpha.0", + "@prismicio/client": "7.9.0-alpha.3", + "@prismicio/mock": "0.3.8-alpha.2", "@size-limit/preset-small-lib": "^8.2.4", "@testing-library/react": "^14.0.0", "@types/node-fetch": "^3.0.3", @@ -113,7 +113,7 @@ "access": "public" }, "overrides": { - "@prismicio/client": "7.9.0-alpha.2", - "@prismicio/mock": "0.3.8-alpha.0" + "@prismicio/client": "7.9.0-alpha.3", + "@prismicio/mock": "0.3.8-alpha.2" } } diff --git a/src/react-server/PrismicLink.tsx b/src/react-server/PrismicLink.tsx index af3f94f..f00a276 100644 --- a/src/react-server/PrismicLink.tsx +++ b/src/react-server/PrismicLink.tsx @@ -5,7 +5,6 @@ import { PrismicDocument, asLinkAttrs, AsLinkAttrsConfig, - isFilled, } from "@prismicio/client"; import { devMsg } from "../lib/devMsg"; diff --git a/test/PrismicLink.test.tsx b/test/PrismicLink.test.tsx index 2002f8c..5667b51 100644 --- a/test/PrismicLink.test.tsx +++ b/test/PrismicLink.test.tsx @@ -81,7 +81,7 @@ it("if URL is external and externalComponent is given to the provider and the co }); it("renders the link's text if no children are provided", async (ctx) => { - const model = ctx.mock.model.link({ text: true }); + const model = ctx.mock.model.link({ allowText: true }); const field = ctx.mock.value.link({ type: "Web", model }); const actual = renderJSON(); const expected = renderJSON( @@ -94,7 +94,7 @@ it("renders the link's text if no children are provided", async (ctx) => { }); it("renders the given children, overriding the link's text", async (ctx) => { - const model = ctx.mock.model.link({ text: true }); + const model = ctx.mock.model.link({ allowText: true }); const field = ctx.mock.value.link({ type: "Web", model }); const children = ctx.mock.value.keyText(); const actual = renderJSON(