Skip to content

Commit 4ac036b

Browse files
committed
chore: update to Astro 6
1 parent 987974a commit 4ac036b

File tree

7 files changed

+7772
-5374
lines changed

7 files changed

+7772
-5374
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v22

.yarn/install-state.gz

675 KB
Binary file not shown.

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sensinum/astro-strapi-loader",
3-
"version": "1.1.2",
3+
"version": "1.2.0",
44
"description": "Astro loader for Strapi CMS",
55
"keywords": [
66
"astro",
@@ -58,11 +58,11 @@
5858
"prepare": "husky install"
5959
},
6060
"dependencies": {
61-
"astro": "^5.0.0",
62-
"zod": "^3.24.2"
61+
"astro": "^6.0.0",
62+
"zod": "^4.3.6"
6363
},
6464
"devDependencies": {
65-
"@astrojs/ts-plugin": "^0.4.0",
65+
"@astrojs/ts-plugin": "^1.10.7",
6666
"@types/jest": "^29.5.14",
6767
"@types/node": "^20.0.0",
6868
"@types/qs": "^6.9.14",
@@ -77,10 +77,10 @@
7777
"typescript": "^5.0.0"
7878
},
7979
"peerDependencies": {
80-
"astro": "^5.0.0",
81-
"zod": "^3.24.2"
80+
"astro": "^6.0.0",
81+
"zod": "^4.3.6"
8282
},
8383
"engines": {
84-
"node": ">=18.17.0"
84+
"node": ">=22.12.0"
8585
}
8686
}

src/utils/loader.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export function strapiLoader(
2828
contentType: string,
2929
options: StrapiLoaderOptions,
3030
query: Record<string, unknown> = {},
31-
): Loader {
32-
return {
31+
) {
32+
return ({
3333
name: options.collectionName || "strapi-loader",
3434
load: async (context: LoaderContext): Promise<void> => {
3535
const { store, logger, parseData, generateDigest } = context;
@@ -88,7 +88,7 @@ export function strapiLoader(
8888

8989
logger.info(`[${collectionName}] Loading data from Strapi... DONE`);
9090
},
91-
};
91+
}) satisfies Loader;
9292
}
9393

9494
async function fetchAndStoreData(

src/utils/strapi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { z, defineCollection } from "astro:content";
1+
import { defineCollection } from "astro:content";
22
import type { CollectionConfig } from "astro/content/config";
3+
import { z } from "astro/zod";
34

45
import type { StrapiComponent, StrapiContentType, StrapiResponse } from "../types/strapi";
56
import { StrapiSchemaGenerator } from "./schema";

yarn.lock

Lines changed: 7758 additions & 5362 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)