expo-router 55.0.15 → 55.0.16

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.
Files changed (39) hide show
  1. package/android/build.gradle +2 -2
  2. package/build/link/href.d.ts.map +1 -1
  3. package/build/link/href.js +4 -1
  4. package/build/link/href.js.map +1 -1
  5. package/expo-module.config.json +1 -1
  6. package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.module → 55.0.16/expo.modules.router-55.0.16.module} +7 -7
  7. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.module.md5 +1 -0
  8. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.module.sha1 +1 -0
  9. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.module.sha256 +1 -0
  10. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.module.sha512 +1 -0
  11. package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.pom → 55.0.16/expo.modules.router-55.0.16.pom} +1 -1
  12. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.pom.md5 +1 -0
  13. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.pom.sha1 +1 -0
  14. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.pom.sha256 +1 -0
  15. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.16/expo.modules.router-55.0.16.pom.sha512 +1 -0
  16. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
  17. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
  18. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
  19. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
  20. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
  21. package/package.json +4 -4
  22. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.module.md5 +0 -1
  23. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.module.sha1 +0 -1
  24. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.module.sha256 +0 -1
  25. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.module.sha512 +0 -1
  26. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.pom.md5 +0 -1
  27. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.pom.sha1 +0 -1
  28. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.pom.sha256 +0 -1
  29. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.15/expo.modules.router-55.0.15.pom.sha512 +0 -1
  30. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15-sources.jar → 55.0.16/expo.modules.router-55.0.16-sources.jar} +0 -0
  31. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15-sources.jar.md5 → 55.0.16/expo.modules.router-55.0.16-sources.jar.md5} +0 -0
  32. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15-sources.jar.sha1 → 55.0.16/expo.modules.router-55.0.16-sources.jar.sha1} +0 -0
  33. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15-sources.jar.sha256 → 55.0.16/expo.modules.router-55.0.16-sources.jar.sha256} +0 -0
  34. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15-sources.jar.sha512 → 55.0.16/expo.modules.router-55.0.16-sources.jar.sha512} +0 -0
  35. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.aar → 55.0.16/expo.modules.router-55.0.16.aar} +0 -0
  36. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.aar.md5 → 55.0.16/expo.modules.router-55.0.16.aar.md5} +0 -0
  37. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.aar.sha1 → 55.0.16/expo.modules.router-55.0.16.aar.sha1} +0 -0
  38. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.aar.sha256 → 55.0.16/expo.modules.router-55.0.16.aar.sha256} +0 -0
  39. /package/local-maven-repo/expo/modules/router/expo.modules.router/{55.0.15/expo.modules.router-55.0.15.aar.sha512 → 55.0.16/expo.modules.router-55.0.16.aar.sha512} +0 -0
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.router'
7
- version = '55.0.15'
7
+ version = '55.0.16'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.router"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "55.0.15"
13
+ versionName "55.0.16"
14
14
  }
15
15
  lintOptions {
16
16
  abortOnError false
@@ -1 +1 @@
1
- {"version":3,"file":"href.d.ts","sourceRoot":"","sources":["../../src/link/href.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,oEAAoE;AACpE,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,MAaxC,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,EAAE,QAAa,EAAE,MAAW,EAAE,GAAE,OAAO,CAAC,SAAS,CAAM,EACvD,EAAE,mBAAmB,EAAE,GAAE,aAAkB,UAmC5C"}
1
+ {"version":3,"file":"href.d.ts","sourceRoot":"","sources":["../../src/link/href.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,oEAAoE;AACpE,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,MAaxC,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,EAAE,QAAa,EAAE,MAAW,EAAE,GAAE,OAAO,CAAC,SAAS,CAAM,EACvD,EAAE,mBAAmB,EAAE,GAAE,aAAkB,UAqC5C"}
@@ -48,7 +48,10 @@ function resolveHrefStringWithSegments(href, { segments = [], params = {} } = {}
48
48
  const url = new URL(href, `http://hostname/${base}`);
49
49
  href = `${url.pathname}${url.search}`;
50
50
  }
51
- return href;
51
+ // Collapse leading slashes so a scheme-relative `//host/...` href — whether
52
+ // smuggled in directly or produced by URL resolution above — cannot route
53
+ // navigation cross-origin.
54
+ return href.replace(/^\/+/, '/');
52
55
  }
53
56
  function createQualifiedPathname(pathname, params) {
54
57
  for (const [key, value = ''] of Object.entries(params)) {
@@ -1 +1 @@
1
- {"version":3,"file":"href.js","sourceRoot":"","sources":["../../src/link/href.ts"],"names":[],"mappings":";;;AAoBA,sEAsCC;AAtDD,oEAAoE;AAC7D,MAAM,WAAW,GAAG,CAAC,IAAU,EAAU,EAAE;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAA,mBAAW,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACjC,IAAI,CAAC,IAAI,EAAE,MA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AE,MAAM,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,WAAW,CAAC,KAAU;IAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,iBAAiB,CAAC,MAA2B;IACpD,OAAO,CACL,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QACpB,uBAAuB;SACtB,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC;SACpC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;SACvE,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { UrlObject } from '../LocationProvider';\nimport { LinkToOptions } from '../global-state/routing';\nimport { Href } from '../types';\n\n/** Resolve an href object into a fully qualified, relative href. */\nexport const resolveHref = (href: Href): string => {\n if (typeof href === 'string') {\n return resolveHref({ pathname: href });\n }\n const path = href.pathname ?? '';\n if (!href?.params) {\n return path;\n }\n const { pathname, params } = createQualifiedPathname(path, {\n ...href.params,\n });\n const paramsString = createQueryParams(params);\n return pathname + (paramsString ? `?${paramsString}` : '');\n};\n\nexport function resolveHrefStringWithSegments(\n href: string,\n { segments = [], params = {} }: Partial<UrlObject> = {},\n { relativeToDirectory }: LinkToOptions = {}\n) {\n if (href.startsWith('.')) {\n // Resolve base path by merging the current segments with the params\n let base =\n segments\n ?.map((segment) => {\n if (!segment.startsWith('[')) return segment;\n\n if (segment.startsWith('[...')) {\n segment = segment.slice(4, -1);\n const param = params[segment];\n if (Array.isArray(param)) {\n return param.join('/');\n } else {\n return param?.split(',')?.join('/') ?? '';\n }\n } else {\n segment = segment.slice(1, -1);\n return params[segment];\n }\n })\n .filter(Boolean)\n .join('/') ?? '/';\n\n if (relativeToDirectory) {\n base = `${base}/`;\n }\n\n const url = new URL(href, `http://hostname/${base}`);\n\n href = `${url.pathname}${url.search}`;\n }\n\n return href;\n}\n\nfunction createQualifiedPathname(\n pathname: string,\n params: Record<string, any>\n): { pathname: string; params: any } {\n for (const [key, value = ''] of Object.entries(params)) {\n const dynamicKey = `[${key}]`;\n const deepDynamicKey = `[...${key}]`;\n if (pathname.includes(dynamicKey)) {\n pathname = pathname.replace(dynamicKey, encodeParam(value));\n } else if (pathname.includes(deepDynamicKey)) {\n pathname = pathname.replace(deepDynamicKey, encodeParam(value));\n } else {\n continue;\n }\n\n delete params[key];\n }\n return { pathname, params };\n}\n\nfunction encodeParam(param: any): string {\n if (Array.isArray(param)) {\n return param.map((p) => encodeParam(p)).join('/');\n }\n\n return encodeURIComponent(param.toString());\n}\n\nfunction createQueryParams(params: Record<string, any>): string {\n return (\n Object.entries(params)\n // Allow nullish params\n .filter(([, value]) => value != null)\n .map(([key, value]) => `${key}=${encodeURIComponent(value.toString())}`)\n .join('&')\n );\n}\n"]}
1
+ {"version":3,"file":"href.js","sourceRoot":"","sources":["../../src/link/href.ts"],"names":[],"mappings":";;;AAoBA,sEAwCC;AAxDD,oEAAoE;AAC7D,MAAM,WAAW,GAAG,CAAC,IAAU,EAAU,EAAE;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAA,mBAAW,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACjC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE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C;QAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,WAAW,CAAC,KAAU;IAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,iBAAiB,CAAC,MAA2B;IACpD,OAAO,CACL,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QACpB,uBAAuB;SACtB,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC;SACpC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;SACvE,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { UrlObject } from '../LocationProvider';\nimport { LinkToOptions } from '../global-state/routing';\nimport { Href } from '../types';\n\n/** Resolve an href object into a fully qualified, relative href. */\nexport const resolveHref = (href: Href): string => {\n if (typeof href === 'string') {\n return resolveHref({ pathname: href });\n }\n const path = href.pathname ?? '';\n if (!href?.params) {\n return path;\n }\n const { pathname, params } = createQualifiedPathname(path, {\n ...href.params,\n });\n const paramsString = createQueryParams(params);\n return pathname + (paramsString ? `?${paramsString}` : '');\n};\n\nexport function resolveHrefStringWithSegments(\n href: string,\n { segments = [], params = {} }: Partial<UrlObject> = {},\n { relativeToDirectory }: LinkToOptions = {}\n) {\n if (href.startsWith('.')) {\n // Resolve base path by merging the current segments with the params\n let base =\n segments\n ?.map((segment) => {\n if (!segment.startsWith('[')) return segment;\n\n if (segment.startsWith('[...')) {\n segment = segment.slice(4, -1);\n const param = params[segment];\n if (Array.isArray(param)) {\n return param.join('/');\n } else {\n return param?.split(',')?.join('/') ?? '';\n }\n } else {\n segment = segment.slice(1, -1);\n return params[segment];\n }\n })\n .filter(Boolean)\n .join('/') ?? '/';\n\n if (relativeToDirectory) {\n base = `${base}/`;\n }\n\n const url = new URL(href, `http://hostname/${base}`);\n href = `${url.pathname}${url.search}`;\n }\n\n // Collapse leading slashes so a scheme-relative `//host/...` href — whether\n // smuggled in directly or produced by URL resolution above — cannot route\n // navigation cross-origin.\n return href.replace(/^\\/+/, '/');\n}\n\nfunction createQualifiedPathname(\n pathname: string,\n params: Record<string, any>\n): { pathname: string; params: any } {\n for (const [key, value = ''] of Object.entries(params)) {\n const dynamicKey = `[${key}]`;\n const deepDynamicKey = `[...${key}]`;\n if (pathname.includes(dynamicKey)) {\n pathname = pathname.replace(dynamicKey, encodeParam(value));\n } else if (pathname.includes(deepDynamicKey)) {\n pathname = pathname.replace(deepDynamicKey, encodeParam(value));\n } else {\n continue;\n }\n\n delete params[key];\n }\n return { pathname, params };\n}\n\nfunction encodeParam(param: any): string {\n if (Array.isArray(param)) {\n return param.map((p) => encodeParam(p)).join('/');\n }\n\n return encodeURIComponent(param.toString());\n}\n\nfunction createQueryParams(params: Record<string, any>): string {\n return (\n Object.entries(params)\n // Allow nullish params\n .filter(([, value]) => value != null)\n .map(([key, value]) => `${key}=${encodeURIComponent(value.toString())}`)\n .join('&')\n );\n}\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "expo.modules.router",
11
11
  "artifactId": "expo.modules.router",
12
- "version": "55.0.15",
12
+ "version": "55.0.16",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.router",
5
5
  "module": "expo.modules.router",
6
- "version": "55.0.15",
6
+ "version": "55.0.16",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.router-55.0.15.aar",
28
- "url": "expo.modules.router-55.0.15.aar",
27
+ "name": "expo.modules.router-55.0.16.aar",
28
+ "url": "expo.modules.router-55.0.16.aar",
29
29
  "size": 13684,
30
30
  "sha512": "096e87bdf28a3c152ae7522330d6395eb967a309de7a888cc9e2654bbed45dc52d89fc7153bda0870732d72a1d938c0508be24b0b213c592e4dd61e3b105f1f2",
31
31
  "sha256": "3bdd36a13fbff4fb9fa0e431e2f71ab69c3d52d2fd72e9dad006249c6d447dcb",
@@ -60,8 +60,8 @@
60
60
  ],
61
61
  "files": [
62
62
  {
63
- "name": "expo.modules.router-55.0.15.aar",
64
- "url": "expo.modules.router-55.0.15.aar",
63
+ "name": "expo.modules.router-55.0.16.aar",
64
+ "url": "expo.modules.router-55.0.16.aar",
65
65
  "size": 13684,
66
66
  "sha512": "096e87bdf28a3c152ae7522330d6395eb967a309de7a888cc9e2654bbed45dc52d89fc7153bda0870732d72a1d938c0508be24b0b213c592e4dd61e3b105f1f2",
67
67
  "sha256": "3bdd36a13fbff4fb9fa0e431e2f71ab69c3d52d2fd72e9dad006249c6d447dcb",
@@ -80,8 +80,8 @@
80
80
  },
81
81
  "files": [
82
82
  {
83
- "name": "expo.modules.router-55.0.15-sources.jar",
84
- "url": "expo.modules.router-55.0.15-sources.jar",
83
+ "name": "expo.modules.router-55.0.16-sources.jar",
84
+ "url": "expo.modules.router-55.0.16-sources.jar",
85
85
  "size": 2326,
86
86
  "sha512": "a1a1537b57bc0d66efbf2bdfd5f514684400b9598e549eaf53c528d1bf32ff42b7826e74fb6e115f8ec0490b9e06ffbb3c3efe9f2f703652c13291ef82b0fa03",
87
87
  "sha256": "2add0f802e663eb9b5f90e086dca0e0e337a1442e15fb372a05945e01ee0d289",
@@ -0,0 +1 @@
1
+ 9eead5f2bfe511d6b33b605f85ad2410ee2781628dccf8bdffc0fc2ad8ba9243
@@ -0,0 +1 @@
1
+ 405c65bc88e86eae2d370fe653455261919131b472affba4efe3e8c69dda93d1c326f0ad4837f5571af6ef1ccbe7ab05f40300f52d8ce47a53aea49fb15494fd
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.router</groupId>
11
11
  <artifactId>expo.modules.router</artifactId>
12
- <version>55.0.15</version>
12
+ <version>55.0.16</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.router</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ b6f58440857f96a7523b12c3c003d55dfb32a2de30e8b38924e81deb2dc063a4
@@ -0,0 +1 @@
1
+ 919a9cbc2f44498e478c9ce3b8c179d404e5738191191521e0b9c302a15430afb712ec490138efbd389ed0e54ab908739307f91d8245f40f8569e465d2729235
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.router</groupId>
4
4
  <artifactId>expo.modules.router</artifactId>
5
5
  <versioning>
6
- <latest>55.0.15</latest>
7
- <release>55.0.15</release>
6
+ <latest>55.0.16</latest>
7
+ <release>55.0.16</release>
8
8
  <versions>
9
- <version>55.0.15</version>
9
+ <version>55.0.16</version>
10
10
  </versions>
11
- <lastUpdated>20260519122305</lastUpdated>
11
+ <lastUpdated>20260521114857</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 2f703080396e50d69712673b9b0417ca
1
+ cd6be689e589ac5ee48a5323e9c552a9
@@ -1 +1 @@
1
- 4c10f10f4cd8947ce3171cca7bb2ca76f0b57cb2
1
+ 8035db48545287240e9a4c84c9c4a9b298821bc6
@@ -1 +1 @@
1
- 8c0335ff6b3210464f59ca4c72dc5854c0e7a264a03b478932aa1a89b074e041
1
+ 57a844c84718067a28ea41e07cd89558215dd13be531240b91a70aa78db02c21
@@ -1 +1 @@
1
- 71e725d8d1e459e02b0e0cf72d3bcb0ddf6f8035b5b729c3567accefc48213b06d64f6118874cc59a52345843952c7771663d7d9f49a5b29a143790658df1375
1
+ 1cbdd227407d846cf482461df6bb92252e5c95b2d6f3b0e56374dc8b2eac199e7d073f21df1d5b8f34096ef748dbc92ddc60bb2896f54d19b003453d21b35aa2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "55.0.15",
3
+ "version": "55.0.16",
4
4
  "description": "Expo Router is a file-based router for React Native and web applications.",
5
5
  "author": "650 Industries, Inc.",
6
6
  "license": "MIT",
@@ -144,8 +144,8 @@
144
144
  "debug": "^4.3.4",
145
145
  "escape-string-regexp": "^4.0.0",
146
146
  "expo-glass-effect": "^55.0.11",
147
- "expo-image": "^55.0.10",
148
- "expo-server": "^55.0.10",
147
+ "expo-image": "^55.0.11",
148
+ "expo-server": "^55.0.11",
149
149
  "expo-symbols": "^55.0.9",
150
150
  "fast-deep-equal": "^3.1.3",
151
151
  "invariant": "^2.2.4",
@@ -160,5 +160,5 @@
160
160
  "use-latest-callback": "^0.2.1",
161
161
  "vaul": "^1.1.2"
162
162
  },
163
- "gitHead": "fcb091766242d53248cd3c5949965961dbc5ec1d"
163
+ "gitHead": "bb1d4bd298e5bcaff86b04aabca7c56659e57138"
164
164
  }
@@ -1 +0,0 @@
1
- e5c6df55680d780e7c1bfbbc09a53a095deb73c03cb588ccdfe535edc5724c03
@@ -1 +0,0 @@
1
- 74dd3f68363fe4df1fc3f7c7847e41f13188d01a3eee0966b15e5d910f1b557e599817f2698a0bac84386e2863eef7d3332b6556571ec0fedae643a60faac857
@@ -1 +0,0 @@
1
- fae2c942edd903ee2d3fb4bee61f2151d54f227df3a01fba11ca2f77829ae05f
@@ -1 +0,0 @@
1
- ef3758e3ec31d3e7620df100712870e905caec59642ab7c1f344dc2643a706d92ff337b5e80d11ef4d7f06f02faab22403658a54d19cd04c6912c0d531d07130