@radhya/mach 2.0.43 → 2.0.44

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/README.md CHANGED
@@ -155,7 +155,7 @@ With the default `ON_LOAD` behavior, the first cold launch checks for and downlo
155
155
 
156
156
  Command flags always win over config values. For example, `mach ota publish --channel staging --runtime-version 1.2.0` overrides `ota.channel` and `ota.runtimeVersion`.
157
157
 
158
- Runtime precedence is `--runtime-version`, `ota.runtimeVersion`, `ota.runtimeVersionPolicy`, Expo config, then package version fallback. A configured Mach policy therefore replaces stale `runtimeVersion` values left in Expo config. Runtime version is the OTA compatibility boundary: Mach stores it on each build and serves updates only to matching platform/channel/runtime combinations. Build, verify, and publish commands stop when the project-local Expo plugin would embed a different runtime.
158
+ Runtime precedence is `--runtime-version`, `ota.runtimeVersion`, `ota.runtimeVersionPolicy`, Expo config, then package version fallback. A configured Mach runtime or policy replaces stale top-level, iOS, and Android `runtimeVersion` values left in Expo config. Runtime version is the OTA compatibility boundary: Mach stores it on each build and serves updates only to matching platform/channel/runtime combinations. Build, verify, and publish commands stop when the project-local Expo plugin would embed a different runtime.
159
159
 
160
160
  Bare React Native uses the same Expo Updates protocol and the same Mach endpoint as Expo. `mach-react-native` remains reserved for a future Mach-owned native runtime and cannot currently be selected for publishing.
161
161
 
package/docs/ota.md CHANGED
@@ -54,7 +54,7 @@ The default `ON_LOAD` behavior downloads a compatible release on one cold launch
54
54
 
55
55
  ## Runtime compatibility
56
56
 
57
- The native binary and OTA manifest must contain the same runtime version. Mach injects the resolved runtime into Expo config during builds and publishes, and synchronizes it into committed bare native projects before a Mach build. Runtime precedence is command `--runtime-version`, `ota.runtimeVersion`, `ota.runtimeVersionPolicy`, Expo config, then package version fallback. When Mach has a policy, old hardcoded Expo runtime values do not override it.
57
+ The native binary and OTA manifest must contain the same runtime version. Mach injects the resolved runtime into Expo config during builds and publishes, and synchronizes it into committed bare native projects before a Mach build. Runtime precedence is command `--runtime-version`, `ota.runtimeVersion`, `ota.runtimeVersionPolicy`, Expo config, then package version fallback. When Mach has a runtime or policy, old top-level or platform-specific Expo runtime values do not override it.
58
58
 
59
59
  `mach ota verify`, `mach ota publish`, and OTA-enabled Expo builds validate the final resolved Expo URL, channel, and runtime. They stop with a repair instruction if the project-local plugin would embed different values.
60
60
 
@@ -5,6 +5,15 @@ const unique = values => Array.from(new Set(values.filter(Boolean)))
5
5
  const nonEmpty = value => typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined
6
6
  const first = (...values) => values.map(nonEmpty).find(Boolean)
7
7
 
8
+ const withoutRuntimeVersion = platformConfig => {
9
+ if (!platformConfig || typeof platformConfig !== 'object' || !Object.prototype.hasOwnProperty.call(platformConfig, 'runtimeVersion')) {
10
+ return platformConfig
11
+ }
12
+ const nextConfig = { ...platformConfig }
13
+ delete nextConfig.runtimeVersion
14
+ return nextConfig
15
+ }
16
+
8
17
  const sanitizeScheme = value => {
9
18
  const normalized = nonEmpty(value)
10
19
  if (!normalized) return 'app'
@@ -126,6 +135,8 @@ module.exports = function withMachDeepLinks(config) {
126
135
  } else if (ota.runtimeVersionPolicy) {
127
136
  config.runtimeVersion = { policy: ota.runtimeVersionPolicy }
128
137
  }
138
+ config.ios = withoutRuntimeVersion(config.ios)
139
+ config.android = withoutRuntimeVersion(config.android)
129
140
  config.extra.mach = {
130
141
  ...(config.extra.mach || {}),
131
142
  projectId: ota.projectId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radhya/mach",
3
- "version": "2.0.43",
3
+ "version": "2.0.44",
4
4
  "description": "Mach CLI: Cloud Build Orchestrator for React Native & Expo",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",