Skip to content

Commit 250e052

Browse files
authored
fix(mobile): upgrade Uniwind and remove local patch (#14597)
1 parent 2a778f7 commit 250e052

6 files changed

Lines changed: 16 additions & 1031 deletions

File tree

‎apps/mobile/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"react-native-worklets": "0.13.0",
128128
"shiki": "4.2.0",
129129
"tailwind-merge": "^3.5.0",
130-
"uniwind": "1.11.0"
130+
"uniwind": "1.12.1"
131131
},
132132
"devDependencies": {
133133
"@effect/vitest": "catalog:",

‎apps/mobile/src/lib/uniwind-platform-variants.test.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { beforeAll, describe, expect, it } from "vite-plus/test";
1010
// `@media ios { ... }` block, and uniwind's CSS processor used to drop the
1111
// block's media queries after its first nested rule. Everything past the first
1212
// utility compiled unguarded and shipped to both platforms. These tests run
13-
// the installed (patched) uniwind compiler over real Tailwind output, per
13+
// the installed uniwind compiler over real Tailwind output, per
1414
// platform, and assert what each bundle receives. The compiler itself runs in
1515
// a plain Node child process (uniwind-platform-variants.fixture.cjs) so no
1616
// test-runner module transforms sit between the test and the shipped code.
@@ -215,11 +215,9 @@ describe("uniwind keeps media rules nested inside class rules attached to the cl
215215
});
216216
});
217217

218-
// The patch file carries three independent uniwind fixes (state/data selector
219-
// variants, the Metro native-styles fingerprint, and this media-query scoping
220-
// fix). Regenerating it for one fix must not silently drop the others — this
221-
// suite exercises the shipped transformer and compiler for the other two.
222-
describe("uniwind patch keeps pre-existing selector and transformer behavior", () => {
218+
// Keep guarding selector variants and the Metro native-styles fingerprint
219+
// alongside media-query scoping when upgrading the installed Uniwind package.
220+
describe("uniwind keeps selector and transformer behavior", () => {
223221
let output: FixtureOutput;
224222

225223
beforeAll(() => {

‎docs/internals/mobile-development.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ shutdown, but a supervisor created after its cleanup runs would escape it. A clo
1717
parent scope also closes late arrivals, preventing interrupted startup or runtime
1818
replacement from leaving a WebSocket alive outside the new registry.
1919

20-
The [Uniwind patch](../../patches/[email protected]) still compiles CSS on Metro
21-
updates so newly used classes are discovered. It skips global style invalidation
22-
only when the generated stylesheet and theme list are unchanged. Skipping compilation
23-
would lose new classes; invalidating every consumer for unchanged output makes an
24-
ordinary component edit refresh the whole app. The fingerprint is recorded only
25-
after initialization succeeds.
20+
Uniwind compiles CSS on Metro updates so newly used classes are discovered. It
21+
skips global style invalidation only when the generated stylesheet and theme list
22+
are unchanged. Skipping compilation would lose new classes; invalidating every
23+
consumer for unchanged output makes an ordinary component edit refresh the whole
24+
app. The fingerprint is recorded only after initialization succeeds.
2625

2726
The [expo-notifications patch](../../patches/[email protected]) protects
2827
`NotificationCenterManager`'s delegates and pending responses with a lock. React runtimes can

0 commit comments

Comments
 (0)