expo-router 57.0.30 → 57.0.31

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/getRoutesRedirects.d.ts.map +1 -1
  3. package/build/getRoutesRedirects.js +8 -5
  4. package/build/getRoutesRedirects.js.map +1 -1
  5. package/expo-module.config.json +1 -1
  6. package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.module → 57.0.31/expo.modules.router-57.0.31.module} +7 -7
  7. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.module.md5 +1 -0
  8. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.module.sha1 +1 -0
  9. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.module.sha256 +1 -0
  10. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.module.sha512 +1 -0
  11. package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.pom → 57.0.31/expo.modules.router-57.0.31.pom} +1 -1
  12. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.pom.md5 +1 -0
  13. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.pom.sha1 +1 -0
  14. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.pom.sha256 +1 -0
  15. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.31/expo.modules.router-57.0.31.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 +5 -5
  22. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.module.md5 +0 -1
  23. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.module.sha1 +0 -1
  24. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.module.sha256 +0 -1
  25. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.module.sha512 +0 -1
  26. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.pom.md5 +0 -1
  27. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.pom.sha1 +0 -1
  28. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.pom.sha256 +0 -1
  29. package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.30/expo.modules.router-57.0.30.pom.sha512 +0 -1
  30. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30-sources.jar → 57.0.31/expo.modules.router-57.0.31-sources.jar} +0 -0
  31. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30-sources.jar.md5 → 57.0.31/expo.modules.router-57.0.31-sources.jar.md5} +0 -0
  32. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30-sources.jar.sha1 → 57.0.31/expo.modules.router-57.0.31-sources.jar.sha1} +0 -0
  33. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30-sources.jar.sha256 → 57.0.31/expo.modules.router-57.0.31-sources.jar.sha256} +0 -0
  34. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30-sources.jar.sha512 → 57.0.31/expo.modules.router-57.0.31-sources.jar.sha512} +0 -0
  35. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.aar → 57.0.31/expo.modules.router-57.0.31.aar} +0 -0
  36. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.aar.md5 → 57.0.31/expo.modules.router-57.0.31.aar.md5} +0 -0
  37. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.aar.sha1 → 57.0.31/expo.modules.router-57.0.31.aar.sha1} +0 -0
  38. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.aar.sha256 → 57.0.31/expo.modules.router-57.0.31.aar.sha256} +0 -0
  39. /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.30/expo.modules.router-57.0.30.aar.sha512 → 57.0.31/expo.modules.router-57.0.31.aar.sha512} +0 -0
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.router'
7
- version = '57.0.30'
7
+ version = '57.0.31'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.router"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "57.0.30"
13
+ versionName "57.0.31"
14
14
  }
15
15
  lintOptions {
16
16
  abortOnError false
@@ -1 +1 @@
1
- {"version":3,"file":"getRoutesRedirects.d.ts","sourceRoot":"","sources":["../src/getRoutesRedirects.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,SAAS,EAAE,cAAc,EAAE,GAAG,SAAS,GACtC,MAAM,GAAG,SAAS,GAAG,IAAI,CAyB3B;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,cAAc;;;;;;EA6B/D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,UAoBnE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,UAe7F"}
1
+ {"version":3,"file":"getRoutesRedirects.d.ts","sourceRoot":"","sources":["../src/getRoutesRedirects.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,SAAS,EAAE,cAAc,EAAE,GAAG,SAAS,GACtC,MAAM,GAAG,SAAS,GAAG,IAAI,CAyB3B;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,cAAc;;;;;;EA6B/D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,UAuBnE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,UAe7F"}
@@ -65,7 +65,7 @@ function applyRedirects(url, redirects) {
65
65
  function getRedirectModule(redirectConfig) {
66
66
  return {
67
67
  default: function RedirectComponent() {
68
- const pathname = require('./hooks').usePathname();
68
+ const path = require('./hooks').useRouteInfo().pathnameWithParams;
69
69
  const isExternal = (0, url_1.shouldLinkExternally)(redirectConfig.destination);
70
70
  (0, react_1.useEffect)(() => {
71
71
  if (isExternal) {
@@ -79,7 +79,7 @@ function getRedirectModule(redirectConfig) {
79
79
  if (isExternal) {
80
80
  return null;
81
81
  }
82
- const href = convertRedirect(pathname, redirectConfig);
82
+ const href = convertRedirect(path, redirectConfig);
83
83
  return (0, react_1.createElement)(require('./link/Link').Redirect, {
84
84
  href,
85
85
  });
@@ -88,8 +88,11 @@ function getRedirectModule(redirectConfig) {
88
88
  }
89
89
  function convertRedirect(path, config) {
90
90
  const params = {};
91
- const parts = path.split('/');
92
- const sourceParts = config.source.split('/');
91
+ const suffixIndex = path.search(/[?#]/);
92
+ const pathname = suffixIndex === -1 ? path : path.slice(0, suffixIndex);
93
+ const suffix = suffixIndex === -1 ? '' : path.slice(suffixIndex);
94
+ const parts = pathname.split('/').filter(Boolean);
95
+ const sourceParts = config.source.split('/').filter(Boolean);
93
96
  for (const [index, sourcePart] of sourceParts.entries()) {
94
97
  const dynamicName = (0, matchers_1.matchDynamicName)(sourcePart);
95
98
  if (!dynamicName) {
@@ -104,7 +107,7 @@ function convertRedirect(path, config) {
104
107
  break;
105
108
  }
106
109
  }
107
- return mergeVariablesWithPath(config.destination, params);
110
+ return `/${mergeVariablesWithPath(config.destination, params)}${suffix}`;
108
111
  }
109
112
  function mergeVariablesWithPath(path, params) {
110
113
  return path
@@ -1 +1 @@
1
- {"version":3,"file":"getRoutesRedirects.js","sourceRoot":"","sources":["../src/getRoutesRedirects.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wCA4BC;AAED,8CA6BC;AAED,0CAoBC;AAED,wDAeC;AA3GD,sDAAwC;AACxC,iCAAiD;AAEjD,0EAA0D;AAG1D,yCAA8C;AAC9C,qCAAmD;AAEnD,SAAgB,cAAc,CAC5B,GAA8B,EAC9B,SAAuC;IAEvC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,kCAAS,EAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,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,2BAAgB,EAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACvC,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["import * as Linking from 'expo-linking';\nimport { createElement, useEffect } from 'react';\n\nimport { cleanPath } from './fork/getStateFromPath-forks';\nimport type { RedirectConfig } from './getRoutesCore';\nimport type { StoreRedirects } from './global-state/router-store';\nimport { matchDynamicName } from './matchers';\nimport { shouldLinkExternally } from './utils/url';\n\nexport function applyRedirects(\n url: string | null | undefined,\n redirects: StoreRedirects[] | undefined\n): string | undefined | null {\n if (typeof url !== 'string' || !redirects) {\n return url;\n }\n\n const nextUrl = cleanPath(url);\n const redirect = redirects.find(([regex]) => regex.test(nextUrl));\n\n if (!redirect) {\n return url;\n }\n\n // If the redirect is external, open the URL\n if (redirect[2]) {\n let href = redirect[1].destination;\n\n if (href.startsWith('//') && process.env.EXPO_OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n return href;\n }\n\n return applyRedirects(convertRedirect(url, redirect[1]), redirects);\n}\n\nexport function getRedirectModule(redirectConfig: RedirectConfig) {\n return {\n default: function RedirectComponent() {\n const pathname = require('./hooks').usePathname();\n\n const isExternal = shouldLinkExternally(redirectConfig.destination);\n\n useEffect(() => {\n if (isExternal) {\n let href = redirectConfig.destination;\n if (href.startsWith('//') && process.env.EXPO_OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n }\n }, []);\n\n if (isExternal) {\n return null;\n }\n\n const href = convertRedirect(pathname, redirectConfig);\n\n return createElement(require('./link/Link').Redirect, {\n href,\n });\n },\n };\n}\n\nexport function convertRedirect(path: string, config: RedirectConfig) {\n const params: Record<string, string | string[]> = {};\n\n const parts = path.split('/');\n const sourceParts = config.source.split('/');\n\n for (const [index, sourcePart] of sourceParts.entries()) {\n const dynamicName = matchDynamicName(sourcePart);\n if (!dynamicName) {\n continue;\n } else if (!dynamicName.deep) {\n params[dynamicName.name] = parts[index]!;\n continue;\n } else {\n params[dynamicName.name] = parts.slice(index);\n break;\n }\n }\n\n return mergeVariablesWithPath(config.destination, params);\n}\n\nexport function mergeVariablesWithPath(path: string, params: Record<string, string | string[]>) {\n return path\n .split('/')\n .map((part) => {\n const dynamicName = matchDynamicName(part);\n if (!dynamicName) {\n return part;\n } else {\n const param = params[dynamicName.name];\n delete params[dynamicName.name];\n return param;\n }\n })\n .filter(Boolean)\n .join('/');\n}\n"]}
1
+ {"version":3,"file":"getRoutesRedirects.js","sourceRoot":"","sources":["../src/getRoutesRedirects.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wCA4BC;AAED,8CA6BC;AAED,0CAuBC;AAED,wDAeC;AA9GD,sDAAwC;AACxC,iCAAiD;AAEjD,0EAA0D;AAG1D,yCAA8C;AAC9C,qCAAmD;AAEnD,SAAgB,cAAc,CAC5B,GAA8B,EAC9B,SAAuC;IAEvC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,kCAAS,EAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAElE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,GAAG,CAAC;IACb,CAAC;IAED,4CAA4C;IA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9C,MAAM;QACR,CAAC;IACH,CAAC;IAED,OAAO,IAAI,sBAAsB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;AAC3E,CAAC;AAED,SAAgB,sBAAsB,CAAC,IAAY,EAAE,MAAyC;IAC5F,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,WAAW,GAAG,IAAA,2BAAgB,EAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACvC,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["import * as Linking from 'expo-linking';\nimport { createElement, useEffect } from 'react';\n\nimport { cleanPath } from './fork/getStateFromPath-forks';\nimport type { RedirectConfig } from './getRoutesCore';\nimport type { StoreRedirects } from './global-state/router-store';\nimport { matchDynamicName } from './matchers';\nimport { shouldLinkExternally } from './utils/url';\n\nexport function applyRedirects(\n url: string | null | undefined,\n redirects: StoreRedirects[] | undefined\n): string | undefined | null {\n if (typeof url !== 'string' || !redirects) {\n return url;\n }\n\n const nextUrl = cleanPath(url);\n const redirect = redirects.find(([regex]) => regex.test(nextUrl));\n\n if (!redirect) {\n return url;\n }\n\n // If the redirect is external, open the URL\n if (redirect[2]) {\n let href = redirect[1].destination;\n\n if (href.startsWith('//') && process.env.EXPO_OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n return href;\n }\n\n return applyRedirects(convertRedirect(url, redirect[1]), redirects);\n}\n\nexport function getRedirectModule(redirectConfig: RedirectConfig) {\n return {\n default: function RedirectComponent() {\n const path = require('./hooks').useRouteInfo().pathnameWithParams;\n\n const isExternal = shouldLinkExternally(redirectConfig.destination);\n\n useEffect(() => {\n if (isExternal) {\n let href = redirectConfig.destination;\n if (href.startsWith('//') && process.env.EXPO_OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n }\n }, []);\n\n if (isExternal) {\n return null;\n }\n\n const href = convertRedirect(path, redirectConfig);\n\n return createElement(require('./link/Link').Redirect, {\n href,\n });\n },\n };\n}\n\nexport function convertRedirect(path: string, config: RedirectConfig) {\n const params: Record<string, string | string[]> = {};\n\n const suffixIndex = path.search(/[?#]/);\n const pathname = suffixIndex === -1 ? path : path.slice(0, suffixIndex);\n const suffix = suffixIndex === -1 ? '' : path.slice(suffixIndex);\n const parts = pathname.split('/').filter(Boolean);\n const sourceParts = config.source.split('/').filter(Boolean);\n\n for (const [index, sourcePart] of sourceParts.entries()) {\n const dynamicName = matchDynamicName(sourcePart);\n if (!dynamicName) {\n continue;\n } else if (!dynamicName.deep) {\n params[dynamicName.name] = parts[index]!;\n continue;\n } else {\n params[dynamicName.name] = parts.slice(index);\n break;\n }\n }\n\n return `/${mergeVariablesWithPath(config.destination, params)}${suffix}`;\n}\n\nexport function mergeVariablesWithPath(path: string, params: Record<string, string | string[]>) {\n return path\n .split('/')\n .map((part) => {\n const dynamicName = matchDynamicName(part);\n if (!dynamicName) {\n return part;\n } else {\n const param = params[dynamicName.name];\n delete params[dynamicName.name];\n return param;\n }\n })\n .filter(Boolean)\n .join('/');\n}\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "expo.modules.router",
11
11
  "artifactId": "expo.modules.router",
12
- "version": "57.0.30",
12
+ "version": "57.0.31",
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": "57.0.30",
6
+ "version": "57.0.31",
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-57.0.30.aar",
28
- "url": "expo.modules.router-57.0.30.aar",
27
+ "name": "expo.modules.router-57.0.31.aar",
28
+ "url": "expo.modules.router-57.0.31.aar",
29
29
  "size": 15835,
30
30
  "sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
31
31
  "sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
@@ -74,8 +74,8 @@
74
74
  ],
75
75
  "files": [
76
76
  {
77
- "name": "expo.modules.router-57.0.30.aar",
78
- "url": "expo.modules.router-57.0.30.aar",
77
+ "name": "expo.modules.router-57.0.31.aar",
78
+ "url": "expo.modules.router-57.0.31.aar",
79
79
  "size": 15835,
80
80
  "sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
81
81
  "sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
@@ -94,8 +94,8 @@
94
94
  },
95
95
  "files": [
96
96
  {
97
- "name": "expo.modules.router-57.0.30-sources.jar",
98
- "url": "expo.modules.router-57.0.30-sources.jar",
97
+ "name": "expo.modules.router-57.0.31-sources.jar",
98
+ "url": "expo.modules.router-57.0.31-sources.jar",
99
99
  "size": 2326,
100
100
  "sha512": "a1a1537b57bc0d66efbf2bdfd5f514684400b9598e549eaf53c528d1bf32ff42b7826e74fb6e115f8ec0490b9e06ffbb3c3efe9f2f703652c13291ef82b0fa03",
101
101
  "sha256": "2add0f802e663eb9b5f90e086dca0e0e337a1442e15fb372a05945e01ee0d289",
@@ -0,0 +1 @@
1
+ 498909dfcc0b85b536bdbc8d0f52da33ee2f3799fae260ef09d4b3215dbc7aa8
@@ -0,0 +1 @@
1
+ fee80e07ba7bba29fd7b1e1b44637173ce52f62b1bebb8dfa4027925a867651ca799d67cbc0c799cac83bbc63342a563a80fc0af8dd0649be5d2986900105e08
@@ -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>57.0.30</version>
12
+ <version>57.0.31</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
+ 5e485ff29de76ecb89f23914de5b005ec79b47a335304e16f61162581d0e0f21
@@ -0,0 +1 @@
1
+ 20b8281944373a13e8625722547173b6a73923a41030700f73439d01854071204c75c037028f1972bd8446d5d7bc27377d0e4493a1b99293d865ebc79ca1fdae
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.router</groupId>
4
4
  <artifactId>expo.modules.router</artifactId>
5
5
  <versioning>
6
- <latest>57.0.30</latest>
7
- <release>57.0.30</release>
6
+ <latest>57.0.31</latest>
7
+ <release>57.0.31</release>
8
8
  <versions>
9
- <version>57.0.30</version>
9
+ <version>57.0.31</version>
10
10
  </versions>
11
- <lastUpdated>20261105092533</lastUpdated>
11
+ <lastUpdated>20261112131751</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- c238d4712a28935b7cba6da82fb34f1f
1
+ ce578e150a00637ac4703705a8eb6dcc
@@ -1 +1 @@
1
- 3ee5d0a6fa13262988adb722f34e28c357b04540
1
+ 2908158837d26188520ec38a013ef5002317e2a2
@@ -1 +1 @@
1
- d12ee821350f4889ecf2e008c560d6b296054b9138a19f09e357580acf25ceaf
1
+ b61ebebe44fcbabeebcbcb828c5ad3eee589df7dc1b1b00b55bed7bc6eb812fa
@@ -1 +1 @@
1
- 8738a561db0f7ffa3fbc4191f9b5863a6ff417f4bbcfe418411562a8bada883d45eb670ab11e7297e95175c2ca45b961eafbf8e23a4fbc331de491d75bea33da
1
+ 806d5895a08601f3085b53d0c4dab18a55185a1d17027a4d62744313a6e93a7d5535edea7c21247af5684b3fd27f4d3fe63c7428092a13726bd751ab35578133
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "57.0.30",
3
+ "version": "57.0.31",
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",
@@ -84,8 +84,8 @@
84
84
  "@expo/metro-runtime": "^57.0.18",
85
85
  "@testing-library/react-native": ">= 13.2.0",
86
86
  "expo": "*",
87
- "expo-constants": "^57.0.23",
88
- "expo-linking": "^57.0.13",
87
+ "expo-constants": "^57.0.24",
88
+ "expo-linking": "^57.0.14",
89
89
  "react": "*",
90
90
  "react-dom": "*",
91
91
  "react-native": "*",
@@ -140,7 +140,7 @@
140
140
  "react-native-web": "~0.21.0",
141
141
  "react-server-dom-webpack": "~19.0.6",
142
142
  "tsd": "^0.33.0",
143
- "expo": "57.0.32"
143
+ "expo": "57.0.33"
144
144
  },
145
145
  "dependencies": {
146
146
  "@expo/log-box": "^57.0.5",
@@ -171,7 +171,7 @@
171
171
  "standard-navigation": "^0.0.5",
172
172
  "vaul": "^1.1.2"
173
173
  },
174
- "gitHead": "d525588681ae2ac2863deff25d35daa39ede8ac1",
174
+ "gitHead": "968a9dcec304789b2ccc1a41ef5d301938e91478",
175
175
  "scripts": {
176
176
  "build": "node ./scripts/build.js",
177
177
  "clean": "expo-module clean",
@@ -1 +0,0 @@
1
- 825b671f0fa5d509942eff54bdd15dc0c88a1d18ed7ca4a7bb4e10d8d9bc2e27
@@ -1 +0,0 @@
1
- 6660185f225d65e39c71efcf6fc6119c43ec8c8c4636b68b9d045297940c44ccc202e15e08f68127e425fe5aaeb479431299db4bbcf9ecba77adb39384c2ca32
@@ -1 +0,0 @@
1
- a7f5037989100ac92ca551a1e1f4f1401e84481ed266eeda6be061feb27f2a17
@@ -1 +0,0 @@
1
- c069d33b739bd0076646e273c51fc0b40c957f8dbe3e104657f758644b0105c5012841c9af067518402f453e875d44ccbbe9cdbec5aa7f92efa93bcb053e79d7