Skip to content

Commit

Permalink
feat(adapter-nuxt): use @nuxtjs/prismic v4
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jan 20, 2025
1 parent 7b64c1a commit 6412ee6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/adapter-nuxt/src/hooks/documentation-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const documentationRead: DocumentationReadHook<PluginOptions> = async (
const prismic = usePrismic();
const route = useRoute();
const { data: page } = useAsyncData(\`[${
const { data: page } = await useAsyncData(\`[${
model.id
}-uid-\${route.params.uid}]\`, () =>
prismic.client.getByUID("${model.id}", route.params.uid${
Expand Down Expand Up @@ -62,7 +62,7 @@ export const documentationRead: DocumentationReadHook<PluginOptions> = async (
import { components } from "~/slices";
const prismic = usePrismic();
const { data: page } = useAsyncData("[${model.id}]", () =>
const { data: page } = await useAsyncData("[${model.id}]", () =>
prismic.client.getSingle("${model.id}")
);
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-nuxt/src/hooks/project-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const installDependencies = async ({
}: InstallDependenciesArgs) => {
await installDependencies({
dependencies: {
[NUXT_PRISMIC]: "^3.3.0",
[NUXT_PRISMIC]: "^4.0.0",
},
dev: true,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-nuxt/test/plugin-project-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test("installs dependencies", async (ctx) => {

expect(installDependencies).toHaveBeenCalledWith({
dependencies: {
"@nuxtjs/prismic": "^3.3.0",
"@nuxtjs/prismic": "^4.0.0",
},
dev: true,
});
Expand Down

0 comments on commit 6412ee6

Please sign in to comment.