@marktiderman/genesis-supabase 0.14.0 → 0.14.1

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.
@@ -141,7 +141,9 @@ function privateSegment(segment: string): string | null {
141
141
  */
142
142
  export function cleanRoute(route: string | null | undefined): string | undefined {
143
143
  if (typeof route !== "string") return undefined;
144
- const path = route.replace(/[?#].*$/, "").trim();
144
+ // A plain search, not a regex: `[?#].*$` retries at every `#` and goes quadratic on `###…`.
145
+ const cut = route.search(/[?#]/);
146
+ const path = (cut === -1 ? route : route.slice(0, cut)).trim();
145
147
  if (!path) return undefined;
146
148
  const safe = path
147
149
  .split("/")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marktiderman/genesis-supabase",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -82,7 +82,7 @@
82
82
  "README.md"
83
83
  ],
84
84
  "dependencies": {
85
- "@marktiderman/genesis-features": "^0.8.1"
85
+ "@marktiderman/genesis-features": "^0.8.2"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@supabase/supabase-js": "^2.118.0",