@stnd/account 0.2.1 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @stnd/account
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @stnd/styles@0.7.1
9
+
10
+ ## 0.2.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Auto-bumped @stnd/account due to modified code.
15
+
3
16
  ## 0.2.1
4
17
 
5
18
  ### Patch Changes
package/middleware.js CHANGED
@@ -18,8 +18,16 @@ export const onRequest = defineMiddleware(async (context, next) => {
18
18
  env = cfEnv;
19
19
  }
20
20
 
21
- if (!env && context.locals?.runtime?.env) {
22
- env = context.locals.runtime.env;
21
+ // `locals.runtime` was removed in Astro v6 — it's now a throwing getter,
22
+ // not just undefined, so even `?.` must be wrapped in try/catch.
23
+ if (!env) {
24
+ try {
25
+ if (context.locals?.runtime?.env) {
26
+ env = context.locals.runtime.env;
27
+ }
28
+ } catch {
29
+ // not present on this adapter/runtime — fall through
30
+ }
23
31
  }
24
32
  if (!env && context.locals?.cfContext?.env) {
25
33
  env = context.locals.cfContext.env;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/account",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "svelte": "./ui/UserMenu.svelte",
6
6
  "main": "./index.module.js",
@@ -27,7 +27,7 @@
27
27
  "@stnd/art": "0.1.1",
28
28
  "@stnd/icon": "0.2.2",
29
29
  "@stnd/log": "0.5.1",
30
- "@stnd/styles": "0.7.0",
30
+ "@stnd/styles": "0.7.1",
31
31
  "@stnd/utils": "0.6.0"
32
32
  },
33
33
  "peerDependencies": {