Skip to content

Commit

Permalink
Upgrade to Astro 5.0! (#177)
Browse files Browse the repository at this point in the history
* Upgrade dep

- Upgrade all dep except docs because starlight does not support 5.0 yet

* Fix resolution of theme entrypoint

* Add changeset

* Upgrade dep

* Add recommended type options to tsconfig

https://docs.astro.build/en/guides/upgrade-to/v5/#changed-typescript-configuration
  • Loading branch information
BryceRussell authored Dec 10, 2024
1 parent dd63fc8 commit 52e2a61
Show file tree
Hide file tree
Showing 10 changed files with 2,202 additions and 2,099 deletions.
7 changes: 7 additions & 0 deletions .changeset/pink-lions-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"astro-theme-provider": patch
---

Upgrade to Astro 5.0

- Fix automatic resolution of theme entrypoint
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"node": ">=18.19.0"
},
"scripts": {
"update:all": "pnpm recursive update --include-workspace-root",
"test": "node --test && pnpm --filter \"./tests/e2e/**\" test",
"test:e2e": "pnpm --filter \"./tests/e2e/**\" test",
"test:unit": "node --test",
Expand All @@ -21,9 +22,9 @@
},
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@changesets/cli": "^2.27.7",
"@playwright/test": "^1.46.0",
"astro": "^4.13.1"
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.27.10",
"@playwright/test": "^1.49.0",
"astro": "^5.0.4"
}
}
}
18 changes: 9 additions & 9 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
}
},
"devDependencies": {
"@astrojs/db": "^0.12.0",
"@types/node": "^22.1.0",
"playwright": "^1.46.0",
"tsup": "^8.2.4",
"typescript": "^5.5.4",
"vite": "^5.4.0"
"@astrojs/db": "^0.14.3",
"@types/node": "^22.10.1",
"playwright": "^1.49.0",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vite": "^6.0.3"
},
"dependencies": {
"astro-integration-kit": "^0.16.0",
"astro-pages": "^0.3.0",
"astro-public": "^0.1.0",
"astro-integration-kit": "^0.17.0",
"astro-pages": "^0.3.1",
"astro-public": "^0.1.1",
"callsites": "^4.2.0",
"fast-glob": "^3.3.2"
}
Expand Down
1 change: 0 additions & 1 deletion package/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function <ThemeName extends string, Schema extends z.ZodTypeAny>(
name: themeName,
schema: configSchema = z.any(),
entrypoint: themeEntrypoint = callsites()
.reverse()
.map((callsite) => (callsite as NodeJS.CallSite).getScriptNameOrSourceURL())
.find((path) => path && !path.startsWith("file://") && path !== thisFile)!,
srcDir: themeSrc = "src",
Expand Down
8 changes: 4 additions & 4 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/sitemap": "^3.1.6",
"astro": "^4.13.1",
"astro-integration-kit": "^0.16.0",
"sharp": "^0.33.4",
"@astrojs/sitemap": "^3.2.1",
"astro": "^5.0.4",
"astro-integration-kit": "^0.17.0",
"sharp": "^0.33.5",
"theme-playground": "workspace:^"
}
}
4 changes: 3 additions & 1 deletion playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"extends": "astro/tsconfigs/strictest"
"extends": "astro/tsconfigs/strictest",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Loading

0 comments on commit 52e2a61

Please sign in to comment.