Skip to content

Commit dbe3842

Browse files
authored
chore: upgrade to SDK 54 (#184)
1 parent 15475e8 commit dbe3842

File tree

7 files changed

+206
-295
lines changed

7 files changed

+206
-295
lines changed

example/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
"dependencies": {
1414
"@expo/metro-runtime": "~6.1.1",
1515
"@tailwindcss/postcss": "^4.1.11",
16-
"expo": "54.0.0-preview.16",
17-
"expo-dev-client": "~6.0.10",
16+
"expo": "54.0.0",
17+
"expo-dev-client": "~6.0.11",
1818
"expo-status-bar": "~3.0.7",
19-
"expo-system-ui": "6.0.6",
19+
"expo-system-ui": "~6.0.7",
2020
"react": "19.1.0",
2121
"react-dom": "19.1.0",
22-
"react-native": "0.81.1",
22+
"react-native": "0.81.4",
2323
"react-native-css": "link:../",
2424
"react-native-reanimated": "~4.1.0",
2525
"react-native-web": "~0.21.1",
26-
"react-native-worklets": "~0.5.0",
26+
"react-native-worklets": "0.5.0",
2727
"react-refresh": "^0.17.0"
2828
},
2929
"devDependencies": {

package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,13 @@
192192
"debug": "^4.4.1"
193193
},
194194
"peerDependencies": {
195-
"@expo/metro-config": ">=0.21.8",
196-
"react": "19.1.0",
197-
"react-native": "0.81.1"
195+
"@expo/metro-config": ">=0.21.8"
198196
},
199197
"devDependencies": {
200198
"@babel/core": "^7.28.0",
201199
"@commitlint/config-conventional": "^19.8.1",
202200
"@eslint/js": "^9.30.1",
203-
"@expo/metro-config": "~0.21.11",
201+
"@expo/metro-config": "~54.0.0",
204202
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",
205203
"@tailwindcss/postcss": "^4.1.12",
206204
"@testing-library/react-native": "^13.3.3",
@@ -211,26 +209,26 @@
211209
"@types/react": "^19.1.10",
212210
"@types/react-test-renderer": "^19",
213211
"babel-plugin-tester": "^12.0.0",
214-
"babel-preset-expo": "~14.0.6",
212+
"babel-preset-expo": "~54.0.0",
215213
"commitlint": "^19.8.1",
216214
"eas-build-cache-provider": "^16.4.2",
217215
"eslint": "^9.30.1",
218216
"eslint-config-prettier": "^10.1.5",
219217
"eslint-plugin-prettier": "^5.5.1",
220-
"expo": "54.0.0-preview.16",
218+
"expo": "54.0.0",
221219
"jest": "^29.7.0",
222-
"jest-expo": "~54.0.8",
220+
"jest-expo": "~54.0.9",
223221
"lefthook": "^1.12.3",
224222
"lightningcss": "^1.30.1",
225223
"metro-runtime": "^0.83.0",
226224
"postcss": "^8.5.6",
227225
"prettier": "^3.6.2",
228226
"react": "19.1.0",
229-
"react-native": "0.81.1",
227+
"react-native": "0.81.4",
230228
"react-native-builder-bob": "^0.40.13",
231229
"react-native-reanimated": "~4.1.0",
232230
"react-native-safe-area-context": "5.6.1",
233-
"react-native-worklets": "~0.5.0",
231+
"react-native-worklets": "0.5.0",
234232
"react-refresh": "^0.17.0",
235233
"react-test-renderer": "19.1.0",
236234
"release-it": "^19.0.4",

src/__tests__/compiler/@prop.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test("@prop target (nested @media)", () => {
2525
{
2626
d: [["#00f", ["test"]]],
2727
v: [["__rn-css-color", "#00f"]],
28-
s: [3, 1],
28+
s: [2, 1],
2929
},
3030
],
3131
],

src/__tests__/compiler/compiler.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ test("media query nested in rules", () => {
359359
},
360360
],
361361
m: [[">=", "width", 600]],
362-
s: [3, 1],
362+
s: [2, 1],
363363
v: [["__rn-css-color", "#00f"]],
364364
},
365365
{
@@ -368,12 +368,12 @@ test("media query nested in rules", () => {
368368
[">=", "width", 600],
369369
[">=", "width", 400],
370370
],
371-
s: [5, 1],
371+
s: [3, 1],
372372
},
373373
{
374374
d: [{ backgroundColor: "#ff0" }],
375375
m: [[">=", "width", 100]],
376-
s: [7, 1],
376+
s: [4, 1],
377377
},
378378
],
379379
],

src/compiler/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function extractRule(
236236
mapping = { ...mapping, ...parsePropAtRule(value.rules) };
237237

238238
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
239-
builder = builder.fork("style", value.selectors);
239+
builder = builder.fork("style", value.selectors, mapping);
240240

241241
if (declarationBlock) {
242242
if (declarationBlock.declarations?.length) {

src/compiler/stylesheet.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ export class StylesheetBuilder {
8181
private selectors: SelectorList = [],
8282
) {}
8383

84-
fork(mode = this.mode, selectors: SelectorList = []): StylesheetBuilder {
84+
fork(
85+
mode = this.mode,
86+
selectors: SelectorList = [],
87+
mapping: StyleRuleMapping = {},
88+
): StylesheetBuilder {
8589
this.shared.ruleOrder++;
8690

8791
/**
@@ -101,7 +105,7 @@ export class StylesheetBuilder {
101105
this.options,
102106
mode,
103107
this.cloneRule(),
104-
{ ...this.mapping },
108+
{ ...this.mapping, ...mapping },
105109
this.descriptorProperty,
106110
this.shared,
107111
selectors,

0 commit comments

Comments
 (0)