Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-rice-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-global": minor
---

The package has been updated to follow changes to the CSP APIs which are now available under the `Astro.csp` namespace.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"packageManager": "pnpm@10.24.0",
"devDependencies": {
"@changesets/changelog-github": "0.5",
"@changesets/cli": "2",
"astro": "5",
"typescript": "5.7"
"@changesets/changelog-github": "~0.5.1",
"@changesets/cli": "^2.29.7",
"astro": "^5.16.1",
"typescript": "~5.9.3"
}
}
2 changes: 1 addition & 1 deletion packages/adds-to-head/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"type": "module",
"devDependencies": {
"@types/node": "22",
"@types/node": "24",
"astro": "5"
}
}
2 changes: 1 addition & 1 deletion packages/client-interaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"astro": "4 || 5"
},
"devDependencies": {
"@types/node": "22"
"@types/node": "24"
}
}
2 changes: 1 addition & 1 deletion packages/dynamic-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"astro": "4 || 5"
},
"devDependencies": {
"@types/node": "22"
"@types/node": "24"
}
}
2 changes: 1 addition & 1 deletion packages/emotion-extract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"magic-string": "0.30"
},
"devDependencies": {
"@types/node": "22",
"@types/node": "24",
"vite": "6"
}
}
2 changes: 1 addition & 1 deletion packages/emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"magic-string": "0.30"
},
"devDependencies": {
"@types/node": "22",
"@types/node": "24",
"astro": "5",
"vite": "6"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/global/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"astro": "5",
"@types/node": "22",
"@types/node": "24",
"astro-global": "workspace:*"
}
}
28 changes: 4 additions & 24 deletions packages/global/runtime/virtual-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,11 @@ export default {
if (ctx === undefined) throw new NoRequestError("isPrerendered")
return ctx.isPrerendered
},
get insertDirective() {
get csp() {
const ctx = storage.getStore()
if (ctx === undefined) throw new NoRequestError("insertDirective")
return ctx.insertDirective
},
get insertStyleResource() {
const ctx = storage.getStore()
if (ctx === undefined) throw new NoRequestError("insertStyleResource")
return ctx.insertStyleResource
},
get insertStyleHash() {
const ctx = storage.getStore()
if (ctx === undefined) throw new NoRequestError("insertStyleHash")
return ctx.insertStyleHash
},
get insertScriptResource() {
const ctx = storage.getStore()
if (ctx === undefined) throw new NoRequestError("insertScriptResource")
return ctx.insertScriptResource
},
get insertScriptHash() {
const ctx = storage.getStore()
if (ctx === undefined) throw new NoRequestError("insertScriptHash")
return ctx.insertScriptHash
},
if (ctx === undefined) throw new NoRequestError("csp")
return ctx.csp
}
} satisfies AstroGlobal

export class NoRequestError extends Error {
Expand Down
2 changes: 1 addition & 1 deletion packages/scope/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"vite": "6",
"astro": "5",
"@types/node": "22"
"@types/node": "24"
}
}
2 changes: 1 addition & 1 deletion packages/server-only-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"type": "module",
"devDependencies": {
"@types/node": "22",
"@types/node": "24",
"astro": "5"
}
}
Loading
Loading