astro-loader-pocketbase 2.0.1 → 2.1.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": "astro-loader-pocketbase",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "A content loader for Astro that uses the PocketBase API",
5
5
  "license": "MIT",
6
6
  "author": "Luis Wolf <development@pawcode.de> (https://pawcode.de)",
@@ -21,15 +21,15 @@
21
21
  "astro": "^5.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@eslint/js": "^9.17.0",
24
+ "@eslint/js": "^9.18.0",
25
25
  "@stylistic/eslint-plugin": "^2.12.1",
26
- "@types/node": "^22.10.2",
27
- "astro": "^5.0.5",
28
- "eslint": "^9.17.0",
29
- "globals": "^15.13.0",
26
+ "@types/node": "^22.10.5",
27
+ "astro": "^5.1.5",
28
+ "eslint": "^9.18.0",
29
+ "globals": "^15.14.0",
30
30
  "husky": "^9.1.7",
31
- "typescript": "^5.7.2",
32
- "typescript-eslint": "^8.18.0"
31
+ "typescript": "^5.7.3",
32
+ "typescript-eslint": "^8.19.1"
33
33
  },
34
34
  "keywords": [
35
35
  "astro",
@@ -15,6 +15,16 @@ export function pocketbaseLoader(options: PocketBaseLoaderOptions): Loader {
15
15
  return {
16
16
  name: "pocketbase-loader",
17
17
  load: async (context: LoaderContext): Promise<void> => {
18
+ if (
19
+ context.refreshContextData?.source === "astro-integration-pocketbase" &&
20
+ context.refreshContextData.collection &&
21
+ context.refreshContextData.collection !== options.collectionName
22
+ ) {
23
+ // Skip the refresh if the reload was triggered by the `astro-integration-pocketbase`
24
+ // and the collection name does not match the current collection.
25
+ return;
26
+ }
27
+
18
28
  // Get the date of the last fetch to only update changed entries.
19
29
  let lastModified = context.meta.get("last-modified");
20
30